[教程]TWICImage 创建灰度图像拷贝

啥也不说,两句代码:

var
  ATemp:IWICBitmapSource;
begin
...
WICConvertBitmapSource(GUID_WICPixelFormat16bppGray,SourceImage.Handle,ATemp);
ATargetImage.Handle:=ATemp;
...
end;

ATargetImage 里存的就是原始图像的灰度图像了.

分享到: