POV-Ray : Newsgroups : povray.bugreports : TGA Alpha channel Server Time
24 Jul 2021 11:26:07 EDT (-0400)
  TGA Alpha channel (Message 1 to 5 of 5)  
From: Ton
Subject: TGA Alpha channel
Date: 5 Feb 2021 19:45:00
Message: <web.601de5a761b9256174b337b70@news.povray.org>
I'm playing with Gilles Tran MakeCloud macro, and the output from tga2df3 didn't
look like a cloud.
After some investigation I found that the TGA output file is confused.
When I use -UA, povray says: makecloud2001.tga, 24 bpp Targa, but the output
file contains an alpha channel (every fourth byte is 0xFF).
When I use +UA, povray says: makecloud2001.tga, 32 bpp with alpha Targa, but
this time I don't have the alpha channel, and tga2df3 generates a cloud.

My povray version is POV-Ray 3.8.0-x.10064738.unofficial, and UberPOV 1.37.1.0
has the same problem.

I couldn't find any mention of this in the newsgroups, but if people are aware
then I apologize for rubbing it in again.

Cheers
Ton.


Post a reply to this message

From: William F Pokorny
Subject: Re: TGA Alpha channel
Date: 6 Feb 2021 15:06:51
Message: <601ef6db$1@news.povray.org>
On 2/5/21 7:41 PM, Ton wrote:
> I'm playing with Gilles Tran MakeCloud macro, and the output from tga2df3 didn't
> look like a cloud.
> After some investigation I found that the TGA output file is confused.
> When I use -UA, povray says: makecloud2001.tga, 24 bpp Targa, but the output
> file contains an alpha channel (every fourth byte is 0xFF).
> When I use +UA, povray says: makecloud2001.tga, 32 bpp with alpha Targa, but
> this time I don't have the alpha channel, and tga2df3 generates a cloud.
> 
> My povray version is POV-Ray 3.8.0-x.10064738.unofficial, and UberPOV 1.37.1.0
> has the same problem.
> 

I believe I see it in my povr branch based off v3.8.

To a quick verification .png output is OK, but .tga files look backward 
to the +UA/-UA control... The reported information looks too at the 
control setting and not at what actually got written.

I'm tired. I'll try and run the issue down tomorrow.

Bill P.


Post a reply to this message

From: William F Pokorny
Subject: Re: TGA Alpha channel
Date: 7 Feb 2021 06:08:33
Message: <601fca31$1@news.povray.org>
On 2/6/21 3:06 PM, William F Pokorny wrote:
> On 2/5/21 7:41 PM, Ton wrote:
...
>> When I use +UA, povray says: makecloud2001.tga, 32 bpp with alpha 
>> Targa, but
>> this time I don't have the alpha channel, and tga2df3 generates a cloud.
>>
...
> 
> I believe I see it in my povr branch based off v3.8.
> 
...
> I'm tired. I'll try and run the issue down tomorrow.
> 

As bugs go, a relatively easy one. :-)

In the file: source/base/image/targa.cpp and the function Write:

bool opaque = options.AlphaIsEnabled();

should be:

bool opaque = !options.AlphaIsEnabled();

Bill P.


Post a reply to this message

From: Ton
Subject: Re: TGA Alpha channel
Date: 7 Feb 2021 18:55:01
Message: <web.60207d5ca388816f74b337b70@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
>
> As bugs go, a relatively easy one. :-)
>
> In the file: source/base/image/targa.cpp and the function Write:
>
> bool opaque = options.AlphaIsEnabled();
>
> should be:
>
> bool opaque = !options.AlphaIsEnabled();
>
> Bill P.

That sure was a simple solution, thanks Bill.

Cheers
Ton.


Post a reply to this message

From: clipka
Subject: Re: TGA Alpha channel
Date: 29 May 2021 17:35:19
Message: <60b2b397@news.povray.org>
Am 07.02.2021 um 12:08 schrieb William F Pokorny:

> As bugs go, a relatively easy one. :-)

It sure must have been hard work to create it in the first place... I 
have no idea how _that_ happened.

> In the file: source/base/image/targa.cpp and the function Write:
> 
> bool opaque = options.AlphaIsEnabled();
> 
> should be:
> 
> bool opaque = !options.AlphaIsEnabled();

Thanks. Confirming both diagnosis and remedy.


Post a reply to this message

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