-fill in the portable version

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
david_112358
Posts: 3
Joined: 2017-06-13T11:07:33-07:00
Authentication code: 1151

-fill in the portable version

Post by david_112358 »

Hello,
I have a little problem with the portable version.
I want to create a software that I can give to somebody without installing anything and so I use the portable version of ImageMagick.

However, one command doesn't work with this version although when I installed the "normal" version on my pc, it worked fine :

"%~dp0ImageMagick-7.0.5-7-portable-Q16-x86\convert.exe" test.png -fuzz 10% -fill white -opaque "rgb(255, 178, 178)" test.png
-> doesn't work
convert test.png -fuzz 10% -fill white -opaque "rgb(255, 178, 178)" test.png -> was working

I don't understand why...

I must add that it's only with "-fill" because if I use something like
"%~dp0ImageMagick-7.0.5-7-portable-Q16-x86\convert.exe" test.png test.pdf
the PDF file is created

I apologize if the question is not easily comprehensible, my english is not very good...
Thank you in advance,
David
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -fill in the portable version

Post by snibgo »

david_112358 wrote:-> doesn't work
What doesn't work? Please link to your input and output images. You can upload them to somewhere like dropox.com and paste the URLs here.

Your code starts with:

Code: Select all

"%~dp0ImageMagick...
So is this in a BAT script? Then you need to double the % in "-fuzz 10%%".
snibgo's IM pages: im.snibgo.com
david_112358
Posts: 3
Joined: 2017-06-13T11:07:33-07:00
Authentication code: 1151

Re: -fill in the portable version

Post by david_112358 »

There is an image that can illustrate the problem:
https://www.dropbox.com/s/8ls7h5wc0m4nt ... e.png?dl=0

I want to erase the pink color (rgb 255, 178, 178), so I replace it by white.

Actually my bat code is :
"%~dp0ImageMagick-7.0.5-7-portable-Q16-x86\convert.exe" exemple.png -fuzz 10%% -fill white -opaque "rgb(255, 178, 178)" exemple.png
I thought it would be more comprehensible if I wrote 10%, I was wrong...

It doesn't work better using the command line with :
"C:\Users\David\Documents\ImageMagick-7.0.5-7-portable-Q16-x86\convert.exe" exemple.png -fuzz 10%% -fill white -opaque "rgb(255, 178, 178)" exemple.png

If I try :
"C:\Users\David\Documents\ImageMagick-7.0.5-7-portable-Q16-x86\convert.exe" exemple.png -fuzz 10%% -fill white -opaque "rgb(255, 178, 178)" exemple2.png
the picture exemple2 is created but the pink color is still there
david_112358
Posts: 3
Joined: 2017-06-13T11:07:33-07:00
Authentication code: 1151

Re: -fill in the portable version

Post by david_112358 »

Finally I found a solution : convert the png images in jpg
I don't kow why but it worked
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -fill in the portable version

Post by fmw42 »

If your command is not run in a .bat script, then I do not think you should double your % to %%.

In IM 7, you should be using magic rather than convert.

The following works just fine for me in IM 7.0.6.0 Q16 Mac OS X using libpng 1.6.29

Code: Select all

magick exemple.png -fuzz 10% -fill white -opaque "rgb(255, 178, 178)" exemple2.png
Perhaps you need to upgrade your IM version or limping version.
Post Reply