Was using this in IM 6
How do i get a transparent background?
flower.jpg
convert flower.jpg -background transparent -shear 12x0 png:output.png
im 6.7.2
img 7.0.8
IM 7 -background transparent
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: IM 7 -background transparent
You need to enable alpha:
Code: Select all
magick flower.jpg -alpha set -background transparent -shear 12x0 out.png
snibgo's IM pages: im.snibgo.com
Re: IM 7 -background transparent
Ok, that works, but it's weird that in other places I use -background transparent it works without -set alpha!?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: IM 7 -background transparent
I suppose in those other cases alpha is already enabled. If the input image has any transparency, alpha will certainly be enabled.
snibgo's IM pages: im.snibgo.com
Re: IM 7 -background transparent
for example
convert flower.jpg -background transparent -rotate 45 out.png
will have a transparent background
you'd think setting a color to transparent would enable alpha.. or some consistency.
Anyway thanks for tip!
convert flower.jpg -background transparent -rotate 45 out.png
will have a transparent background
you'd think setting a color to transparent would enable alpha.. or some consistency.
Anyway thanks for tip!