Search found 12908 matches

by snibgo
2013-02-13T10:09:42-07:00
Forum: Bugs
Topic: display shows PDF with transparent background
Replies: 2
Views: 5723

Re: display shows PDF with transparent background

I don't think this is a bug. Most viewers (including Adobe Acrobat) show transparent as white. IM "display" shows it as chequerboard. Your PDF is mostly transparent. You could use IM to turn transparent white ... convert test2.pdf -background White -flatten testW.pdf ... so it shows as white in "dis...
by snibgo
2013-02-12T21:08:52-07:00
Forum: Users
Topic: Image Magick compositing with alpha channel in background
Replies: 6
Views: 5855

Re: Image Magick compositing with alpha channel in backgroun

The second "-auto-level" in Fred's script makes the outlines in result.png less transparent than they are in outline.png. We can also simplify (Windows script): "%IMG%convert" ^ full.png ^ ( overlap_mask.png -negate ) ^ ( -clone 0 -alpha extract -auto-level ) ^ ( -clone 1 -clone 2 -compose multiply ...
by snibgo
2013-02-12T12:52:56-07:00
Forum: Users
Topic: Getting colors from multiple regions of an image (perl)
Replies: 10
Views: 8844

Re: Getting colors from multiple regions of an image (perl)

If you don't need the pixel coordinates, you can get a more compact output from:

Code: Select all

convert {blah blah} -compress None ppm:-
by snibgo
2013-02-12T12:00:48-07:00
Forum: Users
Topic: Getting colors from multiple regions of an image (perl)
Replies: 10
Views: 8844

Re: Getting colors from multiple regions of an image (perl)

Why do it in two commands, saving the intermediate result? Personally, I wouldn't use the BMP format unless I really had to. Why scale the result? Scaling means that each pixel won't correspond to the regions. The results are coming out as gray values between 20 and 255 -- the 3rd, 4th or 5th number...
by snibgo
2013-02-12T09:53:52-07:00
Forum: Users
Topic: Getting colors from multiple regions of an image (perl)
Replies: 10
Views: 8844

Re: Getting colors from multiple regions of an image (perl)

You might also think about what you are trying to achieve. If you are simply removing noise and trimming white space, there are simpler methods.
by snibgo
2013-02-12T09:43:43-07:00
Forum: Users
Topic: Getting colors from multiple regions of an image (perl)
Replies: 10
Views: 8844

Re: Getting colors from multiple regions of an image (perl)

You wouldn't resize to bitonal, of course. Other than that, it should work. In my experience, the mean of an area is equal (within approx QuantumDepth) to the same area resized to a single pixel. If you can distinguish text versus non-text by taking the mean of a region, it should also work per pixel.
by snibgo
2013-02-12T09:10:36-07:00
Forum: Users
Topic: Getting colors from multiple regions of an image (perl)
Replies: 10
Views: 8844

Re: Getting colors from multiple regions of an image (perl)

The obvious answer is to resize the image such that each new pixel corresponds to one region. Then the value of each pixel gives the mean value of each region. Only one convert per page, instead of 600.
by snibgo
2013-02-12T07:23:11-07:00
Forum: Users
Topic: PNG with embedded sRGB
Replies: 7
Views: 7557

Re: PNG with embedded sRGB

Just to add to the explanation:

If input.png has a profile, your command will convert the pixel values and add the profile. Otherwise, it will just add the profile. Then, because you are saving sRGB as PNG, it will save the sRGB chunk rather than inserting the actual profile in the file.
by snibgo
2013-02-12T06:02:40-07:00
Forum: Users
Topic: PNG with embedded sRGB
Replies: 7
Views: 7557

Re: PNG with embedded sRGB

I don't understand. The input has no profile, and you are not adding one, but expect the output to contain a profile?

Can you provide the exact command you are using, and the input file?
by snibgo
2013-02-12T05:28:57-07:00
Forum: Users
Topic: PNG with embedded sRGB
Replies: 7
Views: 7557

Re: PNG with embedded sRGB

The docs say (somewhere; I forget where) that if IM is writing a PNG with sRGB profile, it just sets a PNG flag that says it is sRGB.
by snibgo
2013-02-11T08:27:24-07:00
Forum: Users
Topic: convert multi page ps to png
Replies: 2
Views: 9284

Re: convert multi page ps to png

Have you tried something like: convert myfile.ps[0-14] myfile.png convert myfile.ps[15] myfile.png convert myfile.ps[16-29] myfile.png What does ... identify myfile.ps ... say? With and without verbose? Edit to add: gosh, that's an ancient version of IM! Perhaps your Ghostscript is also antiquated?
by snibgo
2013-02-10T22:34:43-07:00
Forum: Bugs
Topic: pdf to jpeg poor image quality
Replies: 6
Views: 7740

Re: pdf to jpeg poor image quality

I don't understand the problem. Can you post an example PDF? Put it on a free site such as dropbox, and copy the link here.
by snibgo
2013-02-08T09:57:15-07:00
Forum: Users
Topic: conjure and multiple directories, or alternative
Replies: 8
Views: 8654

Re: conjure and multiple directories, or alternative

snibgo, are you on Windows? If so how do you make a script exectute in the command line automatically? Mostly Windows, yes. I'm not sure what you mean; CPP code writes script files, then executes them with spawn() or system() calls. I suppose it would be possible to have a daemon that watched out f...
by snibgo
2013-02-08T06:10:05-07:00
Forum: Users
Topic: header-less binary image format
Replies: 4
Views: 8139

Re: header-less binary image format

That's it. When I write a program that writes such a file, I find it convenient to have the option to spit out the "-size WIDTHxHEIGHT -depth DEPTH" as appropriate. See also http://www.imagemagick.org/Usage/formats/#rgb . That reference doesn't say (but it's probably obvious) that the image starts a...
by snibgo
2013-02-08T05:40:32-07:00
Forum: Bugs
Topic: Centering too big images doesn't work with pdf
Replies: 8
Views: 8445

Re: Centering too big images doesn't work with pdf

On Windows 7, the following works as it should for 6.7.9-6 and 6.8.1-10. It fails for 6.8.2-0, creating PDF files that are unreadable by Adobe Reader or IM "identify". convert -size 100x100 xc:black test100.png convert -size 1000x1000 xc:black test1000.png convert test100.png -gravity center test100...