Search found 10 matches

by Mazin
2011-04-12T17:35:59-07:00
Forum: Users
Topic: Rasterize SVG with right density?
Replies: 2
Views: 8009

Re: Rasterize SVG with right density?

convert -density 400 in.svg -resize 300x300 out.png I thought about doing that, but it seems like a waste of CPU and memory. It runs the risk of undersampling (e.g. rendering a 16x16px SVG to a 300x300 PNG) or eating up too much memory (e.g. rendering a 10x10m SVG to a 300x300 PNG). The first ...
by Mazin
2011-04-12T17:07:20-07:00
Forum: Users
Topic: Rasterize SVG with right density?
Replies: 2
Views: 8009

Rasterize SVG with right density?

I would like to convert an SVG into a PNG and enlarge it to a specific size in the process (e.g. to 300px on the longest side). However, simply doing convert -resize 300x300 in.svg out.png gives poor results because the image becomes pixelated. Can I get IM to render it with the correct density for ...
by Mazin
2011-04-12T16:54:45-07:00
Forum: Users
Topic: Converting SVG+Javascript files to PNG
Replies: 4
Views: 11107

Re: Converting SVG+Javascript files to PNG

There is no way to know if Javascript code, if any, will ever finish running.
by Mazin
2010-07-15T23:24:12-07:00
Forum: Users
Topic: ReadImage of PDF without "density" specified
Replies: 13
Views: 59245

Re: ReadImage of PDF without "density" specified

It's hard to tell by the vague description of your application, but if all you want to do is extract the un-resized images themselves from the PDF, you can use xpdf or poppler's `pdfimages` command which extracts all images from a pdf as ppm or jpg without doing any PDF rendering. You can then ...
by Mazin
2010-07-12T11:45:33-07:00
Forum: MagickWand for PHP
Topic: Quality PDF>Image
Replies: 5
Views: 54436

Re: Quality PDF>Image

Sorry if I'm bumping this from too long ago. I'd like to point out that counting PDF pages with ImageMagick can be more intensive than you think. Even if you use identify instead of convert, ghostscript will still crunch through the entire PDF. If it's a big PDF, you might just find your CPU maxed ...
by Mazin
2009-08-11T07:33:05-07:00
Forum: Bugs
Topic: potential bug setting density and units in PNG IM 6.5.4.0
Replies: 4
Views: 10486

Re: potential bug setting density and units in PNG IM 6.5.4.0

According to the PNG specification ( http://www.w3.org/TR/PNG/#11pHYs ), the pHYs field contains pixel dimensions on the X and Y axis along with a unit specifier. This unit specifier has two options: none, and metres. So if I understand this correctly, you can either set pixel/metre or the aspect ...
by Mazin
2008-11-26T10:58:59-07:00
Forum: Users
Topic: convert PNG to PDF now too big !
Replies: 3
Views: 18571

Re: convert PNG to PDF now too big !

I was just about to come here and post about the same problem. It seems that IM doesn't embed images in PDFs in their native bit depth. I received a PDF of scans (black and white, 1bit/px). Burst it with pdfimages into PBM. Converted it into PNG (still 1bit/px). Ran "convert *.png pdf.pdf". The ...
by Mazin
2008-11-24T13:57:50-07:00
Forum: Developers
Topic: [PHP]DPI value of an EPS or PDF file
Replies: 0
Views: 3481

Re: [PHP]DPI value of an EPS or PDF file

There is not concept of DPI in a PDF file as far as I know. There are page dimensions, while everything else should be vectors.
by Mazin
2008-11-24T13:48:40-07:00
Forum: Users
Topic: [FIXED] Batch changing resolution in PNG
Replies: 3
Views: 10267

Re: Batch changing resolution in PNG

Erm, I meant that in this particular case, my files are named page00.png, page01.png, etc.

I understand the implications of using mogrify, and it is clearly modifying my files when I run the command. It just isn't setting the resolution.
by Mazin
2008-11-24T13:33:57-07:00
Forum: Users
Topic: [FIXED] Batch changing resolution in PNG
Replies: 3
Views: 10267

[FIXED] Batch changing resolution in PNG

I'm trying to change the resolutions of a batch of PNG files. Right now, they are at 72dpi, but they need to be set to 300dpi (no rescaling). This is because the dpi is used when I convert them into PDF, resulting in incorrect PDF page sizes. I try mogrify -density 300x300 page*.png but nothing ...