We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15734
    • 70 Posts
    Hi,

    This may be a simpleton question but I am using MG 0.6 with smoothGallery and external infozones and carousels. I got that working but I’m having an issue with the height and width of the normal images. When I use a &max_pic_size=`400` I get a 400px x 400px div with the image in the top, center not an image resized to 400 px at the largest dimension with the other dimension proportional. How can I get MG and SG to make a proportional image with a maximum large dimension? Or is that even possible?

    Thanks,

    Kevin
      • 7923
      • 4,213 Posts
      Image resizing is done on upload. You have to re-upload the images if you change the image size parameters.

      With using phpThumb in MaxiGallery, you can set the picture size in templates and it generates the picture on the fly and saves it to cache. If you change picture size parameters, it generates the picture again.



        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 15734
        • 70 Posts
        Hi Doze,

        Thanks for the reply. It’s not so much resizing the image it’s the fact that the &max_pic_size creates a div that’s square. In other words if I set it to &max_pic_size=`400` my div (the one embedded in the header of the page) looks like this:

        #myGallery73, #myGallerySet73
        			{
        			width: 400px;
        			height: 400px;
        			z-index:5;
        			display: none;
        			}


        If i set it to &max_pic_size=`400x200` the code looks like this:

        #myGallery73, #myGallerySet73
        			{
        			width: 400x200px;
        			height: 400x200px;
        			z-index:5;
        			display: none;
        			}


        That doesn’t work at all.

        I’d rather the div not have any height or width at all and the image or the div’s content determine it’s size.

        Perhaps I’m not getting this at all. I’m certainly no CSS genius. I’ve messed around a lot to try to get it to work but to no avail. Any advice would be great.

        Cheers,

        Kevin
          • 7923
          • 4,213 Posts
          You can configure those with &smoothgallery_width and &smoothgallery_height parameters. See the available parameters from MaxiGallery wiki page.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 14779
            • 256 Posts
            I think I am having a similar issue.
            Here is my call:

            [!MaxiGallery? &display=`embedded` &embedtype=`smoothgallery` &smoothgallery_carouselElement=`carousel` &smoothgallery_useExternalCarousel=`true` &smoothgallery_showArrows=`false` &customFields=`tags` &smoothgallery_preloader=`true` &debug=`0` &smoothgallery_timed=`true` &smoothgallery_delay=`3000` &asmoothgallery_embedLinks=`false` &smoothgallery_fadeDuration=`200` &smoothgallery_showInfopane=`true` &smoothgallery_embedLinks=`false` &smoothgallery_carouselMaximizedOpacity=`1.0` &bigimg_linkstyle=`lightboxv2` &big_watermark_type=`text` &smoothgallery_carouselMinimizedOpacity=`1.0` &smoothgallery_embedLinks=`true` [b]&smoothgallery_height=`900` &smoothgallery_width=`874` !][/b]


            Notice at the end in bold I set the width and height. The problem is when I upload images, they are resived to 450px wide. When viewed, the are centered at the top o the slideshow, surrounded on three sides by a grey line. Screenshot is attached.
              PM me to find out how you can get a FREE ipad 2!
              • 7923
              • 4,213 Posts
              Yes, Images are resized to 450px by default. You can set the size with &max_pic_size parameter. See MaxiGallery wiki!


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 14779
                • 256 Posts
                I set the &max_pic_size=`650x488`, but I now get a Fatal Error. Below is my call, and the error:

                [!MaxiGallery? &display=`embedded` &embedtype=`smoothgallery` &smoothgallery_carouselElement=`carousel` &smoothgallery_useExternalCarousel=`true` &smoothgallery_showArrows=`false` &smoothgallery_preloader=`true` &debug=`0` &smoothgallery_timed=`true` &smoothgallery_delay=`6000` &smoothgallery_fadeDuration=`200` &smoothgallery_showInfopane=`true` &smoothgallery_embedLinks=`true` &bigimg_linkstyle=`lightboxv2` &max_pic_size=`650x488` !]


                Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 7680 bytes) in /home/tmlp/public_html/assets/snippets/maxigallery/watermark/Thumbnail.class.php on line 183
                  PM me to find out how you can get a FREE ipad 2!
                  • 26931
                  • 2,314 Posts
                  Hi there,

                  Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 7680 bytes) in /home/tmlp/public_html/assets/snippets/maxigallery/watermark/Thumbnail.class.php on line 183

                  have a look at the MaxiGallery Wiki, under "important note" http://wiki.modxcms.com/index.php/MaxiGallery
                    • 7923
                    • 4,213 Posts
                    Also note that maxigallery resizes images containing aspect ration.

                    &max_pic_size=`650x488`

                    Above setting means that MaxiGallery resizes image so that maximum width is 650 and maximum height is 488. It does not crop it to that specific size.

                    If you want that each picture will become exactly that size, no matter what the aspect ratio of the uploaded picture is, you can use phpThumb together with MaxiGallery and use the Zoom Crop function of phpThumb.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 14779
                      • 256 Posts
                      The 650x488 size is the same aspect ratio as the images I am uploading.

                      The problem is that without the max_pic_size set, I can upload several 2MB pictures at once. When I set the max_pic_size, I can’t even upload a single 800kb image.

                      My php settings are as follows:

                      max_execution_time 60
                      max_input_time 90
                      memory_limit 12M
                      post_max_size 8M
                      upload_max_filesize 8M

                      This is the latest error:
                      Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 7680 bytes) in /home/tmlp/public_html/assets/snippets/maxigallery/watermark/Thumbnail.class.php on line 183
                        PM me to find out how you can get a FREE ipad 2!