home/ atoms/ processing-vector-vs-raster-output

Vector PDF output preserves resolution at any scale while raster output has fixed pixel resolution

When exporting from Processing, choosing between vector and raster depends on end use. Vector PDF stores geometry as mathematical descriptions — printable at any size without pixelation, editable in Illustrator or Inkscape, but may not capture effects that accumulate pixel-by-pixel (e.g., generative layering via semi-transparent shapes). Raster formats (save(), saveFrame()) capture pixels and must be sized for the print resolution before running: a 4-inch print at 600 dpi requires size(2400,2400). Raster is necessary when the visual effect depends on pixel accumulation. JPEG compresses with quality loss; TIFF/PNG are lossless.

Examples

// Vector PDF: import processing.pdf.*; size(800, 800, PDF, “output.pdf”);

// High-res raster: PGraphics big = createGraphics(3000, 3000, JAVA2D); big.beginDraw(); /* draw */ big.save(“big.tif”);

Assessment

For a generative sketch where shapes accumulate with 5% opacity over 1000 frames, explain why PDF output would not capture the final image and what raster settings you would need for a 20cm wide print at 300 dpi.

“Use the vector technique to export line art, type, or shapes that can be printed professionally, published, or printed at very large sizes.”
corpus · processing-handbook-no-login-mirror-pdf-reas-and-fry · chunk 134