turn off compression of images when no intermediate image is created turn off compression of images when no intermediate image is created
 

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

turn off compression of images when no intermediate image is created

Started by nickfzx, October 14, 2007, 09:16:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nickfzx

In my gallery I have "Quality for JPEG files" set to 70

I have "Max width or height of an intermediate picture/video" set to 600

I would like to have it so that when an image is uploaded that is under 600x600 and therefore does not have any intermediate image created that the original image is used and not compressed.

Any help would be fantastico  ;D


nickfzx

not on my gallery...this maybe due to me having the modpack installed and sharpening set to thumbnails and intermediate images

gif images seem to be converted and compressed to jpg images as well

attached is an example before and after upload

Nibbler

Coppermine doesn't convert image formats either, so this must be modpack question.

nickfzx


Nibbler


Stramm

sharpening only is possible for thumbs. If you sharpen intermediate images, then you have hanged code.

The modpack needs ro recompress original / fullsized images when you watermark them. Turn off watermarking then.

nickfzx

hey stramm, yep I have watermarking off already

the only hack I have done is this that you actually gave me:

in util.php find
                if (resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], $watermark))
and replace with
                if (resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], $watermark, 1))

apart from that I don't think I've hacked anything else in the upload process.

is it this hack that is causing gif's be converted to jpeg?

Stramm

it sharpens the intermediate image... means it will be recompressed
Undo that modification and see what happens. With my version I can not reproduce what you reported

nickfzx

ok I have found what is doing this

there is an option in config called:

"Auto resize images that are larger than max width or height"

if this is set to Yes then the image is converted to a jpeg everytime and if it is set to no then the original is kept intact

I don't know exactly what this option does, after reading the docs on this option ( http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumbnail ) i still can't really understand exactly what it does.

As this option is not part of the modpack I think that it is not a problem with the modpack.