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 #50372 is a reply to message #50371] |
Thu, 04 October 2018 14:33   |
Tom1
Messages: 1303 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi Oblivion,
Based on your findings, here's what needs to be done:
...
Image rimg(r->GetImage());
JPGRaster *jpg = dynamic_cast<JPGRaster*>(~r);
if(jpg) {
switch((int)jpg->GetMetaData("orientation")){
// 1 = natural orientation
case 2:
rimg=MirrorHorz(rimg);
break;
case 3:
rimg=Rotate180(rimg);
break;
case 4:
rimg=MirrorVert(rimg);
break;
case 5:
rimg=RotateAntiClockwise(MirrorHorz(rimg));
break;
case 6:
rimg=RotateClockwise(rimg);
break;
case 7:
rimg=RotateClockwise(MirrorHorz(rimg));
break;
case 8:
rimg=RotateAntiClockwise(rimg);
break;
}
}
img.SetImage(rimg);
...
But how to embed it in plugin/jpg in the correct place so that it just works quietly in the background?
Best regards,
Tom
|
|
|
 |
|
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 05:10:32 CEST 2025
Total time taken to generate the page: 0.03943 seconds
|