[英]Delphi - Resize PNG with transparence and index
I have many PNG files with transparency and these PNG fiels seem to be indexed. 我有许多透明的PNG文件,这些PNG文件似乎已被索引。 I would like to : 我想要 :
Do you have an example to do that ? 你有一个例子可以做到吗?
This question is related to other PNG resize questions but... 这个问题与其他PNG调整大小问题有关,但是...
AFAIK, You can't resize an indexed image and keep the original palette. AFAIK,您无法调整索引图像的大小并保留原始调色板。 Resizing the image will necessitate the mixing of colors, especially in reducing the image. 调整图像大小将需要混合颜色,特别是在缩小图像时。
The original author of the PNGImage component (the basis of the Delphi native component) had a forum where he, and others, posted code snippets on how to do things using the PNGImage component. PNGImage组件的原始作者(Delphi本机组件的基础)在一个论坛上,他和其他人发布了有关如何使用PNGImage组件执行操作的代码段。
Before the forum was taken down I grabbed a copy of all of the code snippets and placed them on the CodeGear Code Central website. 在取消论坛之前,我抓取了所有代码片段的副本,并将其放在CodeGear Code Central网站上。
Most if not all of these work with native PNG images and do maintain the Alpha channel. 所有这些(如果不是全部的话)大多数都可以与本地PNG图像一起使用,并且可以维护Alpha通道。
Here is the complete list of examples included in the package: 这是软件包中包含的示例的完整列表:
Here is the link: CodeCentral PNG Methods 这里是链接: CodeCentral PNG方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.