I'm just guessing here, as I've never used GDI+ from C myself.

Error 2 is 
"InvalidParameter" according to 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms534175(v=vs.85).aspx
Indicates that one of the arguments passed to the method was not valid.

Are you making a new BitmapData object for bitmapdata2?  



On Sep 22, 2013, at 9:19 AM, Christian Schmitz <supp...@monkeybreadsoftware.de> 
wrote:

> 
> Am 22.09.2013 um 18:13 schrieb Michael Diehr <m...@xochi.com>:
> 
>> As I understand it, the new-style picture images require gdiplus (GDI+) and 
>> may require some different flags sent to the API
>> I see some examples discussing related issues…
> 
> 
> Current code looks like this:
> 
> GpStatus e = _GdipBitmapLockBits(g, &r, flags, PixelFormat32bppPARGB, 
> bitmapData2);
> DebugMessage("e",e);
> if (e == 2)
>       {
>       e = _GdipBitmapLockBits(g, &r, flags, PixelFormat32bppARGB, 
> bitmapData2);
>       DebugMessage("e",e);
>       }
> if (e == 2)
>       {
>       DebugMessage("Try ARGB read and write");
>       e = _GdipBitmapLockBits(g, &r, ImageLockModeRead|ImageLockModeWrite, 
> PixelFormat32bppARGB, bitmapData2);
>       DebugMessage("e",e);
>       }
> 
> So I try already several combinations.
> Flags should be ImageLockModeRead or ImageLockModeWrite depending on mode.
> 
> Greetings
> Christian
> 
> -- 
> Read our blog about news on our plugins:
> 
> http://www.mbsplugins.de/
> 
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> mbsplugins@monkeybreadsoftware.info
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to