Page 1 of 1

-fill in the portable version

Posted: 2017-06-13T11:18:45-07:00
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

Re: -fill in the portable version

Posted: 2017-06-13T12:04:56-07:00
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%%".

Re: -fill in the portable version

Posted: 2017-06-13T13:44:37-07:00
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

Re: -fill in the portable version

Posted: 2017-06-15T02:53:26-07:00
by david_112358
Finally I found a solution : convert the png images in jpg
I don't kow why but it worked

Re: -fill in the portable version

Posted: 2017-06-15T09:28:51-07:00
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.