Animation Gadget - last update Dec30 2013

Share your advanced PureBasic knowledge/code with the community.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Animation Gadget - last update Dec30

Post by Kwai chang caine »

Is it possible to use your splendid gadget with a windows with image background ?
ImageThe happiness is a road...
Not a destination
hss
User
User
Posts: 69
Joined: Thu Mar 08, 2007 6:02 pm

Re: Animation Gadget - last update Dec30

Post by hss »

both links are broken;
any chance of re-up?
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Animation Gadget - last update Dec30

Post by netmaestro »

It was among a bunch of stuff I lost last year. If someone has it and can email it to me I'll upload it again but failing that I just don't have it.
BERESHEIT
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Animation Gadget - last update Dec30

Post by wilbert »

I removed my post since it was no longer relevant now the code from netmaestro has been found.
Last edited by wilbert on Tue Jul 26, 2016 9:02 pm, edited 1 time in total.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Animation Gadget - last update Dec30

Post by Demivec »

netmaestro wrote:It was among a bunch of stuff I lost last year. If someone has it and can email it to me I'll upload it again but failing that I just don't have it.
I'll post it here for a few weeks (maybe during that time it will be caught by the Wayback Machine :) ).

[temporary link removed]


@Edit: Removed temporary link.
Last edited by Demivec on Mon Jan 23, 2017 12:44 am, edited 1 time in total.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Animation Gadget - last update Dec30

Post by netmaestro »

Thanks to davido and Demivec the project is back online! Link in the first post works again and for added safety I've posted the .pbi code there too. So it shouldn't get lost again.
BERESHEIT
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Animation Gadget - last update Dec30 2013

Post by Keya »

The code is crashing on all eight animated gifs at this page - https://www.fastcodesign.com/1665547/8- ... -l-reynaud

I don't know the reason for the decoding problem but the reason for the crash is there are two instances of code like the following which assume a valid ptr, but the ptr is null with those images due to decoding problem:

Code: Select all

*this.GifObject = GifObjectFromFile(GetGadgetText(0))  ;<-- search for this line (2 instances)
w=*this\containerwidth
...
Needs to be:

Code: Select all

*this.GifObject = GifObjectFromFile(GetGadgetText(0))
If *this.GifObject  ;check null ptr
   w=*this\containerwidth
   ...
The image still won't render but the crash is fixed.
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: Animation Gadget - last update Dec30 2013

Post by JHPJHP »

H Keya, netmaestro

Windows 10 / PureBasic 5.51 (x86 / x64)

All eight examples worked from the link Keya provided; didn't make any changes to the code (download from the first post).
- saved GIFs directly to the GifDecoder folder, adding to the existing images

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Animation Gadget - last update Dec30 2013

Post by netmaestro »

They're working here too, so I really don't know what could be going wrong for you. Tested on PB 5.51 x86 and x64 Windows 7.
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Animation Gadget - last update Dec30 2013

Post by netmaestro »

[edit] No longer applicable.
Last edited by netmaestro on Tue Jan 24, 2017 7:01 pm, edited 2 times in total.
BERESHEIT
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Animation Gadget - last update Dec30 2013

Post by Keya »

sorry guys i mustve used been using a modified or older version. I still think that ptr check is good though hehe. brilliant work as always netmaestro!
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Animation Gadget - last update Dec30 2013

Post by netmaestro »

Thanks Keya, you've taught me a few things along the way and I hold your opinion in high esteem :mrgreen:
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Animation Gadget - last update Dec30 2013

Post by netmaestro »

I completed the 24bit version today, code is added to the first post (it's also included in the download along with the original)
BERESHEIT
Post Reply