Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

GDI+ standard library 1.45 by tic


  • Please log in to reply
1385 replies to this topic
tic
  • Members
  • 1934 posts
  • Last active: Dec 21 2015 01:05 PM
  • Joined: 22 Apr 2007

Hi Surreall

 

Yes, all that is possible with Gdip and only with a few lines of code I should imagine. The Gdip library is moving to the new forums now if you would be able to re-post there then you can get the assistance you need:

 

http://ahkscript.org...opic.php?t=6517



dangerdogL2121
  • Members
  • 636 posts
  • Last active: Nov 19 2015 03:39 AM
  • Joined: 22 Dec 2012

Reporting error in the help file:

 

It displays the CreateRect function as 

CreateRect(ByRef Rect, x, y, w, h) 

where w is the width of the rectangle and h is the height of the rectangle.  CreateRect() in gdip.ahk the w and h values get placed in the rect structure right from the parameters and no addition is done.

 

MSDN says that the second two numbers in the RECT structure should be the coordinates to the bottom right corner of the rectangle.

 

w and h should be changed x2 and y2 or something of that effect and the description of them should be changed too.

 

Hope I'm not missing something


There is a new AutoHotkey forum here.


Shimizoki
  • Members
  • 1 posts
  • Last active: Jul 29 2015 10:51 PM
  • Joined: 24 Jun 2015

Perhaps this can be found elsewhere... but once upon a time THIS happened.

But it does not work. It seems that it does not take the average color... but instead the top left corner.

 

So... my question is... how do you get the average?

Alternativly... did I do something wrong?



tic
  • Members
  • 1934 posts
  • Last active: Dec 21 2015 01:05 PM
  • Joined: 22 Apr 2007

dangerdogL2121: Good catch. That will be in the updated Gdip2

 

Shimizoki: I wouldn't get the average that way any more. We now can use machine code to perform such tasks correctly.

 

Note to all: Please move to the new forums

 

http://ahkscript.org....php?f=6&t=6517

 

As I am not checking the old forum as actively anymore



scremerz
  • Members
  • 10 posts
  • Last active: Oct 08 2015 03:02 PM
  • Joined: 24 Apr 2014

hi

i have a problem with GDI+ under windows server 2008R2 64, my scripts works perfectly under windows server 2012 64 and i have an error when i use the same script under 2008 at line "Gui, 1:".

I tried to use the gdip.dll or gdip_all.ahk and i have the same problem...

 

how can i use it under 2008R2 server 64 ??



titep
  • Members
  • 2 posts
  • Last active:
  • Joined: 26 Aug 2015

2015-Dec-13_7-32PM

Update: The answer is really simple.

Use this : https://raw.githubus...ib/Gdip_All.ahk

 

I hope that this will help some people who encounter the same problem like mine.

 

--------------

ಠ_ಠ
tic, help me
Gdip_SetBitmapToClipboard seems  not to work in Windows 10,a\ ahk 64bit
When I paste to Word, it like this:
http://imgur.com/8uGPSxB

This is the script that I use:

If !pToken := Gdip_Startup()
{
    MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
    ExitApp
}

WinGet, hwnd,ID, A

pBitmap:=Gdip_BitmapFromHWND(hwnd)

Gdip_SetBitmapToClipboard(pBitmap)          ;set image to clipboard
Gdip_SaveBitmapToFile(pBitmap, "newscrshoot.png")  ;saves image to file

Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken)
ExitApp

Gdip_SaveBitmapToFile works fine, but Gdip_SetBitmapToClipboard!