POV-Ray : Newsgroups : povray.general : Povray writes wrong PNG image size info to partially rendered images Server Time
4 Aug 2024 18:19:56 EDT (-0400)
  Povray writes wrong PNG image size info to partially rendered images (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: George Pantazopoulos
Subject: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 00:05:45
Message: <3e891e29@news.povray.org>
This bug is related to, and probably the cause of, Christoph Hormann's
observed bug on 21 Jan 2003:
http://news.povray.org/povray.bugreports/29976/

Using povray 3.5 (precompiled binary) (though I suspect this bug is in all
flavors of 3.5)

When using the Partial Output Options +sc +ec +sr +er povray incorrectly
writes the full image size info to the PNG file it generates.

For example, if we did a render with "povray +w1024 +h768 +sc0 +ec255 +sr0
+er255 +fn +otile0.png cornell.pov",
the resulting tile0.png incorrectly reports a width and height of 1024 and
768, respectively. In this case it should be 256 for both cases.

This has the effect of confusing several image readers I've tried, with some
being unable to load the image at all. I came across this bug and confirmed
it while writing libpng code for a program of mine (even libpng refuses to
load the image).

The images CAN be viewed with ACDSee, which reports a corrupt data stream.

Thanks,
George Pantazopoulos


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 02:16:14
Message: <3e893cbe@news.povray.org>
Not a bug.  The behavior is correct.

    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: George Pantazopoulos
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 10:18:59
Message: <3e89ade3@news.povray.org>
Hi Thorsten,

    Can you please elaborate on this? Its not clear at all why this would be
correct behavior.

Thanks,
George


"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3e893cbe@news.povray.org...
> Not a bug.  The behavior is correct.
>
>     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: Thorsten Froehlich
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 10:30:48
Message: <3e89b0a8$1@news.povray.org>
In article <3e89ade3@news.povray.org> , "George Pantazopoulos" 
<the### [at] attbicom*KILLSPAM*> wrote:

>     Can you please elaborate on this? Its not clear at all why this would be
> correct behavior.

In short: Nowhere is ever said a partial image is good for anything but a
continued trace.  And the image size is required prior to read the image.
This is how all image formats work, and how all image formats are output in
POV-Ray.

    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

From: Tim Nikias v2 0
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 12:06:58
Message: <3e89c732@news.povray.org>
I'm not sure about the possibility of this, but wouldn't it be
useful if partial traces are positioned correctly in the
resulting file?
I'm not sure if that would actually be of much use, but I'd
think that it could be helpful when rendering a scene and
later another one, of which some section will be superimposed
over the old image...
But I'm no expert on that field, and I've never ran into trouble
the way it is. If possible, it might at least be useful for POV-Ray 4.


--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

>
> >     Can you please elaborate on this? Its not clear at all why this
would be
> > correct behavior.
>
> In short: Nowhere is ever said a partial image is good for anything but a
> continued trace.  And the image size is required prior to read the image.
> This is how all image formats work, and how all image formats are output
in
> POV-Ray.
>
>     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

From: Warp
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 13:14:06
Message: <3e89d6ed@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> In short: Nowhere is ever said a partial image is good for anything but a
> continued trace.  And the image size is required prior to read the image.
> This is how all image formats work, and how all image formats are output in
> POV-Ray.

  Many image formats (I don't know if PNG does, but I would be surprised
if it didn't) support specifying that the actual image data is smaller
than the specified image size. In this case the dimensions of the actual
image data and its location on the image are given (besides the regular
image dimensions).
  I wonder if this could be a nicer solution.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 13:43:50
Message: <3e89dde6@news.povray.org>
In article <3e89d6ed@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   I wonder if this could be a nicer solution.

No.


____________________________________________________
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

From: Renderdog
Subject: Re: Povray writes wrong PNG image size info to partially rendered
Date: 1 Apr 2003 15:20:03
Message: <web.3e89f3c7573676b7ba9929f0@news.povray.org>
Thorsten Froehlich wrote:

>In short: Nowhere is ever said a partial image is good for anything but a
>continued trace.  And the image size is required prior to read the image.
>This is how all image formats work, and how all image formats are output in
>POV-Ray.

I've never used the continued trace feature, but I do partial renders quite
often. The uncompressed Targa format works well for me, as it handles large
image sizes and I can read the partial image (my image program displays the
partial render in the upper left corner, with garbage filling the rest). I
also grab partial renders from the screen.

I was always a little surprised POV-Ray didn't simply create an image the
size of the partial render, but that appears to be because I never used the
continued trace feature. Is there a more efficient "partial render"
technique that I'm missing?


Post a reply to this message

From: Paul Bourke
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 1 Apr 2003 17:37:36
Message: <pbourke-978FCF.08353902042003@netplex.aussie.org>
> When using the Partial Output Options +sc +ec +sr +er povray incorrectly
> writes the full image size info to the PNG file it generates.

This is a long standing problem, not limited to the png output
format. I think I first noticed it about 7 years ago.

I agree totally (with a few of the respondents) that the correct
dimenions should be specified otherwise how can one say the image
file is written correctly. In general image software won't read 
these sub image files correctly, eg: PhotoShop.

And lastly, it was suggested that there aren't reasons to do a
partial render except for a "continued trace". Not so. I use it
extensively for distributed rendering of very long running 
renderings jobs across our cluster. I suspect lots of people
use it to preview parts of their images, as it stands many/most
image viewing tools won't handle the resulting "corrupt" images.
-- 
Paul Bourke
pbo### [at] swineduau


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Povray writes wrong PNG image size info to partially rendered images
Date: 2 Apr 2003 02:45:08
Message: <3e8a9504@news.povray.org>
In article <pbo### [at] netplexaussieorg> , Paul Bourke
<pbo### [at] swineduau>  wrote:

> This is a long standing problem, not limited to the png output
> format. I think I first noticed it about 7 years ago.
>
> I agree totally (with a few of the respondents) that the correct
> dimenions should be specified otherwise how can one say the image
> file is written correctly. In general image software won't read
> these sub image files correctly, eg: PhotoShop.

What you are asking for cannot work the way you suggest.  And it isn't and
never was meant to work this way.  The current behavior is exactly as it is
supposed to be and exactly how is is required in order to work as expected.

Partial images are there to continue a trace, not more, not less.  If you
want to get a partial render of an image, specify it as such on the
command-line.  The continue trace feature should simply not be used for
this.

    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

Goto Latest 10 Messages Next 6 Messages >>>

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