Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.
Russell Frank edited this page Feb 15, 2012 · 7 revisions

Renderizer

DPI of Illustrator Files

The Illustrator AppleScript interface does not accept a DPI property when exporting images; it does, however, accept a scaling property. So, the scaling property must be based on the source dpi. This is assumed to be 72. If it is not, use the srcdpi property in an output block to specify otherwise.

When making new files in Illustrator, choose a document profile with a ppi of x. Then, the width and height you specify will be the width and height of the image created with a dpi of x specified in your images.yaml file.

DPI of Inkscape Files

Inkscape seems to default to 90 DPI (for SVG files, at least). So, if you specify x by y pixels as the size of your image when creating an image in Inkscape, render at 90 DPI to get an image of x by y pixels.

If you'd like to maintain some consistency of DPI values with Illustrator, you can use this hack: specify x by y as size of your image in points in Inkscape when creating a file. Then, when you specify a DPI of 72 in your images.yaml file, the image will be x by y pixels when rendered.

You're using the terms dpi and ppi totally incorrectly!

Probably. I'm a developer, not a graphic designer -- I'm concerned with getting the images rendered at the proper resolution. The DPI and PPI that Inkscape and Illustrator use are probably just properties in the files somewhere. I just need to know what to tell my graphic designer in order to properly automate the rendering process.

This doesn't work with my version of Illustrator!

I'm sorry to hear that. Unfortunately, Adobe's AppleScript interface for Illustrator is notoriously crappy. The version of Illustrator I have is CS5, and it works for me. If you can get it working with an older version of Illustrator, open a pull request or send me the code and I'll integrate it.

How can I render images with x?

You'll need to add another render backend. This will involve writing a function that accepts input, output, and dpi parameters. Then, you add this function to the backends dict in the compile function.

Clone this wiki locally