% --- 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
本文介绍了一段MATLAB代码,该代码实现了从全局变量中读取图片,并通过用户界面选择文件路径和类型来保存图片的功能。支持的图片格式包括.jpg、.bmp、.gif、.png和.tif。
3869

被折叠的 条评论
为什么被折叠?



