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.
That's right. It is why I use the aforementioned method, in order to estimate the best size. We do three tries, and then use the results to calculate the best compression ratio.
It is only an estimate, and fringe cases may be wrong. But since there is no way to calculate precisely the compression in regard to the size, we attempt to get as close as possible.Reply
It is only an estimate, and fringe cases may be wrong. But since there is no way to calculate precisely the compression in regard to the size, we attempt to get as close as possible.