Can't read MPC files properly? [magick++]

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
mankyd

Can't read MPC files properly? [magick++]

Post by mankyd »

I have a rather large library of square images. I want to both display these images to my users over the web as well as do work on them. Thus, I have stored every image in 2 ways: img.png and img.mpc. (4 ways if you count the fact that I have two sizes of each image.)

In my code, I have the following command. It's only purpose is to open the source image for work:

Code: Select all

imgs.push_back(Image(get_file_name(size, "png")));
imgs is a stl vector<Image>. size is an integer indicating the desired image size (one of two values) and the char* is the file extension.

For some reason, when I change the file extension to "mpc", the image fails to open properly and my output (a composite of my source images) ends up all black. If I keep it as "png" it works just fine.

There is no difference in the naming schemes between the mpc and png files save for the extension. Running a 'convert' command from the command line seems to show that the mpc files are encoded just fine - the output will look like a normal png:

Code: Select all

convert img.mpc test.png
Anyone have any ideas?
Post Reply