Delphi scaled Image code-supports PNG transparent channels (leveraging Windows Windowscodecs.dll)

Source: Internet
Author: User

Requires Delphi2007 or higher, the system requires at least XP-SP2

is actually taking advantage of the functionality of the Windows Windowscodecs.dll this file

Encapsulated as Twicimage class in VCL

Procedure Scalerimage (aimage:twicimage; Awidth, Aheight:word); var  nwif:iwicimagingfactory;  Nwis:iwicbitmapscaler;begin  nwif: = aimage.imagingfactory;  Nwif.createbitmapscaler (Nwis);  Nwis.initialize (Aimage.handle, Awidth, Aheight, wicbitmapinterpolationmodefant);  Aimage.handle: = Iwicbitmap (Nwis);  Nwis: = nil;  Nwif: = Nil;end;

This class can also be used to do more image effects, such as inversion, or format conversion, etc.

Http://www.cnblogs.com/hs-kill/p/3460064.html

Delphi scaled Image code-supports PNG transparent channels (leveraging Windows Windowscodecs.dll)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.