Unreadable image (Transparency ?)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
cris
Posts: 1
Joined: 2013-01-22T16:36:18-07:00
Authentication code: 6789

Unreadable image (Transparency ?)

Post by cris »

Hello,

My goal is to transform the organisation of a sprite to be read by a game. I realized several command:

Code: Select all

convert skin.png -resize 133% skin-resize.png
convert skin-resize.png -crop 128x128+0+0 skin-resize-crop1.png
convert skin-resize.png -crop 128x128+128+0 skin-resize-crop2.png
convert skin-resize-crop2.png skin-resize-crop1.png +append montage.png
convert montage.png -background transparent -extent 256x256 -quality 0 montage_extend.png
The new organization of the sprite look good for me, however the image is no longer recognized by my game, then I have no problem to open it with the windows software.
I noticed that if I open the image with Photoshop, then I backup the image, without any modification, the image is recognize by my game.
I make a "identify -verbose" on 2 image to see the differences, here is what I noticed:

montage_extend.png generated with imagemagick 6.8.1-9 (windows 7)

Code: Select all

Alpha: none   #00000000
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)
Interlace: None
Background color: black
Border color: srgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Compose: Over
Page geometry: 680x340+256+0
Origin geometry: +256+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
  date:create: 2013-01-22T23:43:59+01:00
  date:modify: 2013-01-23T00:29:50+01:00
  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       : 8
  png:IHDR.color_type      : 6 (RGBA)
  png:IHDR.interlace_method: 0 (Not interlaced)
  png:IHDR.width,height    : 256, 256
  png:oFFs                 : x_off=256, y_off=0
  png:pHYs                 : x_res=7873, y_res=7873, units=1
  png:sRGB                 : intent=0 (Perceptual Intent)
  png:text                 : 2 tEXt/zTXt/iTXt chunks were found
  png:vpAg                 : width=680, height=340
  signature: c9aee1b8c3e1b8111a19eb1ec2a50b675eec067688f74363730c58857ea9c724
Artifacts:
  filename: montage_extend.png
montage_extend-ps.png (image saved with photoshop)

Code: Select all

Alpha: srgba(255,255,255,0)   #FFFFFF00
Rendering intent: Perceptual
Gamma: 0.454545
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)
Interlace: None
Background color: white
Border color: srgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Compose: Over
Page geometry: 256x256+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
  date:create: 2013-01-23T00:30:40+01:00
  date:modify: 2013-01-23T00:30:42+01:00
  png:cHRM                 : chunk was found (see Chromaticity, above)
  png:IHDR.bit_depth       : 8
  png:IHDR.color_type      : 6 (RGBA)
  png:IHDR.interlace_method: 0 (Not interlaced)
  png:IHDR.width,height    : 256, 256
  png:pHYs                 : x_res=7873, y_res=7873, units=1
  signature: c121d0c36e1dca7f55fb4bd04f140614aa34210dab19c6f6d5031f63d0be4978
Artifacts:
  filename: montage_extend-ps.png

Transparency look different, but i dont know how to convert my image with Image Magick for get the same result.

PS : sorry for my english :s
Post Reply