Image Processing Toolbox Preferences

You can use Image Processing Toolbox™ preferences to control certain characteristics of how imshow and the Image Viewer app display images on your screen. For example, using toolbox preferences, you can specify the initial magnification used.

Retrieve Values of Toolbox Preferences

To determine the current value of Image Processing Toolbox preferences, you can look in the Preferences dialog box or use the iptgetpref function.

To open the Preference dialog box, click Preferences in the Home tab in the MATLAB® desktop. In the Preferences dialog box, select Image Processing Toolbox. You can also access Image Processing Toolbox preferences from the Image Viewer File menu, or by typing iptprefs at the command line.

To retrieve the values of Image Processing Toolbox preferences programmatically, type iptgetpref at the command prompt. The following example uses iptgetpref to retrieve the value to determine the value of the ImtoolInitialMagnification preference.

iptgetpref('ImtoolInitialMagnification')

ans =

   100

Preference names are case insensitive and can be abbreviated. For a complete list of toolbox preferences, see the iptprefs reference page.

Set Values of Toolbox Preferences

To set the value of Image Processing Toolbox preferences, you can use the Preferences dialog box or use the iptsetpref function.

To open the Preference dialog box, click Preferences in the Home tab in the MATLAB desktop. In the Preferences dialog box, select Image Processing Toolbox. You can also access Image Processing Toolbox preferences from the Image Viewer File menu, or by typing iptprefs at the command line.

To specify the value of a toolbox preference, use the iptsetpref function. This example calls iptsetpref to specify that imshow resize the figure window so that it fits tightly around displayed images.

iptsetpref('ImshowBorder', 'tight');

For a table of the available preferences, see the iptprefs reference page.

Was this topic helpful?