RotateImage

Rotates an image in a file in place updating the original file.

RotateImage(lcImage,lnRotateType)

Return Value

.T. or .F.

Parameters

lcImage
The image file to rotate. This file must be referenced with a full path.

lnRotateType
A numeric value that specifies how the image is to be rotated:

1 - Rotate 90 degrees
2 - Rotate 180 degrees
3 - Rotate 270 degrees
4 - Flip Image (mirror image)
5 - Flip Image and Rotate 90 degrees
6 - Flip Image and Rotate 180 degrees
7 - Flip Image and Rotate 270 degrees


Remarks

The original image file is overwritten with the new rotated image. If you want to create a new image file, save the file to a new name first then rotate that image.

Image rotation in compressed JPEG formats may result in image degradation if the image dimensions are not in exact multiples of 16 (which is a limitation of the underlying GDI+ functions used here).

Uses wwImaging.dll shipped in the Web Connection directory.

This function requires wwImaging.dll and uses GDI+ which is available with XP/.NET Server by default and as separate installs on all other platforms. The latest versions of Internet Explorer (6.0), the Windows Media player and the .NET Platform also install GDI+.

Note this is a function not a method of the wwAPI class. This function is simply stored in the wwAPI.prg file.

This function supports the following image formats:

  • gif
  • jpg
  • png
  • tiff
  • bmp

GDI+ is downloadable from:
http://www.microsoft.com/downloads/release.asp?releaseid=32738


See also:

Class wwAPI

© West Wind Technologies, 1996-2019 • Updated: 08/05/07
Comment or report problem with topic