Search found 613 matches

by iseahound
28 Oct 2020, 21:33
Forum: Scripts and Functions
Topic: ImagePut - Windows Image Transformation Library
Replies: 9
Views: 1801

Re: ImagePut - Windows Image Transformation Library

SpeedMaster wrote:
28 Oct 2020, 20:26
iseahound wrote:
27 Oct 2020, 11:49
You can actually use the base64 data directly.
Great, I didn't know that. :thumbup:
How do I explain that better in the documentation? You can use literally anything as an input.
by iseahound
27 Oct 2020, 11:49
Forum: Scripts and Functions
Topic: ImagePut - Windows Image Transformation Library
Replies: 9
Views: 1801

Re: ImagePut - Windows Image Transformation Library

You can actually use the base64 data directly. ImagePutCursor("iVBORw0KGgoAAAANSUhEUgAAADAAAABICAYAAACwc3YrAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTFH80I3AAAFDUlEQVRoQ9WaSUwsVRSGmR8qgTDIJAlBEBY47Ygx0RBxwRAWroAgIbJgo8HniKjIDhMWJmwxYYYFYcYYXTstnJa6e...
by iseahound
14 Oct 2020, 08:48
Forum: Scripts and Functions
Topic: Imagen() : A fade-in/fade-out animator for picture control
Replies: 11
Views: 675

Re: Imagen() : A fade-in/fade-out animator for picture control

There's also a color matrix tester included... which probably deserves its own post!
by iseahound
28 Sep 2020, 01:03
Forum: Ask For Help
Topic: want to forbid cursor from moving to the right of x1800
Replies: 2
Views: 126

Re: want to forbid cursor from moving to the right of x1800

Yep. There exists a clipcursor function. https://www.autohotkey.com/boards/viewtopic.php?p=287979#p287979 Esc:: ExitApp f1:: ;on ClipCursor( True, 100, 100, 200, 200) Return f2:: ;off ClipCursor( False) return ClipCursor( Confine:=True, x1:=0 , y1:=0, x2:=1, y2:=1 ) { pData := DllCall("GlobalAlloc",...
by iseahound
21 Sep 2020, 13:31
Forum: Scripts and Functions
Topic: ToGrayscale() : Converts GDI bitmap to Greyscale
Replies: 14
Views: 430

Re: ToGrayscale() : Converts GDI bitmap to Greyscale

You're right about the nearest neighbor. I didn't notice at first, but it doesn't seem to be true greyscale. I can see topological rings of grey in the blurred background of the butterfly picture that aren't present in the photoshop equivalent. You could randomize noise and dither the photo to preve...
by iseahound
20 Sep 2020, 11:23
Forum: Scripts and Functions
Topic: Vis2 - Image to Text OCR()
Replies: 250
Views: 73327

Re: Vis2 - Image to Text OCR()

Sure
by iseahound
19 Sep 2020, 08:23
Forum: Scripts and Functions
Topic: ToGrayscale() : Converts GDI bitmap to Greyscale
Replies: 14
Views: 430

Re: ToGrayscale() : Converts GDI bitmap to Greyscale

Wow. Are the calculations from RGB to Greyscale done by windows itself? I know that RGB channels have different color weights, but I'm not seeing how that is accounted for in the code. (Although your sample looks very good.) ; Returns a value between 0-255 when given an RGB value. grayscale(sRGB) { ...
by iseahound
15 Sep 2020, 10:20
Forum: AutoHotkey v2 Scripts and Functions
Topic: [a122] ImagePut - Windows Image Transformation Library
Replies: 14
Views: 3653

Re: [a122] ImagePut - Windows Image Transformation Library

a122 compatible ; Script: ImagePut.ahk ; Author: iseahound ; License: MIT License ; Version: 2020-05-22 ; Release: 2020-09-14 ; ImagePut - Windows Image Transformation Library ; Copy and paste functions from this reference libary as you wish. ; -> All put_XXX functions map from a pBitmap to XXX. ; ...
by iseahound
11 Sep 2020, 18:45
Forum: Scripts and Functions
Topic: IsAlphaBitmap(hBM) : Returns true if a GDI Bitmap is alpha transparent
Replies: 10
Views: 588

Re: IsAlphaBitmap() : Returns true if hBitmap is alpha transparent

Thanks for this function! I was stumped that Windows didn't have a solution to checking the alpha channel of a bitmap for transparency. However, I doubt that there is any faster method than going through every pixel BBGGRRAA | 0xFF and checking if it is equal to 255. Did you benchmark it?
by iseahound
11 Sep 2020, 09:37
Forum: Ask For Help
Topic: Creating a GUI with a transparent background? (per-pixel transparency)
Replies: 0
Views: 66

Creating a GUI with a transparent background? (per-pixel transparency)

I have some code that works on Windows 8+ that is capable of creating a clickable transparent window. I am using a Layered Child Window that is not compatible with earlier versions of windows. https://i.imgur.com/gRILmgJ.png This is a picture of a green gradient loaded from a PNG file. Note: The com...
by iseahound
09 Sep 2020, 09:03
Forum: Ask For Help
Topic: transparent windows in screen-shots
Replies: 19
Views: 1903

Re: transparent windows in screen-shots

You need to study the code examples given, either the DirectX or GDI method. You don’t understand the code that you’re getting - you seem to be under the impression that code size is relevant to code speed, it is clearly not. Stop removing parts of code that have no impact on the script, and focus o...
by iseahound
08 Sep 2020, 22:06
Forum: Ask For Help
Topic: transparent windows in screen-shots
Replies: 19
Views: 1903

Re: transparent windows in screen-shots

An old trick would be to save the files as pARGB, but it is doubtful there would be any gains in speed. Honestly, the use of CAPTUREBLT is probably expensive. The only other speedup I can think of is to avoid the use of PNG and settle for TIF or the fastest: BMP. Finally you should not be loading an...
by iseahound
08 Sep 2020, 10:05
Forum: Ask For Help
Topic: transparent windows in screen-shots
Replies: 19
Views: 1903

Re: transparent windows in screen-shots

FormatTime filename, % A_Now, % "yyyy-MM-dd HH-mm-ss" filepath := "mydir\" filename ".png" I wrote this code to use a temporary name ___date___.png because I wanted the name of the file to be equal to the file modified and creation time. I edited the code to dispose the bitmap created: there was a ...
by iseahound
08 Sep 2020, 07:45
Forum: Ask For Help
Topic: transparent windows in screen-shots
Replies: 19
Views: 1903

Re: transparent windows in screen-shots

tmplinshi 's answer is correct. Here are the changes with their suggestions added. image := [0,0,A_ScreenWidth,A_ScreenHeight] filepath := "C:\Documents and Settings\Administrator\Desktop\scr-ss\" ; backslash at the end is required at the moment :( quality := "" ; Load GDI+ DllCall("LoadLibrary", "...
by iseahound
07 Sep 2020, 21:21
Forum: Scripts and Functions
Topic: ImagePut - Windows Image Transformation Library
Replies: 9
Views: 1801

Re: ImagePut - Windows Image Transformation Library

Fixed monitor numbers as an input type, so that ImagePutFile(1) now properly copies the first monitor, ImagePutFile(2) the second, and so on...
by iseahound
07 Sep 2020, 21:02
Forum: Ask For Help
Topic: transparent windows in screen-shots
Replies: 19
Views: 1903

Re: transparent windows in screen-shots

Oh your question is super confusing. I do not have an example that works for me on windows 10. Are you on a PC with Aero disabled? Either way the answer is the CAPTUREBLT flag 0x40000000 added to BitBlt: image := [0,0,A_ScreenWidth,A_ScreenHeight] filepath := "" quality := "" ; Load GDI+ DllCall("Lo...
by iseahound
07 Sep 2020, 19:39
Forum: Ask For Help
Topic: transparent windows in screen-shots
Replies: 19
Views: 1903

Re: transparent windows in screen-shots

the following code successfully creates a screen-shot of the screen: That code does absolutely nothing for me. The pBitmap created has a value of 0. Does the following code work for transparent windows? I don't see how it would not. image := [0,0,A_ScreenWidth,A_ScreenHeight] filepath := "" quality...
by iseahound
07 Sep 2020, 18:20
Forum: Scripts and Functions
Topic: Vis2 - Image to Text OCR()
Replies: 250
Views: 73327

Re: Vis2 - Image to Text OCR()

static q := Chr(0x22) _cmd .= q this.tesseract q " --tessdata-dir " q fast q " " q in q " " q SubStr(out, 1, -4) q _cmd .= (this.language) ? " -l " q this.language q : "" _cmd := ComSpec " /C " q _cmd q RunWait % _cmd,, Hide Add this line: " --psm 8" where page segmentation mode is set to 8 static ...
by iseahound
07 Sep 2020, 11:58
Forum: Ask For Help
Topic: How to view PDF with Windows API? (PDF -> bitmap)
Replies: 8
Views: 449

Re: How to view PDF with Windows API? (PDF -> bitmap)

Next time, try reading the question. Because I am clearly trying to get a pointer to to an IDXGIDevice or ID2D1DeviceContext which I need to figure out how to convert back into a GDI device context using interop functions, or a GDI+ bitmap. For example, the GDI+ function GdipCreateBitmapFromDirectDr...

Go to advanced search