[Qt-interest] QImage class....cannot load .sgi files
Kevin Tierney
kbt at vectorcast.com
Mon May 18 18:48:57 CEST 2009
Aaveg Mittal wrote:
> Hello everyone,
>
> I have been trying to open an .sgi image file in QImage ( Qt4 ) class as,
>
> QImage image("filename.sgi") ;
> if ( image.isNull() )
> {
> PRINT "Cannot load image"
> }
> else
> {
> PRINT "Image Loaded"
> // Rest of the work
> }
>
> It works well if I open an .jpg file or any other format but does not
> work with sgi files...any solutions????
>
> Regards,
>
> Aaveg
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
The documentation for QImage lists the supported file types, and SGI
isn't one of them. You're going to need to convert your SGI file to a
supported data type of QImage, or you need to find an library that can
read SGI files (how you will map that into Qt is the hard part, and it
will likely depend on the library's representation of the SGI file)
More information about the Qt-interest-old
mailing list