typedef struct
  int            ImageType;
  int            DataSize;
  unsigned char  Data[ 1 ];
} SMemoryImage;

ImageType item holds one of the following values: IMAGE_JPG, IMAGE_GIFT, IMAGE_BMP, IMAGE_TGA

DataSize item contains information about the number of bytes available through Data item.

Data item can be used to access compressed image data.

The MemoryImage data format is described by following image:

The memory buffer which you need to give to LoadFromMemory and LoadThumbnailFromMemory functions need to have ImageType indicator in first four bytes, then DataSize in next four bytes followed by <DataSize> bytes of data. 


The SMemoryImage structure is used to store the compressed image data.