There is any possibility to zoom an image in php? I've searched on google but nothing util found.
If someone has any tips please give it to me. Thank you
There is any possibility to zoom an image in php? I've searched on google but nothing util found.
If someone has any tips please give it to me. Thank you
use imagemagic
$geometry = '142x106';
$resize_geo = $geometry.'^';
$crop_geo = $geometry.'+0+0';
`convert $pic_original_path -resize $resize_geo -gravity Center -crop $crop_geo $pic_resized_path`;
If you follow the imagecopyresampled php example (and make it large instead of smaller - (smaller is demonstrated in the php.net example), and if you are PASSING a js variable, then you would get something like the following php:
However, I should point out that you should be careful when working with file types such as images and I would advise that you put in some error handling to check that the file is an image at the start (preferably when you upload the image to begin with, if you are uploading the images via a website).
If you're working with pre-uploaded images that you have uploaded on the server, then you should be good to go.