new square behaviour
ak - May 6, 2006 - 09:33
| Project: | Image Exact Sizes |
| Version: | HEAD |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
hi there,
first i realy like this module it comes in very handy, thanx a lot. I've got an idea for a slightly differnet behaveiour to get the images square. it would be a nice new feature for this modul. instead of croping the image to fit in a square we could just scale the image in to a square outline and center the image in to that square. it's kinda like when you preview a image in the windows explorer. i think this snipped is allready trying to approach this effect, allthough i wasn't able to get it to work in drupal 4.7, but it could be a starting point. would be nice as a option, a radiabutton in this module. what do you think?

#1
I think that this would be quite an elegant solution to a problem that can be a pain at the best of times. Constrain the long side of the image to a set size, e.g. 200 pixels, keeping the image in proportion, and adding padding either side of the short side to keep the image square, e.g. 200 x 200 pixels. There would be no cropping problems or problems with images looking oddly proportioned. I would definitely use this feature.
#2
You can do that with CSS. There's no need to mess with the image file at all.
#3
Please correct me, but if I don't use tables I think it's difficult to do. I've got my image in a div thats fixed, lets say 200x200 px. For aligning a vertical image in the center of my div container I may could use text-align: center; but if I want to align horizontal image to center vertical theres no attribute I know that could do this because vertical-align can only be applied to tabels. Did I mention that nobody likes tabels anymore. Am I wrong or do you know a other solution.
#4
It's true that vertical-alignment is hard, but I've not seen a photo gallery design that used vertical alignment. Most good-looking photo gallery layouts normalize the image size by cropping, which is what this module is intended to do.
If you feel you must make a module that creates a regularly-sized image file by adding some kind of blank padding, it's easy enough to do. Just read up on the GD and Imagemagik PHP commands and hack away.
#5
Hi josh,
thanx for your quick response. You're right, the most do that, but what the most do doesn't mean much. In my case I am bulding up a gallery for a photographer and her hart aches when I would crop her images. Never the less they must line up symmetric. The default line up is a bit odd. On the other hand I think it looks quite nice and clean on windows when you preview thumbs.
I think, I feel I must hack it away. Good to know that it's easy to do but it may take some time for me to read and hack this up (weeks ...). If I'm successfull I'll be back again with a patch to extend your modul. Fingers crossed.