Code covered by the BSD License  

Highlights from
Image File Get/Put Dialog Boxes

Be the first to rate this file! 9 Downloads (last 30 days) File Size: 6.09 KB File ID: #25814
image thumbnail

Image File Get/Put Dialog Boxes

by Kesh Ikuma

 

12 Nov 2009 (Updated 13 Nov 2009)

Open and save image file dialog boxes

| Watch this File

File Information
Description

Contains two functions: UIGETIMFILE and UIPUTIMFILE

As their name suggests, they wraps the standard UIGETFILE and UIPUTFILE functions; the FILTERSPEC parameter in the standard functions is automatically set to browse only MATLAB supported image files according to IMFORMATS function.

Also, the third output parameter is changed to IMFORMAT which is the IMFORMATS entry that corresponds to the selected file (extension). It gives a quick access to ISA/INFO/READ/WRITE functions specific to the selected image format.

Examples:

[filename,pathname,imformat] = uigetimfile('Pick an image file');
[filename,pathname,imformat] = uiputimfile('Save as');

% to use a subset of supported image format
[filename,pathname,imformat] = uigetimfile([1 4 8], 'Pick an image file');
[filename,pathname,imformat] = uiputimfile([1 4 8], 'Save as');
% [1 4 8] are the index to IMFORMATS returning structure.
% In R2009A Windows release, these indexes correspond to BMP, GIF, and JPEG formats.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
13 Nov 2009

Added a screenshot

Tag Activity for this File
Tag Applied By Date/Time
gui Kesh Ikuma 12 Nov 2009 11:36:25
file input Kesh Ikuma 12 Nov 2009 11:36:25
file output Kesh Ikuma 12 Nov 2009 11:36:25
image Kesh Ikuma 12 Nov 2009 11:36:25
dialog Kesh Ikuma 12 Nov 2009 15:18:20
uigetfile Kesh Ikuma 12 Nov 2009 15:18:20
uiputfile Kesh Ikuma 12 Nov 2009 15:18:20

Contact us at files@mathworks.com