|
|
In article <K+VMOJjc8SPbYBb12fbq=tY0T+bl@4ax.com> , Peter Popov
<pet### [at] usanet> wrote:
>>I ran into this problem as well with my custom compile of POV-Ray. For
>>unknown reasons, the code for saving TGA images sometimes does not compile
>>properly, and as a result, the most significant byte of the image size is
>>not written properly. The fix is as follows:
>>
>>In file TARGA.C line 282 or so, fully parenthesize the four lines of code
>>for writing the image width and height, so that you get the following:
>>
>> /* write width and height Bytes 12 - 15 */
>>
>> putc(((*width) % 256), handle->file);
>> putc(((*width) / 256), handle->file);
>> putc(((*height) % 256), handle->file);
>> putc(((*height) / 256), handle->file);
>>
>>Then recompile POV-Ray. This should fix the problem.
>>
>>Mark
>
> Mark, if this is a bug, and this is a fix (and they seem to be), would
> you please post a proper bug report to povray.bugreports? Thank you.
> This seems to be very platform- and compiler-specific, but still, if
> it is a problem...
No, it is not a bug in POV-Ray! It is a compiler/library specific problem.
The code POV-Ray uses is legal in ANSI C and should work without problems if
the compiler is configured properly and supports ANSI C. It might also just
be a library problem, where the library uses signed char (usually "char" is
signed). I.e. if the library does an assignment like "int i; char c = i;"
you will get such problems. If you have the source of the library, you can
fix it by searching in function fputc any assignment of the parameter from a
"char" to an "unsigned char".
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|