The ImageInfo struct currently has a field sof of the type SOFMarkers. The SOFMarkers enum is not exported, so consumers of the library cannot use the field.
At Typst, we would like to check the type of the enclosed JPEG. For example, images encoded with SOF0 and SOF1 (compare Adobe Tech Note #5116, p. 8; as well as SOF2 starting from PDF 1.3, see PDF 1.7 spec, p. 35) may directly be included in PDFs, without recoding to a different format. This would make Typst faster and potentially conserve image quality better, depending on if a lossy recoding would have been chosen otherwise. We want to check that the image file isn't in a format that zune-jpeg supports but PDF viewers may not, hence why we want to check the field. It would be great if the enum could be exported!
The
ImageInfo
struct currently has a fieldsof
of the typeSOFMarkers
. TheSOFMarkers
enum is not exported, so consumers of the library cannot use the field.At Typst, we would like to check the type of the enclosed JPEG. For example, images encoded with
SOF0
andSOF1
(compare Adobe Tech Note #5116, p. 8; as well asSOF2
starting from PDF 1.3, see PDF 1.7 spec, p. 35) may directly be included in PDFs, without recoding to a different format. This would make Typst faster and potentially conserve image quality better, depending on if a lossy recoding would have been chosen otherwise. We want to check that the image file isn't in a format thatzune-jpeg
supports but PDF viewers may not, hence why we want to check the field. It would be great if the enum could be exported!