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?
From Blob with MPG to PPM Image failure
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: From Blob with MPG to PPM Image failure
You need to convert the blob to an image, not just use it or read it.
See API manual.
See API manual.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: From Blob with MPG to PPM Image failure
I just tried something like
image.magick("JPG");
but also didn't create a correct image, which i can write to disk.
Can you post a quick solution please?
image.magick("JPG");
but also didn't create a correct image, which i can write to disk.
Can you post a quick solution please?