| http://www.ccl.net/cca/software/X-WINDOW/ImageMagick/ImageMagick/www/api/shear.shtml |
|
CCL shear |
|
NAMEshear - Shear or rotate a raster image by an arbitrary angle
SYNOPSISCropShearImage(image,x_shear,y_shear,width,height,crop)rotated_image=IntegralRotateImage(image,rotations) RotateImage(image,degrees,crop,sharpen) ShearImage(image,x_shear,y_shear,crop) XShearImage(image,degrees,width,height,x_offset,y_offset,range_limit) YShearImage(image,degrees,width,height,x_offset,y_offset,range_limit)
FUNCTION DESCRIPTIONS
CropShearImageFunction CropShearImage crops the sheared image as determined by the bounding box as defined by width and height and shearing angles.The format of the CropShearImage routine is:
CropShearImage(image,x_shear,y_shear,width,height,crop) A description of each parameter follows.
IntegralRotateImageFunction IntegralRotateImage rotates the image an integral of 90 degrees. It allocates the memory necessary for the new Image structure and returns a pointer to the rotated image.The format of the IntegralRotateImage routine is:
rotated_image=IntegralRotateImage(image,rotations) A description of each parameter follows.
XShearImageProcedure XShearImage shears the image in the X direction with a shear angle of 'degrees'. Positive angles shear counter-clockwise (right-hand rule), and negative angles shear clockwise. Angles are measured relative to a vertical Y-axis. X shears will widen an image creating 'empty' triangles on the left and right sides of the source image.The format of the XShearImage routine is:
XShearImage(image,degrees,width,height,x_offset,y_offset,range_limit) A description of each parameter follows.
YShearImageProcedure YShearImage shears the image in the Y direction with a shear angle of 'degrees'. Positive angles shear counter-clockwise (right-hand rule), and negative angles shear clockwise. Angles are measured relative to a horizontal X-axis. Y shears will increase the height of an image creating 'empty' triangles on the top and bottom of the source image.The format of the YShearImage routine is:
YShearImage(image,degrees,width,height,x_offset,y_offset,range_limit) A description of each parameter follows.
RotateImageFunction RotateImage creates a new image that is a rotated copy of an existing one. Positive angles rotate counter-clockwise (right-hand rule), while negative angles rotate clockwise. Rotated images are usually larger than the originals and have 'empty' triangular corners. X axis. Empty triangles left over from shearing the image are filled with the color defined by the pixel at location (0,0). RotateImage allocates the memory necessary for the new Image structure and returns a pointer to the new image.Function RotateImage is based on the paper ``A Fast Algorithm for General Raster Rotatation'' by Alan W. Paeth. RotateImage is adapted from a similiar routine based on the Paeth paper written by Michael Halle of the Spatial Imaging Group, MIT Media Lab. The format of the RotateImage routine is:
RotateImage(image,degrees,crop,sharpen) A description of each parameter follows.
ShearImageFunction ShearImage creates a new image that is a sheared copy of an existing one. Shearing slides one edge of an image along the X or Y axis, creating a parallelogram. An X direction shear slides an edge along the X axis, while a Y direction shear slides an edge along the Y axis. The amount of the shear is controlled by a shear angle. For X direction shears, x_shear is measured relative to the Y axis, and similarly, for Y direction shears y_shear is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the color defined by the pixel at location (0,0). ShearImage allocates the memory necessary for the new Image structure and returns a pointer to the new image.Function ShearImage is based on the paper ``A Fast Algorithm for General Raster Rotatation'' by Alan W. Paeth. The format of the ShearImage routine is:
ShearImage(image,x_shear,y_shear,crop) A description of each parameter follows.
|
[ CCL Home Page ]
[ api ]
[ Raw Version of this page ]
| Modified: Wed May 7 00:32:25 1997 GMT |
| Page accessed 1815 times since Sat Apr 17 22:32:33 1999 GMT |