Image Processing Toolbox | ![]() ![]() |
Adjust display size of an image
Syntax
Description
truesize(fig,[mrows ncols])
adjusts the display size of an image. fig
is a figure containing a single image or a single image with a colorbar. [mrows ncols]
is a 1-by-2 vector that specifies the requested screen area in pixels that the image should occupy.
truesize(fig)
uses the image height and width for [mrows ncols]
. This results in the display having one screen pixel for each image pixel.
If you omit the figure argument, truesize
works on the current figure.
Remarks
If the'TruesizeWarning'
toolbox preference is 'on'
, truesize
displays a warning if the image is too large to fit on the screen. (The entire image is still displayed, but at less than true size.) If 'TruesizeWarning'
is 'off'
, truesize
does not display the warning. Note that this preference applies even when you call truesize
indirectly, such as through imshow
.
See Also
imshow
, iptsetpref
, iptgetpref
![]() | translate | uint8 | ![]() |