ImageEn, unit iexBitmaps

IEWriteICOImages

IEWriteICOImages


Declaration


procedure IEWriteICOImages(const fileName: WideString; images: array of TObject);


Description


Provides an alternate method to save ICO files (instead of using SaveToFile or SaveToFileICO). It allows you to specify the origin of each frame of ICO to be saved.

IEWriteICOImages doesn't look at ICO_Sizes and ICO_BitCount, but only TImageEnView.IO.Params.BitsPerSample and TImageEnView.IO.Params.SamplesPerPixel.


Example


// Suppose we have three images, each in a TImageEnView component (e.g. ImageEnView1, ImageEnView2, ImageEnView3)
// we want to create an icon of these three images at 32 bit, 8 bit and 4 bit.

// 32 bit (24 for colors and 8 for alpha channel)
ImageEnView1.IO.Params.BitsPerSample := 4;
ImageEnView1.IO.Params.SamplesPerPixel := 3;

// 8 bit (256 colors)
ImageEnView2.IO.Params.BitsPerSample := 8;
ImageEnView2.IO.Params.SamplesPerPixel := 1;

// 4 bit (16 colors)
ImageEnView3.IO.Params.BitsPerSample := 4;
ImageEnView3.IO.Params.SamplesPerPixel := 1;

// save all inside a single ICO
IEWriteICOImages('output.ico', [ImageEnView1, ImageEnView2, ImageEnView3]);


See Also


- SaveToFileICO
- SaveToStreamICO
- EnumICOIm (Image Count)
- Global Image Methods