Search code examples
c#image-processingwindows-8windows-rt

Handling Bitmaps in Windows 8/RT app


I have previously created a C# console application for manipulating Images. Now I'd like to port it over to a Windows 8/RT app. Unfortunately I can't seem to take advantage of following packages:

using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;

Double-Clicking on the ".NET for Windows Store apps" reference, they do seem to still exist. Do I have to use some other classes for Image handling, or is it possible to get my old code working as is?


Solution

  • Drawing namespace is forbidden in Modern UI apps, there are third party libraries that implement part of the API (like this one), but the best library for what you want (manipulate bitmaps) is WriteableBitmapEx, your only other solutions will be Direct2D or, if you feel lucky, the Canvas element using HTML5 and JavaScript.