POV-Ray : Newsgroups : povray.binaries.images : alpha channel not work : Re: alpha channel not work Server Time
8 Jul 2024 06:50:47 EDT (-0400)
  Re: alpha channel not work  
From: clipka
Date: 7 Aug 2014 01:12:22
Message: <53e30ab6@news.povray.org>
Am 07.08.2014 04:19, schrieb liujg:

>          image_map { gif "DHKX0221.gif"  transmit 0, 1.0}
>                  }
>           finish {
>        specular 0.3
>        roughness 0.01
>                  }
>              }
>   // translate <1,  2, 5>
> }
> Such as can render to have result picture,but I change image_map { gif
> "DHKX0221.gif"  transmit 0, 1.0}to image_map { png "DHKX0221.png"  transmit 0,
> 1.0}. The povray will have a parse error ,keyword "transmit"cann't use with non
> color_map image.Why? Thank you.

In .gif image files, for each pixel only a single value in the range 
0..255 is stored: This is an index into a table of RGB colours (the 
so-called "palette").

The syntax

     image_map { gif "DHKX0221.gif"  transmit 0, 1.0}

tells POV-Ray that each pixel referring to the first entry of the palete 
should be treated as being transparent.


PNG files (normally) don't use a palette, but store RGB colours for each 
pixel, so the above approach does not work.


Post a reply to this message

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