code:
KiXtart
KiXtart Version = KiXtart 2001 4.22 Release Candidate 1
KiXforms Version = 2.3.0.41
KiXGolf Script = kixgolf_pxmagic.kix

Computer
OS = Windows XP Home Edition
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2792 MHz
Memory = 512 MB

KiXGolf Scoring Engine
Scoring Engine = 3.2

KiXtart Golf Score
Tournament = KiXtart Golf: PxMagic - Read & Display PxM Images
Processing Start = 2003/10/20 15:57:59.515
Processing End = 2003/10/20 16:12:53.406
Duration = 0000/00/00 00:14:53.891
# Images = 8
KiXGolf Score PxMagic = 39
KiXGolf Score PxMRead = 190
KiXGolf Score PxMDisplay = 219
KiXGolf Score Total = 448

Thank you for participating in KiXtart Golf!

code:
Function PxMagic($)
PxMRead($)
EndFunction

Function PxMRead($)
$=""+open(1,$)
do $=join(split($+" "+join(split(split(readline(1),#)[0], ))," ")) until instr($," ")=1+@error
PxMDisplay(split($),CreateObject(Kixtart.Form))
close(1)
EndFunction

Function PxMDisplay($,$a)
dim $f, $w, $h, $y, $z

$a.Show(3)

$y = 5
$f = 255/$[4]
if $[1]=P1
$y = 4
$f = 255
endif

$z = $[1]=P3

for $h=1 to $[3]
for $w=1 to $[2]
$a.PSet($w, $h, $f*(65536*$[$y+2*$z]+256*$[$y+$z]+$[$y]))
$y = 1 + $y + 2*$z
next
next
sleep 10
EndFunction

btw, the default form size IS NOT sufficient.
there is at least one image which is bigger.

[ 20. October 2003, 15:12: Message edited by: Lonkero ]
_________________________
!

download KiXnet