pymagery — python imagery
1.8.0 documentation / canvasresize plugin
The canvasresize plugin adjusts the size of the canvas. The original image can be translated vertically or horizontally. When translating the original image you can move it anywhere, even if the all image data is lost.
This plugin is similar to the crop plugin with no bounding box checks.
This plugin is not like the resize plugin. This plugin does not change pixel values nor does it interpolate.
The plugin prototype is:
The following example adds a 10-pixel white border. It adds 20 pixels to the width and 20 pixels to the height then translates the original image down 10 pixels and right 10 pixels. This creates a 10 pixel border all the way around. This is, in fact, how the border plugin works.
The following example of a 100x100 pixel image yields a complete loss of image data because it is translated off the canvas by 900 pixels. It results in an all-white image because of the fill value.
Change Log
- 1.1.0 — added