剪辑png格式的幻灯片(Delphi 2010) [英] Clipping a filmstrip in png format (Delphi 2010)

查看:113
本文介绍了剪辑png格式的幻灯片(Delphi 2010)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个png格式的图像胶片,如下所示:

I have a filmstrip of images in png format like this:

我想知道如何裁剪每个图像并将这些图像放置在TImageList控件中,始终保持透明性.

I'd like to know how to clip each of the images and put these images in a TImageList control, always preserving the transparency.

是的,在设计时,RRUZ提到的技巧很好用,但是我想在运行时裁剪图像,即通过从资源或文件中加载胶片来

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

推荐答案

您必须遵循以下步骤:

  • ColorDepth属性设置为cd32Bit

DrawingStyledsTransparent

Height = 48,

Width = 48,

然后加载图像,结果将是

then load the image and the result will be

这篇关于剪辑png格式的幻灯片(Delphi 2010)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