Printing a figure using meta to be paste into PowerPoint

3 ビュー (過去 30 日間)
Kevin O'Hara
Kevin O'Hara 2011 年 3 月 11 日
回答済み: Jacob Mathew 2024 年 9 月 26 日
I have been using this MatLab code to print a image to storage and then paste it into PowerPoint.
temp = strcat([pathB,'Users\temp.jpg']);
print(hfig,'-dmeta','-r300',temp);
Image1 = Slide1.Shapes.AddPicture(temp,'msoFalse','msoTrue',15,18,680,500);
close(hfig);
Last night it was working great, this am it stopped. It gives me this warning. It seems to be having a problem with the print statement.
Warning: Failed in SetDIBits (gle00000008) > In C:\Program Files\MATLAB\R2010b\toolbox\matlab\graphics\hardcopy.p>hardcopy at 21 In graphics\private\render at 142 In print at 316 In FLAT_v1p5>Print_Graph_Callback at 1614 In gui_mainfcn at 96 In FLAT_v1p5 at 40 In @(hObject,eventdata)FLAT_v1p5('Print_Graph_Callback',hObject,eventdata,guidata(hObject))
Can someone tell what's happening??? This is the 1st time this error has occurred. Like I said last night it worked great!.

回答 (1 件)

Jacob Mathew
Jacob Mathew 2024 年 9 月 26 日
Hey Kevin,
The error code “gle00000008” while printing to metafiles or bitmaps has been documented in an external bug report:
The root cause is not enough memory leading to this error. Some workarounds include closing the number of open windows or applications or reducing the resolution of the image. However, you can completely resolve this by upgrading to MATLAB version R2014b or above.

カテゴリ

Help Center および File ExchangeMATLAB Report Generator についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by