Closed cnieuweboer closed 1 month ago
Have you tried downloading the latest version here?
https://github.com/iseahound/ImagePut/blob/master/ImagePut%20(for%20v1).ahk
Yes that is the version I am using.
I am also using the Gdip standard library v1.45 somewhere else in the script, for other purposes. It seems pToken := Gdip_StartUp() causes webp to fail. Without pToken := Gdip_StartUp() the webp image does load, but doesn't animate.
Looks like the image file isn't being parsed correctly. I'll take a deeper look at the sample image you provided, I manually added code to parse WebP frames.
ImagePutWindow("https://mathiasbynens.be/demo/animated-webp-supported.webp")
Most other webp animations work :)
For your pToken startup problem, you can use ImagePut's loader: ImagePut.gdiplusStartup()
Thanks, that works. Guess I should just use the library as it was intended then.
I still couldn't get your animated webp to correctly animate in ImagePutWindow however.
Partially fixed by b5242ba7e4c1cbd653b3c687788a83d6a04d0e6c.
Your sample image has frame delays of 0, which I've now set to 100ms as per chrome / firefox.
Can confirm that fixes the animation. But it stops after 1 cycle, other webp/gif files repeat the animation.
Fully fixed by f6788aa953f9b61c11b4738206d9661518fc71ee
Also feel free to play with this example here: https://github.com/iseahound/ImagePut/wiki/Add-Image-to-AutoHotkey-GUI#bonus-synchronize-animations which includes some useful animation functions.
I am using the ahk v1 version, and use the imageputwindow function as follows imagewindow_handle := ImagePutWindow(imagefile,"image window",coordinates,0x80000000,0x08000028)
When I use a webp file it gives me an error.![image](https://github.com/iseahound/ImagePut/assets/55538749/54475431-cd6c-479c-a038-bdd8a7cc10d7)
Gif files work fine.
Example animated webp file https://www.tutorialexample.com/wp-content/uploads/2020/09/gif-test-2.webp
Example animated giffile https://www.tutorialexample.com/wp-content/uploads/2020/09/gif-test.gif
The supported formats website says animated webp should work. https://github.com/iseahound/ImagePut/wiki/Quick-Start#accepts