Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DrawArc not working in GTK mode
Next Topic: RescaleFilter.cpp: Implicit conversion from bool to double
Goto Forum:
  


Current Time: Mon May 06 04:40:37 CEST 2024

Total time taken to generate the page: 0.02859 seconds