Page 1 of 1

Transparent Backgrounds and Frames

Posted: 2007-02-01T15:09:16-07:00
by tdan
This is a bit of a newbie question - but I have looked around for the answer to no avail.
I can't get things to show up transparent.

I want to create a frame surrounding a transparent background:

Code: Select all

convert -size 100x100 xc:none -background none -mattecolor red -frame 20x20+5+5 rect.png
And a background surrounded by a transparent frame:

Code: Select all

convert -size 100x100 xc:orange -frame 5x5 -mattecolor none frame.png
What am I doing wrong?

Posted: 2007-02-01T23:16:57-07:00
by anthony
You did not use the bible... the IM Examples (Cutting and Bordering)

Frame does not use background, it uses bordercolor! background is used for a seperate purpose as part of "montage"

And in your second example you want to use -bordercolor and -border, not -mattecolor and -frame. PS: always set the settings, before the operator that uses them!!!!

Code: Select all

 convert -size 100x100 xc:none -bordercolor none -mattecolor red -frame 20x20+5+5 rect.png

Code: Select all

convert -size 100x100 xc:orange -bordercolor none -border 5  frame.png

Posted: 2007-02-02T07:25:16-07:00
by tdan
That makes sense - thanks so much.

By the way - I do read your IM Examples very frequently. Stellar job!
Somehow I missed that paragraph about -bordercolor applying to the background of frames.

Re: Transparent Backgrounds and Frames

Posted: 2007-02-05T21:17:07-07:00
by anthony
Note IM examples is now on the offical IM website -- update you links.
The old site will redirect you.