Some fixes on behalf of GreatBull issue #649
This commit is contained in:
@@ -785,7 +785,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) {
|
|||||||
|
|
||||||
exif->write (8, buffer);
|
exif->write (8, buffer);
|
||||||
write (TIFFFileno (out), buffer+8, exif_size);
|
write (TIFFFileno (out), buffer+8, exif_size);
|
||||||
delete buffer;
|
delete [] buffer;
|
||||||
// let libtiff know that scanlines or any other following stuff should go
|
// let libtiff know that scanlines or any other following stuff should go
|
||||||
// at a different offset:
|
// at a different offset:
|
||||||
TIFFSetWriteOffset (out, exif_size+8);
|
TIFFSetWriteOffset (out, exif_size+8);
|
||||||
|
@@ -642,11 +642,11 @@ class NALensDataInterpreter : public Interpreter {
|
|||||||
d100 = false;
|
d100 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char buffer[15];
|
unsigned char buffer[16];
|
||||||
if (d100)
|
if (d100)
|
||||||
memcpy (buffer, t->getValue()+6, 7);
|
memcpy (buffer, t->getValue()+6, 7);
|
||||||
else
|
else
|
||||||
memcpy (buffer, t->getValue()+4, 15);
|
memcpy (buffer, t->getValue()+4, 16);
|
||||||
|
|
||||||
if (ver>=201) {
|
if (ver>=201) {
|
||||||
const unsigned char* serval = t->getParent()->getTag(0x001d)->getValue ();
|
const unsigned char* serval = t->getParent()->getTag(0x001d)->getValue ();
|
||||||
@@ -661,7 +661,7 @@ class NALensDataInterpreter : public Interpreter {
|
|||||||
unsigned char ci = xlat[0][serial & 0xff];
|
unsigned char ci = xlat[0][serial & 0xff];
|
||||||
unsigned char cj = xlat[1][key];
|
unsigned char cj = xlat[1][key];
|
||||||
unsigned char ck = 0x60;
|
unsigned char ck = 0x60;
|
||||||
for (int i=0; i < 15; i++)
|
for (int i=0; i < 16; i++)
|
||||||
buffer[i] ^= (cj += ci * ck++);
|
buffer[i] ^= (cj += ci * ck++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user