google-code-export / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
1 stars 1 forks source link

RGBA raw writer #101

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes, I want to know rgb value from the file. 
My attachment is related to RawWriter which can store RGBA image.

Original issue reported on code.google.com by justin.j...@gmail.com on 15 Feb 2013 at 12:10

Attachments:

GoogleCodeExporter commented 9 years ago
Shouldn't the inner loop look like this

rgba |= 0xff << 24;
rgba |= *(*(rgbData + i) + j + 2) << 16;
rgba |= *(*(rgbData + i) + j + 1) << 8;
rgba |= *(*(rgbData + i) + j);

Otherwise the R and B channels are swapped when I try to analyse the result 
using the Python Image Library

Original comment by dirk.vdb on 16 Feb 2013 at 10:46

GoogleCodeExporter commented 9 years ago
You're right. RGBA should be arranged like your comment. 
but, in case of my code, I'm using "BGRA" type of raw image.
I think it should be clear by an option.

Original comment by justin.j...@gmail.com on 18 Feb 2013 at 2:04