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.
You can use only one image_ratio..... parameter at the same time.
If you have an area of any size, and want to make it fit within 197x70, you have two alternatives:
1. You make it fit within 197x70, the area is resized proportionally, but the image will not fill all 197x70 (there may be some space on the sides or top and bottom). You would do:
2. You make it fit within 197x70, the area is resized proportionally, and the image will not fill all 197x70 (some parts of the area will be cut off so that the proportional image fits in 197x70). You would do:
You don't understood me. Sorry about my bad english.
I use a tool called jsCropper. With this tool, after some settings, I can select a region of a picture of any size. This region's area is always proportional to 197x70 pixels, but can be bigger or samaller than 197x70.
This is a picture of application: http://img156.imageshack.us/my.php?image=cropperij3.png
So, the point is: how can I work ONLY with the selected region and resize this region to the final size that will be ALWAYS 197x70?
Again, sorry about my bad english. I realy need an english course... :)Reply
I see what you mean. You will have to use the new dev version 0.27RC1. This version adds a parameter called image_precrop, which works as image_crop except that it crops the image before any resizing.
Here is how your code should look like with 0.27RC1:
If you have an area of any size, and want to make it fit within 197x70, you have two alternatives:
1. You make it fit within 197x70, the area is resized proportionally, but the image will not fill all 197x70 (there may be some space on the sides or top and bottom). You would do:
2. You make it fit within 197x70, the area is resized proportionally, and the image will not fill all 197x70 (some parts of the area will be cut off so that the proportional image fits in 197x70). You would do:
I use a tool called jsCropper. With this tool, after some settings, I can select a region of a picture of any size. This region's area is always proportional to 197x70 pixels, but can be bigger or samaller than 197x70.
This is a picture of application: http://img156.imageshack.us/my.php?image=cropperij3.png
So, the point is: how can I work ONLY with the selected region and resize this region to the final size that will be ALWAYS 197x70?
Again, sorry about my bad english. I realy need an english course... :)
Here is how your code should look like with 0.27RC1:
Note that you don't need any image_ratio... here, as your selected area will always be proportional to 197x70.
Thanks!