zplCore.comzplCore.com

ImageMetadata

public static class ImageMetadata

Writes resolution (DPI) metadata into encoded PNG (pHYs chunk) and JPEG (JFIF APP0 density) files.

Methods

Method SignatureReturnsDescription
static # GetJpegDpi(byte[] jpeg)(int, int)?Reads the JFIF density in DPI (units 1) or null.
static # GetPngDpi(byte[] png)(double, double)?Reads the pHYs resolution in DPI, or null.
static # SetJpegDpi(byte[] jpeg, double dpiX, double dpiY)byte[]Returns the JPEG with JFIF APP0 density set to the resolution in dots per inch (inserts APP0 if missing).
static # SetPngDpi(byte[] png, double dpiX, double dpiY)byte[]Returns the PNG with a pHYs chunk (replacing any existing one) for the given resolution.