Crash on read *.gif?!

BlitzMax Forums/BlitzMax Programming/Crash on read *.gif?!

Trader3564(Posted 2008) [#1]
Ok. When i call
Self.body = LoadImage("player\body.png")
all works
when i call
Self.body = LoadImage("player\body.gif")
i get a null object.

im 100% sure both images are in the same directory.
i tried a 16color, 256 color, and transperant gif.


GfK(Posted 2008) [#2]
Blitzmax doesn't support GIF afaik.


Trader3564(Posted 2008) [#3]
ok. whats te best format after GIF, PNG right?


GfK(Posted 2008) [#4]
yup.

GIF is a god-awful format. I don't use it for anything, let alone games.

PNG is the best all-round option.


Trader3564(Posted 2008) [#5]
I did some tests on BMP and PNG. In MASKEDBLEND modes BMP actualy renders faster then PNG. Its only 1-2 FPS on 500 images.
Compressed BMP is even smaller then compressed PNG.
(im talking about small files here of 32x32)


Dreamora(Posted 2008) [#6]
Yes but on the other end, you normally get problems if you intend to use 32bit bmps ie bmp with alpha channels ... which is the strength of PNG. (thats most likely the reason its faster as well ... its only RGB, not RGBA as PNG)


N(Posted 2008) [#7]
I did some tests on BMP and PNG. In MASKEDBLEND modes BMP actualy renders faster then PNG. Its only 1-2 FPS on 500 images.
This is incorrect because by the time you are rendering the image, format makes no difference. You aren't actually seeing a difference in performance based on the image format. It is most likely that both formats are ending up at the same pixel format (this is not image format) thanks to the use of masked blending.


Trader3564(Posted 2008) [#8]
I understand. But i think it is as Dreamora said. its only RGB, not RGBA as with PNG, tbus its a little faster. But hey, wre talking millisecs here.


Raph(Posted 2008) [#9]
This old GIF code works -- I still have it in my project.

http://www.blitzbasic.com/Community/posts.php?topic=63744#779222