Animation Gadget - last update Dec30 2013

Share your advanced PureBasic knowledge/code with the community.
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 Dec 26

Post by netmaestro »

Thanks for the kind words :mrgreen: New update today, it works on all 3 platforms now. Just take your time when clicking through the tree on Mac for now.
BERESHEIT
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 Dec 26

Post by Kwai chang caine »

I dreamed the solution. I'm not lying to you, that's exactly what happened.
:shock: :shock:

KCC also want to dream like master of the net :cry:
Me...when i dream it's most like this :oops:
Image

My empire for just a dream of NETMAESTRO 8)
ImageThe happiness is a road...
Not a destination
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 Dec 27

Post by netmaestro »

New update today. Much work has been done on the decoder as I was never happy with the level of
efficiency I was attaining with my code written the way it was. It is my custom when tackling a
difficult project to begin with the simplest and easiest-to-understand ways of approaching the
various parts of it and then when it's working well, go back and optimize. That's what today's
update is about. I had been keeping the full "strings" (they weren't really strings) in the
dictionary and writing them to the output stream when called for, but there isn't any reason for
that to be necessary. I had read the concepts found here:
http://warp.povusers.org/EfficientLZW/part5.html
The index value points to a string in the dictionary. However, as we remember, the
"string" in the dictionary only consists of the last byte of the string and an index to the
prefix for that string. Likewise the "string" at that prefix index only contains the last byte
and an index to the rest of the prefix.
early on in the process but that approach is a bit more difficult to understand and implement
(for me) than straight dictionary storage so I left it off until things were pretty much running
reliably.

Anyway, the result of today's update is a significant speed gain (approx. 2.5x) and cleaner, more
efficient code overall. I hope it will continue to work everywhere, as I don't see anything I've
done that would affect that. If there are issues though, please let me know.
BERESHEIT
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Animation Gadget - last update Dec 27

Post by davido »

Works fine here. Thanks, again. :D

Impressive speed increase!

Crashes, if no gifs in folder. Apologies for the nitpick.
DE AA EB
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 Dec 29

Post by netmaestro »

Update today, details in first post.
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 Dec 29

Post by netmaestro »

New update today, details in first post.
BERESHEIT
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Animation Gadget - last update Dec30

Post by davido »

Thank you for the updates. :D
Version 1.00 crashes on my system.
However, version 1.03 (BrowseGifs_1) is fine - no problem.
I had problem with the 'paste' version (BrowseGifs_2) as the pasted gif did not run - just left a blank window.

Would 'drag/drop' be possible?
DE AA EB
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 »

There could be a few reasons for a blank window. One, the file might not actually be a .gif. In this case it won't play. Two, the file could be one that ReceiveHttpFile fails on, I found a couple of those. And three, anything copied from your filesystem as ReceiveHttpFile won't get them. If a file is a) on the web and b) an actual .gif and c) ReceiveHttpFile can download it then it should play on the window without problems. It does here anyway. The program could be modified easily enough to also accept pastes from the filesystem, it' just that this version hasn't got that. Also drag&drop is no problem to implement, maybe I'll make some additions to the second test program.
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

Post by netmaestro »

Sample #2 is updated to accept dropped gifs from your filesystem. Just drag them to the window, let go and they play.
BERESHEIT
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Animation Gadget - last update Dec30

Post by davido »

The gif I tried was your Avatar!? So I assume it should have worked. Also tried it on a few machines so it must be my problem, sorry.

Thank you for the update to #2, it works fine. I'm used to simply dragging files off of Chrome screens.
A most unexpected and very rapid response. :D
Wishing you a happy New Year.
DE AA EB
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 »

Good, I'm glad it works for you. To summarize:

From the web: copy/paste only, drag-drop won't work
From your filesystem: drag-drop only, copy/paste won't work
BERESHEIT
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Animation Gadget - last update Dec30

Post by walbus »

Great,
many thanks !!!
UUICEO
User
User
Posts: 57
Joined: Tue Mar 10, 2009 9:09 pm
Location: Shakopee, Minnesota. USA

Re: Animation Gadget - last update Dec30

Post by UUICEO »

The DL link dead?
Windows 7 Ultimate x64 / PureBasic 5.21 LTS / ProGUI Platinum / PureVision / http://www.linkedin.com/groups/PureBasi ... =&trk=tyah
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 »

I apologize for the dead link. I'm moving my site to a new host and the changes are taking longer than usual to propagate through the internet. I have a temporary address that should work in the meantime:

http://zeus.canspace.ca/~lloydspl/GifDecoder.zip
BERESHEIT
coco2
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Re: Animation Gadget - last update Dec30

Post by coco2 »

Replying so I can look at this tonight
Post Reply