This documentation is for the old version. Go to the latest Upload Suite docs

Rotating Images

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

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 ConverterConverter (ASP.NET)Converter (PHP)converter (JavaScript) with Thumbnail ModeMode (ASP.NET)Mode (PHP)mode (JavaScript), 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 receiving rotation angle in ASP.NET receiving rotation angle in PHP paragraph.

To disable manual image rotation set the ImageUploaderFlash.EnableRotationEnableRotation (ASP.NET)EnableRotation (PHP)enableRotation (JavaScript) 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.EnableAutoRotationEnableAutoRotation (ASP.NET)EnableAutoRotation (PHP)enableAutoRotation (JavaScript) 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

Manual