Linux png compression issue

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Linux png compression issue

Post by fmw42 »

ONE LAST TIME:

I think you may need to post your full input jpg and your full two output png IMAGES, so the PNG developer can try to reproduce the problem or some of us can test ourselves. You can upload to some free hosting service that won't change the image, such as dropbox.com and put the URLs here so we can download them.
Myrecs
Posts: 12
Joined: 2017-08-17T15:41:13-07:00
Authentication code: 1151

Re: Linux png compression issue

Post by Myrecs »

Last edited by Myrecs on 2017-08-21T13:30:09-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Linux png compression issue

Post by fmw42 »

Your centos result points to the same image as your window link. At least they have the same names. Please fix the links.
Myrecs
Posts: 12
Joined: 2017-08-17T15:41:13-07:00
Authentication code: 1151

Re: Linux png compression issue

Post by Myrecs »

sorry, updated
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Linux png compression issue

Post by fmw42 »

Your two resulting png images are identical according the pixel data in the images and only marginally different from the jpg (<0.7% different).

Code: Select all

compare -metric rmse test.jpg test_res_win.png null:
446.814 (0.00681794)

Code: Select all

compare -metric rmse test.jpg test_res_cent.png null:
446.814 (0.00681794)

Code: Select all

compare -metric rmse test_res_win.png test_res_cent.png null:
0 (0)

There are some slight difference in the PNG specific meta data that are likely due to different versions of libpng.

None of your images contain sRGB profiles. Thus different viewers may display them differently and this may be due to what PNG meta data is included.

I would recommend you consider upgrading your libpng delegates to the same or current levels.
Myrecs
Posts: 12
Joined: 2017-08-17T15:41:13-07:00
Authentication code: 1151

Re: Linux png compression issue

Post by Myrecs »

So you think that metadata causes the size? But what does compression parameter mean, that was in output i provided?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Linux png compression issue

Post by fmw42 »

Myrecs wrote: 2017-08-21T15:53:43-07:00 So you think that metadata causes the size? But what does compression parameter mean, that was in output i provided?
Sorry, I misunderstood what was the issue. I thought you were saying they looked different. I did not re-read your original post. I apologize.

Here are the verbose information from both images:

Code: Select all

