| View previous topic :: View next topic |
| Author |
Message |
DataLife
Joined: 27 Apr 2008 Posts: 369
|
|
| Back to top |
|
 |
DataLife
Joined: 27 Apr 2008 Posts: 369
|
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1786
|
Posted: Thu Jan 22, 2009 2:26 pm Post subject: |
|
|
lol, everyones disregarded that this function is old and rubbish
The gdi+ library will do this much better
| Code: | #Include Gdip.ahk
pToken := Gdip_Startup()
pBitmap := Gdip_CreateBitmapFromFile("file.jpg")
Gdip_SaveBitmapToFile(pBitmap, "file.bmp")
Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken) |
I know its longer, but that could all be wrapped into one function:
| Code: | ConvertImage(sInput, sOutput)
{
pBitmap := Gdip_CreateBitmapFromFile(sInput)
Gdip_SaveBitmapToFile(pBitmap, sOutput)
Gdip_DisposeImage(pBitmap)
} |
Use that instead! |
|
| Back to top |
|
 |
oliver.lipkau
Joined: 17 Sep 2006 Posts: 85 Location: Munique/Germany
|
Posted: Thu Jan 22, 2009 2:28 pm Post subject: |
|
|
| tic wrote: | lol, everyones disregarded that this function is old and rubbish
The gdi+ library will do this much better
| Code: | #Include Gdip.ahk
pToken := Gdip_Startup()
pBitmap := Gdip_CreateBitmapFromFile("file.jpg")
Gdip_SaveBitmapToFile(pBitmap, "file.bmp")
Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken) |
I know its longer, but that could all be wrapped into one function:
| Code: | ConvertImage(sInput, sOutput)
{
pBitmap := Gdip_CreateBitmapFromFile(sInput)
Gdip_SaveBitmapToFile(pBitmap, sOutput)
Gdip_DisposeImage(pBitmap)
} |
Use that instead! |
tic,
can you past a image to the clipboard using your GDI lib?
Thanks |
|
| Back to top |
|
 |
adamrgolf
Joined: 28 Dec 2006 Posts: 440
|
Posted: Tue Mar 02, 2010 10:28 pm Post subject: |
|
|
| Is it possible to convert an input image from memory instead of from file? |
|
| Back to top |
|
 |
Lithodora
Joined: 02 Jul 2006 Posts: 23
|
Posted: Tue Apr 06, 2010 12:06 am Post subject: |
|
|
| Is there a way to get a hold of this function because the link in the OP doesn't work? |
|
| Back to top |
|
 |
Wicked - Guest Guest
|
Posted: Tue Apr 06, 2010 3:06 am Post subject: |
|
|
A good idea would be a similar function for bitmaps stored in memory. For example using your GDI+ library. Not a convert image, but a simple resize.
Maybe there is one already, but I've not had much time to look. Then you could do:
| Code: | | pBitmap := ConvertImage(pBitmap, 200, 100) |
See what I mean? If there is one already, I apologize. |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1786
|
|
| Back to top |
|
 |
|