jpeg

fun jpeg(jpegBytes: ByteArray, width: Int, height: Int, grayscale: Boolean = false): PdfImage

Embed encoded JPEG bytes directly via /DCTDecode (no re-encode). width/height must match the JPEG's own dimensions. Set grayscale for a single-component (DeviceGray) JPEG.