huge file size for intermediate (normal_) images huge file size for intermediate (normal_) images
 

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

huge file size for intermediate (normal_) images

Started by rivers, December 17, 2007, 04:20:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rivers

Problem:
Intermediate images have HUGE file size.  Larger than original.  Actual example:

original.png33k417x379px
normal_original.png175k399x363px
thumb_original.png15k99x90px


Details:
All original images are PNG.  Using ImageMagick.  Max dimension of intermediates set to 400px (but intermediates and thumbs always seem to be 1px less than max setting).  Using CPGmassimport.  Linux.


Thanks



Joachim Müller

Post real world examples, i.e. deep links to a set of files.

Nibbler


rivers

Quote from: Nibbler on December 17, 2007, 05:57:02 PM
Did you adjust the quality setting in config?

The menu and documentation specify that this option relates to "Quality for JPEG files", but my issue is with PNG files.  JPEG files are working perfectly under my install. 

But I tried this anyway.  Reduced quality from 80 to 75 and the intermediate file got even BIGGER (huge actually - like 7x the original PNG file size).

I tested with GD1 and PNG intermediates were created perfectly with small file sizes.  This seems to be an issue with ImageMagick,  so I will try to find solution on ImageMagick forums somewhere.  Probably some command line settings. 

Thanks again.  Will post if I can resolve.


p.s. Separate issue, but related:  I noticed that intermediates are not created if the setting "Max width or height of an intermediate picture/video" is greater than that of the original source file.  CPG would not create an intermediate with "Max width or height = 400px" if my PNG file was only 300x300px.  This behaviour was not documented anywhere I could find.  This was very confusing while trying to resolve the above ImageMagick problem. 










rivers

Quote from: Nibbler on December 17, 2007, 07:07:16 PM
Check the IM manual for what quality means for PNG files.

http://www.imagemagick.org/script/command-line-options.php#quality


Thanks.  The appropriate compression settings made minimal difference, but the problem is largely solved with "-colors 256".  This greatly reduced the image sizes.

This brings up a problem though.  If I add thousands of JPEGs and PNGs simultaneously using CPGmassimport, when intermediates and thumbs are created using ImageMagick, the "JPEG Quality" setting in the Admin panel is applied in different ways to each file type.  If I want Quality=85 for JPEgs, I have to use that same setting for the PNGs as well, even though for PNGs it means a completely different thing.  And I only want the "-colors 256" switch applied to PNGs, not JPEgs.

Is there any better way of doing this?


Thanks

rivers


Oops, I think this solves it:

Mass import the PNG's and JPEGs in separate batches using different Quality and ImageMagick switches for each.

Thansk