jasny Posted November 8, 2014 Share Posted November 8, 2014 Can someone look at the code and check why is that crashing ? _GDIPlus_Startup() $fileA = @ScriptDir & "\images\file1.bmp" $hImageA = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\file1.bmp") $hBitmapA = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImageA) $pix = _GDIPlus_BitmapGetPixel($hBitmapA,5,5) consolewrite($pix) _GDIPlus_ImageDispose($hBitmapA) _GDIPlus_Shutdown() thanks Link to comment Share on other sites More sharing options...
UEZ Posted November 8, 2014 Share Posted November 8, 2014 See my comments: _GDIPlus_Startup() $fileA = @ScriptDir & "\images\file1.bmp" $hImageA = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\file1.bmp") ;<- this is a GDIPlus bitmap $hBitmapA = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImageA) ;<- this is a GDI bitmap! $pix = _GDIPlus_BitmapGetPixel($hBitmapA,5,5) ;<- _GDIPlus_BitmapGetPixel() can handle only GDIPlus bitmaps! consolewrite($pix) _GDIPlus_ImageDispose($hBitmapA) _GDIPlus_Shutdown() $pix = _GDIPlus_BitmapGetPixel($hImageA,5,5) should work. Br, UEZ Celtic88 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
jasny Posted November 13, 2014 Author Share Posted November 13, 2014 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now