I need to create a PHP photo processing class, I know that there are many that already exist for the public, but I need to build one to do what I need, and nothing more and nothing less.
I need my class to do this ...
1)
I create a new instance of my class, and I pass in either the URL of the photo or the path to the local photo that is uploaded using the POST form.
2)
Then I need to take the main image and check its size, if it is wider than 800 pixels, I need to resize it, if it is not wider than 800, then I just leave it
3)
Now we need to create two sketches to fit this image, if we resize the image to 800 pixels, then we use this image to create thumbnails, otherwise we will make our thumbnails from the original image.
4)
Then we update several database records
Then completed.
I know that this is not so difficult, but I need to build it with the best performance, for example, if the user uploads a 2 MB photo, I donโt want to depend on memory and continue to create thumbnails from this photo if we have already made a smaller image. I think then he should use a smaller image to create thumbnails.
, GD imagemagick. , , , , ? , IMO, .