Hello,
I’ve been using imagecreatefromjpeg to regenerate an existing image. However, I do not want the quality to be changed during this process.
This is what I currently have:
[code=php]
$imagepath = http://site.com/path/to/image.jpg;
$image = imagecreatefromjpeg($imagepath);
header(‘Content-Type: image/jpeg’);
imagejpeg($image);
Which, as you can see, is a basic use of imagecreatefromjpeg. However, the quality is greatly diminished after this process. Is there a way to keep the quality at the same level as the original (100%)? Or is there an alternative function I can use on existing images, not to resize or anything?
I’ve been googling for hours over this and haven’t been able to find any solid answers, except a hint that “imagejpeg” might be a possibility, but from what I’ve found it’s not for existing images…?
I would really appreciate any help I can get.
Thanks!