Search found 11581 matches

by snibgo
2019-05-20T10:21:34-07:00
Forum: Users
Topic: Compile not working
Replies: 2
Views: 37

Re: Compile not working

jonotrain wrote:... but now all of a sudden I get the following error:
What has changed? A new version of IM? A new computer?
by snibgo
2019-05-20T05:38:39-07:00
Forum: Fred's Scripts
Topic: Fred scripts are NOT working on 64 bit Windows 10
Replies: 9
Views: 221

Re: Fred scripts are NOT working on 64 bit Windows 10

I suggest you write a simple bash script, and learn how to run it. For example, a file named myecho.sh might contain: echo $PWD When I run this command in Windows CMD the result is: $PWD But when I run the command in bash the result is: /cygdrive/f/web/im (In bash, $PWD is the current working direct...
by snibgo
2019-05-20T05:07:28-07:00
Forum: Users
Topic: How to achieve DPI of an image to 300 DPI value
Replies: 2
Views: 46

Re: How to achieve DPI of an image to 300 DPI value

Code: Select all

convert in.png -set units pixelsperinch -density 300 out.png
by snibgo
2019-05-19T22:56:39-07:00
Forum: Users
Topic: Find sub-image while ignoring transparent pixels
Replies: 4
Views: 118

Re: Find sub-image while ignoring transparent pixels

It's super slow - takes about 3 minutes. How can I get this done to less than 2 seconds? As Fred says, a multi-scale search is faster. If you build IM yourself, you can use my Process modules , such as srchimg . When the subimage ("image-to-search-for") is large, this is massively faster than IM's ...
by snibgo
2019-05-19T04:36:11-07:00
Forum: Users
Topic: Vegitation Index from RGB
Replies: 3
Views: 120

Re: Vegitation Index from RGB

What version of IM, on what platform? For "-fx", see http://www.imagemagick.org/script/fx.php . Use single letters "r", "g" or "b" for those channels. Eg: magick in.png -fx "(g-r)/(g+r-b)" out.png At pixels where g+r-b=0, you will get a divide by zero, so the output pixel will be white. It might hel...
by snibgo
2019-05-19T03:49:30-07:00
Forum: Users
Topic: Sorry, can not handle images with 32-bit samples
Replies: 5
Views: 171

Re: Sorry, can not handle images with 32-bit samples

Your LIBTIFF is slightly older than the version currently used by IM. However, that doesn't seem to be the problem. I don't have a version of IM that can read your file dsm.tiff. For example, with IM v7.0.7-28 Q32 with HDRI, ignoring "Unknown field" warnings: magick identify -verbose dsm.tiff identi...
by snibgo
2019-05-18T09:39:55-07:00
Forum: Fred's Scripts
Topic: Fred scripts are NOT working on 64 bit Windows 10
Replies: 9
Views: 221

Re: Fred scripts are NOT working on 64 bit Windows 10

I have converted the script to application by saving it as .exe Huh?? Scripts should not have an ".exe" extension. That extension is only for binary programs (which includes "magick.exe", "convert.exe", etc. Personally, for bash scripts I use the extension ".sh". Under Cygwin, they also work with n...
by snibgo
2019-05-18T07:53:25-07:00
Forum: Users
Topic: Elongated “Shadow” Script
Replies: 4
Views: 239

Re: Elongated “Shadow” Script

You use "-motion-blur" which is sophisticated and quite expensive. Then you use "-fx" to reduce the motion blur to a binary on/off. "-fx" is expensive. A simpler and quicker alternative is to use "-morphology": convert ^ 1KfLe5M.png ^ -alpha Extract ^ -morphology Thicken:-1 "2x2+1+1:1,-,-,0" ^ sprea...
by snibgo
2019-05-18T04:00:29-07:00
Forum: Users
Topic: Sorry, can not handle images with 32-bit samples
Replies: 5
Views: 171

Re: Sorry, can not handle images with 32-bit samples

I've never seen that message before. What was your command? Please link to a sample input file so we can test it doesn't have problems. What version of IM ("magick -version")? What version of the TIFF library("magick -list format |grep TIFF")? If your TIFF library is older than v4.0.9 I suggest you ...
by snibgo
2019-05-17T16:31:43-07:00
Forum: Users
Topic: Removing All Shades of Grey from an Image
Replies: 12
Views: 312

Re: Removing All Shades of Grey from an Image

Interesting method, GeeMack. It creates opacity less than 100% where the sum of C+M+Y is less than 100%. This may be reasonable, or could be thresholded to make the opacity either 0 or 100%. We can make it slightly faster (and use less memory) by separating just the CMY channels, rather then separat...
by snibgo
2019-05-17T11:31:51-07:00
Forum: Users
Topic: Removing All Shades of Grey from an Image
Replies: 12
Views: 312

Re: Removing All Shades of Grey from an Image

Good stuff. It will work better if your input image hasn't been through JPEG compression.
by snibgo
2019-05-17T09:50:32-07:00
Forum: Users
Topic: Removing All Shades of Grey from an Image
Replies: 12
Views: 312

Re: Removing All Shades of Grey from an Image

My suggestion works fairly well on your image; it makes all pure gray pixels transparent. Change to "-threshold 10%" if you want.
by snibgo
2019-05-17T09:24:55-07:00
Forum: Users
Topic: Removing All Shades of Grey from an Image
Replies: 12
Views: 312

Re: Removing All Shades of Grey from an Image

Reading and writing miff is much faster than png, so that would help. Your solution won't work for 16-bit images unless you have a longer loop. A loop-less method is to find where chroma is zero, and make those pixels transparent: magick in.png ( +clone -colorspace HCL -channel G -separate +channel ...
by snibgo
2019-05-17T05:39:03-07:00
Forum: Bugs
Topic: "-morphology thicken" in v7
Replies: 2
Views: 95

"-morphology thicken" in v7

This seems to be broken in v7. I use an example from http://www.imagemagick.org/Usage/morphology/#thicken Input man.gif http://snibgo.com/imforums/man.gif v6.9.9-50 (correct result): convert man.gif -morphology Thicken 3x1+2+0:1,0,0 mn_thk_v6.gif http://snibgo.com/imforums/mn_thk_v6.gif v7.0.7-28 (b...
by snibgo
2019-05-16T12:00:40-07:00
Forum: Users
Topic: Putting an image onto an A4 PostScript
Replies: 4
Views: 193

Re: Putting an image onto an A4 PostScript

Perhaps "-extent" isn't an option for "magick montage". You can run multiple commands with piping:

Code: Select all

magick montage rose: logo: miff:- |magick - -extent 2100x2970 info:

- MIFF 2100x2970 2100x2970+0+0 16-bit sRGB 0.438u 0:00.327