class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I'd like to be able to check what is larger x value or y value of theimage then scale to a particular size based on determined sizes. Say it's x=300 y=400 Then I'd like to scale x to 100
x=400 y=300 scale y to 100 and then crop to a 100x100 square.
Is it possible, and if yes, what are the steps?Reply
I am not too sure I understand what you mean. Maybe using image_ratio_crop would help. Maybe you can generate two thumbnails, and choose one or the other after the upload has taken place.Reply
image_ratio_crop is available in the version 0.21 Release Candidate, that you can find here. More info here.
image_ratio_crop resizes an image, conserving the original sizes ratio, using image_x AND image_y as maximum sizes, and cropping excedent to fill the space.Reply
x=300
y=400
Then I'd like to scale x to 100
x=400
y=300
scale y to 100 and then crop to a 100x100 square.
Is it possible, and if yes, what are the steps?
Needs something like this:
image_ratio_crop resizes an image, conserving the original sizes ratio, using image_x AND image_y as maximum sizes, and cropping excedent to fill the space.