The documentation of credits is on going, but I HAVE to thank a few people up front whose help made this lib possible.
Thanks to:
@tic for the original gdip.ahk
@Rseding91 for the original Unicode rewrite of tic's lib
@robodesign who answered MANY of my questions about the concepts behind GDI+. And for his work on his version of Gdip_all.ahk
@guest3456 (mmikeww?) for the AHK v2 a108 rewrite Gdip_all.ahk and examples. I learned a lot from those.
I know a few others participated in this original project like just me, and @isahound
Thanks to @GeekDude for his work on gdi.ahk. I referenced this old lib a lot and I will continue to do so.
I have to thank @just me again for teaching me about structure byte alignment (way back when) which has got me to the point where I can understand much more of docs.microsoft.com documentation.
And as always thanks to @lexikos for AHK v2, and for taking the time to answer some of my (occasionally malformed) questions.
@neogna2 for pointing out an oversight that also lead to several other fixes for ahk v2 beta.3
just to clarify, the original AHK v1 "Gdip_All.ahk" was created by @Rseding91 as a unicode compatible update to tic's original Gdip.ahk.
my attempt here was simply to make a backward compatible version for both ahk v1 and v2, but it stalled with all the recent updates in v2. but that also included many other contributors as well.
[in] c ... The number of bytes of information to be written to the buffer.
With that change applied this example script works. It takes a screenshot of the upper left screen corner, saves it as .png and puts it on the clipboard.
#Include Gdip_All.ahk
;Area := x "|" y "|" w "|" h
Area := 0 "|" 0 "|" 400 "|" 400
SaveFile := A_ScriptDir "\" A_Now ".png"
pToken := Gdip_Startup()
Sleep(50)
pBitmap := Gdip_BitmapFromScreen(Area)
Gdip_SaveBitmapToFile(pBitmap, SaveFile)
Gdip_SetBitmapToClipboard(pBitmap)
Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken)
pToken := ""
ExitApp
Edit:
Your gdip_all.ahk version is (after this fix) the only one I found that is compatible with v2-beta3. It would help if you highlighted that more in the repo or even moved it to a repo of its own. Because the current "old_gdip_stuff" folder name might confuse someone to think it is outdated.
I get that the repo is primarily for your GDI++ class. But a working v2 gdip_all.ahk is good to have too. For example I wanted it when converting an old v1 script that used the v1 lib to v2 and while also wanting to make as few changes to the old code as possible.
One more thing. If the issues mentioned by helgef and malcev at viewtopic.php?p=312230#p312230 apply also to your gdip_all.ahk then that is worth mentioning in the readme and source.
Also, this is not my code. None of it is. All the contributors are listed in the OP, but all I did was convert to v2 and maintain.
Yeah, me saying "TheArkive's version" is just a sloppy shorthand for "TheArkive's specific v2.beta3 compatibility update of v2 code by several people that in turn is a v2 port of v1 code by tic but also a lot of other people evolving over a decade and in 100+ forum pages full of posts"