POV-Ray : Newsgroups : povray.programming : PNG_Image class problems Server Time
5 Jul 2024 15:16:37 EDT (-0400)
  PNG_Image class problems (Message 1 to 3 of 3)  
From: Matthew Grove
Subject: PNG_Image class problems
Date: 28 Dec 2002 05:42:26
Message: <3e0d8012$1@news.povray.org>
Hi folks, has anyone out there had problems with the PNG_Image class? I
notice that the class contains a number of static variables, and also
accesses a number of local static variables in png_pov.cpp. At a glance
it looks like it would break if several different files were open
concurrently.
My initial fix was to put all these variables inside the class and make
them non-static. This works great for writing to multiple files, but
breaks the continue trace ability (png_ptr seems to persist between READ
and APPEND?). I'm guessing that a chunk of initialisation code from the
READ case put into the APPEND case would fix the problem, but I would
rather not guess.
I found a thread from many months ago discussing similar problems with
PNG and continue trace, but there did not seem to be any answers. This
isn't vital to my current project(pvmpov_3_5), but just annoying - I only
discovered it when I forgot the +ft while continuing an animation.

Thanks, Matthew.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: PNG_Image class problems
Date: 28 Dec 2002 05:52:57
Message: <3e0d8289@news.povray.org>
In article <3e0d8012$1@news.povray.org> , Matthew Grove 
<mat### [at] ihugconz>  wrote:

> Hi folks, has anyone out there had problems with the PNG_Image class? I
> notice that the class contains a number of static variables, and also
> accesses a number of local static variables in png_pov.cpp. At a glance
> it looks like it would break if several different files were open
> concurrently.

This cannot happen in POV-Ray, so it is irrelevant.  Most of POV-Ray will
break if you have multiple image files open at a time (note that the class
interface is only needed for read/write of output images).  The Image
classes are essentially just a wrapper around the 3.1 code.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Le Forgeron
Subject: Re: PNG_Image class problems
Date: 30 Dec 2002 07:01:17
Message: <3E1035C6.1070005@free.fr>
Matthew Grove wrote:


> I found a thread from many months ago discussing similar problems with
> PNG and continue trace, but there did not seem to be any answers.


So far, until someone find the bug location, I consider that the 
continue option got broken with png when the code was moved from 3.1 to 
3.5. I do not know where is the error, but continued png by 3.5 seems to
be a little too much longer than they should. May be a bad fseek somewhere ?


Post a reply to this message

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