odfWeave (version 0.8.4)

adjustImageSize: Automate image size adjustments

Description

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

Usage

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

Value

No data are returned.

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.

Examples

Run this code
getImageDefs()
adjustImageSize(2, 5, scale = 1.75)
getImageDefs()

Run the code above in your browser using DataLab