Matlab GUI儲存圖片

Dsp Tian發表於2014-04-02
% --- 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

 

相關文章