class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
There is an explanation to why sizes differ so much when handling JPG compression. The content of an image is based on x times y pixels ofcourse but a jpg compression looks at how a picture is built. Example is if a JPG has a lot of Blue sky or large bodies of very close resembling colour pixels like night snow or any other large body it can thereby resize (ZIP) it much more than a detailed rich picture. In the example of the sky it can go ahead and group the thousands of near blue or cyan pixels and instead of letting each single pixel have its own RGB value (220,200,255) like PSDs, TIFS ect, in can save space by grouping in to Example: 26x(220,200,255), 88x((227,140,255), 4x(220,233,252) etc etc.... Thats why we see some jpgs larger or smaller than others. Kind regards Sofus Comer, DenmarkReply
Kind regards Sofus Comer, Denmark