Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: huge file size for intermediate (normal_) images  (Read 2989 times)

0 Members and 1 Guest are viewing this topic.

rivers

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
huge file size for intermediate (normal_) images
« on: December 17, 2007, 04:20:38 pm »

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


« Last Edit: December 18, 2007, 08:00:59 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: huge file size for intermediate (normal_) images
« Reply #1 on: December 17, 2007, 05:38:14 pm »

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

Nibbler

  • Guest
Re: huge file size for intermediate (normal_) images
« Reply #2 on: December 17, 2007, 05:57:02 pm »

Did you adjust the quality setting in config?
Logged

rivers

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: huge file size for intermediate (normal_) images
« Reply #3 on: December 17, 2007, 06:46:59 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. 








Logged

Nibbler

  • Guest
Re: huge file size for intermediate (normal_) images
« Reply #4 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
Logged

rivers

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: huge file size for intermediate (normal_) images
« Reply #5 on: December 17, 2007, 08:25:00 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
Logged

rivers

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: huge file size for intermediate (normal_) images
« Reply #6 on: December 17, 2007, 08:27:48 pm »


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


Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.