I have some code to do resizing of a single image for various purposes. Here's my class extending Image:
class OutfitPage_OutfitImage extends Image {
function generateOutfitImage($gd) {
$gd->setQuality(100);
return $gd;
}
}
This function here was just to test something. Does GD do default background processing of the image, e.g. when resizing etc.? I ask as when I present both the edited/resized image on a page along with the same image "accessed directly" (using src=assets/Uploads/image.jpg) they are different file sizes as reported by the browser, and there are obvious image artefacts - even with the function above supposedly setting the quality to 100%.
It seems to be resampling the whole image, and with a poor jpeg algorithm, no matter what.
Have I got this right? Is there a way around this?
Thanks :)