Page 1 of 1

possible bug -strip with PNG output IM 6.8.8.10 Q16 Mac OSX

Posted: 2014-04-04T11:13:46-07:00
by fmw42
When I strip the following image and save as JPG, the meta data (EXIF) is removed. But when I do the same and save as PNG, the meta data (EXIF) is not removed.

Is this correct behavior?


input:
Image

Code: Select all

Image: colorwheel.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 616x462+0+0
  Resolution: 72x72
  Print size: 8.55556x6.41667
  Units: PixelsPerInch
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 202.93 (0.795805)
      standard deviation: 93.1653 (0.365354)
      kurtosis: 0.567192
      skewness: -1.51572
    Green:
      min: 26 (0.101961)
      max: 255 (1)
      mean: 195.89 (0.768197)
      standard deviation: 79.119 (0.31027)
      kurtosis: -0.32305
      skewness: -1.08077
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 169.262 (0.663771)
      standard deviation: 107.995 (0.42351)
      kurtosis: -1.17507
      skewness: -0.789668
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 189.361 (0.742591)
      standard deviation: 94.1674 (0.369284)
      kurtosis: -0.197975
      skewness: -1.19285
  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: 616x462+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 94
  Orientation: TopLeft
  Properties:
    crs:AlreadyApplied: True
    date:create: 2014-04-03T18:38:07-07:00
    date:modify: 2014-04-03T18:38:06-07:00
    dc:format: image/jpeg
    exif:BitsPerSample: 8, 8, 8
    exif:ColorSpace: 65535
    exif:Compression: 6
    exif:DateTime: 2011:07:18 14:36:25
    exif:ExifImageLength: 462
    exif:ExifImageWidth: 616
    exif:ExifOffset: 232
    exif:ExifVersion: 48, 50, 50, 49
    exif:ImageLength: 462
    exif:ImageWidth: 616
    exif:JPEGInterchangeFormat: 382
    exif:JPEGInterchangeFormatLength: 4644
    exif:Orientation: 1
    exif:PhotometricInterpretation: 2
    exif:ResolutionUnit: 2
    exif:SamplesPerPixel: 3
    exif:Software: Adobe Photoshop CS5 Macintosh
    exif:XResolution: 720000/10000
    exif:YResolution: 720000/10000
    icc:copyright: Copyright 1999 Adobe Systems Incorporated
    icc:description: Adobe RGB (1998)
    icc:manufacturer: Adobe RGB (1998)
    icc:model: Adobe RGB (1998)
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    photoshop:ColorMode: 3
    photoshop:ICCProfile: Adobe RGB (1998)
    rdf:Alt: 
    
   
    rdf:Bag: 
    
   
    signature: b6f94cd15767961c4fb47166967737966accb107f88b59ee2e7033c1cc28d9b4
    stRef:documentID: xmp.did:018011740720681192B0E10E8EB1231F
    stRef:instanceID: xmp.iid:D6F3878A0A20681192B0E10E8EB1231F
    xmp:CreateDate: 2011-07-18T10:13:24-04:00
    xmp:CreatorTool: Adobe Photoshop CS5 Macintosh
    xmp:MetadataDate: 2011-07-18T14:36:25-04:00
    xmp:ModifyDate: 2011-07-18T14:36:25-04:00
    xmpMM:DocumentID: xmp.did:7156D149A96C11E0B4E6968208F642A8
    xmpMM:InstanceID: xmp.iid:E0C2AC332820681195FE87779E5DC0A1
    xmpMM:OriginalDocumentID: xmp.did:018011740720681192B0E10E8EB1231F
  Profiles:
    Profile-8bim: 6772 bytes
    Profile-exif: 5032 bytes
    Profile-icc: 560 bytes
    Profile-iptc: 15 bytes
      City[1,90]: 0x00000000: 254700                                        -%
      unknown[2,0]: 
    Profile-xmp: 5461 bytes
  Artifacts:
    filename: colorwheel.jpg
    verbose: true
  Tainted: False
  Filesize: 70.5KB
  Number pixels: 285K
  Pixels per second: 28.46MB
  User time: 0.010u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.8.8-10 Q16 x86_64 2014-03-28 http://www.imagemagick.org

Code: Select all

convert colorwheel.jpg -strip colorwheel_stripped.jpg

Code: Select all

Image: colorwheel_stripped.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 616x462+0+0
  Resolution: 72x72
  Print size: 8.55556x6.41667
  Units: PixelsPerInch
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 202.902 (0.795694)
      standard deviation: 93.0899 (0.365058)
      kurtosis: 0.567066
      skewness: -1.51553
    Green:
      min: 25 (0.0980392)
      max: 255 (1)
      mean: 195.878 (0.768149)
      standard deviation: 79.1126 (0.310246)
      kurtosis: -0.322865
      skewness: -1.08079
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 169.293 (0.663892)
      standard deviation: 107.894 (0.423112)
      kurtosis: -1.17475
      skewness: -0.789539
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 189.357 (0.742578)
      standard deviation: 94.102 (0.369027)
      kurtosis: -0.198925
      skewness: -1.19241
  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: 616x462+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 94
  Orientation: Undefined
  Properties:
    date:create: 2014-04-04T11:04:11-07:00
    date:modify: 2014-04-04T11:04:11-07:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 1x1,1x1,1x1
    signature: bcacf935631520272d160c488c8163718ee79bc3ee97376abc2d3bc14e994ef5
  Artifacts:
    filename: colorwheel_stripped.jpg
    verbose: true
  Tainted: False
  Filesize: 50.1KB
  Number pixels: 285K
  Pixels per second: 28.46MB
  User time: 0.010u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.8.8-10 Q16 x86_64 2014-03-28 http://www.imagemagick.org

