From Blob with MPG to PPM Image failure
Posted: 2007-09-03T07:55:09-07:00
Hello,
i have frames from an imx-Movie (MPG with I-Frame only) and want do get the frames as ppm-Image with Magick++.
First i read it in a blob and then i want to generate an Image from it:
Blob blob(buffer, length);
Image image(buffer);
image.write("test.jpg");
But the Image is empty. When i manipulate the delegates, so that i can see status (use mpeg2decoder without -q) of the decoder i see, that the Image-constructor use mpeg2decoder to generate an ppm-Image in /tmp/...
But in the next step the constructor doesn't read this created temp-Image in so it generates an empty one.
When i use instead a
image.read("/tmp/filename.ppm");
before, it functions correctly.
What i made wrong?
i have frames from an imx-Movie (MPG with I-Frame only) and want do get the frames as ppm-Image with Magick++.
First i read it in a blob and then i want to generate an Image from it:
Blob blob(buffer, length);
Image image(buffer);
image.write("test.jpg");
But the Image is empty. When i manipulate the delegates, so that i can see status (use mpeg2decoder without -q) of the decoder i see, that the Image-constructor use mpeg2decoder to generate an ppm-Image in /tmp/...
But in the next step the constructor doesn't read this created temp-Image in so it generates an empty one.
When i use instead a
image.read("/tmp/filename.ppm");
before, it functions correctly.
What i made wrong?