Intelligent and Interactive Systems

User Tools

Site Tools


misc:graphics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

misc:graphics [2015/10/25 07:54]
c7031007
misc:graphics [2018/09/03 19:35]
Line 1: Line 1:
-====== Proper Choice of Graphics Formats ====== 
- 
-===== Creating your images ===== 
- 
-Create all graphics using the right tool and the right format. For example: 
-  - From SciPy, Octave, Matlab, etc., **export plots in vector format**. 
-  - Create line graphics with **Inkscape**. For LaTeX documents, TikZ may sometimes be a good choice. 
-  - Process photographs with the GIMP - unless you overlay line graphics, in which case use vector tools like Inkscape or LaTeX graphics. 
- 
-===== Never throw away essential information. ===== 
- 
-  - //**Never convert vector to raster data.**// 
-  - //**Never use lossy compression on line graphics.**//​ 
- 
-The proper choice of graphics formats during processing and publishing has a critical impact on the quality and usability of the result. The two principal issues are: 
- 
-  - Preservation of information (in particular, **resolution independence** and avoidance of **compression artifacts**) 
-  - Minimization of **file size** 
- 
-The most important distinction is between vector (resolution independent) and raster (pixel) data. From this follows Rule Number One: //Never convert vector data to raster data.// 
- 
-Then, file formats require attention because of the technological restrictions imposed by the publishing medium. 
- 
-===== Vector Data (possibly combined with raster data) ===== 
- 
-  - Never convert them to raster format. 
-  - For **print** publishing: For PDFLaTeX, convert your graphics to (vector-format) PDF.((OpenOffice.org can import PDF, SVG and other vector graphics formats. I’m sure some of its proprietary look-alikes can also be convinced to grok vector graphics.)) 
-  - For **Web** publishing: Use SVG. For legacy browers that do not yet support SVG, for maximum portability you may want to offer an alternative raster image (inside an ''<​object>''​ tag, for example), see below. 
- 
- 
-===== Raster Data ===== 
- 
-  - Keep your graphics files reasonably small. Provide the resolution required for high-quality publishing, but do not preserve more than can be reproduced in the published form. 
-  - If your data are composed of **smooth transitions** (typically, this includes all **photographs** and almost nothing else): Use a **lossy** format enabling a high compression rate at almost no visible loss of quality (JPEG/​JFIF). 
-  - If your data contain **discrete colors, drawings** etc. (this includes most non-photographic data, or photographic data with line graphics overlaid): Use a **lossless** format. PNG is highly recommended as it is open, includes compression,​ and is widely supported((Except for alpha-channel transparency by Microsoft products, but perhaps this information is outdated.)). For discrete-color drawings, it yields better compression ratios than JPEG, at perfect quality, while JPEG creates approximation artifacts that are particularly obnoxious in print. ((There is almost no reason to use GIF anymore, as PNG is much more versatile and often more efficient. Exceptions are alpha-channel transparency for use with Microsoft products (well supported by the open-source community however) and animated raster graphics ([[http://​www.libpng.org/​pub/​mng/​|MNG]] is still not very widely supported).)) 
- 
-===== Recommended Graphics Formats ===== 
- 
-^ Format ^^ Vector ^ Raster ^^ 
-^  ^^  ^ lossless ^ lossy ^ 
-^ [[http://​www.adobe.com/​devnet/​pdf/​|Portable Document Format]] | PDF |  •  |  •  |  •  | 
-^ [[http://​www.w3.org/​Graphics/​SVG/​|Scalable Vector Graphics]] | SVG |  •  |  •  |   ​• ​ | 
-^ [[http://​www.libpng.org/​pub/​png/​|Portable Network Graphics]] | PNG |  |  •  |  | 
-^ [[http://​www.jpeg.org/​jpeg/​|JPEG File Interchange Format]] | JPG, JPEG, JFIF |  |  |  •  | 
- 
-===== Conversion ===== 
- 
-There are open-source tools for essentially all conversions that arise in practice. To convert PDF to SVG I recommend [[http://​www.inkscape.org/​|Inkscape]]. 
  
misc/graphics.txt · Last modified: 2018/09/03 19:35 (external edit)