Manta Interactive Ray Tracer Development Mailing List

Text archives Help


Re: [Manta] ARGB8Pixel vs. RGBA8Pixel


Chronological Thread 
  • From: Roni Choudhury <roni@cs.utah.edu>
  • To: "'manta@sci.utah.edu'" <manta@sci.utah.edu>
  • Subject: Re: [Manta] ARGB8Pixel vs. RGBA8Pixel
  • Date: Mon, 29 Oct 2007 16:04:24 -0600

ok, -imagetype will get me rgba...but my other question still stands.

I'll try to read help files before asking questions in the future ;)

roni

Roni Choudhury wrote:
How do I ask Manta to use one or the other? Or would it be better to write a case in NRRDFile.cc that swizzles the data and saves it?

roni

James Bigler wrote:
The difference is how the data is stored in the buffer. Think of it kind of like endianness.

RGBA:

data[0] = r;
data[1] = g;
data[2] = b;
data[3] = a;

ARGB:

data[0] = a;
data[1] = r;
data[2] = g;
data[3] = b;

Some machines have optimized paths for different byte packing, hence why there are different ones.

If you want to write nrrds, you need to specify the image type as RGBA8, RGB8, RGBAfloat, or RGBfloat. The problem, is that I don't handle the byte swizzling in the exporter.

James

On Oct 29, 2007, at 3:48 PM, Roni Choudhury wrote:

What is the difference between an ARGB8Pixel and an RGBA8Pixel?

I have an SimpleImage of the former type, which does not get handled by the if-then-else block in NRRDFile.cc. Should the case for RGBA8Pixel handle ARGB8Pixel as well?

roni





Archive powered by MHonArc 2.6.16.

Top of page