terminate called after throwing an instance of 'Magick::ErrorCorruptImage'
what(): main: improper image header `' @ error/sct.c/ReadSCTImage/189
I don't know why it's trying to read a SCT image. There should be no image header with raw RGB data. Any insight is appreciated. The code snippet is shown below. The error is triggered on the last line. Essentailly, the raw frame data is stored in buffer and i'm making a blob from the already buffered data.
Code: Select all
Magick::Blob blob;
blob.updateNoCopy(buffer, 640*480*3);
Magick::Image image;
image.depth(8);
image.size("640x480");
image.magick("RGB");
image.read(blob);