Ready to test
This commit is contained in:
@ -119,44 +119,35 @@ public class C_Resize
|
||||
int outputResolutionOrientation = resize[2];
|
||||
using Bitmap temp = new(subFile, useIcm: false);
|
||||
PropertyItem[] propertyItems = temp.PropertyItems;
|
||||
bitmap = new(temp, outputResolutionWidth, outputResolutionHeight);
|
||||
switch (outputResolutionOrientation) // exif 274
|
||||
{
|
||||
case 0:
|
||||
bitmap = new(temp, outputResolutionWidth, outputResolutionHeight);
|
||||
break;
|
||||
case 1:
|
||||
bitmap = new(temp, outputResolutionWidth, outputResolutionHeight);
|
||||
break; // 1 = Horizontal (normal)
|
||||
case 2:
|
||||
bitmap = new(temp, outputResolutionWidth, outputResolutionHeight);
|
||||
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipX);
|
||||
break; // 2 = Mirror horizontal
|
||||
case 3:
|
||||
bitmap = new(temp, outputResolutionWidth, outputResolutionHeight);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate180FlipNone);
|
||||
break; // 3 = Rotate 180
|
||||
case 4:
|
||||
bitmap = new(temp, outputResolutionWidth, outputResolutionHeight);
|
||||
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
break; // 4 = Mirror vertical
|
||||
case 5:
|
||||
bitmap = new(temp, outputResolutionHeight, outputResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate270FlipX);
|
||||
break; // 5 = Mirror horizontal and rotate 270 CW
|
||||
case 6:
|
||||
bitmap = new(temp, outputResolutionHeight, outputResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
break; // 6 = Rotate 90 CW
|
||||
case 7:
|
||||
bitmap = new(temp, outputResolutionHeight, outputResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate90FlipX);
|
||||
break; // 7 = Mirror horizontal and rotate 90 CW
|
||||
case 8:
|
||||
bitmap = new(temp, outputResolutionHeight, outputResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate270FlipNone);
|
||||
break; // 8 = Rotate 270 CW
|
||||
default:
|
||||
bitmap = new(temp, outputResolutionWidth, outputResolutionHeight);
|
||||
break;
|
||||
}
|
||||
if (fileInfo is null)
|
||||
@ -182,44 +173,35 @@ public class C_Resize
|
||||
int outputResolutionOrientation = resize[2];
|
||||
using Bitmap temp = new(subFile, useIcm: false);
|
||||
PropertyItem[] propertyItems = temp.PropertyItems;
|
||||
bitmap = new(temp, tempResolutionWidth, tempResolutionHeight);
|
||||
switch (outputResolutionOrientation) // exif 274
|
||||
{
|
||||
case 0:
|
||||
bitmap = new(temp, tempResolutionWidth, tempResolutionHeight);
|
||||
break;
|
||||
case 1:
|
||||
bitmap = new(temp, tempResolutionWidth, tempResolutionHeight);
|
||||
break; // 1 = Horizontal (normal)
|
||||
case 2:
|
||||
bitmap = new(temp, tempResolutionWidth, tempResolutionHeight);
|
||||
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipX);
|
||||
break; // 2 = Mirror horizontal
|
||||
case 3:
|
||||
bitmap = new(temp, tempResolutionWidth, tempResolutionHeight);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate180FlipNone);
|
||||
break; // 3 = Rotate 180
|
||||
case 4:
|
||||
bitmap = new(temp, tempResolutionWidth, tempResolutionHeight);
|
||||
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
break; // 4 = Mirror vertical
|
||||
case 5:
|
||||
bitmap = new(temp, tempResolutionHeight, tempResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate270FlipX);
|
||||
break; // 5 = Mirror horizontal and rotate 270 CW
|
||||
case 6:
|
||||
bitmap = new(temp, tempResolutionHeight, tempResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
break; // 6 = Rotate 90 CW
|
||||
case 7:
|
||||
bitmap = new(temp, tempResolutionHeight, tempResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate90FlipX);
|
||||
break; // 7 = Mirror horizontal and rotate 90 CW
|
||||
case 8:
|
||||
bitmap = new(temp, tempResolutionHeight, tempResolutionWidth);
|
||||
bitmap.RotateFlip(RotateFlipType.Rotate270FlipNone);
|
||||
break; // 8 = Rotate 270 CW
|
||||
default:
|
||||
bitmap = new(temp, tempResolutionWidth, tempResolutionHeight);
|
||||
break;
|
||||
}
|
||||
Bitmap preRotated;
|
||||
|
Reference in New Issue
Block a user