Jump to content

PXL_Raster - problem loading from file


Recommended Posts

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...