It seems that a workaround is to add this:
#if TargetWin32
data.EndianU32_LtoBMBS(0,data.size/4)
#endif
On Jun 27, 2014, at 9:03 AM, Michael Diehr <[email protected]> wrote:
> 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
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info