how to crop without changing type
Posted: 2011-03-11T15:57:48-07:00
Hi.
I feel a bit insecure to bother you with this little problem, but it bugs me enough to register here, so I hope someone can help or enlighten me:
I want to crop a region from a bigger PNG-image without changing anything else. My tries on the bash command line are:
Somehow I do not preserve the Type, Alpha Channel, Background Color and Border Color
Anyone who can help with this?
Here are the details, specifically compare Type, Background Color, Border Color and the Alpha Channel.
I added the "no alpha channel" to make things clearer (I hope)
If I look at the original with identify -verbose big-pic_orig.png I get among other things:
A look at my first try to create part-of-it.png reveals this:
A look at my second try to create part-of-it.png reveals this:
Thanks.
P.S.: I can provide more details, of course.
I feel a bit insecure to bother you with this little problem, but it bugs me enough to register here, so I hope someone can help or enlighten me:
I want to crop a region from a bigger PNG-image without changing anything else. My tries on the bash command line are:
Code: Select all
convert -background white -type TrueColorMatte -crop 880x600+200+190! big-pic_orig.png part-of-it.png
convert -type TrueColorMatte -matte -background white -strip -crop 880x600+200+190! big-pic_orig.png part-of-it.png
Anyone who can help with this?
Here are the details, specifically compare Type, Background Color, Border Color and the Alpha Channel.
I added the "no alpha channel" to make things clearer (I hope)
If I look at the original with identify -verbose big-pic_orig.png I get among other things:
Code: Select all
Format: PNG (Portable Network Graphics)
Geometry: 1132x812
Class: DirectClass
Type: TrueColorMatte
Alpha: ( 0, 0, 0,255) #000000FF
Rendering-intent: Undefined
Interlace: None
Background Color: white
Border Color: #DFDFDF00
Matte Color: grey74
Code: Select all
Format: PNG (Portable Network Graphics)
Geometry: 880x600
Class: DirectClass
Type: TrueColor
No Alpha Channel
Rendering-intent: Undefined
Interlace: None
Background Color: white
Border Color: #DFDFDF
Matte Color: grey74
Code: Select all
Format: PNG (Portable Network Graphics)
Geometry: 880x600
Class: DirectClass
Type: TrueColor
Alpha:
Min: 255 (1)
Max: 255 (1)
Mean: 255 (1)
Standard deviation: 0 (0)
Rendering-intent: Undefined
Interlace: None
Background Color: #00000000
Border Color: #DFDFDF00
Matte Color: grey74
Thanks.
P.S.: I can provide more details, of course.