Search found 10566 matches

by snibgo
2018-09-22T12:31:16-07:00
Forum: IMagick
Topic: Fax image processing (needs to be fast)
Replies: 4
Views: 112

Re: Fax image processing (needs to be fast)

Yes, "-monochrome" is multi-threaded. Will it be much faster with lots of cores? That depends on many factors, including image size and the computer. We can test it with "-bench", for example: f:\web\im>%IMG7%magick -size 2000x2000 gradient:red-blue g.miff f:\web\im>%IMG7%magick g.miff -bench 5 -mon...
by snibgo
2018-09-21T06:57:08-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 5
Views: 114

Re: Remove horizontal summation lines but keep a minus

A bit more pre-processing solves the problem: convert ^ Before1.png ^ -strip ^ ( +clone ^ -threshold 50%% ^ -write mpr:ORG ^ +delete ^ ) ^ ( mpr:ORG ^ -negate ^ -morphology Erode rectangle:50x1 ^ -mask mpr:ORG -morphology Dilate rectangle:50x1 ^ +mask ^ -morphology Dilate Disk:2 ^ ) ^ -compose Light...
by snibgo
2018-09-21T05:37:13-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 5
Views: 114

Re: Remove horizontal summation lines but keep a minus

My command turns black lines into white, but your image doesn't have black lines. You could process it to make the lines black, then remove them, and use the pixels that have changed to paint white over your input image. However, that image is low quality with small characters. I doubt that you will...
by snibgo
2018-09-21T04:13:56-07:00
Forum: Users
Topic: Error resize with the height
Replies: 4
Views: 97

Re: Error resize with the height

What version of IM, on what platform? It seems to work fine on v7.0.7-27 on Windows 8.1:

Code: Select all

f:\web\im>%IMG7%magick -size 2322x4128 xc: -resize x600 info:

xc: XC 338x600 338x600+0+0 16-bit sRGB 2.906u 0:00.562
by snibgo
2018-09-21T04:07:53-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 5
Views: 114

Re: Remove horizontal summation lines but keep a minus

See viewtopic.php?f=1&t=22338&p=129166#p129154 where I show a command that turns white all black lines that are at least 50 pixels wide.
by snibgo
2018-09-20T17:17:39-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 246

Re: Getting the color of a pixel

We can also use expressions for the coordinates, eg: -transparent %[pixel:p{0,h-1}] "hex:" also works for me. In Windows, "#" isn't a special character so we don't need quotes (but they are harmless). What are the tradeoffs for "hex:" versus "pixel:"? "Hex:" always rounds HDRI values to integers, an...
by snibgo
2018-09-20T15:29:52-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 246

Re: Getting the color of a pixel

GeeMack wrote:-transparent %[pixel:p{0,3769}]
Ah, I didn't know we could do that. Very useful. Thanks, GeeMack.
by snibgo
2018-09-20T10:06:47-07:00
Forum: Users
Topic: Image sequence to RGBA file
Replies: 1
Views: 54

Re: Image sequence to RGBA file

The RGBA format doesn't compress data. If you want compression, use a different format.
by snibgo
2018-09-20T03:35:50-07:00
Forum: Users
Topic: Partial gamma correction
Replies: 1
Views: 58

Re: Partial gamma correction

I don't understand the question. A required operation often breaks down into: - what changes do I want? - where do I want those changes? A solution is to clone the input, apply the changes to that clone, then composite the clone over the original using a mask that is white where we want the changes ...
by snibgo
2018-09-20T03:29:14-07:00
Forum: Users
Topic: How to draw with tranparent color / how draw erasures?
Replies: 1
Views: 52

Re: How to draw with tranparent color / how draw erasures?

I would draw a grayscale image, then copy-opacity that to form the alpha channel: convert -size 1001x1001 xc:#2244aa ^ ( +clone -fill Black -colorize 100 ^ -fill White -draw "circle 500,500,1,500" ^ -fill Black -draw "circle 500,500,400,500" ^ ) ^ -alpha off ^ -compose CopyOpacity -composite ^ out.p...
by snibgo
2018-09-20T03:21:23-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 246

Re: Getting the color of a pixel

Like this, Windows BAT syntax:

Code: Select all

for /F "usebackq" %%L in (`magick ^
  KEWX_L2_VEL_colorized.gif ^
  -format "mycol=%%[hex:p{0,3769}]\n" ^
  info:`) do set %%L

magick KEWX_L2_VEL_colorized.gif -transparent #%mycol% KEWX_L2_VEL_colorized.gif
by snibgo
2018-09-19T14:57:17-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 246

Re: Getting the color of a pixel

dholcomb9711 wrote:(I used notepad to save it as a batch file and ran it):
In a BAT file, you need to double the %.
by snibgo
2018-09-19T09:49:40-07:00
Forum: Users
Topic: yellow+blue=green
Replies: 1
Views: 55

Re: yellow+blue=green

"yellow+cyan->green" occurs in subtractive mixing, like paints or colour printers. So do the work in CMY colorspace, eg:

Code: Select all

magick -size 200x200 xc:Yellow xc:cyan -colorspace CMY -compose Add -composite -colorspace sRGB x.png
by snibgo
2018-09-19T05:57:34-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 246

Re: Getting the color of a pixel

Here's the command I showed you:

Code: Select all

magick in.png -format %[hex:p{0,99}] info:
You should put in your own filename, and height minus 1:

Code: Select all

magick KEWX_L2_VEL_colorized.gif -format %[hex:p{0,3769}] info:
Does that work okay?
by snibgo
2018-09-19T04:39:28-07:00
Forum: Users
Topic: Getting the color of a pixel
Replies: 17
Views: 246

Re: Getting the color of a pixel

Compare your command to mine. Mine included characters in the format that yours doesn't.

You haven't said what shell you use (bash, Windows CMD, or whatever). When your magick command works, use shell facilities to put the result in a variable, then you can use that variable in your 2nd command.