Page 1 of 1

GIF encoder/decoder

Posted: Mon Jun 28, 2004 7:28 pm
by Shannara
Yes, I've done a search for one on these forums, and came up with nothing usable. The results either said read the beginner FAQ (which has nothing concerning GIFs), or claim copyright issues, which does not exist in most places anymore.

Why have a GIF one? Because I need an lossless image format that both PB and VB (& directx) can read and display. The format cannot be BMP :) So... I tried JPEG, but no matter what compression setting I use in Photoshop, the resulting image still looks.. quarky.

So I'm looking to use GIF. PureArena has "loadgif.pb" example that do not really load gifs. It uses a stupid movie gadget and loads a gif image in there.. quite useless for any real world application :(

I was thinking about making a dll in PB that will load a PNG image and pass it to PB, but haven't figured out how to do that, and put it in a VB Picture object, so.... im stuck with GIFs :D

Please note that I am not looking for a workaround as there is already an image plugin found:

viewtopic.php?t=6005

What I am looking for is Fred to start adding in support for more image formats, as it seems that that image formats supported in PB is quite small.

Posted: Mon Jun 28, 2004 8:04 pm
by thefool
PNG is lossless and has MUCH greater quality than gif. Jpeg pictures can also have many more colors.
But anyway, gif files are small.

but can vb read png?

Posted: Fri Jul 16, 2004 1:00 am
by newbie
I am for this one too.

JPG displays with a better quality gradiant pictures for instance, but for the others ones, GIF quality is excellent, and the file size is smaller.

Posted: Fri Jul 16, 2004 10:12 am
by Lebostein
Yes! Why 'png' and not 'gif'? The gif-format is very frequently in use. In new versions of PureBasic I can load 256-color Bitmaps, its time for loading gif's too.

Please :D

Thanks!

Posted: Fri Jul 16, 2004 1:06 pm
by plouf
firstly i have to admit that i am a PNG fan too ;)
and yes png can be 256 color and higly compressed too :evil:
anyway the gif prob is with its license if i am not wrong
(ye i know it has expire in many countries but still is prob)

pb added the image 'plugin' way thus anyway (who knows) can make a plugin elchoni has made one for win BMP, JPG, GIF, ICO, CUR, WMF and EMF
check in pureare user-libs

Posted: Fri Jul 16, 2004 3:14 pm
by Karbon
Check out this post for a gif loader :
viewtopic.php?t=6005&highlight=ole+image

You aren't going to find any freeware encoders out there because of the patent. And before someone says that it's expired - it isn't in all countries.

Posted: Fri Jul 16, 2004 4:29 pm
by newbie
Thanks for the link Karbon ;)

I am using it right now, very nice ! :D

Posted: Sat Jul 17, 2004 6:48 pm
by Shannara
That is true, however, I could of sworn it has expired in france, and if it has, any remaining patants do not apply to Fred, but does apply to people who lives in the country where the patent still exist.. so the "it's still patant in some countries" do not hold water here (if...france..)

Posted: Sat Jul 17, 2004 7:02 pm
by newbie
france here ^^

A workaround...

Posted: Sat Jul 17, 2004 8:39 pm
by StarHawk
I got into with Fred over this very issue some months ago. I don't want to stir up hard feelings, but yes, this is needed. Now, you can use this code to display a GIF:

InitMovie()
LoadMovie(0,"YOUR GIF FILE NAME.gif")
PlayMovie(0,WindowID())

But watch out for compatibility issues. This is not "native" support of a GIF. If you use this, you may run into trouble on older computers or computers that have some DLL incompatibility issues or damaged or missing. If your requirements are to run on a Windows XP only, then it should work just fine.

P.S. GIF license is expired in almost all countries as of June, and even a few other countries were only about 6 months to 1 year longer. So in any event, in about 1 year, all GIF patents expire.