diula Posted July 31, 2009 Share Posted July 31, 2009 Hello, I have a problem while trying to use PXL_Raster class (I'm using this as I need to read from a floating point image, and as far as I can tell IMG_Raster is 8/16 bits only). I'm trying to read a file, but it always fails - tried different formats (pic/tiff/etc). The way I'm using it is as follows: std::string iname = "myfile.tiff"; UT_IFStream istream( iname.c_str() ); PXL_Raster img; if( !img.load( istream ) ) { cerr << "Could not read image!" << endl; return 1; } Any tips: I am doing sth wrong, or is that the intended usage of the class? Quote Link to comment Share on other sites More sharing options...
edward Posted July 31, 2009 Share Posted July 31, 2009 Use IMG_File. First call open() to specify your image and then readImages() to parse specific image format data into a PXL_Raster. Don't forget to delete your PXL_Raster objects when done. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.