I have the following code working to create a jpg file out of a IWICBitmapSource with defaults options: function SaveWICBitmapToJpgFile(WICFactory: IWICImagingFactory; WICBitmap: IWICBitmapSource; SrcRect: TRect; FileName: string): HRESULT; var hr: HRESULT; Encoder: IWICBitmapEncoder; Frame: IWICBitmapFrameEncode; PropBag: IPropertyBag2; S: IWICStream; PixelFormatGUID: WICPixelFormatGUID; R: WICRect; begin hr := WICFactory.CreateStream(S); if Succeeded(hr) then [...] read more
I'm trying to encode an image as an interlaced png using WIC. I can save the image as png without any problems and set the interlaced mode. But if i try to set a filtermode (any filter), i get the following error: [System.Runtime.InteropServices.COMException] = {"The bitmap property type is unexpected. [...] read more