To display an image on screen, use UIImage. For working with low level bitmaps, use the CoreImage framework.
http://docs.xamarin.com/guides/ios/application_fundamentals/working_with_images/
Question
I installed Xamarin studio and trying to use System.Drawing frame work but it is not working. The reason I want this framework is to be able to define a Bitmap object. This bitmap object is assigned to a qr code image. Can anyone help me on how i can assigned an image to bitmap since i can not use bitmap in xamarin studio framework.
What i wanna do is as follows:
//create a qr code
QRCodeEncoder encoder = new QRCodeEncoder();
// Assign a bitmap image to the encoder since the encoder.encode returns bitmap image
Bitmap img = encoder.Encode("http://www.monkeywow.com");
// save the image in to images folder
img.save("www.monkeywow.com/images/imp.jpg", ImageFormat.jpg);
The problem is I can not use Bitmap img since i can not import System.Drawing into Xamarin. I tried that and did not work. Since the encoder returns bitmap, i do not know how to obtain the image so i can save it where ever i want.
No correct solution
OTHER TIPS
To display an image on screen, use UIImage. For working with low level bitmaps, use the CoreImage framework.
http://docs.xamarin.com/guides/ios/application_fundamentals/working_with_images/
Xamarin.iOS includes a few System.Drawing
types, e.g. Rectangle[F]
, Point[F]
and Size[F]
, inside monotouch.dll
to ease code sharing between (cross platform) projects.
However the System.Drawing.dll
assembly itself is not part of the mobile profile that ships with Xamarin.iOS.
Like @Jason mentioned are several, native, ways you can do graphics on iOS (OpenGL would be another one).
Another option is to use the code from https://github.com/mono/sysdrawing-coregraphics which offers a partial System.Drawing API on top of CoreGraphics.