S
Steve K.
I would like to rotate pages in a multi-page tiff. Here is my first
attempt:
<code>
public void RotatePageAndSave(int degrees)
{
RotateFlipType rotateType = RotateFlipType.Rotate180FlipNone;
switch(degrees)
{
case 180: rotateType = RotateFlipType.Rotate180FlipNone; break;
case 90: rotateType = RotateFlipType.Rotate90FlipNone; break;
default: throw new Exception("Unsupported rotation value: " +
degrees);
}
// try drawing on the current frame and saving to a temp folder
_attachment.RotateFlip(rotateType);
int y = _attachment.GetFrameCount(FrameDimension.Page);
Console.WriteLine("The saved file should have {0} pages and the " +
"rotating should be on page {1}", _numPages, _currentPageIndex);
_attachment.Save(@"C:\StompTest.tif");
}
attempt:
<code>
public void RotatePageAndSave(int degrees)
{
RotateFlipType rotateType = RotateFlipType.Rotate180FlipNone;
switch(degrees)
{
case 180: rotateType = RotateFlipType.Rotate180FlipNone; break;
case 90: rotateType = RotateFlipType.Rotate90FlipNone; break;
default: throw new Exception("Unsupported rotation value: " +
degrees);
}
// try drawing on the current frame and saving to a temp folder
_attachment.RotateFlip(rotateType);
int y = _attachment.GetFrameCount(FrameDimension.Page);
Console.WriteLine("The saved file should have {0} pages and the " +
"rotating should be on page {1}", _numPages, _currentPageIndex);
_attachment.Save(@"C:\StompTest.tif");
}