Page 1 of 1

Colored Canvas Washes Out Image

Posted: 2012-06-28T12:38:28-07:00
by hknight
I want my image to be exactly 70px by 70px with a red canvas.

This does not work because the canvas is black:

Code: Select all

convert -size 70x70 xc:transparent null: ( rose: -thumbnail "70x70" +repage ( +clone -shave 10x10 -fill gray50 -colorize 100% -mattecolor gray50 -frame 10x10+3+4 -blur 0x2 ) -compose HardLight -composite ) -gravity Center -layers Composite -format jpg -unsharp 0x.5 -strip -quality 80 output1.jpg
This does not work because the image gets washed out with red:

Code: Select all

convert -size 70x70 xc:Red null: ( rose: -thumbnail "70x70" +repage ( +clone -shave 10x10 -fill gray50 -colorize 100% -mattecolor gray50 -frame 10x10+3+4 -blur 0x2 ) -compose HardLight -composite ) -gravity Center -layers Composite -format jpg -unsharp 0x.5 -strip -quality 80 output2.jpg
How can I have a canvas color other than transparent or black while maintaining the integrity of the image?

Re: Colored Canvas Washes Out Image

Posted: 2012-06-28T13:05:08-07:00
by Bonzo
The first piece of code will not works as jpg does not support transparnecy.

The second piece of code is confusing and I belive you do not need the null: or the -compose HardLight or the -format jpg probably not the -strip either. I do not know what effect you are after but I would start again one effect at a time.

Re: Colored Canvas Washes Out Image

Posted: 2012-06-28T14:53:02-07:00
by hknight
Bonzo, thanks, but your comments do not help. Firstly, the first piece of code DOES work with only one exception: the background is black. I want the background to be red. When I take out those things you suggested, it breaks.

How can I get a red canvas instead of a black canvas?

This is the effect I am after:
Image

Re: Colored Canvas Washes Out Image

Posted: 2012-06-28T15:54:14-07:00
by glennrp
I'm not sure what you are trying to get, but you could try using "#FF000000" instead of "transparent" (that is, transparent red instead of opaque red) as the canvas.

Re: Colored Canvas Washes Out Image

Posted: 2012-06-28T16:07:16-07:00
by hknight
Adding the extra two zeros at the end works. Thanks!