2

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?

Patrick
  • 17,669
  • 6
  • 70
  • 85
Thomas
  • 4,030
  • 4
  • 40
  • 79
  • What are the key classes that you need? – JP Alioto Feb 08 '13 at 23:11
  • I do almost eveything on Bitmaps, so this would be the major one. I also use classes like ColorMatrix, Graphics and Rectangle (for cropping). – Thomas Feb 09 '13 at 00:03
  • It's not a real answer, but you might start from this namespace http://msdn.microsoft.com/en-us/library/windows/apps/br243258.aspx and go from there – JP Alioto Feb 09 '13 at 00:56
  • Thanks, I'm currently trying to wrap my head around that. For the time being, the WriteableBitmapEx library (http://writeablebitmapex.codeplex.com) does seem very promising for what I'm trying to accomplish. Still open to suggestions, though. ;-) – Thomas Feb 09 '13 at 01:42
  • WriteableBitmap is an option that is easy to use but not very powerful. Direct2D is a little bit harder to start with, but you can do almost anything with it. – Filip Skakun Feb 09 '13 at 05:33
  • MSDN lists Windows 8 as Minimum supported Client for DirectX 2D. Will this work on Windows RT? Also for using DirectD2 one should be able to Code C++ if I'm right? – Thomas Feb 09 '13 at 23:33

1 Answers1

1

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.

Rafael
  • 2,827
  • 1
  • 16
  • 17