Pub.PCXLoader

BlitzMax Forums/BlitzMax Programming/Pub.PCXLoader

gman(Posted 2005) [#1]
if anyone needs it, i added a simple PCX loader to the code archives:

Pub.PCXLoader

limitation: it only does 8-bit 256 color images with palette.


assari(Posted 2005) [#2]
thanks for sharing


semar(Posted 2005) [#3]
@gman,
thanks for your unvaluable contribute to this community !

:)

Sergio.


gman(Posted 2005) [#4]
@semar - lol "unvaluable" :) PCXLoader is essentially a by-product of my porting the Irrlicht engine. if i can port it when i get to it there should be a PSD loader as well.


Nigel Brown(Posted 2005) [#5]
Do you have anuy example code using this module?


gman(Posted 2005) [#6]
@Nigel - it works the same as the other loaders such as the JPG loader. simply Import the module and then call LoadPixmap.
Strict
Framework BRL.Blitz
Import Pub.PCXLoader
Import BRL.GLMax2D

Local pixmap:TPixmap=LoadPixmap("d:/armourgreen.PCX")

If pixmap
	SetGraphicsDriver(GLMax2DDriver())
	Graphics 640,480,0
	While Not KeyDown(KEY_ESCAPE)
		Cls
		DrawPixmap(pixmap,30,10)
		Flip
	Wend
	
	pixmap=Null
	FlushMem
EndIf