Need Depth 8bit Red/Green/Blue 1-bit, Alpha 8-bit png. How?
Posted: 2011-02-28T14:15:59-07:00
I'm using a program "Seam Carving GUI" that can save .png files of its masks. The program can also read in masks.
There are 2 types of mask - in appearance they are either green or red images on a transparent background.
Created my own mask using gimp but it isn't recognised properly by the program.
I'd like to use convert to change gimp's image into a usable mask - example from a good mask "identify -verbose" is below.
Tried all manner of convert options but I've had no success, the last attempt being:
(This is for a red image on a black background).
I'm pretty sure my problem is to do with bit depth and alpha channel.
identify -verbose on a good mask "saved.mask.png" shows:
Depth: 8-bit
Channel depth:
red: 1-bit
green: 1-bit
blue: 1-bit
alpha: 8-bit
But using the above convert command "my.PaletteMatte.png" shows:
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Can anybody tell me the parameters to create a "good mask"?
I'm using Version: ImageMagick 6.6.6-9 2011-01-17 Q16 http://www.imagemagick.org
(It has crossed my mind that the program could be creating non-standard .png files that are only readable by itself.
But then I remember that gimp and ImageMagick etc. are quite happy to read and process these files).
Cheers,
Peter
identify -verbose saved.mask.png
Image: saved.mask.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 2599x776+0+0
Resolution: 32.68x33.07
Print size: 79.5288x23.4654
Units: PixelsPerCentimeter
Type: PaletteMatte
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 1-bit
green: 1-bit
blue: 1-bit
alpha: 8-bit
Channel statistics:
Red:
min: 0 (0)
max: 255 (1)
mean: 0.321528 (0.00126089)
standard deviation: 9.0491 (0.0354867)
kurtosis: 788.09
skewness: 28.1085
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: 255 (1)
mean: 0.312748 (0.00122646)
standard deviation: 8.83258 (0.0346376)
kurtosis: 803.638
skewness: -28.3381
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 63.7522 (0.250009)
standard deviation: 6.32259 (0.0247945)
kurtosis: 217038
skewness: 6150.17
Alpha: none #00000000
Histogram:
2014281: ( 0, 0, 0, 0) #00000000 none
1846: (255, 0, 0,255) #FF0000 red
153: (255, 0, 0,204) #FF0000CC rgba(255,0,0,0.
123: (255, 0, 0,251) #FF0000FB rgba(255,0,0,0.984314)
121: (255, 0, 0,254) #FF0000FE rgba(255,0,0,0.996078)
91: (255, 0, 0,253) #FF0000FD rgba(255,0,0,0.992157)
82: (255, 0, 0,245) #FF0000F5 rgba(255,0,0,0.960784)
68: (255, 0, 0,232) #FF0000E8 rgba(255,0,0,0.909804)
59: (255, 0, 0,141) #FF00008D rgba(255,0,0,0.552941)
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Compose: Over
Page geometry: 2599x776+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
date:create: 2011-02-28T20:08:42+00:00
date:modify: 2011-02-28T20:08:42+00:00
signature: 481037812242a68ad01f6c06460fb2e98b050593626061067b3ab41362ee74b1
Artifacts:
verbose: true
Tainted: False
Filesize: 9.7KBB
Number pixels: 2.017MB
Pixels per second: 33.61MB
User time: 0.050u
Elapsed time: 0:01.060
Version: ImageMagick 6.6.6-9 2011-01-17 Q16 http://www.imagemagick.org
There are 2 types of mask - in appearance they are either green or red images on a transparent background.
Created my own mask using gimp but it isn't recognised properly by the program.
I'd like to use convert to change gimp's image into a usable mask - example from a good mask "identify -verbose" is below.
Tried all manner of convert options but I've had no success, the last attempt being:
Code: Select all
convert -transparent "#000000" -type PaletteMatte mymask.png PNG8:my.PaletteMatte.png
I'm pretty sure my problem is to do with bit depth and alpha channel.
identify -verbose on a good mask "saved.mask.png" shows:
Depth: 8-bit
Channel depth:
red: 1-bit
green: 1-bit
blue: 1-bit
alpha: 8-bit
But using the above convert command "my.PaletteMatte.png" shows:
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Can anybody tell me the parameters to create a "good mask"?
I'm using Version: ImageMagick 6.6.6-9 2011-01-17 Q16 http://www.imagemagick.org
(It has crossed my mind that the program could be creating non-standard .png files that are only readable by itself.
But then I remember that gimp and ImageMagick etc. are quite happy to read and process these files).
Cheers,
Peter
identify -verbose saved.mask.png
Image: saved.mask.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 2599x776+0+0
Resolution: 32.68x33.07
Print size: 79.5288x23.4654
Units: PixelsPerCentimeter
Type: PaletteMatte
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 1-bit
green: 1-bit
blue: 1-bit
alpha: 8-bit
Channel statistics:
Red:
min: 0 (0)
max: 255 (1)
mean: 0.321528 (0.00126089)
standard deviation: 9.0491 (0.0354867)
kurtosis: 788.09
skewness: 28.1085
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: 255 (1)
mean: 0.312748 (0.00122646)
standard deviation: 8.83258 (0.0346376)
kurtosis: 803.638
skewness: -28.3381
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 63.7522 (0.250009)
standard deviation: 6.32259 (0.0247945)
kurtosis: 217038
skewness: 6150.17
Alpha: none #00000000
Histogram:
2014281: ( 0, 0, 0, 0) #00000000 none
1846: (255, 0, 0,255) #FF0000 red
153: (255, 0, 0,204) #FF0000CC rgba(255,0,0,0.
123: (255, 0, 0,251) #FF0000FB rgba(255,0,0,0.984314)
121: (255, 0, 0,254) #FF0000FE rgba(255,0,0,0.996078)
91: (255, 0, 0,253) #FF0000FD rgba(255,0,0,0.992157)
82: (255, 0, 0,245) #FF0000F5 rgba(255,0,0,0.960784)
68: (255, 0, 0,232) #FF0000E8 rgba(255,0,0,0.909804)
59: (255, 0, 0,141) #FF00008D rgba(255,0,0,0.552941)
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Compose: Over
Page geometry: 2599x776+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
date:create: 2011-02-28T20:08:42+00:00
date:modify: 2011-02-28T20:08:42+00:00
signature: 481037812242a68ad01f6c06460fb2e98b050593626061067b3ab41362ee74b1
Artifacts:
verbose: true
Tainted: False
Filesize: 9.7KBB
Number pixels: 2.017MB
Pixels per second: 33.61MB
User time: 0.050u
Elapsed time: 0:01.060
Version: ImageMagick 6.6.6-9 2011-01-17 Q16 http://www.imagemagick.org