PNG filmstrip cropping (Delphi 2010)

I have a png image filmstrip as follows: filmstrip

I would like to know how to crop each image and put these images in the TImageList control, always preserving transparency.

[EDIT]

Yes, during development, the trick mentioned by RRUZ works fine, but I wanted to crop the images at runtime, i.e. loading a filmstrip from a resource or file

+3
source share
3 answers

You must follow these steps:

  • set the property ColorDepthvalue cd32Bit,

  • DrawingStyleto dsTransparent,

  • Height= 48,

  • Width= 48,

then upload the image and the result will be

enter image description here

+4
source

. , . D2005.

: AWIcons Pro http://www.awicons.com/icon-editor/ ( !). , imagelist ( .bmp .png), . .ico, , . ( .png), Delphi . . AWIcons , , , .

+1

TImageList.FileLoad. , .

, , ImageList_LoadImage uFlags, LR_LOADFROMFILE, Windows . TBitmap (BMP).

. . PNG - , PNG- PNG -BMP-, MS Common Controls. DFM , , PNG. , , .

If you want to save your data in PNG format, you should not use the VCL TImageList to store it, because you will need to do the conversion from PNG to TBitmap in order to actually use the TImageList.

+1
source

All Articles