Search found 134 matches
- 10 Apr 2024, 12:13
- Forum: Ask for Help (v1)
- Topic: How to get similarity "%" of an image search?
- Replies: 1
- Views: 46
How to get similarity "%" of an image search?
I want to build an imagesearch with showing the similarity of source image and captured image. Most difficult part is the searching area bigger than the source/searcing image. Build-in image search with tolerance option is not enough to find extreme situations. Example: Captured area is: Captured1.p...
- 17 Nov 2023, 11:41
- Forum: Scripts and Functions (v1)
- Topic: ImagePut - A core library for images in AutoHotkey (Now supports HEIC & WEBP)
- Replies: 41
- Views: 15309
Re: ImagePut - Image library for converting to files, streams, windows, base64, urls, cursors, screen coordinates, clipb
iseahound if you can help me, it would be great. I need to capture part of the screen as 512 color. And convert into base64 string to compare images strings in bin file. my goal is compare and get most similar string as result in fastest way. Currently bin file has 625 image total 121MB. I store th...
- 13 Nov 2023, 20:43
- Forum: Ask for Help (v1)
- Topic: Need help for image quantization/posterization.
- Replies: 9
- Views: 806
Re: Need help for image quantization/posterization.
Ok... thank you for the additional information. I'm not familiar with a png format that supports a limit of 512 colors. I assume this is being done manually, but I am not understanding how limiting the colors to 512 will reduce file size unless the bit depth is reduced as well. Or using a form of c...
- 13 Nov 2023, 19:25
- Forum: Ask for Help (v1)
- Topic: Need help for image quantization/posterization.
- Replies: 9
- Views: 806
Re: Need help for image quantization/posterization.
@andymbody
I aim to use DLL file to store png files. I am searching with my bad english is a huge task
I aim to use DLL file to store png files. I am searching with my bad english is a huge task
- 13 Nov 2023, 19:13
- Forum: Ask for Help (v1)
- Topic: Need help for image quantization/posterization.
- Replies: 9
- Views: 806
Re: Need help for image quantization/posterization.
I need to reduce resource data. Thats why I want to use PNG file with 512 color. I was using BMP but it exceed over 4GB. PNG 512 color gives exact same result with 100mb. To achieve this. So I convert ImageFromScreen into 512 color. I know there is also huge color data loss. But its enough for %100 ...
- 13 Nov 2023, 04:11
- Forum: Ask for Help (v1)
- Topic: Need help for image quantization/posterization.
- Replies: 9
- Views: 806
Re: Need help for image quantization/posterization.
I personally like to apply a bitblt in difference mode then look for pixels that are not black, but... see if any of these help https://www.autohotkey.com/boards/viewtopic.php?f=6&t=59113 https://rosettacode.org/wiki/Percentage_difference_between_images#AutoHotkey https://www.autohotkey.com/boards/...
- 12 Nov 2023, 06:52
- Forum: Ask for Help (v1)
- Topic: Need help for image quantization/posterization.
- Replies: 9
- Views: 806
Re: Need help for image quantization/posterization.
Color composition of 512 color is;
RGB;
dec : 0, 36, 72, 109, 145, 182, 218, 255
hex : 0x00, 0x24, 0x48, 0x6D, 0x91, 0xB6, 0xDA, 0xFF
RGB;
dec : 0, 36, 72, 109, 145, 182, 218, 255
hex : 0x00, 0x24, 0x48, 0x6D, 0x91, 0xB6, 0xDA, 0xFF
- 12 Nov 2023, 05:55
- Forum: Ask for Help (v1)
- Topic: Need help for image quantization/posterization.
- Replies: 9
- Views: 806
Need help for image quantization/posterization.
I have two image one of "reference" and other "Gdip_BitmapFromScreen()" Reference image, posterized (value 8) in photoshop by total 512 color. I want to compare this two image pixel by pixel. But I cannot how to figure it out. The code is not complete... count = 0 mpositive = 1 ; to prevent 0/100 mt...
- 11 Nov 2023, 12:51
- Forum: Ask for Help (v1)
- Topic: How to detect which button is pressed?
- Replies: 5
- Views: 721
Re: How to detect which button is pressed?
This is what I want, It works I would like each action to be sent once each button is pressed down (not after released) how to do that? #If WinActive("ahk_exe anki.exe") ; if window active ^m:: ; if window active and CTRL+M key pressed if WinExist("ahk_exe anki.exe") ; close the window. WinClose ; ...
- 10 Nov 2023, 19:25
- Forum: Ask for Help (v1)
- Topic: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
- Replies: 8
- Views: 638
Re: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
Okey spot the issue, that (my fault) Gdip_CreateARGBBitmapFromHBITMAP() create with no Alpha channel. And if you want to save as .png with transperancy you have to add 0xFF000000 if you dont, it saves the bitmap as ARGB wich means all colors disappear. Gdip_BMPtoPNG(thebitmap, RGBtransX) { pToken :=...
- 10 Nov 2023, 18:09
- Forum: Ask for Help (v1)
- Topic: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
- Replies: 8
- Views: 638
Re: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
I'm surprised any of that is working. I'm only able to view this thread from phone right now (which does not always make things easy to see), and unable to test. Have you tried this instead (by @iseahound )? Gdip_CreateARGBBitmapFromHBITMAP() ; pBitmapResource := Gdip_CreateBitmapFromHBITMAP(thebit...
- 10 Nov 2023, 17:08
- Forum: Ask for Help (v1)
- Topic: How to detect which button is pressed?
- Replies: 5
- Views: 721
Re: How to detect which button is pressed?
if you want start with CTRL+M key pressing, and wait until get the mouse keys pressed and released. #If WinActive("ahk_exe anki.exe") ; if window active ^m:: ; if window active and CTRL+M key pressed if WinExist("ahk_exe anki.exe") ; close the window. WinClose ; Close the window found by WinExist. l...
- 10 Nov 2023, 16:16
- Forum: Ask for Help (v1)
- Topic: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
- Replies: 8
- Views: 638
Re: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
Output file's white pixels turn into black 0x000000 The quotes are swapped. Afaik, to designate the alpha channel, you will need to use 0xAARRGGBB, rather than 0xRRGGBB (4 hex values, not 3). Is this not correct? For example, 0xFF888888 would be solid gray. 0x888888 does not include the alpha chann...
- 10 Nov 2023, 13:33
- Forum: Ask for Help (v1)
- Topic: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
- Replies: 8
- Views: 638
Re: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
I updated the code.
@andymbody
Thank you, as you mention I was using an older version of the Gdip_all and I updated. But it still save the .png file without Alpha channel. Output file's white pixels turn into black 0x000000
@just me
thebitmapnow is the file name.
@andymbody
Thank you, as you mention I was using an older version of the Gdip_all and I updated. But it still save the .png file without Alpha channel. Output file's white pixels turn into black 0x000000
@just me
thebitmapnow is the file name.
- 10 Nov 2023, 06:09
- Forum: Ask for Help (v1)
- Topic: Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
- Replies: 8
- Views: 638
Gdip_BMPtoPNG how to convert 0xFFFFFF into ARGB?
Gdip_BMPtoPNG(thebitmap, transX) { transpar := (transX = transwhite) ? 0xFFFFFF : 0xFF0000 pToken := Gdip_Startup() ; Load the bitmap from resource pBitmapResource := Gdip_CreateBitmapFromHBITMAP(thebitmap) Gdip_GetImageDimensions(pBitmapResource, wResource, hResource) Gdip_LockBits(pBitmapResource...
- 10 Nov 2023, 01:18
- Forum: Ask for Help (v1)
- Topic: ;@Ahk2Exe-AddResource "Out of Memory" issue Topic is solved
- Replies: 1
- Views: 482
;@Ahk2Exe-AddResource "Out of Memory" issue Topic is solved
I want to add bunch of files with AddResource, but I think there is a limitation. How can I increase it I couldnt find anything in documentation about it.
I have 1639 ".bmp" files total 4,4GB.
I have 1639 ".bmp" files total 4,4GB.
- 09 May 2023, 10:28
- Forum: Ask for Help (v1)
- Topic: How to increase speed, ImageSearch with 8-bit depth ".bmp" files?
- Replies: 0
- Views: 369
How to increase speed, ImageSearch with 8-bit depth ".bmp" files?
HT1_Test_ash32bit := LoadPicture("C:\T1_Test_ash32bitDepth.bmp") ImageSearch, kX, kY, 0,0, 1920,1080, *TransWhite *0 HBITMAP:*%HT1_Test_ash32bitDepth% ; it founds the image with 0 tolerance If (ErrorLevel = 0) { msgbox, Found 32 bit depth } HT1_Test_ash8bit := LoadPicture("C:\T1_Test_ash8bitDepth.b...
- 28 Apr 2023, 03:10
- Forum: Scripts and Functions (v2)
- Topic: ImagePut - A core library for images in AutoHotkey (Now supports HEIC & WEBP)
- Replies: 82
- Views: 28378
Re: ImagePut - Image library for converting to files, streams, windows, base64, urls, cursors, screen coordinates, clipb
in v1, im := ImagePutBuffer({screenshot: "A", crop: [100, 100, -100, -100]}) was return with error. I update ImagePut.ahk from github. Now has no error. Im now testing in .ahk I couldnt pass .exe yet. I need a working methot for both. @Ahk2Exe allows to put images in .exe file, so you can call image...
- 27 Apr 2023, 11:32
- Forum: Scripts and Functions (v2)
- Topic: ImagePut - A core library for images in AutoHotkey (Now supports HEIC & WEBP)
- Replies: 82
- Views: 28378
Re: ImagePut - Image library for converting to files, streams, windows, base64, urls, cursors, screen coordinates, clipb
Why not just use a screenshot instead? WinGetClientPos &X, &Y, &W, &H, "A" im := ImagePutBuffer({screenshot: [x, y, w, h], crop: [100, 100, -100, -100]}) ; <- Modify xywh with relative coordinates. im.show Shorter version: im := ImagePutBuffer({screenshot: "A", crop: [100, 100, -100, -100]}) im.sho...
- 23 Apr 2023, 12:30
- Forum: Scripts and Functions (v2)
- Topic: ImagePut - A core library for images in AutoHotkey (Now supports HEIC & WEBP)
- Replies: 82
- Views: 28378
Re: ImagePut - Image library for converting to files, streams, windows, base64, urls, cursors, screen coordinates, clipb
hi, is it possible to get ImagePutBuffer(x,y,w,h) as relative of active window. example: buf := ImagePutBuffer([X-227, 30, 217, 900],r) ; r for relative of the active window. f1:: coordmode,mouse,relative ; native coordmode is relative to an active window. mousegetpos X,Y ; example x=300, but imagep...