mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-15 12:24:19 +00:00
A raster that SVG import decodes and stores again (a TIFF, a BMP or any other format that is not PNG, JPEG, GIF or WebP, or an image whose EXIF or TIFF orientation turns or flips it) was written as a PNG with no pHYs chunk, and a turned or planar CMYK TIFF was written without resolution tags, so the image lost the resolution its file declares. The converted PNG now carries the source's resolution in a pHYs chunk, and the CMYK TIFF in its resolution tags, as Open and Place store them. A quarter turn (orientations 5 to 8) swaps the horizontal and vertical values. An image that declares no resolution is stored without one, and an image stored unchanged keeps its own bytes. The PNG, JPEG, TIFF, WebP and BMP resolution readers and the pHYs writer move from the engine to vectorcraft-doc, so the SVG importer can use them; the engine and renderer entry points forward to them unchanged.