Improved image quality

To improve image quality when writing the jpg file you can specify the quality of the jpg image. The default looks like about 75% quality, but if you change to 95% there is very little difference than the original image.

Change the section:

// Send the image
header('Content-type: image/jpeg');
imagejpeg($image);

to:

// Send the image
header('Content-type: image/jpeg');
imagejpeg($image,null,95);

Submitted by nzwhost on Sat, 2008-06-14 10:03.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

About Us

NZ Web Hosting Internet Technolgies Blog.

Website design, website development, promotion and search engine optimisation.