Compiled Matlab MEX function "imread()" cannot open .bmp images.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Leo103
am 22 Jun. 2018
Bearbeitet: Leo103
am 19 Jul. 2018
Hi,
the Matlab function "Image = imread('File');" works perfectly fine, if you provide a .bmp image. But when compiled to MEX, I get the following error message:
JPEG library error (8 bit), "Not a JPEG file: starts with 0x89 0x50".
Error in imread (line 65)
coder.internal.errorIf(errWarnType == ERROR_MESSAGE_CODE, ...
Studying the generated c-code, the MEX version of 'imread()' seems to only link to the jpeg-library. The MEX version doesn't even accept a second argument like "imread('file', 'bmp')". It would cause a compiler error.
Is the MEX version of imread() even able to open .bmp files? Btw. I'm compiling under Mac environment.
0 Kommentare
Akzeptierte Antwort
Julianna Mather
am 19 Jul. 2018
The imread function currently only supports JPEG files in code generation. We weren't sure which formats would be most useful for codegen customers, but we were pretty sure that JPEG was at the top of the list. :-)
We will consider adding support for additional file formats to imread in future releases of MATLAB and MATLAB Coder.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!