@Fred: Can I add 'my' own ImagePlugin (e.g GIF En-/Decoder)?

Everything else that doesn't fall into one of the other PB categories.
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post by Michael Vogel »

Hi (Fred),

in the meantime the GIF format should be free now?!

Is there a plan to implement a UseGIFImageDecoder() function?

Thanks,
Michael
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post by localmotion34 »

It wouldn't be too hard. haqibaba posted code here for a native GIF decoder, and I myself modified that to decode ALL the frames of an animated gif. So in essence, it could be added to the PB command set:

UseGIFImageDecoder

GetGIFFrame(#image, FrameNumber)

CountGIFFrames(#image)

Or you can just use the code posted on here, but it has NOT been adapted for CatchImage.

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
Seymour Clufley
Addict
Addict
Posts: 1264
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Post by Seymour Clufley »

How is your GIF encoder coming along, localmotion? Did the project stall?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

There's already a small code snippet in these forums that let you load and
display GIFs, JPGs and PNGs without using PureBasic's image decoders.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply