Automate image size adjustments

Share:

Description

This function is a wrapper for getImageDefs and setImageDefs to allow the user to change image sizes in one function call.

Usage

1
adjustImageSize(x, y, scale = 1, res = 96)

Arguments

x

the display width of an image (in inches)

y

the display height of an image (in inches)

scale

a scaling factor for the image file size

res

resolution for bitmap images

Details

This function will get the current image specifications, change them and reset them using setImageDefs. If the device is either bmp, jpeg or png, the image will be converted to pixel size using the res argument.

Optionally, to make bitmap images look a little better, the scale argument can be used to scale-up the image file. This also has the effect of reducing the size of text and points in the displayed image.

Value

No data are returned.

Author(s)

Sarah Goslee, Max Kuhn

Examples

1
2
3