lost quality lost quality
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

lost quality

Started by exichlo, January 03, 2006, 12:11:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

exichlo

Hi

Why after uploading the pictures (.gif) into my gallery, the quality of the picture get worse... lots of dots? Did I do something wrong or should I config it somehow?

Thanks

ecto

Lots of dots? Do you mean on the thumbnails or in the original image? Please post a link to your gallery.

exichlo

http://eshop.pandela.net/index.php

The pictures looks very poor although the original is much better. Please help

whmeeske

Quote from: exichlo on January 03, 2006, 12:13:29 PM
The pictures looks very poor although the original is much better. Please help
Which tool do you use for making the thumbnails, GDx or ImageMagick?
I see your images are GIF's. I'm not sure that you get the same quality using GDx or ImageMagick with GIF's or JPG's.
I have mostly JPG's in my gallery and I'm satisfied with whe picture quality.

I'm interested if other CPG users can give more usefull information about this issue.

Joachim Müller

GIFs have a reduced color palette (that's the nature of GIFs, they have a max color depth of 256 colors). When such a GIF get's resized, the results often look bad due to the dithering algorhythms. There's little you can do about this except manually creating the thumbnails on your client and uploading them manually.

ecto

exichlo, it is not strange at all that the quality of your intermediate pics are a bit worse than the original, because:



  • First of all, you have bad quality images from the beginning. The GIF file format can only display 256 colors, which makes it very unsuitable for pictures. GIF is made for images with few colors and repeating colors, like type, small buttons and such. For example, the buttons here in the forum are GIF files.


  • When Coppermine genereates the intermediate pictures, it does so by taking the original image and making a JPEG out of it. As JPEG is a lossy image file format, the intermediate image will inevitably be of lesser quality than the original. JPEG works (roughly) like this: it finds parts of the image that look alike and make single-colored "blocks" out of them. The less color information from the beginning, the bigger and uglier these blocks will be. This is especially true when the original image is of bad quality (has too little color information), which your images do.

What I suggest you do:


  • Use good quality JPEG images from the beginning instead of GIFs! JPEG is made for displaying pictures like yours, GIF is not!

  • If that by some reason is impossible, and since the file dimensions of your original images are not very much bigger than the intermediate ones, I suggest you crank up the "Max width or height of an intermediate picture/video" in your config so that it's the same or higher than your original images (or turn off "Create intermediate pictures"). That way the displayed image will be your original GIF file and not a JPEG file with even worse quality.

  • Or, if you don't want to change the size of the intermediate image, you could resize your images (keeping them as GIFs not to lose quality) to be within the allowed file dimensions.

  • If that too isn't an option (!?), you could try changing from GD2 to ImageMagick and see if it makes any difference, although I highly doubt it as going from a bad GIF image and compressing it to a JPEG (almost) always is a really bad idea.

  • Related to the last suggestion, you could crank up the "Quality for JPEG files" in your config. But as it is already at 80, which should do just fine when resizing a good JPEG image, I highly doubt that you'll see any difference except your file sizes being bigger.

As to why Coppermine makes JPEG intermediates from GIF originals, I don't know if it's by design or by some limitation in GD. And about the GD vs. ImageMagick issue - From what I've read there's not that much of a difference between the two. It simply seems that some prefer GD and some prefer ImageMagick. Search these forums and Google and you'll find more answers and opinions.

Happy resizing  8)