## Aurigma Image Uploader Flash 7.2.9

# Rotating Images

- Collapse All Sections
- See Also
- Language Filter ( all languages )

There are two approaches to rotating images in Image Uploader Flash:

- manual rotation based on the user-given rotation angle
- automatic rotation based on the EXIF metadata

## Manual Rotation

By default manual rotation is enabled in Image Uploader Flash. It means that a user can rotate images by clicking the rotation control. To upload rotated images you just need to specify a Converter with Thumbnail Mode, as it is shown in the example below.

### ASP.NET

    <aur:ImageUploaderFlash ID="Uploader1" runat="server">
        <Converters>
            <aur:Converter Mode="*.*=Thumbnail" ThumbnailFitMode="ActualSize" />
        </Converters>
    </aur:ImageUploaderFlash>

### PHP

    $uploader = new ImageUplaoderFlash("Uploader1");
    $converters = &$uploader->getConverters();
    $converter = new Converter();
    $converter->setMode("*.*=Thumbnail");
    $converter->setThumbnailFitMode("ActualSize");
    $converters[] = $converter;

### JavaScript

    var u = $au.imageUploaderFlash({
        id: 'Uploader1',
        converters: [{mode: '*.*=Thumbnail',
            thumbnailFitMode: 'ActualSize'}]
    });

You may also get rotation angle value on the server and handle it in a way that suites your requirements, for more information, please, see the receiving rotation angle paragraph.

To disable manual image rotation set the ImageUploaderFlash.EnableRotation property to false.

## Automatic Rotation

Automatic rotation means that Image Uploader Flash rotates images automatically, if needed. The decision, whether to rotate an image or not, is based on the EXIF metadata contained in the original image. To turn automatic rotation on you have to set the ImageUploaderFlash.EnableAutoRotation property to true and add a Thumbnail converter, as it is shown in the following example.

### ASP.NET

    <aur:ImageUploaderFlash ID="Uploader1" runat="server" EnableAutoRotation="true">
        <Converters>
            <aur:Converter Mode="*.*=Thumbnail" ThumbnailFitMode="ActualSize" />
        </Converters>
    </aur:ImageUploaderFlash>

### PHP

    $uploader = new ImageUplaoderFlash("Uploader1");
    $uploader->setEnableAutoRotation(true);
    $converters = &$uploader->getConverters();
    $converter = new Converter();
    $converter->setMode("*.*=Thumbnail");
    $converter->setThumbnailFitMode("ActualSize");
    $converters[] = $converter;

### JavaScript

    var u = $au.imageUploaderFlash({
        id: 'Uploader1',
        enableAutoRotation: true,
        converters: [{mode: '*.*=Thumbnail',
            thumbnailFitMode: 'ActualSize'}]
    });

Note

Though it may be convenient, remember that not all the cameras recognize orientation properly. Reading EXIF data also slows down the process of folder scanning, and if the folder contains a lot of images, the decrease in speed may be noticeable.

## See Also

### Reference

- ImageUploaderFlash Class
- EnableRotation Property
- Converter Class
- BeforeUpload Event

### Manual

- Working with EXIF and IPTC Metadata
- Uploading Additional Data in ASP.NET
- Uploading Additional Data in PHP

- receiving rotation angle in ASP.NET
- receiving rotation angle in PHP

- Converter (ASP.NET)
- Converter (PHP)
- converter (JavaScript)

- Mode (ASP.NET)
- Mode (PHP)
- mode (JavaScript)

- EnableRotation (ASP.NET)
- EnableRotation (PHP)
- enableRotation (JavaScript)

- EnableAutoRotation (ASP.NET)
- EnableAutoRotation (PHP)
- enableAutoRotation (JavaScript)

- ImageUploaderFlash (ASP.NET)
- ImageUploaderFlash (PHP)
- imageUploaderFlash (JavaScript)

- EnableRotation (ASP.NET)
- EnableRotation (PHP)
- enableRotation (JavaScript)

- Converter (ASP.NET)
- Converter (PHP)
- converter (JavaScript)