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 #50390 is a reply to message #50389] |
Fri, 12 October 2018 21:21 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
Found it.
In Raster.h it should read:
enum FlipMode {
FLIP_NONE = 1,
FLIP_MIRROR_HORZ = 2,
FLIP_ROTATE_180 = 3,
FLIP_MIRROR_VERT = 4,
FLIP_TRANSPOSE = 5,
FLIP_ROTATE_CLOCKWISE = 6,
FLIP_TRANSVERSE = 7,
FLIP_ROTATE_ANTICLOCKWISE = 8,
}
And in jpgupp.cpp:
Raster::Info JPGRaster::GetInfo()
{
ASSERT(data);
Raster::Info info;
info.kind = IMAGE_OPAQUE;
if(data->cinfo.output_components == 1) {
info.bpp = 8;
info.colors = 256;
}
else {
info.bpp = 24;
info.colors = 0;
}
info.dots = data->dot_size;
info.hotspot = Null;
Value v = GetMetaData("orientation");
if(IsNumber(v))
info.orientation = clamp((int)v, 1, 8);
return info;
}
I.e. The Exif orientation value runs from 1 to 8 instead of 0 to 7.
Anyway, thanks for this new easier way of dealing with photos!
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: Mon May 06 04:40:37 CEST 2024
Total time taken to generate the page: 0.02859 seconds
|