Enum ImageAttachmentFormat
- Namespace
- MailFathom.Application.Emails.Extraction.Images
- Assembly
- MailFathom.Application.dll
Names an image format this deployment is willing to send to a provider for description.
public enum ImageAttachmentFormat
Fields
Gif = 3GIF, whose logical screen descriptor states the grid every frame is composed onto.
An animated GIF is sent as it arrived and a vision model reads its first frame, which is the frame the description is of.
Jpeg = 1JPEG, whose grid is stated by whichever start-of-frame marker the segment chain reaches first.
Png = 0Portable Network Graphics, whose
IHDRchunk states the grid in the first twenty-four octets.Webp = 2WebP, in any of its three chunk layouts: lossy, lossless, and extended.
Remarks
The whole allow-list, and deliberately a short one. Every entry is a raster format whose header states its own pixel
grid in a fixed place, which is what lets a decompression bomb be refused from a few bytes rather than discovered by
allocating for it. A format that carries markup, script, or a reference to something fetched elsewhere is not on the
list and is not made to be — image/svg+xml is the one such format common enough in mail to be named as
excluded rather than left to fall through as unrecognized.
Membership is decided from the octets rather than from the part's declared media type, because the media type is written by the sender and the octets are what a provider decodes.