Hello Dan,

Did the same code worked on a previous version of Mono ? (if so which
version ?) or are you testing this for the first time ?

Because I recently fixed many endian issues affecting Mac OS X (and
other architectures). It is possible that one of them has broken
something else :-(

I'll try to build a similar test case using one of the embedded bitmap
files we have in the unit tests and see how to bots reacts to it.

On Wed, 2006-08-30 at 15:56 -0700, Dan Shryock wrote:
> When attempting to read the pixel bytes of a jpg on osx (using the
> 1.1.17 build just released) I am getting different results on windows
> versus osx.  Does anybody have any ideas why I am getting these
> different results?  Any information is very appreciated.
> 
> Dan
> 
> 
> The code being used is as follows:
> 
> Bitmap bmp = new Bitmap("file.jpg");
> BitmapData bmpdata = bmp.LockBits(new Rectangle(0,0,bmp.Width,
> bmp.Height),ImageLockMode.ReadOnly,PixelFormat.Format24bppRgb);
> 
> unsafe{
>       byte* scandata = (byte*) bmpdata.Scan0;
>       for(int i=0; i<30; i++){
>               Console.WriteLine(scandata[i]);
>       }
> }
> 
> 
> and the results using mono on windows are:
> 187
> 144
> 77
> 187
> 144
> 77
> 186
> 144
> 75
> 188
> 143
> 75
> 188
> 144
> 73
> 189
> 145
> 74
> 192
> 147
> 74
> 192
> 147
> 74
> 192
> 150
> 75
> 191
> 149
> 74
> 
> while the results on osx are:
> 255
> 255
> 255
> 255
> 255
> 77
> 255
> 255
> 255
> 255
> 77
> 255
> 255
> 255
> 144
> 75
> 255
> 143
> 75
> 255
> 255
> 73
> 255
> 188
> 255
> 255
> 188
> 144
> 255
> 189
> _______________________________________________
> Mono-winforms-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
-- 
Sebastien Pouliot  <[EMAIL PROTECTED]>
Blog: http://pages.infinit.net/ctech/

_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Reply via email to