On 30/06/10 20:51 , Akhtar Shamim wrote:
> I have a model exported in IVE format. This model is just a quad with a texture mapped
> onto it. I want to retrieve the original image from osg::Image object and convert it to
> JPG/PNG or any other format. Seems simple, but I am not sure what is causing the problem.
>
> The image when loaded using osgviewer looks perfectly fine. But when I debug and look at
> the contents of the osg::Image object I find that both the InternalTextureFormat and the
> PixelFormat are invalid.
>
> _internalTextureFormat 33776 int
> _pixelFormat 33776 unsigned int
They are not invalid, decimal 33776 is hex 0x83f0 is GL_COMPRESSED_RGB_S3TC_DXT1_EXT.
In the process of converting to .ive they have been compressed to speed up texture upload.
As far as I know no image exporter supports writing these compressed images.
You could render the texture to a framebuffer and read that back... :-/
/ulrich
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
They are not invalid, decimal 33776 is hex 0x83f0 is GL_COMPRESSED_RGB_S3TC_DXT1_EXT.
In the process of converting to .ive they have been compressed to speed up texture upload.
As far as I know no image exporter supports writing these compressed images.
Good point, but it will only save it in its compressed form, so one still needs to find a
tool to uncompress the file.
Cheers,
Good point, but it will only save it in its compressed form, so one still needs to find a
tool to uncompress the file.
> If your are on Windows, the excellent (and free) Paint.NET image editor
> can open/save compressed dds files.
I personally like XnView (also free ($) but not free (libre) unfortunately).
Ulrich, it's really not hard these days to find something to open dds
files with. The DirectX SDK includes a viewer of course, GIMP opens and
saves them, osgviewer --image loads them, etc. Unfortunately OSG won't
convert internal image formats between load and save, so you can't just
load a dds and save a jpg/png/tga/bmp for example, but many tools can do
it (GIMP, command line ImageMagick, etc.)
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-seba...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/