POV-Ray : Newsgroups : povray.programming : own output format : Re: own output format Server Time
28 Jul 2024 08:28:15 EDT (-0400)
  Re: own output format  
From: Grimbert Jerome
Date: 24 Aug 2002 16:25:02
Message: <3D67EC21.C0C125E@free.fr>
Posting under my real name for once, I will revert to "Le Forgeron" right after.
(it's the week-end!)

Rafal 'Raf256' Maj wrote:
> 
> Le Forgeron <jgr### [at] freefr> wrote in news:3D6### [at] freefr
> 
> > The problem might be to collect the information when it is available.
> 
> > The traditional file writing code is usually given a line of pixel at a
> > time. Here, pixel being "traditional" pixel (rgba), not your pixel.
> > To collect your information, you will have to patch (heavily) the
> > rendering engine
> 
> It realy looks not so easy, maybe I should start with basic r,g,b text
> format.
> With file/line is responsible for
> - setting i.e. 'txt' and 'T' as output format

+FT is already used for Uncompressed Targa 24bits
What about +FA instead (A: Ascii ?)

> - creating output file
> - adding pixel to buffer
You do not have to update that code, unless you want more than RGBA in the buffer.
The file interface has only the knowledge of the concept of line.

Look in png_pov.* or targa.* for an example of the functions needed
(one open, one write a line, one read a line, one read full image, one close)
The buffer is there to delay the writing of x lines on the disk, instead
of making a disk access (or rather asking the system to do it) per lines.
Most useful when rendering small width, far less I/O, this keep the CPU working
on the useful things!)

> - writing buffer/line to file
> - closing it

-- 
Non Sine Numine
http://grimbert.cjb.net/
Etiquette is for those with no breeding;
fashion for those with no taste.


Post a reply to this message

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