Rotating images based on the 'orientation' EXIF tag with JHEAD software.
AutoImageTurnInCSharp: Kind of a 'library' for CSharp on how to rotate images based on the 'orientation' EXIF tag.
AutoImageTurner is the corresponding .exe.
See here for more information on the EXIF tags used in Windows (.Net).
For C# see also here for another possible implementation.
Example images using each of the EXIF orientation flags (1-to-8), in both landscape and portrait orientations See here.
See here for more information.
using System;
using System.Windows.Forms;
namespace AutoImageTurner
{
public class AutoTurnExample
{
public void Test()
{
try
{
IAutoTurnImages rotator = new AutoTurnImages();
rotator.RotateImagesInFolder("C:\\abc", "jpg");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, ex.StackTrace, MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
public void Test()
{
try
{
IAutoTurnImages rotator = new AutoTurnImages();
rotator.RotateImagesInFolderNoMessage("C:\\abc", "jpg");
//Doesn't show an error message from the method itself
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, ex.StackTrace, MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
}
}
Dave Perrett :: hello@daveperrett.com :: @daveperrett
These images are licensed under the MIT License.
Copyright (c) 2010 Dave Perrett. See License for details.
See the Changelog.