Hi to All, From few days I am struggling to display 12 bit images in UIImageView images are displayed but "Not Properly" I show you image screenshot how it render on UIImageView http://monotouch.2284126.n4.nabble.com/file/n4656427/brain.jpg http://monotouch.2284126.n4.nabble.com/file/n4656427/chest.png
this is the out put i get from my code as below const int bytesPerPixel = 4; int _width = (int)_drawArg.RectUIImageMatrix.Width; int _height = (int)_drawArg.RectUIImageMatrix.Height; CGImage _bitmap ; Rectangle srcRectangle = new Rectangle(0, 0, imageGraphic.Columns, imageGraphic.Rows); Rectangle rect = Rectangle.Round(new RectangleF(0,0,_width , _height)); Rectangle dstRectangle = rect; int[] srcPixels = new int[image.Columns * image.Rows * image.PixelData.BytesPerPixel]; int bitsPerComponent = 8; int bytesPerRow = srcRectangle.Width * bytesPerPixel *2; var pixelBytes = imageGraphic.PixelData.Raw; CGColorSpace _color = CGColorSpace.CreateDeviceRGB(); CGDataProvider _provide = new CGDataProvider(pixelBytes , 0,pixelBytes.Length); _bitmap = new CGImage(srcRectangle.Width,srcRectangle.Height ,bitsPerComponent,32,bytesPerRow , _color , CGBitmapFlags.ByteOrder16Big | CGBitmapFlags.PremultipliedLast ,_provide ,null ,true ,CGColorRenderingIntent.Default); ImgView.Image = UIImage.FromImage(_bitmap); So please help me !!!!!!!!! Its Very Urgent for Me Regards Pritish M. Deshmukh -- View this message in context: http://monotouch.2284126.n4.nabble.com/How-to-display-12-bit-images-in-UIImageView-tp4656427.html Sent from the MonoTouch mailing list archive at Nabble.com. _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
