3. L'image et animation simple

3.6. Conversion d'images vectorisés

[Extrait de la Graphics FAQ:] A lot of people ask about converting from HPGL to PostScript, or MacDraw to CGM, or whatever. It is important to understand that this is a very different problem from the image format conversions Converting one image format to another is a fairly easy problem, since once you get past all the file header junk, a pixel is a pixel -- the basic objects are the same for all image formats. This is not so for vector formats. The basic objects -- circles, ellipses, drop-shadowed pattern-filled round-cornered rectangles, etc. -- vary from one format to another. Except in extremely restricted cases, it is simply not possible to do a one-to-one conversion between vector formats. There is software for converting to and from CGM files on ftp.psc.edu. The contributor states that it runs on Unix, MS-Windows, and possibly the Mac. A better, more specific blurb would be most welcome.

On the other hand, it is quite possible to do a close approximation,rendering an image from one format using the primitives from another. As far as I know, no one has put together a general toolkit of such converters, but two different HPGL to PostScript converters have been posted to comp.sources.misc. Check the index on your nearest archive site.

A related frequent question is how to convert from some vector format to a bitmapped image - from PostScript to Sun raster format, or HPGL to X11 bitmap. For example, some of the commercial PostScript clones for PC's allow you to render to a disk file as well as a printer. Also, the PostScript interpreters in the NeXT box and in Sun's X11/NeWs can be used to render to a file if you're clever. But in general, the answer is no. However, if someone were to put together a vector to vector conversion toolkit, adding a vector to raster converter would be trivial.

GNU ghostscript (from the FSF - current version 2.5.2) includes drivers for both ppm and gif format files, thus it can be used as a PostScript to ppm or a PostScript to GIF filter. (It implements essentially all of PostScript level 1 and alot of Display PostScript and level 2).


No Title - 6 OCT 1995

Generated with Harlequin WebMaker