What should it look like? I assume the purple bit should be black and white?
could it be this? > _bitmap = new CGImage(srcRectangle.Width,srcRectangle.Height > ,bitsPerComponent,32,bytesPerRow , _color , CGBitmapFlags.ByteOrder16Big | > CGBitmapFlags.PremultipliedLast ,_provide ,null ,true > ,CGColorRenderingIntent.Default); Change the ByteOrder16Big to ByteOrder16Small (or Little?). I'm guessing, BTW... On Wed, Aug 8, 2012 at 12:01 PM, pritish <[email protected]> wrote: > 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 -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
