how to stop the process ?

See all posts Reply

how to stop the process ? new!
by michel, 16 years, 8 months ago
Hello,

I would like to be able to stop the treatment of the picture when it is oriented in portrait way instead as landscape.

How is it possible to refuse a portrait image to be uploaded ?
More generaly, how to stop the process if the file is not convenient (size, weight, ratio, etc...) ?Reply
Re: how to stop the process ? new!
by colin, 16 years, 8 months ago
You can use the folllowing constraints:
image_max_width
image_max_height
image_max_pixels
image_max_ratio
image_min_width
image_min_height
image_min_pixels
image_min_ratio

You can also do this with a little bit of coding. Instantiate the class first, and then if $foo->uploaded == true, you can read the following variables:
image_src_x
image_src_y
image_src_bits, 
image_src_pixels
image_src_type
Then, you can call $foo->process() with different parameters, depending on the variables above.

Note that this will not work if open_basedir restrictions are in place.Reply