Square thumbnails with Gallery
Permalink 1 user found helpful
I've just purchased the Marketplace version of the Gallery package. Right now, you can define a maxwidth and maxheight for thumbnails but I'm looking for a way to make the thumbnails square. These would of course need to be a crop inside the image, and not a stretched version of the said image.
"if we tried to crop automatically we'd end up chopping people's faces off and whatnot, no?"
Exactly what I'm looking for. I used to work with Drupal and ImageCache and I cropped the image from the center. It doesn't really matter if you chop a person's face off, it's only a thumbnail.
I can't make the source images square though, the idea is to present the whole image not simply a part of it. That's the role of a thumbnail.
Exactly what I'm looking for. I used to work with Drupal and ImageCache and I cropped the image from the center. It doesn't really matter if you chop a person's face off, it's only a thumbnail.
I can't make the source images square though, the idea is to present the whole image not simply a part of it. That's the role of a thumbnail.
I think I'll try modifying the code so that it'll show the thumbnail in a div with a set width and height. I'll make the thumbnail slightly bigger than needed, and have the overflow set at hidden.
made it clear you meant crop not scale:
http://www.concrete5.org/index.php?cID=10447...
http://www.concrete5.org/index.php?cID=10447...
Alright thanks!
I think it'd be nice to have the option to choose whether or not the thumbs should be cropped. This comes in handy depending on the design. I do understand your point about heads though. ;)
In the meantime I'll try hacking it and see if it works.
I think it'd be nice to have the option to choose whether or not the thumbs should be cropped. This comes in handy depending on the design. I do understand your point about heads though. ;)
In the meantime I'll try hacking it and see if it works.
In case anyone comes across this discussion and is looking for this functionality, there is a new image gallery in the marketplace that will do automatic cropping of thumbnails:
http://www.concrete5.org/marketplace/addons/deluxe-image-gallery/...
http://www.concrete5.org/marketplace/addons/deluxe-image-gallery/...
the only other way I could imagine doing it is let you upload/customize a thumbnail for the image - keeping your big images rectangles and your small thumbs square.... if we tried to crop automatically we'd end up chopping people's faces off and whatnot, no?