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

    Is it possible to have MaxiGallery set the images to a specific size. For example, lets say we crop it to 200x200. If I upload a portrait image of say, 600x800. Is it possible for MG to crop the image so that it is 200 x 200 without it looking stretched?

    Thanks
    Lee
      http://www.blend.uk.com | Web Design by Blend
      • 7923
      • 4,213 Posts
      No.

      EDIT: Unless you modify MaxiGallery code, take a look at the createthumb() function in maxigallery.class.php and the /watermark/Thumbnail.class.php file.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17717
        • 433 Posts
        Informative... laugh

        Thanks for your help.

        Lee
          http://www.blend.uk.com | Web Design by Blend
          • 17717
          • 433 Posts
          I need this for another job now, can’t help but think how useful it would be, actually, as I typing this I have just thought of an idea, what if we set the thumbnail to a larger size, and then the set li img tag to crop to a particular size using the overflow tag, might work...

          Thanks
          Lee
            http://www.blend.uk.com | Web Design by Blend
            • 10449
            • 956 Posts
            Quote from: lw-d at Apr 19, 2007, 09:21 AM

            For example, lets say we crop it to 200x200. If I upload a portrait image of say, 600x800. Is it possible for MG to crop the image so that it is 200 x 200 without it looking stretched?

            How do you know which area needs to be included in the crop? the center? top-left corner? bottom right corner? The danger with just taking a part of an image to represent the whole original sized image is that the script doesn’t know what the "interesting" area is. Often @ flickr I’m annoyed that thumbs don’t show the really interesting part of an image, but something from the border/background instead...
              • 17717
              • 433 Posts
              Couldn’t agree more, however, for my purpose, it seems to work quite well. It would be impossible at the minute to add custom id’s to each image to position.

              Maybe somebody has a better alternative for us all.

              Thanks
              Lee
                http://www.blend.uk.com | Web Design by Blend
                • 7923
                • 4,213 Posts
                Unfortunately I’m not going to do anything to this until I implement phpThumb to maxigallery, because it can handle the cropping.. but you could try that your idea to make bigger thumbnails and crop via css.. sounds easy enough.


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 17717
                  • 433 Posts
                  Look forward to seeing phpThumb implementation. The CSS workaround works well for my needs, as ganeshXL mentioned, you don’t have full control over the area to mask.

                  Thanks
                  Lee
                    http://www.blend.uk.com | Web Design by Blend