gdi+ Can someone help? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
alware
Posts: 8
Joined: 01 Jun 2018, 02:25

gdi+ Can someone help?

06 Jun 2018, 05:40

hello, I am using gdip_all and gdip_imagesearch in my script but

my script works perfectly ! but i'm wondering if i can get raw bitmap code for specific img so that i can delete that img file so that my script doesn't have to find image on the according directory.

i have tried this code but everytime i run it msgbox gives me different numbers

Code: Select all

needle := Gdip_CreateBitmapFromFile("practice.png")

pracimg:= needle

msgbox % pracimg
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdi+ Can someone help?  Topic is solved

06 Jun 2018, 23:57

The number doesn't contain the entire image obviously.
A single number is only enough data to contain 2 colours.
What it does instead it tells you where the pBitmap is stored in the memory.
So your needle is more of a name than the picture itself or rather the name of the place where the picture currently lives.
If you want to put the picture inside your script I reccomend using a base64 encoding.
Recommends AHK Studio
alware
Posts: 8
Joined: 01 Jun 2018, 02:25

Re: gdi+ Can someone help?

08 Jun 2018, 08:23

nnnik wrote:The number doesn't contain the entire image obviously.
A single number is only enough data to contain 2 colours.
What it does instead it tells you where the pBitmap is stored in the memory.
So your needle is more of a name than the picture itself or rather the name of the place where the picture currently lives.
If you want to put the picture inside your script I reccomend using a base64 encoding.
thank you ill look for base64 encoding!!!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Mateusz53, MrHue, peter_ahk, Pianist and 269 guests