Advanced search  

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]

Pages: [1]   Go Down

Author Topic: turn off compression of images when no intermediate image is created  (Read 5246 times)

0 Members and 1 Guest are viewing this topic.

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285

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
Logged

Nibbler

  • Guest
Re: turn off compression of images when no intermediate image is created
« Reply #1 on: October 14, 2007, 09:36:05 pm »

This already happens.
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: turn off compression of images when no intermediate image is created
« Reply #2 on: October 14, 2007, 09:42:55 pm »

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
Logged

Nibbler

  • Guest
Re: turn off compression of images when no intermediate image is created
« Reply #3 on: October 14, 2007, 09:49:39 pm »

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

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: turn off compression of images when no intermediate image is created
« Reply #4 on: October 14, 2007, 09:52:29 pm »

ok so shall I start a topic in the modpack forum?
Logged

Nibbler

  • Guest
Re: turn off compression of images when no intermediate image is created
« Reply #5 on: October 14, 2007, 09:54:25 pm »

I already moved this one. Continue here.
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: turn off compression of images when no intermediate image is created
« Reply #6 on: October 14, 2007, 09:54:36 pm »

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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: turn off compression of images when no intermediate image is created
« Reply #7 on: October 14, 2007, 10:00:21 pm »

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
Code: [Select]
                if (resize_image($work_image, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], $watermark)) and replace with
Code: [Select]
                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?
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: turn off compression of images when no intermediate image is created
« Reply #8 on: October 14, 2007, 11:15:46 pm »

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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: turn off compression of images when no intermediate image is created
« Reply #9 on: October 14, 2007, 11:30:18 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.