Problem with Image.read(), write() methods

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
black_and_white

Problem with Image.read(), write() methods

Post by black_and_white »

Hi,

I've got some problem with Image object.

Code: Select all

Magick::Image image;
try{
  image.read("1.raw"); // here is my problem
}
catch(Magick::Exception &ex){
  std::cout<<"Exception: "<<ex.what()<<std::endl;
}
Everything is ok, until i try to read(or write) Image to file. If I try read from file in constructor - the same.
I'm using windows with Visual Studio 2008.
Can anybody give me any advices what can be wrong?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem with Image.read(), write() methods

Post by magick »

For raw images you need to specify the size and format of the raw image (e.g. 640x480, RGB).
Post Reply