opened
yasuhirohoshino
username_0
I tried to load .hdr and .exr images using ofFloatImage. But R and B channel are swapped.
I think the cause is 'ofImage.cpp's' line 136 - 143.
```
#ifdef TARGET_LITTLE_ENDIAN
if(swapForLittleEndian){
	if(channels==3) pixFormat=OF_PIXELS_BGR;
	if(channels==4) pixFormat=OF_PIXELS_BGRA;
}else{
	if(channels==3) pixFormat=OF_PIXELS_RGB;
	if(channels==4) pixFormat=OF_PIXELS_RGBA;
}
```
Using 'ofFloatImage::load()', 'swapForLittleEndian' is always true.
ofFloatImage swaps R and B channel of HDR Image
issue
created
arturoc
username_1
can you post an example image? most image formats will have BGR format instead of RGB in little endian architectures (both intel and arm cpus are little endian) but probably the specific format you are using doesn't so we might need to check that instead of assuming that B and R are swapped by default
comment
created
yasuhirohoshino
username_0
I downloaded HDR images from this website. 
http://www.hdrlabs.com/sibl/archive.html
I tried to load top rows images in the site.(Alexs Apartment, Arches PineTree, Barcelona Rooftops, Backetball Court)
And this pack(studio033.exr and studio034.exr)
http://zbyg.deviantart.com/art/HDRi-Pack-3-112847728
comment
closed
arturoc
username_1
issue
created
arturoc
username_1
there was a bug introduced with some changes in 0.9 should be fixed now
comment