Image: test_res_win.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 2560x1600+0+0
  Resolution: 37.79x37.79
  Print size: 67.7428x42.3392
  Units: PixelsPerCentimeter
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 4096000
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 157.418 (0.617326)
      standard deviation: 77.0849 (0.302294)
      kurtosis: -1.48971
      skewness: -0.190849
      entropy: 0.951776
    Green:
      min: 2 (0.00784314)
      max: 255 (1)
      mean: 151.313 (0.593385)
      standard deviation: 75.7857 (0.297199)
      kurtosis: -1.50401
      skewness: -0.0300933
      entropy: 0.954262
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 91.4319 (0.358557)
      standard deviation: 93.8192 (0.367919)
      kurtosis: -1.13846
      skewness: 0.697618
      entropy: 0.892503
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 121.612 (0.476911)
      standard deviation: 87.8382 (0.344464)
      kurtosis: -1.49354
      skewness: 0.0249376
      entropy: 0.932847
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 2560x1600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    comment: CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90

    date:create: 2017-08-21T11:35:21-07:00
    date:modify: 2017-08-21T11:35:21-07:00
    exif:Artist: [CooL GuY] {{a2zRG}};World4free.in
    exif:Copyright: [CooL GuY] {{a2zRG}}
    exif:ExifOffset: 2236
    exif:ImageDescription: [CooL GuY] {{a2zRG}}
    exif:Make: [CooL GuY] {{a2zRG}}
    exif:Model: [CooL GuY] {{a2zRG}}
    exif:WinXP-Author: 91, 0, 67, 0, 111, 0, 111, 0, 76, 0, 32, 0, 71, 0, 117, 0, 89, 0, 93, 0, 32, 0, 123, 0, 123, 0, 97, 0, 50, 0, 122, 0, 82, 0, 71, 0, 125, 0, 125, 0, 59, 0, 87, 0, 111, 0, 114, 0, 108, 0, 100, 0, 52, 0, 102, 0, 114, 0, 101, 0, 101, 0, 46, 0, 105, 0, 110, 0, 0, 0
    exif:WinXP-Comments: 91, 0, 67, 0, 111, 0, 111, 0, 76, 0, 32, 0, 71, 0, 117, 0, 89, 0, 93, 0, 32, 0, 123, 0, 123, 0, 97, 0, 50, 0, 122, 0, 82, 0, 71, 0, 125, 0, 125, 0, 0, 0
    exif:WinXP-Keywords: 91, 0, 67, 0, 111, 0, 111, 0, 76, 0, 32, 0, 71, 0, 117, 0, 89, 0, 93, 0, 32, 0, 123, 0, 123, 0, 97, 0, 50, 0, 122, 0, 82, 0, 71, 0, 125, 0, 125, 0, 59, 0, 87, 0, 111, 0, 114, 0, 108, 0, 100, 0, 52, 0, 102, 0, 114, 0, 101, 0, 101, 0, 46, 0, 105, 0, 110, 0, 0, 0
    exif:WinXP-Subject: 91, 0, 67, 0, 111, 0, 111, 0, 76, 0, 32, 0, 71, 0, 117, 0, 89, 0, 93, 0, 32, 0, 123, 0, 123, 0, 97, 0, 50, 0, 122, 0, 82, 0, 71, 0, 125, 0, 125, 0, 0, 0
    exif:WinXP-Title: 91, 0, 67, 0, 111, 0, 111, 0, 76, 0, 32, 0, 71, 0, 117, 0, 89, 0, 93, 0, 32, 0, 123, 0, 123, 0, 97, 0, 50, 0, 122, 0, 82, 0, 71, 0, 125, 0, 125, 0, 0, 0
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 2560, 1600
    png:pHYs: x_res=3779, y_res=3779, units=1
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 17 tEXt/zTXt/iTXt chunks were found
    png:text-encoded profiles: 2 were found
    signature: d53f9d3f9fb1ce7416497cafc5f9850838d9358c038e4c1ad8e45f44287ba1ec
    unknown: 28, 234, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  Profiles:
    Profile-exif: 4462 bytes
    Profile-xmp: 3686 bytes
  Artifacts:
    filename: test_res_win.png
    verbose: true
  Tainted: False
  Filesize: 6.70199MiB
  Number pixels: 4096000
  Pixels per second: 31.5077MB
  User time: 0.130u
  Elapsed time: 0:01.130
  Version: ImageMagick 6.9.9-8 Q16 x86_64 2017-08-20 http://www.imagemagick.org
Fredericks-Mac-mini:desktop fred$ 

Code: Select all

Image: test_res_cent.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 2560x1600+0+0
  Resolution: 37.79x37.79
  Print size: 67.7428x42.3392
  Units: PixelsPerCentimeter
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 4096000
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 157.418 (0.617326)
      standard deviation: 77.0849 (0.302294)
      kurtosis: -1.48971
      skewness: -0.190849
      entropy: 0.951776
    Green:
      min: 2 (0.00784314)
      max: 255 (1)
      mean: 151.313 (0.593385)
      standard deviation: 75.7857 (0.297199)
      kurtosis: -1.50401
      skewness: -0.0300933
      entropy: 0.954262
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 91.4319 (0.358557)
      standard deviation: 93.8192 (0.367919)
      kurtosis: -1.13846
      skewness: 0.697618
      entropy: 0.892503
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 121.612 (0.476911)
      standard deviation: 87.8382 (0.344464)
      kurtosis: -1.49354
      skewness: 0.0249376
      entropy: 0.932847
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 2560x1600+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    comment: CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90

    date:create: 2017-08-21T15:24:59-07:00
    date:modify: 2017-08-21T15:24:59-07:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x2,1x1,1x1
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45455 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 2560, 1600
    png:pHYs: x_res=3779, y_res=3779, units=1
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 7 tEXt/zTXt/iTXt chunks were found
    rdf:Alt: 
    rdf:Bag: 
    signature: d53f9d3f9fb1ce7416497cafc5f9850838d9358c038e4c1ad8e45f44287ba1ec
  Artifacts:
    filename: test_res_cent.png
    verbose: true
  Tainted: False
  Filesize: 9.20081MiB
  Number pixels: 4096000
  Pixels per second: 40.9599MB
  User time: 0.110u
  Elapsed time: 0:01.100
  Version: ImageMagick 6.9.9-8 Q16 x86_64 2017-08-20 http://www.imagemagick.org
