Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » JPEG Images do not get rotated correctly
Re: JPEG Images do not get rotated correctly [message #50374 is a reply to message #50372] |
Thu, 04 October 2018 18:13   |
Oblivion
Messages: 1213 Registered: August 2007
|
Senior Contributor |
|
|
Hello Tom,
Well, adding this to Raster is not so trivial, as -AFAIK- this EXIF orientation tag is currently jpeg specific and Raster::GetImage is not virtual.
I'd rather add this as a JPGRaster method.
Image JPGRaster::GetNormalizedImage()
{
Value n = GetMetaData("orientation");
Image img(GetImage());
if(!IsNull(n))
switch((int)n){
case 2:
img = MirrorHorz(img);
break;
case 3:
img = Rotate180(img);
break;
case 4:
img = MirrorVert(img);
break;
case 5:
img = RotateAntiClockwise(MirrorHorz(img));
break;
case 6:
img = RotateClockwise(img);
break;
case 7:
img = RotateClockwise(MirrorHorz(img));
break;
case 8:
img = RotateAntiClockwise(img);
break;
default:
// Natural orientation
break;
}
return pick(img);
}
Of course, it is up to Mirek and/or the developer(s) of the plugin to decide. 
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Thu, 04 October 2018 19:00] Report message to a moderator
|
|
|
 |
|
JPEG Images do not get rotated correctly
By: Tom1 on Mon, 01 October 2018 11:01
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Zbych on Wed, 03 October 2018 19:32
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Thu, 04 October 2018 08:58
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Oblivion on Thu, 04 October 2018 11:28
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Thu, 04 October 2018 14:03
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Thu, 04 October 2018 14:33
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Oblivion on Thu, 04 October 2018 18:13
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Thu, 04 October 2018 19:05
|
 |
|
Re: JPEG Images do not get rotated correctly
By: mirek on Wed, 10 October 2018 13:20
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Wed, 10 October 2018 13:28
|
 |
|
Re: JPEG Images do not get rotated correctly
By: mirek on Fri, 12 October 2018 19:09
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Fri, 12 October 2018 20:40
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Fri, 12 October 2018 21:21
|
 |
|
Re: JPEG Images do not get rotated correctly
By: mirek on Sat, 13 October 2018 19:07
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Sat, 13 October 2018 22:33
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Sun, 21 October 2018 16:20
|
 |
|
Re: JPEG Images do not get rotated correctly
By: mirek on Wed, 31 October 2018 11:12
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Wed, 31 October 2018 19:30
|
 |
|
Re: JPEG Images do not get rotated correctly
By: mirek on Thu, 01 November 2018 08:34
|
 |
|
Re: JPEG Images do not get rotated correctly
By: Tom1 on Thu, 01 November 2018 09:57
|
Goto Forum:
Current Time: Wed Jun 25 10:07:41 CEST 2025
Total time taken to generate the page: 0.09261 seconds
|