Code: Select all

convert colorwheel.jpg -strip colorwheel_stripped.png

Code: Select all

Image: colorwheel_stripped.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 616x462+0+0
  Resolution: 28.34x28.34
  Print size: 21.7361x16.302
  Units: PixelsPerCentimeter
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 202.93 (0.795805)
      standard deviation: 93.1653 (0.365354)
      kurtosis: 0.567192
      skewness: -1.51572
    Green:
      min: 26 (0.101961)
      max: 255 (1)
      mean: 195.89 (0.768197)
      standard deviation: 79.119 (0.31027)
      kurtosis: -0.32305
      skewness: -1.08077
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 169.262 (0.663771)
      standard deviation: 107.995 (0.42351)
      kurtosis: -1.17507
      skewness: -0.789668
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 189.361 (0.742591)
      standard deviation: 94.1674 (0.369284)
      kurtosis: -0.197975
      skewness: -1.19285
  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: 616x462+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    crs:AlreadyApplied: True
    date:create: 2014-04-04T11:05:50-07:00
    date:modify: 2014-04-04T11:05:50-07:00
    dc:format: image/jpeg
    exif:BitsPerSample: 8, 8, 8
    exif:ColorSpace: 65535
    exif:Compression: 6
    exif:DateTime: 2011:07:18 14:36:25
    exif:ExifImageLength: 462
    exif:ExifImageWidth: 616
    exif:ExifOffset: 232
    exif:ExifVersion: 48, 50, 50, 49
    exif:ImageLength: 462
    exif:ImageWidth: 616
    exif:JPEGInterchangeFormat: 382
    exif:JPEGInterchangeFormatLength: 4644
    exif:PhotometricInterpretation: 2
    exif:SamplesPerPixel: 3
    exif:Software: Adobe Photoshop CS5 Macintosh
    icc:copyright: Copyright 1999 Adobe Systems Incorporated
    icc:description: Adobe RGB (1998)
    icc:manufacturer: Adobe RGB (1998)
    icc:model: Adobe RGB (1998)
    photoshop:ColorMode: 3
    photoshop:ICCProfile: Adobe RGB (1998)
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45454544 (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: 616, 462
    png:pHYs: x_res=2834, y_res=2834, units=1
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 34 tEXt/zTXt/iTXt chunks were found
    rdf:Alt: 
    
   
    rdf:Bag: 
    
   
    signature: b6f94cd15767961c4fb47166967737966accb107f88b59ee2e7033c1cc28d9b4
    stRef:documentID: xmp.did:018011740720681192B0E10E8EB1231F
    stRef:instanceID: xmp.iid:D6F3878A0A20681192B0E10E8EB1231F
    xmp:CreateDate: 2011-07-18T10:13:24-04:00
    xmp:CreatorTool: Adobe Photoshop CS5 Macintosh
    xmp:MetadataDate: 2011-07-18T14:36:25-04:00
    xmp:ModifyDate: 2011-07-18T14:36:25-04:00
    xmpMM:DocumentID: xmp.did:7156D149A96C11E0B4E6968208F642A8
    xmpMM:InstanceID: xmp.iid:E0C2AC332820681195FE87779E5DC0A1
    xmpMM:OriginalDocumentID: xmp.did:018011740720681192B0E10E8EB1231F
  Artifacts:
    filename: colorwheel_stripped.png
    verbose: true
  Tainted: False
  Filesize: 88.7KB
  Number pixels: 285K
  Pixels per second: 28.46MB
  User time: 0.010u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.8.8-10 Q16 x86_64 2014-03-28 http://www.imagemagick.org

Re: possible bug -strip with PNG output IM 6.8.8.10 Q16 Mac

Posted: 2014-04-04T12:40:44-07:00
by glennrp
The behavior is wrong. It is due to changes made in coders/png.c, revision 6.8.5-2. I'll see about fixing that, hopefully without breaking whatever those changes were supposed to fix.
(fix checked in, SVN revision 15345, for ImageMagick-6.8.9-0 and 15346 for ImageMagick-7.0.0-0).

Re: possible bug -strip with PNG output IM 6.8.8.10 Q16 Mac

Posted: 2014-04-04T12:41:57-07:00
by fmw42
Thanks Glenn. I will test with the next beta.

Re: possible bug -strip with PNG output IM 6.8.8.10 Q16 Mac

Posted: 2014-04-05T10:33:35-07:00
by fmw42
In the current 6.8.9.0 beta, the -strip works for PNG output files. Thanks Glenn.