Hi Christian,
If you run the following code on Cocoa vs. Win32 (with GDI+ enabled), the final
picture result is different, it appears as if the pixels are mis-ordered:
Pushbutton1.Action
' testing PictureMBS byte order
dim w,h as integer
w=32
h=32
dim p as new picture(w,h)
dim r as RGBSurface = p.RGBSurface
for y as integer = 0 to h-1
for x as integer = 0 to w-1
r.Pixel(x,y) = &cFF80bb99
next
next
dim pSrc as new PictureMBS(p,p.HasAlphaChannel)
dim data as new MemoryBlock(w*h*4)
dim pDest as new PictureMBS(data,w,h,PictureMBS.ImageFormatBGRA,w*4)
call pDest.copyPixels(pSrc)
dim p2 as picture = pDest.CopyPicture
break // look at p2 in the debugger. On Mac it's purpleish, on windows it's
greenish
Is this a bug in PictureMBS?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info