Need to sap the pink out of an image but the pink comes in variants. e.g. #F700F8 #F800F7 #F700FF #FF00FF, etc
Base command: magick convert bear.png -transparent #F800F7 bear2.png
I've also tried -fuzz (1-100% and massive integers), -trim, and -transparent-color but still comes out with spotted background.
Any help is appreciated. Using the latest version.
Original:
Result:
Remove Solid Color Background
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Remove Solid Color Background
Please say what version of IM you use, on what platform.
For v7, I suggest you use "magick" not "magick convert".
For me, v7.0.7-28 on Windows 8.1, this works fine:
If you are using Windows BAT, don't forget to double the %.
For v7, I suggest you use "magick" not "magick convert".
For me, v7.0.7-28 on Windows 8.1, this works fine:
Code: Select all
magick k2svX7r.png -fuzz 5% -transparent #F800F7 out.png
snibgo's IM pages: im.snibgo.com
Re: Remove Solid Color Background
Ah perfect, that did work. Thank you!
v7.0.7-31-Q16-x64; Win 7 Pro 64
Any suggestions on skimming that last little pink edge?
v7.0.7-31-Q16-x64; Win 7 Pro 64
Any suggestions on skimming that last little pink edge?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove Solid Color Background
Either increase the fuzz value or extract the alpha channel after using the -fuzz command and antialias it with a blur.
For the latter, you can try the following
If in a bat file, you need to double the % to %%
For the latter, you can try the following
Code: Select all
magick k2svX7r.png -fuzz 5% -transparent #F800F7 -channel alpha -blur 0x2 -level 50x100% +channel output.png
Re: Remove Solid Color Background
Thank you very much! :]