mlreportge​n:ppt_erro​r:invalidI​mageType only when GUI is compiled

Im getting an Errormessage for my Report Generator GUI when i compile it to a standalone Application.
My GUI takes Measurement Files and plots them afterwards it saves the figures as an Image and replaces them in a PPT.
When i compile it i get this Error Message "mlreportgen:ppt_error:invalidImageType" for creating the Picture Object.
if ismcc || isdeployed %für das compilen notwendig
makeDOMCompilable();
makePPTCompilable();
end
import mlreportgen.ppt.*
[...]
cd(app.path);
namepic=(sprintf("Bild%u.bmp",i));
saveas(fig,namepic); % figure als Bild abspeichern.
try
pic=Picture(which(namepic));%Bild als Bildobjekt aufnehmen
catch ME
msgbox({ME.identifier;"Bildobjekt erzeugen Fehler"});
end

 採用された回答

Robin Mozer
Robin Mozer 2020 年 9 月 7 日

0 投票

I was in contact with the MATLAB Support, they told me that the "which" causes the error.
If you have the same Problem just attach the path to the name of the picture and dont use "which".

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

製品

リリース

R2019b

質問済み:

2020 年 8 月 30 日

回答済み:

2020 年 9 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by