Search found 625 matches

by GeeMack
2018-10-14T14:52:51-07:00
Forum: Users
Topic: Running batch file only on images recently modified
Replies: 4
Views: 86

Re: Running batch file only on images recently modified

I run a batch script to modify images in folders and subfolders in windows. It works great, but it runs imagemagick for every single image in the folders. Is there a way to limit the files that are modified to a time period eg. a week from date modified? As the others have mentioned, you'll probabl...
by GeeMack
2018-10-09T09:26:10-07:00
Forum: Users
Topic: changing the whole color of a png icon preserving the edges alpha
Replies: 16
Views: 442

Re: changing the whole color of a png icon preserving the edges alpha

I have another question. In above command how can I fill with gradient instead of solid color and again with preserving alpha? You can use "-sparse-color" to add a gradient fill to the red, green, and blue channels of the input image while keeping the transparency of the alpha channel. A simple exa...
by GeeMack
2018-10-08T12:14:46-07:00
Forum: Users
Topic: changing the whole color of a png icon preserving the edges alpha
Replies: 16
Views: 442

Re: changing the whole color of a png icon preserving the edges alpha

artech wrote:
2018-10-08T11:32:33-07:00
Again the result was the same. It fills the whole of image to that color like following:
Try the same thing only instead of "-alpha off" just work it with the RGB channels like this...

Code: Select all

magick icon.png -channel RGB -fuzz 50% -fill "#550000" -opaque "#000000" -alpha on icon2.png
by GeeMack
2018-10-08T08:46:40-07:00
Forum: Users
Topic: Batch Edit
Replies: 5
Views: 204

Re: Batch Edit

I am trying to batch edit my files and save them as their original names using the code: magick convert *.tif -colorspace gray -threshold 50% -compress Group4 -set filename:f %t "%[filename:f].tif" But, they are all saved under the first tif name as almost a pdf, with all of the image combined into...
by GeeMack
2018-10-05T12:25:15-07:00
Forum: Users
Topic: How to build this effect in Image Magick?
Replies: 10
Views: 475

Re: How to build this effect in Image Magick?

Yes 1/3, 1/3 , 1/3 would be good I think so. If you could give me the command I can adapt it in case I would like to change the proportions. In the example commands above there's a section inside parentheses. That's where you're creating the mask for the gradient overlay. You can use FX expressions...
by GeeMack
2018-10-05T08:01:06-07:00
Forum: Users
Topic: How to build this effect in Image Magick?
Replies: 10
Views: 475

Re: How to build this effect in Image Magick?

I am on IM7 on OSx: convert --version Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-09-08 https://www.imagemagick.org The command that you gave me does not work, I suppose it's related to IM7? If you're using IM7 you should be using the command "magick" instead of "convert". This command is nearly ...
by GeeMack
2018-09-28T08:43:51-07:00
Forum: Users
Topic: How to Uncompress
Replies: 2
Views: 220

Re: How to Uncompress

digcollib wrote:
2018-09-28T08:29:54-07:00
Any tips on what this is or why it is happening?
You need to end your command with the name of the output file you're writing to.
by GeeMack
2018-09-27T19:15:23-07:00
Forum: Users
Topic: Conditional -negate pdf file
Replies: 18
Views: 763

Re: Conditional -negate pdf file

That does it. Thanks very much for all your help. Keep in mind when using FX expressions directly within an operation like... ... -level "%[fx:mean<0.5?100:0] ... ... it will run that expression separately on every image in the list, or on each page of the PDF. But if you set that variable before t...
by GeeMack
2018-09-27T10:46:03-07:00
Forum: Users
Topic: Conditional -negate pdf file
Replies: 18
Views: 763

Re: Conditional -negate pdf file

One last issue - the level command seems to cause a problem with the anti-aliasing. I noticed the output pdf has reduced image dimensions and file size. Not sure why? When IM reads in a PDF it defaults to a density of 72. Try setting the density before reading the input file, maybe 150 or 300. magi...
by GeeMack
2018-09-27T07:28:26-07:00
Forum: Users
Topic: Conditional -negate pdf file
Replies: 18
Views: 763

Re: Conditional -negate pdf file

I wondered if I could store the mean at the start somehow, I tried: magick input.pdf -channel RGB -set option:mw "%%[mean]" -level "%%[fx:mw<0.5?100:0]%% -white-threshold "%%[fx:mw<0.5?85:100]%%" output.pdf IM won't let you set a variable like that and use it inside another FX expression, but you c...
by GeeMack
2018-09-26T20:21:12-07:00
Forum: Users
Topic: Conditional -negate pdf file
Replies: 18
Views: 763

Re: Conditional -negate pdf file

I'm getting an error: convert: invalid argument for option '-level': %[fx:mean<0.5?100:0]% @ error/convert.c/ConvertImageCommand/2003. Try using just "magick" instead of "magick convert". When you add "convert" to the command it will take on IM6 behavior. You need it to act like IM7 to make those i...
by GeeMack
2018-09-26T18:24:41-07:00
Forum: Users
Topic: Conditional -negate pdf file
Replies: 18
Views: 763

Re: Conditional -negate pdf file

In a batch file I'm using: magick convert %1 -alpha deactivate -negate -white-threshold 85%% "%~dpn1_negated%~x1" which inverts all the pages of the input.pdf to the output.pdf Using IM7 offers various approaches, but you should be using just "magick" instead of "magick convert" to use its full set...
by GeeMack
2018-09-25T07:09:11-07:00
Forum: Users
Topic: Modifying a list of images
Replies: 3
Views: 380

Re: Modifying a list of images

I have a list of these images and their locations in a txt file. Is there a way to run this script in batch for these specific images in the txt file? If the text list has full path file names, you can have IM read that list by preceding it with "@". Then when setting the file name in your command,...
by GeeMack
2018-09-22T06:52:58-07:00
Forum: Users
Topic: Error with "magick convert"
Replies: 9
Views: 1055

Re: Error with "magick convert"

Awlwot wrote:
2018-09-22T03:36:41-07:00
Any idea how I could fix this 3285 error?
Your command doesn't have an output file name.

And as Bonzo mentioned, when you're using IM7 you should be using the command "magick" not "magick convert".
by GeeMack
2018-09-20T16:50:23-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 1446

Re: Getting the color of a pixel

or I presume in Windows, this will work without the quotes, but someone should check that out. magick KEWX_L2_VEL_colorized.gif -transparent # %[ hex :p{0,3769}] KEWX_L2_VEL_colorized.gif That works in Windows with or without the quotes. Either way requires doubling the percent sign if used in a BA...