How should use ID2D1RenderTarget.DrawBitmap
#332
Answered
by
manju-summoner
qwerty1874
asked this question in
Q&A
-
I have done:
But this is wrong. One more small question:
This approach also looks wrong. |
Beta Was this translation helpful? Give feedback.
Answered by
manju-summoner
Jul 23, 2022
Replies: 1 comment 3 replies
-
try it using var factory = new IWICImagingFactory();
using var wicStream = factory.CreateStream(filePath, System.IO.FileAccess.Read);
using var decoder = factory.CreateDecoderFromStream(wicStream);
using var decodedFrame = decoder.GetFrame(0);
using var converter = factory.CreateFormatConverter();
converter.Initialize(decodedFrame, PixelFormat.Format32bppPBGRA, BitmapDitherType.None, null, 0, BitmapPaletteType.Custom);
var bitmap = deviceContext.CreateBitmapFromWicBitmap(converter, null); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
amerkoleci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try it