|
 |
A while ago I made some POV code to turn a 2meg color tga (made by POV) into a
256 color palette pcx. This was for the old Quake2 game.
I used this in a mac to save the file:
#local Tc=Image_Width * Image_Height;
#for(a,0,Tc-1)
#write (Mfile,uint8 Image[a])// The image array contain Integers<256
#end
I had no problems, as the Image_Width & Image_Height where rather small 400*400.
Lately I tried to use the same code to save a much larger image array
(2048*1024)
The Image just didn't work. After going through the code a dozen times looking
for bugs. I decided to try and make the POV crash on purpose.
So I tried this.
#local Tc=Image_Width * Image_Height;
#for(a,0,Tc)//--- notice the change------
#write (Mfile,uint8 Image[a])// The image array still contain Integers<256
#end
POV didn't crash !? And the image worked!!
To see what the output was I saved the Image array into POV file as an Named
array and ran that file to see if the array would work.
neither of the codes above made a good array with out a lot of tweeking.
Not satisfied I tried this:
#local Tc=Image_Width * Image_Height;
#local a=0;
#while(a<Tc)
#write (Mfile,uint8 Image[a])
#local a=a+1;
#end
Everything worked as expected!!
So what ya think?
I've got:: POV version 3.7.0.RC7.mevc10.sse.win32 running on an winXP.
Have fun!!
Post a reply to this message
|
 |