imwrite function in c++ shared library
4 次查看(过去 30 天)
显示 更早的评论
Greetings,
I am compiling a matlab code which has the imwrite function in it. I want it to create an image file and write it to the disk when the c++ code calls my dll. The problem is it does not output the image file. Is it not possible to use imwrite function in a c++ shared library? If it is so, are there any alternatives to this function that will create an image file in a predefined path the user provides?
6 个评论
Walter Roberson
2018-8-17
Note here the difference between MATLAB Compiler SDK and MATLAB Coder.
MATLAB Coder would be for stand-alone code generation; imwrite() is not supported for that purpose.
MATLAB Compiler SDK would be for generating a DLL that called into the MATLAB Engine to do the work, requiring that MCR be present. imwrite is supported for that purpose.
I interpreted your "compile" as meaning code generation, but Kojiro Saito is correct that you could easily have meant Compiler SDK.
采纳的回答
Walter Roberson
2018-8-17
imwrite() is not supported for code generation, for any file type.
(and imread() supports code generation only for reading 8 bit JPEG.)
You can find external libraries to write files, such as libjpeg and libtiff and libpng
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!