Search code examples
cwindows-runtimewindows-store-apps

Is there any Windows Store class equivalent to the ImageFormat class?


In an app I am developing I want to offer the option to convert an image to a selected format, such as JPG PNG TIFF and so on. In winforms i would simply use the ImageFormat class and just save the image with the selected ImageFormat. How would I go around doing this in the Windows Store App without this?


Solution

  • You should look at the BitmapDecoder and BitmapEncoder class. It supports quite a few formats. I have some code here that picks the right encoder id for specific file extension.