It is currently Fri Aug 23, 2019 12:07 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: GIF Toolkit
PostPosted: Mon Feb 27, 2017 10:56 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
-----------------------------------------------------------------------------------

Download GIF Toolkit from My PureBasic Stuff

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

Tricks 'n' Tips
PureBasic Interface to OpenCV
PureBasic Interface to WinDivert
PureBasic Interface to WinRAR
PureBasic Interface to 7-Zip
PureBasic Interface to ImDisk
Windows Services & Other Stuff
Invading Space Aliens
Death Star vs Asteroids
GIF Toolkit
LSB File Embedding
Spider Web Drawing
Deform Image: MLS
Video Snipping Tool
Image Waves: LUT
HTML5 YouTube Player
HTML5 MP4 Player
Barcode Generator
Embed JS into PureBasic
Geolocation: Google Maps
Book & Viewer & Magnify
Video for Windows: VfW
Alternate Console
Network Share Management

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

Based on information from the following resources:
- UnFREEz Source Code
- What's In A GIF - Bit by Byte
- Inside the GIF file format
- How LZW (GIF) Compression Works
- GIF89a Specification
- Netscape Looping Application Extension

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

APPLICATION
- GIFToolkit.pb: Based on scripts from the following examples.

SCRIPTS
- gif_animate.pb: Create an animated GIF from a folder of GIF images.
-- use the example gif_extract.pb to create a folder of (frames) GIF images

- gif_decode.pb: Decode an animated GIF to play in a Canvas Gadget.
-- Context Menu: Open GIF Image, Play GIF Image
-- move through frames in either direction using the arrow keys
-- set a custom Transparent / Background color

- gif_detail.pb: List the container and frame information from an animated GIF.
-- returns all the information from the various structures

- gif_encode.pb: Encode an image from a Canvas Gadget to a GIF image.
-- this example is a work in progress; still need to finish the EncodeLZW Procedure

- gif_extract.pb: Extract frames from an animated GIF creating a folder of images.
-- use the example gif_animate.pb to compile the images into an animation

- gif_patch.pb: Patch any GIF parameter; requires further coding, but should be enough to get started.
-- files are patched in-place; execute the example against the GIF located in the images folder

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Thu Jun 06, 2019 7:02 am, edited 64 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Mon Feb 27, 2017 11:33 pm 
Offline
User
User

Joined: Fri Feb 05, 2016 10:11 am
Posts: 73
Excellent idea
thank you for sharing


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Tue Feb 28, 2017 2:14 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 24, 2011 12:40 am
Posts: 534
Location: Iowa, USA
Does this require the new beta version of PB or can I run it with version 5.50?

_________________
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Tue Feb 28, 2017 2:27 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi boyoss,

Thank you for your comments.

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

Hi BasicallyPure,

The examples should work in any version of PureBasic, but may require some minor changes due to PureBasic Constants, etc. not existing in earlier versions of the IDE

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Tue Feb 28, 2017 5:26 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4487
Location: Lyon - France
Thanks JHPJHP 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Wed Feb 07, 2018 2:35 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi Kwai chang caine,

You're very much welcome.

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

Updated:
- gif_decode.pb
-- modified the way transparency was handled
- gif_detail.pb
-- returns all available GIF information by frame

NOTE:
- this toolkit does not use the PureBasic GIF decoder
- gif_encode.pb is still unfinished (missing the LZW Encode algorithm)
- when time permits, will include a GIF to Spritesheet utility

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Wed Feb 07, 2018 2:07 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4487
Location: Lyon - France
Hello JHPJHP

Thanks for sharing your great works 8)

I have try the extract and the result if strange, show by yourself :wink:

The first image extracting with your code

Image

The second image extracting with your code
And nearly all the next images extracting with your code is like the second image :|


Image

The first image extracting with JASC animation shop

Image

The second image extracting with JASC animation shop

Image

With JASC all the images is perfect :wink:

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Wed Feb 07, 2018 8:25 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi Kwai chang caine,

Thank you for your post.

The example gif_extract.pb is working as expected...
- this can be tested using the example gif_animate.pb; combine the extracted frames into an animated GIF

Animated GIFs:
Chapter 17 of Learning Web Design, 2nd edition wrote:
The optimization process saves only the pixels that change from frame to frame and throws out redundant pixels.
The result is a big savings in file size with no change in the animation’s appearance.

NB*: I will add an option to the soon-to-be-released GIF Toolkit utility, to save layered images as individual frames.

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

Updated:
- gif_decode.pb
-- modified Disposal Method
-- modified DecodeLZW Procedure

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Tue Feb 13, 2018 6:37 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Thu Feb 08, 2018 2:19 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4487
Location: Lyon - France
Aaaaah ok !!! excuse me for disturbe you for nothing :oops:
I have a little bit thinking to that when i have see the result, but like JASC save all the image, i believe it's a problem :wink:

It's right the picture are merveillous, it's the rolls royce of the GIF :shock: i'm in the paradise :mrgreen:

So thanks again for your splendid works, like all the others of JHPJHP 8) 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Thu Feb 08, 2018 7:16 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi Kwai chang caine,

Kwai chang caine wrote:
... excuse me for disturbe you for nothing

On the contrary, you are a very helpful member of this forum who not only takes the time to test the various code contributions, but also provide valuable feedback. Thank you :!:

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Thu Feb 08, 2018 9:49 pm 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
I am looking forward to the Sprite Sheet tool
In itself, a sprite sheet is the better GIF
Much more flexible and easier to handle

_________________
http://www.nachtoptik.de


Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Fri Feb 09, 2018 4:41 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi walbus,

I like the package aspect of a GIF, but it does have some drawbacks.

Updated:
- GIFToolkit.pb: GIF Toolkit GUI (currently only formatted for Windows, but is cross-platform)

This is an unfinished product, but should give you an idea of where I am heading...
- most of the backend scripts have already been written (see the scripts folder)
- the top GIF player will display the animation
- each button will display an area with additional settings
- the bottom filmstrip will display individual frames, controlled by the above trackbar

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Tue Feb 13, 2018 6:38 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Fri Feb 09, 2018 8:28 am 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
Yes, with a filmstrip looks good

_________________
http://www.nachtoptik.de


Last edited by walbus on Wed Mar 28, 2018 11:19 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Sat Feb 10, 2018 6:45 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1572
Hi walbus,

Had a couple of hours today to work on the GIF Toolkit; currently only the thumbnail player and transparency coloring are completed.
- double-click the thumbnail player, while a GIF is loaded, to open the GIF in its original size

NB*: All the previous examples are still available from the scripts folder.

_________________

I will be unreachable from the forum for an indefinite period; downloads moved to My PureBasic Stuff.
_________________


Last edited by JHPJHP on Fri May 18, 2018 4:28 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: GIF Toolkit
PostPosted: Sat Feb 10, 2018 7:33 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4487
Location: Lyon - France
JHPJHP wrote:
On the contrary, you are a very helpful member of this forum who not only takes the time to test the various code contributions, but also provide valuable feedback. Thank you :!:
Sincerely thanks for this great compliment, who have again more value when it come from a great master of programming like you :oops: 8) 8)
Continue to illuminate our computers with all your jewels codes :shock: 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye