XCode, ImageLoader Example: All Images are blueish

hi,
I need some help with the ImageLoader Example source.

i tried to get the original colored images without tinting
on the display. so i have disabled all ofSetColor lines.
anyway, all textures still appear to have the blueish tone.

i also tried to include a own gif file, but this one did not show at all.
it reserved its place as a white square but without content.

do i have to look on specific specifications while creating an
image (24&32bit, gif, jpg compression and so on)?

can someone shed some light on a simple image implementation
(only loading the image and positioning on x,y without colorcorrections).

thank you for any hints,
daniel

hi daniel,

happy to help — I’ve moved this to bugs for now, because it sounds like a bug, not a usage problem. the default color to draw with is 0xffffff, so the images shouldn’t be tinted.

can you post a screen shot and computer specs (intel/ppc, etc) ?

are the images blue, as in the every pixel has a blue value of 255, ie black is 0,0,255 instead of 0,0,0 ?

also, for the gif that doesn’t display, can you post it online? I will try to see what the problem is. we are attempting to convert gifs to 24bit color as they are loaded in. I’ve had the best luck with 24bit pngs for transparency and jpegs.

thanks -
zach

ok -

investigating the screen shots, it seems the problem is one of byte order - RGB vs. BGR (some info here)

since it’s an intel cpu, we have to deal with it differently then PPC - We are working on a fix for this, which shouldn’t be hard, because all of the code is in there, just only being activated for windows at the moment.

  • zach

ok — fixes for this are now in the svn, and should be in the next release.

two solutions to two problems:

a) adding a #define for endianess that allows intel macs (__i386__) to call the BGR -> RGB swapping routines.

b) 256 color gifs (and any other image format that uses a palette) are no longer misinterpreted as grayscale images - instead they are converted to 24 bit.

fyi - the SVN code is available here:
http://openframeworks.cc/downloads/openFrameworks.zip
update hourly - those changes should be in later today…

  • zach

great!

thank you zach for your effort.

i try out the svn (dunno how, but will find out) this evening.

daniel

thanks a lot, everything works now.

hmm, seems i am finally liking c++, i learned asm, pascal, turbopascal,
delphi years ago, but never really touched c++. anyway my level of coding
stopped in every language when structures became too complex.

thanks again,
daniel