Search found 647 matches

by GeeMack
2018-09-27T10:46:03-07:00
Forum: Users
Topic: Conditional -negate pdf file
Replies: 18
Views: 1638

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: 1638

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: 1638

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: 1638

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: 750

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: 2276

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: 2272

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...
by GeeMack
2018-09-20T14:25:20-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 2272

Re: Getting the color of a pixel

magick KEWX_L2_VEL_colorized.gif -transparent #4BCB2AFF KEWX_L2_VEL_colorized.gif This works when I manually type it, but I should be able to inject the variable in there to automate it somehow. Since you're using IM7, in many cases you can do this sort of thing as a single command by reading the p...
by GeeMack
2018-09-11T15:33:27-07:00
Forum: Users
Topic: how I could reduce this command for output only one image ?
Replies: 6
Views: 1316

Re: how I could reduce this command for output only one image ?

I have this code and this output two images ; how I could do for output 1 image [...] reduce this two command to one command One of the simplest ways to combine commands is by isolating the various parts inside parentheses. Here's an example using your commands... convert z1.gif \( -clone 0--1 -mor...
by GeeMack
2018-09-04T22:33:18-07:00
Forum: Users
Topic: How to stretch an image non-linearly in one dimension (à la Gopro Superview)
Replies: 12
Views: 2968

Re: How to stretch an image non-linearly in one dimension (à la Gopro Superview)

I'm trying to recreate the "Superview" effect of a go-pro camera in linux, from a camera that doesn't have this ability. [...] Any help or hints would be greatly appreciated. Another approach is to crop the image into vertical strips, use "+distort" to scale those strips progressively wider from th...
by GeeMack
2018-09-04T16:38:13-07:00
Forum: Users
Topic: How to stretch an image non-linearly in one dimension (à la Gopro Superview)
Replies: 12
Views: 2968

Re: How to stretch an image non-linearly in one dimension (à la Gopro Superview)

I'm trying to recreate the "Superview" effect of a go-pro camera in linux, from a camera that doesn't have this ability. [...] Any help or hints would be greatly appreciated. I can get the basic effect you describe by cropping a 1440x1080 image into halves, running two distortions on the halves, an...
by GeeMack
2018-09-03T12:47:37-07:00
Forum: Bugs
Topic: Problem with "gradient:[WxH]" - IM7.0.8-11
Replies: 2
Views: 1569

Re: Problem with "gradient:[WxH]" - IM7.0.8-11

This problem also occurs with ImageMagick 6.9.10-11 Q16 x64 HDRI. These three commands should produce gradients, but instead the outputs are an all white square, an all red square, and an all yellow square... convert gradient:[100x100] test1.png convert gradient:red-yellow[100x100] test2.png convert...
by GeeMack
2018-08-31T21:59:57-07:00
Forum: Bugs
Topic: Problem with "gradient:[WxH]" - IM7.0.8-11
Replies: 2
Views: 1569

Problem with "gradient:[WxH]" - IM7.0.8-11

Using ImageMagick 7.0.8-11 Q16 x64 HDRI on Windows 10... I'm getting unexpected results creating gradients using square brackets to specify the canvas size like this... magick gradient:[200x200] test.png It generates an all white image, no gradient. These commands also show the problem... magick gra...
by GeeMack
2018-08-27T10:03:45-07:00
Forum: Users
Topic: choose starting frame (different than frame 0) for a GIF
Replies: 4
Views: 1168

Re: choose starting frame (different than frame 0) for a GIF

Assuming my sequence si 90 frames and I wan it to start at frame 7 how would you adapt your code into mine? The "( -clone 0-7 ) -delete 0-7 +insert" part of my example should be right after your command reads in the images... magick ... *.png ( -clone 0-7 ) -delete 0-7 +insert ... output.gif After ...
by GeeMack
2018-08-25T20:09:40-07:00
Forum: Users
Topic: choose starting frame (different than frame 0) for a GIF
Replies: 4
Views: 1168

Re: choose starting frame (different than frame 0) for a GIF

Ideally I'd like to have a way to set in the bat file the starting frame for the GIF and still loop through all provided images from the png sequence. If you can set your desired starting frame number as a variable or an argument to your script, you can easily re-order the images when you read them...