Castle Game Engine: CastleImages: record TImageFormatInfo

# record TImageFormatInfo
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleImages ## Declaration `type TImageFormatInfo = record` ## Description ## Overview ### Fields
`FormatName: string;`
`MimeTypesCount: TImageFormatInfoMimeTypesCount;`
`MimeTypes: array [TImageFormatInfoMimeTypesCount] of string;`
`ExtsCount: TImageFormatInfoExtsCount;`
`Exts: array [TImageFormatInfoExtsCount] of string;`
`Load: TImageLoadFunc;`
`LoadedClasses: TImageLoadHandledClasses;`
`Save: TImageSaveFunc;`
`SavedClasses: TImageSaveHandledClasses;`
## Description ### Fields
`FormatName: string;`
Human-readable format name. Note that this is supposed to be shown to normal user, in save dialog boxes etc. So it should be short and concise. I used to have here long format names like `JFIF, JPEG File Interchange Format` or `PNG, Portable Network Graphic`, but they are too ugly, and unnecessarily resolving format abbrevs. For example, most users probably used JPEG, but not many have to know, or understand, that actually this is image format JFIF; these are technical and historical details that are not needed for normal usage of image operations. Saying it directly, I want to keep this `FormatName` short and concise. This is not a place to educate users what some abbrev means. This is a place to "name" each file format in the most natural way, which usually means to only slightly rephrase typical file format extension. In practice, I now copy descriptions from English GIMP open dialog.
`MimeTypesCount: TImageFormatInfoMimeTypesCount;`
`MimeTypes: array [TImageFormatInfoMimeTypesCount] of string;`
MIME types recognized as this image file format. First MIME type is the default for this file format (some procedures make use of it).
`ExtsCount: TImageFormatInfoExtsCount;`
`Exts: array [TImageFormatInfoExtsCount] of string;`
File extensions for this image type. First file extension is default, which is used for some routines. Must be lowercase. This is used e.g. to construct file filters in open/save dialogs. Together with MimeTypes it is also used by URIMimeType to map file extension into a MIME type. An extension matching one of `Exts` values implicates the default MIME type for this format (MimeTypes[1]). Note that to cooperate nicely with network URLs (when server may report MIME type) and data URIs, most of the code should operate using MIME types instead of file extensions. So usually you are more interested in MimeTypes than `Exts`.
`Load: TImageLoadFunc;`
Load method for this file format. `Nil` if cannot be loaded.
`LoadedClasses: TImageLoadHandledClasses;`
If Load is assigned, this describes what TCastleImage descendants can be returned by this Load. LoadImage will need this information, to make necessary convertions to other TCastleImage classes, when possible.
`Save: TImageSaveFunc;`
Save method for this file format. `Nil` if cannot be saved.
`SavedClasses: TImageSaveHandledClasses;`
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13