POV-Ray : Newsgroups : povray.general : Writing binary files with POV script : Re: Writing binary files with POV script Server Time
4 Nov 2024 23:18:25 EST (-0500)
  Re: Writing binary files with POV script  
From: Warp
Date: 22 Aug 2003 07:27:47
Message: <3f45fe33@news.povray.org>
ABX <abx### [at] abxartpl> wrote:
> It was discussed a few times. It is not possible to make binary files.

  The reason for this is that due to how POV-Ray (well, actually C)
internally works, you can't write the byte value 0 to a file (any other
value is writable).
  In order to be able to write any byte values (including 0) to a file,
a specialized function would have to be added. Perhaps someone could make
a patch...

  (The reason why 0 is not writable is because in C's string-handling
functions it marks the end of the string. The writing C function will
stop at that point and will not write the 0 nor anything which comes
after it. In order to write raw binary data, a different C function
needs to be used (which is not a string function). There's no feature
in the POV-Ray scripting language which would use such function and
thus this is not possible currently.)

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.