I want to be able to allow users to upload images to my website via a php script, while taking appropriate actions to reduce/optimize large images.
-I want the script to be able to resize (proportionately) any uploaded image whose height is more than 300 or whose width is more than 400.
-At that point, if the image size (bytes) is larger than 30k, then the image quality should be reduced (80 quality?).
-Uploaded images will be saved to /img directory. Files names can just be the unix timestamp (number of seconds since 1970?). For example: [url removed, login to view]
-In addition, I want it to simultaneously save a thumbnail pic of approximately 20pixels. The name for that file can be the same plus '-a'. For example: [url removed, login to view]
-IDEAL (not required, but desired): I would like the large image to have some text placed on it in the lower left corner that says "Image hosted by [url removed, login to view]" (to be replaced with my site name).
I am open to use of a recent GD Library or installation of free/inexpensive software (is ImageMagik free?).
Should be commented so I can understand what it's doing - in case I need to make changes.
Looking for simple (as possible), efficient code.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.