timagelist

Clipping a filmstrip in png format (Delphi 2010)

烈酒焚心 提交于 2019-12-22 10:38:08
问题 I have a filmstrip of images in png format like this: I'd like to know how to clip each of the images and put these images in a TImageList control, always preserving the transparency. [EDIT] Yes, at designtime the trick mentioned by RRUZ works fine, but I wanted to clip the images at runtime, i.e. by loading the filmstrip from resource or file 回答1: You must follow these steps: set ColorDepth property to cd32Bit , DrawingStyle to dsTransparent , Height = 48, Width =48, then load the image and

How to load a transparent Image from ImageList?

本秂侑毒 提交于 2019-12-21 03:54:15
问题 I want to load a picture (32 bit-depth, transparent) from a TImageList to an TImage . The standard approach would be ImageList.GetBitmap(Index, Image.Picture.Bitmap); . However the GetBitmap method doesn't work with transparency, so I always get a non-transparent bitmap. 回答1: The workaround is rather simple - ImageList offers another method, GetIcon , which works OK with transparency. Code to load a transparent Image would be: ImageList.GetIcon(Index, Image.Picture.Icon); And don't forget to

TImagelist not adding bitmap

◇◆丶佛笑我妖孽 提交于 2019-12-12 06:46:36
问题 I'm at my whits end... trying to get a custom list of pictures, a TImageList and a TListView to work together. Original problem: No dynamically-added pictures are displayed in the list. Narrowed it down, problem is in the TImagelist. Code is below. ilMain is the TImagelist (defined elsewhere). Adding a bitmap to the list, immediatly retrieving it, first "Draw" works fine but the sedond fails... what am I missing here? var i:integer; test:TSch; currentimage :TBitmap; stupid :TBitmap; begin

Saving transparent (alpha channel) PNG from TImageList

孤者浪人 提交于 2019-12-11 13:42:57
问题 I have a TImageList which contains transparent icons (32bit, with alpha channel). What I want to do is to save individual icons based on image index as PNG file(s), while preserving alpha channel transparency. Using RAD Studio 2010 so it has TPngImage support, no need for third party libraries. Images are loaded into TImageList from PNG "sprite" image using the method here - Add a png image to a imagelist in runtime using Delphi XE - so the transparency is preserved upon loading. Now I need

Clipping a filmstrip in png format (Delphi 2010)

杀马特。学长 韩版系。学妹 提交于 2019-12-06 03:51:31
I have a filmstrip of images in png format like this: I'd like to know how to clip each of the images and put these images in a TImageList control, always preserving the transparency. [EDIT] Yes, at designtime the trick mentioned by RRUZ works fine, but I wanted to clip the images at runtime, i.e. by loading the filmstrip from resource or file RRUZ You must follow these steps: set ColorDepth property to cd32Bit , DrawingStyle to dsTransparent , Height = 48, Width =48, then load the image and the result will be Just import into the imagelist. It'll complain that it's too big and offer to break

Delphi TImageList Bitmap Changes

自古美人都是妖i 提交于 2019-12-05 11:45:50
问题 I'm using Delphi XE2 Update 3. Update 4 is not compatible with some of our 3rd party components, so we haven't updated yet. I use TImageList's in my applications. I've noticed that many times when it toggle from source view to form view (F12), suddenly the previously unmodified unit will be modified. If I save the change caused by pressing F12, I can look at source control and see a few bytes of the TImageList.Bitmap property have changed. Here's one example as seen in TortoiseHg Workbench: @

Delphi TImageList Bitmap Changes

荒凉一梦 提交于 2019-12-04 01:10:16
I'm using Delphi XE2 Update 3. Update 4 is not compatible with some of our 3rd party components, so we haven't updated yet. I use TImageList's in my applications. I've noticed that many times when it toggle from source view to form view (F12), suddenly the previously unmodified unit will be modified. If I save the change caused by pressing F12, I can look at source control and see a few bytes of the TImageList.Bitmap property have changed. Here's one example as seen in TortoiseHg Workbench: @@ -830,7 +830,7 @@ Left = 760 Top = 480 Bitmap = { -

Delphi / C++ builder Windows 10 1709 bitmap operations extremely slow

筅森魡賤 提交于 2019-12-01 11:04:23
问题 Anyone experienced this problem? : It appeared after Windows 10 update to build 1709. After some system up time - a few hours -, bitmap loadings, imagelist item adding gets extremely slow. A 256x256 BMP loads in more than 10 seconds...while doing this, it occupies one CPU core 100%. So compiled applications that start up normally in seconds now start up in minutes! I use hibernation/resume regularly. Display drivers are more than a year old, so that can't be the problem. Any comment on this?