POV-Ray : Newsgroups : povray.beta-test : tiff problems in reading (including crash, including [doc]) : Re: tiff problems in reading (including crash, including [doc]) Server Time
2 Nov 2024 07:25:39 EDT (-0400)
  Re: tiff problems in reading (including crash, including [doc])  
From: Mike Williams
Date: 4 Jan 2002 15:37:40
Message: <4K85NGAPFhN8EwWn@econym.demon.co.uk>


>First bug: "..\\" should IMO cause message with IO restrictions becouse it was
>first run after start and pointed to not. But no massage. Render finished
>succesfull and I changed content of pigment to
>
>image_map{ png "..\\test.png" map_type 1 interpolate 2 }
>
>and message about IO restrictions appeared.

Confirmed. IO restrictions seem to be applied to PNG, GIF and JPEG image
maps, but not to TIFF image maps.


>Second bug and others.
>
>Let's back to first render. I used IrfanView 3.61 (http://www.irfanview.com/) to
>convert images to tiff format. 
>
>1. No conversion.
>
>Shape of image seems ok but colors are distorted. Parts seems transparent. At
>first I though it is bit/color component order problem but distortions are
>different after every next render of the same compressed file.

Confirmed. Perhaps POV is reading off the end of the 4-bit palette into
the part of memory where it expects the 8-bit palette to reach. (All the
Irfanview TIFFs except number 4 have 4-bit palettes).

>2. LZW compression
>
>Shape is distorted and change after next renders.

Distortion confirmed. It looks the same every time on my machine.

>3. PackBits compression
>
>The same as No conversion

Confirmed.

>4. JPEG compression
>
>Parser crashed ! So no image output to comment.

This TIF file seems to be really weird. It seems to state that it uses
73646 bits per pixel. 

>5. ZIP compression
>
>The same as No conversion

Confirmed.


Irfanview seems to create TIFF images with just enough bits-per-pixel
for the particular image it is processing at the time. I tested it with
an image that happens to use 130515 different colours, and it created
TIFFs with 24 bits per pixel; and with an image that happens to use 254
different colours and it created TIFFs with 8 bits per pixel.

POV handles such images correctly with all compression types none,
packbits and Zip, except that the 24-bit images are upside down.


POV fails to handle TIF images of any colour-depth created by Paint Shop
Pro. Perhaps PsP always uses LZW compression.

I happen to have 10 applications on my machine that have the ability to
read TIFF files. None of them could read types 1, 4 and 5, except
Irfanview itself.


>It is possible that above problems are connected with output of Irfan View but
>POV shouldn't crash) so I checked output of MS Photo Editor 3.0. Output of MS
>PhotoEditor is as good as output of iriginal png. So at last I found below
>problems:
>
>1. There shouldn't be crash.
>2. There could be some warnings or errors when tiff file is wrong
>3. Why appearance of the same tiff-file change from render to render ?
>4. There should be update of documentation about tiff limitations.
>5. There could be some softweare listed in documentation to validate tiff
>according to pov limits.
>6. Isn't IO restrictions checked for tiff reading ?
>
>All discussed image maps after moment in povray.beta-test.binaries.
>And sorry I have no time to test all this behaviours with second compile
>version, other mapping types, other interpolation types and other locations.
>There could be to many variants and IMO it's moment for source investigation.

I've checked map_type and interpolate. They don't affect any of the
anomalous behaviour.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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