Geom/Ctrl/PlotterCtrl: new methods to check for reversed orientation of coordinate axes

plugin/jpg/jpgupp.cpp: support for EXIM image orientation metadata
plugin/sqlite3/Sqlite3upp.cpp: support for BLOB write using SqlRaw
Oracle/Oci8.cpp: fixed OracleBlob::Write to survive zero-length write

git-svn-id: svn://ultimatepp.org/upp/trunk@4100 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2011-10-24 21:30:07 +00:00
parent dd90c9d1f7
commit a4947790ef
5 changed files with 52 additions and 5 deletions

View file

@ -26,6 +26,17 @@ enum
ROW_BUF_SIZE = 16384,
};
enum {
EXIF_BYTE = 1, // An 8-bit unsigned integer
EXIF_ASCII = 2, // An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL
EXIF_SHORT = 3, // A 16-bit (2-byte) unsigned integer
EXIF_LONG = 4, // A 32-bit (4-byte) unsigned integer
EXIF_RATIONAL = 5, // Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator
EXIF_UNDEFINED = 7, // An 8-bit byte that can take any value depending on the field definition
EXIF_SLONG = 9, // A 32-bit (4-byte) signed integer (2's complement notation)
EXIF_SRATIONAL = 10, // Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator
};
struct jpg_stream_destination_mgr
{
jpeg_destination_mgr pub;
@ -336,13 +347,17 @@ int JPGRaster::Data::ExifDir(const char *begin, int offset, IFD_TYPE type)
}
}
else if(type == GPS_IFD) {
if((tag == 2 || tag == 4) && fmt == 5 && count == 3) {
if((tag == 2 || tag == 4) && fmt == EXIF_RATIONAL && count == 3) {
metadata.Add(tag == 2 ? "GPSLatitude" : "GPSLongitude",
ExifF5(data + 0) + ExifF5(data + 8) / 60 + ExifF5(data + 16) / 3600);
// puts(NFormat("GPSLatitude: %n %n %n", n1, n2, n3));
}
else if(tag == 6 && fmt == 5 && count == 1)
else if(tag == 6 && fmt == EXIF_RATIONAL && count == 1)
metadata.Add("GPSAltitude", ExifF5(data));
else if(tag == 16 && fmt == EXIF_ASCII && count == 2 && *data)
metadata.Add("GPSImgDirectionRef", String(*data, 1));
else if(tag == 17 && fmt == EXIF_RATIONAL && count == 1)
metadata.Add("GPSImgDirection", ExifF5(data + 0));
}
}
int nextoff = Exif32(e);