Jason,
I'm writing a Java program where I want to read in the ITERATES.TGA file produced by Fractint (using truecolor=yes).
However, the trouble occurs when I try to read in the iteration values -- I think I've determined that there are three bytes per iteration value, but for the life of me I can't figure out how to shift/add the bytes to produce the iteration values I expect to see (1, 2, 3, etc.). Here's the closest I think I may have come to the correct code:
b1 = dis.readUnsignedByte(); b2 = dis.readUnsignedByte(); b3 = dis.readUnsignedByte(); System.out.println("b1-3 : "+b1+" "+b2+" "+b3); long iteration; iteration = b1 + (b2 <<8) + (b3 << 16);
Looping through the entire file, all I ever get back is: b1-3 : 200 153 51 iter : 3381704
This should work. What value are you using for maxiter? Which version of Fractint are you using. If you are seeing an iterates.tga file, you need to use a newer version of Fractint. The developer's version (20.4 patch 11) works as I expect with truecolor=y and truemode=iter, and generates fractxxx.tga files. Using a TGA file viewer shows a mostly black image with a trace of blue around the lake (which is blue) with the default settings. I have a vague recollection that this feature was broken at one time, but I don't recall when it got fixed or what the problem was. Jonathan