How can this be accomplished? The customer requires to take a picture in the post of the page, then to resize and store it to server. All using PHP and JSON.
Asked
Active
Viewed 42 times
-4
-
1Have you tried anything? Or nothing at all? :| – Gynteniuxas Apr 21 '18 at 07:59
-
[Imagick is a native php extension to create and modify images using the ImageMagick API.](http://php.net/manual/en/book.imagick.php) – deEr. Apr 21 '18 at 08:01
-
You say it's native, but do I need to install a dll? – user1238784 Apr 21 '18 at 08:05
-
I find extremely complicated to setup the imagemagick api and to extract the imagemagick archives. I would need a step by step from someone that has already done that. thanks – user1238784 Apr 21 '18 at 08:27
-
This package: [intervention/image](https://packagist.org/packages/intervention/image) – Rambarun Komaljeet Apr 21 '18 at 08:05
1 Answers
2
Well you can check the file size from using $_FILES
[file] => Array
(
[name] => MyFile.jpg
[type] => image/jpeg
[tmp_name] => /tmp/php/php6hst32
[error] => UPLOAD_ERR_OK
[size] => 98174
)
and regarding image resize you can refer "Resize image in PHP"

Aman jaura
- 201
- 3
- 15