Re: [osg-users] [osgPlugins] bmp load vertically flipped

2009-09-04 Thread Ulrich Hertlein
On 3/09/09 9:32 PM, stefan nortd wrote: Granted that different image types store pixels differently I would still assume that the image loader should nevertheless be consistent across different image format. I guess this is an assumption that depends how low-level one approaches pixel data.

[osg-users] [osgPlugins] bmp load vertically flipped

2009-09-03 Thread stefan nortd
Hi, I have been doing some image stuff lately. JPEGs and PNGs load right but BMPs are upside down. Is this a feature or a bug? At the moment I am doing this for remedy: Code: osg::Image* image = osgDB::readImageFile(filename); if(filename.substr(filename.length()-3) == bmp) {

Re: [osg-users] [osgPlugins] bmp load vertically flipped

2009-09-03 Thread stefan nortd
hey ulrich, I am not sure I understand. I am loading a bmp and use it as a texture on a quad. I use the same texture coordinates for various image types but only the bmp displays upside down. stefan stefan hechenberger http://linear.nortd.com -- Read

Re: [osg-users] [osgPlugins] bmp load vertically flipped

2009-09-03 Thread Ulrich Hertlein
Hi Stefan, On 3/09/09 5:14 PM, stefan nortd wrote: I am not sure I understand. I am loading a bmp and use it as a texture on a quad. I use the same texture coordinates for various image types but only the bmp displays upside down. Then I would say your BMP is upside down ;-) I have a stack

Re: [osg-users] [osgPlugins] bmp load vertically flipped

2009-09-03 Thread Kawicki, Ryan H
Bitmaps are stored upside down internally. If the loader is not flipping your image, then flip the image yourself. From http://en.wikipedia.org/wiki/BMP_file_format; Bitmap data This block of bytes describes the image, pixel by pixel. Pixels are stored upside-down with respect to normal image

Re: [osg-users] [osgPlugins] bmp load vertically flipped

2009-09-03 Thread Ulrich Hertlein
On 3/09/09 5:47 PM, Kawicki, Ryan H wrote: Bitmaps are stored upside down internally. If the loader is not flipping your image, then flip the image yourself. From http://en.wikipedia.org/wiki/BMP_file_format; Bitmap data This block of bytes describes the image, pixel by pixel. Pixels are

Re: [osg-users] [osgPlugins] bmp load vertically flipped

2009-09-03 Thread stefan nortd
Granted that different image types store pixels differently I would still assume that the image loader should nevertheless be consistent across different image format. I guess this is an assumption that depends how low-level one approaches pixel data. So I record it is not a bug in the image

Re: [osg-users] [osgPlugins] bmp load vertically flipped

2009-09-03 Thread Chris 'Xenon' Hanson
stefan nortd wrote: Granted that different image types store pixels differently I would still assume that the image loader should nevertheless be consistent across different image format. I guess this is an assumption that depends how low-level one approaches pixel data. Agreed. So I