I'm trying to play with the GD library. I downloaded the latest GD library and pointed Mia to the bgd.dll. I then whipped up this little script:
But no image shows up.
The error.txt doesn't show anything useful
1|0|16777215|16711680|255||||
Looks like the ImageCreate works, the colors are assigned a hue value, and then nothing else happens.
What's missing?
Thanks
Code:
<MIVA STANDARDOUTPUTLEVEL=""> <MvASSIGN NAME = "l.null" VALUE = "{ miva_output_header('Content-type','image/png' ) }"> <MvASSIGN NAME = "l.x_size" VALUE = "{ 200 }"> <MvASSIGN NAME = "l.y_size" VALUE = "{ 100 }"> <MvASSIGN NAME = "l.image" VALUE = "{ gdImageCreateTrueColor( l.x_size, l.y_size ) }"> <MvASSIGN NAME = "l.black" VALUE = "{ gdImageColorAllocate( l.image, 0, 0, 0 ) }"> <MvASSIGN NAME = "l.green" VALUE = "{ gdImageColorAllocate( l.image, 0, 0, 255 ) }"> <MvASSIGN NAME = "l.red" VALUE = "{ gdImageColorAllocate( l.image, 255, 0, 0 ) }"> <MvASSIGN NAME = "l.white" VALUE = "{ gdImageColorAllocate( l.image, 255, 255, 255 ) }"> <MvASSIGN NAME = "l.fill1" VALUE = "{ gdImageFilledRectangle( l.image, 10, 10, 80, 80, l.red ) }"> <MvASSIGN NAME = "l.draw" VALUE = "{ gdImagePng( l.image, 'square.png', '/' ) }"> <MvASSIGN NAME = "l.destroy" VALUE = "{ gdImageDestroy( l.image ) }"> <MvASSIGN NAME = "l.error" VALUE = "{ gdLastError() }"> <MvEXPORT FILE = "error.txt" FIELDS = "l.image, l.black, l.white, l.red, l.green, l.fill1, l.draw, l.destroy, l.error" DELIMITER = "|"> <MvEXIT>
The error.txt doesn't show anything useful
1|0|16777215|16711680|255||||
Looks like the ImageCreate works, the colors are assigned a hue value, and then nothing else happens.
What's missing?
Thanks
Comment