Matlab GUI保存图片

% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global src_img;
[filename,pathname] = uiputfile({'*.jpg';'*.bmp';'*.gif';'*.png';'*.tif'}, 'Write Pic');
str=[pathname filename];
if str~=0
    imwrite(src_img,str);  
end

 

posted @ 2014-04-02 20:59  Dsp Tian  阅读(5419)  评论(0编辑  收藏  举报