Reply to Re: image_resize and JPEG filesize

Re: image_resize and JPEG filesize new!
by colin, 16 years, 2 months ago
It is currently not possible to avoid calculation if the uploaded image has already the dimensions that you want to resize it to.

However, the class provides some information about the image, before calling process(). Available are image_src_x, image_src_y and the newly introduced image_src_bits, image_src_pixels and image_src_type. Using these, you can process the picture differently.

For your second question, if you use $handle->image_convert = ' jpg ';, then all images will be converted to JPEG.
If you want to restrict to JPEG only, use:
$handle->allowed = array('image/jpg','image/jpeg');
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important