i have huge number of images provided various artists working on project. images have varying specs, pngs. 8-bit indexed (palette), others true color alpha 32-bit , 64-bit pngs.
now, trying use imagemagick push these images single coherent format, facing painful issue. noticed images have been converted truecolor alpha (16-bit channel depth) work charm. however, 8-bit per channel images, or possibly lower/higher images corrupted , rendering engine (on ios) have not display images properly.
is there way convert images robustly single 8-bit per channel truecolor alpha png format (rgba8888)?
(note: read in wikipedia link true color & alpha @ least 32 bits per channel, need reduce depth trimming reduce file size. rendering engine take care of that.)
i tried following commands:
/opt/local/bin/convert -depth 8 {} {} /opt/local/bin/convert {} -depth 8 {} /opt/local/bin/convert {} -colorspace srgb -depth 8 {} /opt/local/bin/convert {} -type truecolormatte -depth 8 {} here 2 images running last command, second 1 doesn't run on engine:
image: bu_hu_townhall_l01.png format: png (portable network graphics) class: directclass geometry: 640x558+0+0 resolution: 28.35x28.35 print size: 22.575x19.6825 units: pixelspercentimeter type: truecoloralpha endianess: undefined colorspace: srgb depth: 8-bit channel depth: red: 8-bit green: 8-bit blue: 8-bit alpha: 8-bit channel statistics: red: min: 0 (0) max: 255 (1) mean: 207.468 (0.8136) standard deviation: 60.7017 (0.238046) kurtosis: 1.18939 skewness: -1.39109 green: min: 0 (0) max: 255 (1) mean: 205.419 (0.805565) standard deviation: 56.0321 (0.219734) kurtosis: 1.15995 skewness: -1.22368 blue: min: 0 (0) max: 255 (1) mean: 174.337 (0.683673) standard deviation: 79.2051 (0.310608) kurtosis: -0.8628 skewness: -0.578582 alpha: min: 0 (0) max: 255 (1) mean: 96.4893 (0.37839) standard deviation: 123.454 (0.484134) kurtosis: -1.74557 skewness: -0.501528 image statistics: overall: min: 0 (0) max: 255 (1) mean: 186.434 (0.731112) standard deviation: 84.1704 (0.33008) kurtosis: 0.210139 skewness: -1.19818 alpha: srgba(255,255,255,0) #ffffff00 rendering intent: perceptual gamma: 0.45455 chromaticity: red primary: (0.63999,0.33001) green primary: (0.3,0.6) blue primary: (0.15,0.05999) white point: (0.31269,0.32899) background color: white border color: srgba(223,223,223,1) matte color: grey74 transparent color: none interlace: none intensity: undefined compose: on page geometry: 640x558+0+0 dispose: undefined iterations: 0 compression: zip orientation: undefined properties: date:create: 2013-07-19t12:48:10-07:00 date:modify: 2013-07-19t12:48:10-07:00 png:bkgd: chunk found (see background color, above) png:chrm: chunk 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: 6 png:ihdr.color_type: 6 (rgba) png:ihdr.interlace_method: 0 (not interlaced) png:ihdr.width,height: 640, 558 png:phys: x_res=2835, y_res=2835, units=1 png:srgb: intent=0 (perceptual intent) png:text: 2 text/ztxt/itxt chunks found signature: 547acae3cbfddef87d1ec49fb4dbe259772343ed121a8f9bfe2f1846fc542cf0 artifacts: filename: bu_hu_townhall_l01.png verbose: true tainted: false filesize: 333kb number pixels: 357k pixels per second: 17.86mb user time: 0.010u elapsed time: 0:01.019 version: imagemagick 6.8.6-0 2013-07-03 q16 http://www.imagemagick.org and...
image: red_circle.png format: png (portable network graphics) class: directclass geometry: 256x256+0+0 resolution: 28.35x28.35 print size: 9.02998x9.02998 units: pixelspercentimeter type: palettealpha endianess: undefined colorspace: srgb depth: 8-bit channel depth: red: 1-bit green: 1-bit blue: 1-bit alpha: 8-bit channel statistics: red: min: 255 (1) max: 255 (1) mean: 255 (1) standard deviation: 0 (0) kurtosis: 0 skewness: 0 green: min: 0 (0) max: 0 (0) mean: 0 (0) standard deviation: 0 (0) kurtosis: 0 skewness: 0 blue: min: 0 (0) max: 0 (0) mean: 0 (0) standard deviation: 0 (0) kurtosis: 0 skewness: 0 alpha: min: 0 (0) max: 40 (0.156863) mean: 6.30113 (0.0247103) standard deviation: 10.7071 (0.0419887) kurtosis: 1.47694 skewness: -1.66221 image statistics: overall: min: 0 (0) max: 255 (1) mean: 125.925 (0.493822) standard deviation: 5.35356 (0.0209944) kurtosis: 309547 skewness: 77.6945 alpha: srgba(255,0,0,0) #ff000000 colors: 41 histogram: 37164: (255, 0, 0, 0) #ff000000 srgba(255,0,0,0) 4416: (255, 0, 0, 1) #ff000001 srgba(255,0,0,0.00392157) 1974: (255, 0, 0, 2) #ff000002 srgba(255,0,0,0.00784314) 1394: (255, 0, 0, 4) #ff000004 srgba(255,0,0,0.0156863) 1154: (255, 0, 0, 5) #ff000005 srgba(255,0,0,0.0196078) 982: (255, 0, 0, 8) #ff000008 srgba(255,0,0,0.0313725) 942: (255, 0, 0, 7) #ff000007 srgba(255,0,0,0.027451) 893: (255, 0, 0, 10) #ff00000a srgba(255,0,0,0.0392157) 758: (255, 0, 0, 3) #ff000003 srgba(255,0,0,0.0117647) 754: (255, 0, 0, 11) #ff00000b srgba(255,0,0,0.0431373) 752: (255, 0, 0, 14) #ff00000e srgba(255,0,0,0.054902) 749: (255, 0, 0, 13) #ff00000d srgba(255,0,0,0.0509804) 698: (255, 0, 0, 16) #ff000010 srgba(255,0,0,0.0627451) 684: (255, 0, 0, 17) #ff000011 srgba(255,0,0,0.0666667) 657: (255, 0, 0, 19) #ff000013 srgba(255,0,0,0.0745098) 636: (255, 0, 0, 20) #ff000014 srgba(255,0,0,0.0784314) 635: (255, 0, 0, 38) #ff000026 srgba(255,0,0,0.14902) 630: (255, 0, 0, 32) #ff000020 srgba(255,0,0,0.12549) 604: (255, 0, 0, 23) #ff000017 srgba(255,0,0,0.0901961) 598: (255, 0, 0, 26) #ff00001a srgba(255,0,0,0.101961) 589: (255, 0, 0, 28) #ff00001c srgba(255,0,0,0.109804) 574: (255, 0, 0, 34) #ff000022 srgba(255,0,0,0.133333) 574: (255, 0, 0, 31) #ff00001f srgba(255,0,0,0.121569) 568: (255, 0, 0, 22) #ff000016 srgba(255,0,0,0.0862745) 551: (255, 0, 0, 29) #ff00001d srgba(255,0,0,0.113725) 542: (255, 0, 0, 6) #ff000006 srgba(255,0,0,0.0235294) 541: (255, 0, 0, 25) #ff000019 srgba(255,0,0,0.0980392) 516: (255, 0, 0, 37) #ff000025 srgba(255,0,0,0.145098) 485: (255, 0, 0, 35) #ff000023 srgba(255,0,0,0.137255) 387: (255, 0, 0, 9) #ff000009 srgba(255,0,0,0.0352941) 381: (255, 0, 0, 12) #ff00000c srgba(255,0,0,0.0470588) 327: (255, 0, 0, 36) #ff000024 srgba(255,0,0,0.141176) 327: (255, 0, 0, 24) #ff000018 srgba(255,0,0,0.0941176) 326: (255, 0, 0, 15) #ff00000f srgba(255,0,0,0.0588235) 316: (255, 0, 0, 21) #ff000015 srgba(255,0,0,0.0823529) 305: (255, 0, 0, 18) #ff000012 srgba(255,0,0,0.0705882) 304: (255, 0, 0, 27) #ff00001b srgba(255,0,0,0.105882) 270: (255, 0, 0, 33) #ff000021 srgba(255,0,0,0.129412) 254: (255, 0, 0, 30) #ff00001e srgba(255,0,0,0.117647) 251: (255, 0, 0, 39) #ff000027 srgba(255,0,0,0.152941) 74: (255, 0, 0, 40) #ff000028 srgba(255,0,0,0.156863) rendering intent: perceptual gamma: 0.454545 chromaticity: red primary: (0.64733,0.33636) green primary: (0.28904,0.6052) blue primary: (0.1235,0.0424) white point: (0.28021,0.296) background color: white border color: srgba(223,223,223,1) matte color: grey74 transparent color: none interlace: none intensity: undefined compose: on page geometry: 256x256+0+0 dispose: undefined iterations: 0 compression: zip orientation: undefined properties: date:create: 2013-07-19t12:48:29-07:00 date:modify: 2013-07-19t12:48:29-07:00 png:bkgd: chunk found (see background color, above) png:chrm: chunk found (see chromaticity, above) png:iccp: chunk found png:ihdr.bit-depth-orig: 8 png:ihdr.bit_depth: 8 png:ihdr.color-type-orig: 3 png:ihdr.color_type: 3 (indexed) png:ihdr.interlace_method: 0 (not interlaced) png:ihdr.width,height: 256, 256 png:phys: x_res=2835, y_res=2835, units=1 png:plte.number_colors: 42 png:text: 2 text/ztxt/itxt chunks found png:trns: chunk found signature: f41a73e5fe161c06aa147572380ab95b6e43a411fa533b6533af37e2d19a161e profiles: profile-icc: 3224 bytes description: display manufacturer: display model: display copyright: copyright apple, inc., 2013 artifacts: filename: red_circle.png verbose: true tainted: false filesize: 8.44kb number pixels: 65.5k pixels per second: 0b user time: 0.000u elapsed time: 0:01.000 version: imagemagick 6.8.6-0 2013-07-03 q16 http://www.imagemagick.org this how before got corrupted:
image: red_circle.png format: png (portable network graphics) class: directclass geometry: 256x256+0+0 resolution: 28.35x28.35 print size: 9.02998x9.02998 units: pixelspercentimeter type: palettealpha endianess: undefined colorspace: srgb depth: 8-bit channel depth: red: 1-bit green: 1-bit blue: 1-bit alpha: 8-bit channel statistics: red: min: 255 (1) max: 255 (1) mean: 255 (1) standard deviation: 0 (0) kurtosis: 0 skewness: 0 green: min: 0 (0) max: 0 (0) mean: 0 (0) standard deviation: 0 (0) kurtosis: 0 skewness: 0 blue: min: 0 (0) max: 0 (0) mean: 0 (0) standard deviation: 0 (0) kurtosis: 0 skewness: 0 alpha: min: 0 (0) max: 40 (0.156863) mean: 6.30113 (0.0247103) standard deviation: 10.7071 (0.0419887) kurtosis: 1.47694 skewness: -1.66221 image statistics: overall: min: 0 (0) max: 255 (1) mean: 125.925 (0.493822) standard deviation: 5.35356 (0.0209944) kurtosis: 309547 skewness: 77.6945 alpha: srgba(255,0,0,0) #ff000000 colors: 41 histogram: 37164: (255, 0, 0, 0) #ff000000 srgba(255,0,0,0) 4416: (255, 0, 0, 1) #ff000001 srgba(255,0,0,0.00392157) 1974: (255, 0, 0, 2) #ff000002 srgba(255,0,0,0.00784314) 1394: (255, 0, 0, 4) #ff000004 srgba(255,0,0,0.0156863) 1154: (255, 0, 0, 5) #ff000005 srgba(255,0,0,0.0196078) 982: (255, 0, 0, 8) #ff000008 srgba(255,0,0,0.0313725) 942: (255, 0, 0, 7) #ff000007 srgba(255,0,0,0.027451) 893: (255, 0, 0, 10) #ff00000a srgba(255,0,0,0.0392157) 758: (255, 0, 0, 3) #ff000003 srgba(255,0,0,0.0117647) 754: (255, 0, 0, 11) #ff00000b srgba(255,0,0,0.0431373) 752: (255, 0, 0, 14) #ff00000e srgba(255,0,0,0.054902) 749: (255, 0, 0, 13) #ff00000d srgba(255,0,0,0.0509804) 698: (255, 0, 0, 16) #ff000010 srgba(255,0,0,0.0627451) 684: (255, 0, 0, 17) #ff000011 srgba(255,0,0,0.0666667) 657: (255, 0, 0, 19) #ff000013 srgba(255,0,0,0.0745098) 636: (255, 0, 0, 20) #ff000014 srgba(255,0,0,0.0784314) 635: (255, 0, 0, 38) #ff000026 srgba(255,0,0,0.14902) 630: (255, 0, 0, 32) #ff000020 srgba(255,0,0,0.12549) 604: (255, 0, 0, 23) #ff000017 srgba(255,0,0,0.0901961) 598: (255, 0, 0, 26) #ff00001a srgba(255,0,0,0.101961) 589: (255, 0, 0, 28) #ff00001c srgba(255,0,0,0.109804) 574: (255, 0, 0, 34) #ff000022 srgba(255,0,0,0.133333) 574: (255, 0, 0, 31) #ff00001f srgba(255,0,0,0.121569) 568: (255, 0, 0, 22) #ff000016 srgba(255,0,0,0.0862745) 551: (255, 0, 0, 29) #ff00001d srgba(255,0,0,0.113725) 542: (255, 0, 0, 6) #ff000006 srgba(255,0,0,0.0235294) 541: (255, 0, 0, 25) #ff000019 srgba(255,0,0,0.0980392) 516: (255, 0, 0, 37) #ff000025 srgba(255,0,0,0.145098) 485: (255, 0, 0, 35) #ff000023 srgba(255,0,0,0.137255) 387: (255, 0, 0, 9) #ff000009 srgba(255,0,0,0.0352941) 381: (255, 0, 0, 12) #ff00000c srgba(255,0,0,0.0470588) 327: (255, 0, 0, 36) #ff000024 srgba(255,0,0,0.141176) 327: (255, 0, 0, 24) #ff000018 srgba(255,0,0,0.0941176) 326: (255, 0, 0, 15) #ff00000f srgba(255,0,0,0.0588235) 316: (255, 0, 0, 21) #ff000015 srgba(255,0,0,0.0823529) 305: (255, 0, 0, 18) #ff000012 srgba(255,0,0,0.0705882) 304: (255, 0, 0, 27) #ff00001b srgba(255,0,0,0.105882) 270: (255, 0, 0, 33) #ff000021 srgba(255,0,0,0.129412) 254: (255, 0, 0, 30) #ff00001e srgba(255,0,0,0.117647) 251: (255, 0, 0, 39) #ff000027 srgba(255,0,0,0.152941) 74: (255, 0, 0, 40) #ff000028 srgba(255,0,0,0.156863) rendering intent: perceptual gamma: 0.454545 chromaticity: red primary: (0.64733,0.33636) green primary: (0.28904,0.6052) blue primary: (0.1235,0.0424) white point: (0.28021,0.296) background color: white border color: srgba(223,223,223,1) matte color: grey74 transparent color: none interlace: none intensity: undefined compose: on page geometry: 256x256+0+0 dispose: undefined iterations: 0 compression: zip orientation: undefined properties: date:create: 2013-07-18t20:55:49-07:00 date:modify: 2013-07-18t20:55:49-07:00 png:chrm: chunk found (see chromaticity, above) png:iccp: chunk found png:ihdr.bit-depth-orig: 8 png:ihdr.bit_depth: 8 png:ihdr.color-type-orig: 6 png:ihdr.color_type: 6 (rgba) png:ihdr.interlace_method: 0 (not interlaced) png:ihdr.width,height: 256, 256 png:phys: x_res=2835, y_res=2835, units=1 signature: f41a73e5fe161c06aa147572380ab95b6e43a411fa533b6533af37e2d19a161e profiles: profile-icc: 3224 bytes description: display manufacturer: display model: display copyright: copyright apple, inc., 2013 artifacts: filename: red_circle.png verbose: true tainted: false filesize: 11.2kb number pixels: 65.5k pixels per second: 0b user time: 0.000u elapsed time: 0:01.000 version: imagemagick 6.8.6-0 2013-07-03 q16 http://www.imagemagick.org
if using imagemagick, can force images written rgba8888 png with
/opt/local/bin/convert input.png png32:output.png
Comments
Post a Comment