How to crop all images to 1x1 ratio (square)?

0
I suppose this can be done during the upload process with the same file that creates static thumbnails but I am not sure how. (I haven't looked at the code yet).

An alternative would be to modify the modules to resize and display images as a square, hiding any overflow either vertically or horizontally.

Has anyone does this with their site? I prefer to have some conformity with images displayed throughout the component/modules and these methods are the only means I can think of to accomplish this.
Responses (4)
  • Accepted Answer

    greengeek
    greengeek
    Offline
    Friday, January 20 2012, 08:35 AM - #Permalink
    0
    I did it the long slow painful way by editing all my images to ensure they are all square. I also modified all my images to be 500x500 when possible, and 72dpi jpgs.

    The downside about doing this via the software automatically is that to take a rectangle image and make it a square you will have to distort the image. Either it will need to appear to be cropped which will make part of the image not show up or you would have to drop maintaining the ratio and squeeze that rectangle into a square, making the image all distorted.


    For batch renaming images I use FastStone Photo Resizer
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 20 2012, 05:06 PM - #Permalink
    0
    there is also one thing you can try: if you're not afraid of coding, you can simply change the THUMBNAIL link created automaticaly

    on the file /helpers/helpers.php

    if you find the function getThumbnailSrc

    you just need to set

    $height = $width ;

    at the beginning of the function. do you know what I mean?

    only coders!!! ;)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 20 2012, 05:13 PM - #Permalink
    0
    Yes! At the function level is what I meant. I'll try this later this evening. Typically when I modify code I add:



    I have already modified the function that creates static thumbnails but I cannot find my markers. Very odd.

    Anyway, your answer helps quite a bit.

    Thank you.

    Moni
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 20 2012, 10:56 PM - #Permalink
    0
    Germi, I just added what suggested and it works perfectly!

    Thank you!

    Moni
    The reply is currently minimized Show
Your Reply