Fredericks-Mac-mini:desktop fred$ 
There are differences, but I do not see anything significant to cause the issue.

I can only guess that the two different versions of libpng used different compression optimizations.

So again I would suggest you upgrade your libpng delegates.

Perhaps the PNG expert, glennrp, can find other explanations for the differences in file size.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Linux png compression issue

Post by glennrp »

Idon't see the differences in filesize that you're talking about:

Code: Select all

-rw-rw-r-- 1 glennrp glennrp 3030102 Aug 21 20:34 test_res_cent.png
-rw-rw-r-- 1 glennrp glennrp 3030102 Aug 21 20:33 test_res_win.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Linux png compression issue

Post by fmw42 »

Glenn, from my verbose information, Imagemagick is reporting

Window png: Filesize: 6.70199MiB

CentOS png: Filesize: 9.20081MiB
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Linux png compression issue

Post by glennrp »

OK my mistake. I had downloaded the dropbox thumbnails. Here's what I get
when I use the DOWNLOAD/Direct Download buttons:

-rw-rw-r-- 1 glennrp glennrp 7027543 Aug 24 19:10 test_res_win.png
-rw-rw-r-- 1 glennrp glennrp 9647753 Aug 24 19:08 test_res_cent.png
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Linux png compression issue

Post by glennrp »

"pngcrush -n -v file.png" shows me that the centos compressor chose the "NONE" (0) filter for every row (note the "count" values):

Code: Select all

     filter[0] defilter time =     0.000420997, count = 1600
     filter[1] defilter time =     0.000000000, count = 0
     filter[2] defilter time =     0.000000000, count = 0
     filter[3] defilter time =     0.000000000, count = 0
     filter[4] defilter time =     0.000000000, count = 0
while the Win compressor chose "AVG" or "PAETH" (3 or 4) filter most of the time:

Code: Select all

     filter[0] defilter time =     0.000000000, count = 0
     filter[1] defilter time =     0.000007068, count = 1
     filter[2] defilter time =     0.000002102, count = 1
     filter[3] defilter time =     0.010492089, count = 935
     filter[4] defilter time =     0.024955388, count = 663
That explains the file size difference. There are other differences, but less important,
in that one stores the Exif and XMP data while the other doesn't.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Linux png compression issue

Post by fmw42 »

Glenn, it is interesting but Imagemagick is reporting the same ZIP compression for both images. Is it possible to present a more accurate compression type (and quality value) to the Imagemagick verbose information.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Linux png compression issue

Post by glennrp »

They probably are using the same ZIP compression and "quality". What would you like -verbose to report? Something like

Code: Select all

PNG:filters=1600x0; 0x1; 0x2; 0x3; 0x4
PNG:filters=0x0; 1x1; 1x2; 935x3; 663x4
or just

Code: Select all

PNG:filters=1600, 0, 0, 0, 0
PNG:filters=0, 1, 1, 935, 663
repectively for the two images? It would require a custom libpng to do that.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Linux png compression issue

Post by fmw42 »

glennrp wrote: 2017-08-25T15:48:30-07:00 They probably are using the same ZIP compression and "quality". What would you like -verbose to report? Something like

Code: Select all

PNG:filters=1600x0; 0x1; 0x2; 0x3; 0x4
PNG:filters=0x0; 1x1; 1x2; 935x3; 663x4
or just

Code: Select all

PNG:filters=1600, 0, 0, 0, 0
PNG:filters=0, 1, 1, 935, 663
repectively for the two images? It would require a custom libpng to do that.
Perhaps you might discuss this with the others on the libpng development team and see if it makes sense to them to modify libpng to show one or the other. I don't know enough about the filter values to say which is better. I would leave that to you and the PNG team to decide which, if they agree to present this information in a new version of libpng.
Myrecs
Posts: 12
Joined: 2017-08-17T15:41:13-07:00
Authentication code: 1151

Re: Linux png compression issue

Post by Myrecs »

on ubuntu 16 with libpng 1.2 everything works fine. a thing to think...
Post Reply