Search found 9760 matches

by snibgo
2018-02-24T13:24:19-07:00
Forum: IMagick
Topic: policy.xml
Replies: 2
Views: 24

Re: policy.xml

Ki, Mi, Gi etc are binary prefices, where 1 Ki = 1024.

K, M, G etc are decimal prefices, where 1K = 1000.

See https://en.wikipedia.org/wiki/Binary_prefix
by snibgo
2018-02-24T06:27:58-07:00
Forum: Users
Topic: -fx return raw values?
Replies: 6
Views: 90

Re: -fx return raw values?

I do not know if it is being rounded or truncated to an integer. But I suspect that the IM developers have done whatever is correct to make it properly an integer. It isn't deliberately rounded or truncated to an integer, but the current "-precision" setting may round it to an integer. The output m...
by snibgo
2018-02-23T15:30:17-07:00
Forum: Users
Topic: -fx return raw values?
Replies: 6
Views: 90

Re: -fx return raw values?

The constant Fred give, 65535, is correct for Q16 IM. For portability across any Q-number IM, use QuantumRange.
by snibgo
2018-02-23T10:29:02-07:00
Forum: Users
Topic: How can I convert a pdf page to jpg with its original resolution?
Replies: 3
Views: 56

Re: How can I convert a pdf page to jpg with its original resolution?

I think you mean that you have a PDF page with an embedded raster image. You want to know what density to rasterize the page such that the raster image is not resampled. Is that the question?

The answer is to use pdfimages, not ImageMagick.
by snibgo
2018-02-23T08:22:14-07:00
Forum: Bugs
Topic: Transparent image after scale
Replies: 2
Views: 45

Re: Transparent image after scale

Your sample image is too large (52MB) for me to download, sorry.

GIF has binary transparency: each pixel is either opaque or transparent. If your resized TIFF image has graduated transparency, I suggest you either flatten it against a background colour, or threshold the alpha channel at 50%.
by snibgo
2018-02-23T03:39:04-07:00
Forum: Users
Topic: Script to batch split Multipdf to pdf
Replies: 3
Views: 54

Re: Script to batch split Multipdf to pdf

You can do the same "convert" command with PDF files.

However, ImageMagick is a raster image processor. So it will rasterize each PDF page and put each of those raster images inside its own PDF file. This probably isn't what you really want.
by snibgo
2018-02-22T07:47:23-07:00
Forum: Users
Topic: spaces and annotations in filenames
Replies: 19
Views: 400

Re: spaces and annotations in filenames

If you allow uploads from anyone, there are also security considerations. For example, don't allow quote characters.
by snibgo
2018-02-22T07:35:04-07:00
Forum: Users
Topic: same input - different results
Replies: 5
Views: 80

Re: same input - different results

Image files contain metadata such as date/timestamps. You can compare the images for being identical:

Code: Select all

compare -metric AE ina.png inb.png NULL:
The result is the number of pixels that are different.
by snibgo
2018-02-22T07:32:23-07:00
Forum: Users
Topic: Extract sprites/images from a bigger image with transparent background
Replies: 10
Views: 413

Re: Extract sprites/images from a bigger image with transparent background

Probably something like:

Code: Select all

convert in.png -fuzz 10% -transparent #abc out.png
... where abc is the average background colour and the fuzz percentage covers the range of background colours.
by snibgo
2018-02-22T07:29:25-07:00
Forum: Users
Topic: Imagemagick cannot process DNG (dng.la file not found)
Replies: 5
Views: 101

Re: Imagemagick cannot process DNG (dng.la file not found)

Did you build IM yourself? If so, what does config.log say about the build? In particular, what does it say about libraw?
by snibgo
2018-02-22T02:09:42-07:00
Forum: Users
Topic: Using -density in a loop in a batch in Windows 10
Replies: 4
Views: 96

Re: Using -density in a loop in a batch in Windows 10

I've never used Windows 10. (I use 8.1) In all previous versions, "call" is wrong for running an exe program. For your magick line, you should use delayed expansion of the variable "mypage" (because it has to be expanded in each loop repetition, not just once at the start). So the script looks like ...
by snibgo
2018-02-22T01:33:55-07:00
Forum: Users
Topic: Using -density in a loop in a batch in Windows 10
Replies: 4
Views: 96

Re: Using -density in a loop in a batch in Windows 10

"call" is used to call a batch (BAT) script. magick.exe is a binary program, not a BAT script.
by snibgo
2018-02-21T20:47:56-07:00
Forum: Users
Topic: spaces and annotations in filenames
Replies: 19
Views: 400

Re: spaces and annotations in filenames

Ideally, IM would have a setting that meant: "Ignore special characters in filenames." But it doesn't, so including characters like ":[]" in filenames creates ambiguity, which is a bad idea. For example: TIFF:abc.tiff Is this a file named "abc.tiff" with a "TIFF:" prefix, or is it a file named "TIFF...
by snibgo
2018-02-21T11:06:36-07:00
Forum: Users
Topic: spaces and annotations in filenames
Replies: 19
Views: 400

Re: spaces and annotations in filenames

The real problem is that IM interprets characters before the colon as a format type, as in "PNG:abc.png", even if those characters aren't a format type.