mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
new uvs2 releases : uppsrc-2586 tutorial-38 examples-141 reference-113
git-svn-id: svn://ultimatepp.org/upp/trunk@283 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d2b54f7989
commit
0f391f3fb5
104 changed files with 1043 additions and 923 deletions
|
|
@ -106,6 +106,62 @@ int AString<B>::Find(const tchar *s, int from) const
|
||||||
return Find(strlen__(s), s, from);
|
return Find(strlen__(s), s, from);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class B>
|
||||||
|
int AString<B>::FindFirstOf(int len, const tchar *s, int from) const
|
||||||
|
{
|
||||||
|
ASSERT(from >= 0 && from <= GetLength());
|
||||||
|
const tchar *ptr = B::Begin();
|
||||||
|
const tchar *e = End();
|
||||||
|
const tchar *se = s + (len * sizeof(tchar));
|
||||||
|
if((s[0] & s[1]) != 0) {
|
||||||
|
if(s[2] == 0) {
|
||||||
|
__BREAK__;
|
||||||
|
tchar c1 = s[0];
|
||||||
|
tchar c2 = s[1];
|
||||||
|
for(const tchar *bs = ptr + from; bs < e; bs++) {
|
||||||
|
tchar ch = *bs;
|
||||||
|
if(ch == c1 || ch == c2)
|
||||||
|
return (int)(bs - ptr);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if(s[3] == 0) {
|
||||||
|
tchar c1 = s[0];
|
||||||
|
tchar c2 = s[1];
|
||||||
|
tchar c3 = s[2];
|
||||||
|
for(const tchar *bs = ptr + from; bs < e; bs++) {
|
||||||
|
tchar ch = *bs;
|
||||||
|
if(ch == c1 || ch == c2 || ch == c3)
|
||||||
|
return (int)(bs - ptr);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if(s[4] == 0) {
|
||||||
|
tchar c1 = s[0];
|
||||||
|
tchar c2 = s[1];
|
||||||
|
tchar c3 = s[2];
|
||||||
|
tchar c4 = s[3];
|
||||||
|
for(const tchar *bs = ptr + from; bs < e; bs++) {
|
||||||
|
tchar ch = *bs;
|
||||||
|
if(ch == c1 || ch == c2 || ch == c3 || ch == c4)
|
||||||
|
return (int)(bs - ptr);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(const tchar *bs = ptr + from; bs < e; bs++)
|
||||||
|
for(const tchar *ss = s; ss < se; ss++)
|
||||||
|
if(*bs == *ss)
|
||||||
|
return (int)(bs - ptr);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class B>
|
||||||
|
int AString<B>::FindFirstOf(const tchar *s, int from) const
|
||||||
|
{
|
||||||
|
return FindFirstOf(strlen__(s), s, from);
|
||||||
|
}
|
||||||
|
|
||||||
inline int String0::Compare(const String0& s) const
|
inline int String0::Compare(const String0& s) const
|
||||||
{
|
{
|
||||||
#ifdef FAST_STRING_COMPARE
|
#ifdef FAST_STRING_COMPARE
|
||||||
|
|
|
||||||
|
|
@ -855,7 +855,7 @@ template <class T>
|
||||||
struct StableSortItem {
|
struct StableSortItem {
|
||||||
const T& value;
|
const T& value;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
StableSortItem(const T& value, int index) : value(value), index(index) {}
|
StableSortItem(const T& value, int index) : value(value), index(index) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -863,7 +863,7 @@ template <class II, class T>
|
||||||
struct StableSortIterator {
|
struct StableSortIterator {
|
||||||
II ii;
|
II ii;
|
||||||
int *vi;
|
int *vi;
|
||||||
|
|
||||||
typedef StableSortIterator<II, T> Iter;
|
typedef StableSortIterator<II, T> Iter;
|
||||||
|
|
||||||
Iter& operator ++ () { ++ii; ++vi; return *this; }
|
Iter& operator ++ () { ++ii; ++vi; return *this; }
|
||||||
|
|
@ -890,7 +890,7 @@ struct StableSortLess_ {
|
||||||
if(less(a.value, b.value)) return true;
|
if(less(a.value, b.value)) return true;
|
||||||
return less(b.value, a.value) ? false : a.index < b.index;
|
return less(b.value, a.value) ? false : a.index < b.index;
|
||||||
}
|
}
|
||||||
|
|
||||||
StableSortLess_(const Less& less) : less(less) {}
|
StableSortLess_(const Less& less) : less(less) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -932,7 +932,7 @@ struct StableSortLessCmp_ {
|
||||||
int q = SgnCompare(a.value, b.value);
|
int q = SgnCompare(a.value, b.value);
|
||||||
return q ? q < 0 : a.index < b.index;
|
return q ? q < 0 : a.index < b.index;
|
||||||
}
|
}
|
||||||
|
|
||||||
StableSortLessCmp_(const Cmp& cmp) : cmp(cmp) {}
|
StableSortLessCmp_(const Cmp& cmp) : cmp(cmp) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -223,28 +223,28 @@ Callback pteback3(Object *object, R (O::*method)(A, B, C), T1 arg1, T2 arg2, T3
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class OBJECT_, class METHOD_, class T1, class T2, class T3>
|
template <class OBJECT_, class METHOD_, class T1, class T2, class T3>
|
||||||
struct CallbackMethodActionArg3 : public CallbackAction
|
struct CallbackMethodActionArg3 : public CallbackAction
|
||||||
{
|
{
|
||||||
OBJECT_ *object;
|
OBJECT_ *object;
|
||||||
METHOD_ method;
|
METHOD_ method;
|
||||||
T1 arg1;
|
T1 arg1;
|
||||||
T2 arg2;
|
T2 arg2;
|
||||||
T3 arg3;
|
T3 arg3;
|
||||||
|
|
||||||
void Execute() { (object->*method)(arg1, arg2, arg3); }
|
void Execute() { (object->*method)(arg1, arg2, arg3); }
|
||||||
|
|
||||||
CallbackMethodActionArg3(OBJECT_ *object, METHOD_ method, T1 arg1, T2 arg2, T3 arg3)
|
CallbackMethodActionArg3(OBJECT_ *object, METHOD_ method, T1 arg1, T2 arg2, T3 arg3)
|
||||||
: object(object), method(method), arg1(arg1), arg2(arg2), arg3(arg3) {}
|
: object(object), method(method), arg1(arg1), arg2(arg2), arg3(arg3) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Object, class R, class O, class A, class B, class C, class T1, class T2, class T3>
|
template <class Object, class R, class O, class A, class B, class C, class T1, class T2, class T3>
|
||||||
Callback callback3(Object *object, R (O::*method)(A, B, C), T1 arg1, T2 arg2, T3 arg3)
|
Callback callback3(Object *object, R (O::*method)(A, B, C), T1 arg1, T2 arg2, T3 arg3)
|
||||||
{
|
{
|
||||||
return Callback(
|
return Callback(
|
||||||
new CallbackMethodActionArg3<Object, R (O::*)(A, B, C), T1, T2, T3>(object, method, arg1, arg2, arg3));
|
new CallbackMethodActionArg3<Object, R (O::*)(A, B, C), T1, T2, T3>(object, method, arg1, arg2, arg3));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Object, class R, class O, class A, class B, class C, class T1, class T2, class T3>
|
template <class Object, class R, class O, class A, class B, class C, class T1, class T2, class T3>
|
||||||
Callback callback3(const Object *object, R (O::*method)(A, B, C) const, T1 arg1, T2 arg2, T3 arg3) {
|
Callback callback3(const Object *object, R (O::*method)(A, B, C) const, T1 arg1, T2 arg2, T3 arg3) {
|
||||||
return Callback(new CallbackMethodActionArg3<Object, R (O::*)(A, B, C) const, T1, T2, T3>
|
return Callback(new CallbackMethodActionArg3<Object, R (O::*)(A, B, C) const, T1, T2, T3>
|
||||||
(object, method, arg1, arg2, arg3));
|
(object, method, arg1, arg2, arg3));
|
||||||
|
|
@ -258,7 +258,7 @@ struct CallbackActionCallArg3 : public CallbackAction {
|
||||||
T3 arg3;
|
T3 arg3;
|
||||||
void Execute() { x(arg1, arg2, arg3); }
|
void Execute() { x(arg1, arg2, arg3); }
|
||||||
|
|
||||||
CallbackActionCallArg3(X x, T1 arg1, T2 arg2, T3 arg3)
|
CallbackActionCallArg3(X x, T1 arg1, T2 arg2, T3 arg3)
|
||||||
: x(x), arg1(arg1), arg2(arg2), arg3(arg3) {}
|
: x(x), arg1(arg1), arg2(arg2), arg3(arg3) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -295,7 +295,7 @@ Callback pteback4(Object *object, R (O::*method)(A, B,C,D), T1 arg1, T2 arg2, T3
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class OBJECT_, class METHOD_, class T1, class T2, class T3, class T4>
|
template <class OBJECT_, class METHOD_, class T1, class T2, class T3, class T4>
|
||||||
struct CallbackMethodActionArg4 : public CallbackAction
|
struct CallbackMethodActionArg4 : public CallbackAction
|
||||||
{
|
{
|
||||||
OBJECT_ *object;
|
OBJECT_ *object;
|
||||||
METHOD_ method;
|
METHOD_ method;
|
||||||
|
|
@ -303,21 +303,21 @@ struct CallbackMethodActionArg4 : public CallbackAction
|
||||||
T2 arg2;
|
T2 arg2;
|
||||||
T3 arg3;
|
T3 arg3;
|
||||||
T4 arg4;
|
T4 arg4;
|
||||||
|
|
||||||
void Execute() { (object->*method)(arg1, arg2, arg3, arg4); }
|
void Execute() { (object->*method)(arg1, arg2, arg3, arg4); }
|
||||||
|
|
||||||
CallbackMethodActionArg4(OBJECT_ *object, METHOD_ method, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
CallbackMethodActionArg4(OBJECT_ *object, METHOD_ method, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
||||||
: object(object), method(method), arg1(arg1), arg2(arg2), arg3(arg3), arg4(arg4) {}
|
: object(object), method(method), arg1(arg1), arg2(arg2), arg3(arg3), arg4(arg4) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Object, class R, class O, class A, class B, class C, class D, class T1, class T2, class T3, class T4>
|
template <class Object, class R, class O, class A, class B, class C, class D, class T1, class T2, class T3, class T4>
|
||||||
Callback callback4(Object *object, R (O::*method)(A, B, C, D), T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
Callback callback4(Object *object, R (O::*method)(A, B, C, D), T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
||||||
{
|
{
|
||||||
return Callback(
|
return Callback(
|
||||||
new CallbackMethodActionArg4<Object, R (O::*)(A, B, C, D), T1, T2, T3, T4>(object, method, arg1, arg2, arg3, arg4));
|
new CallbackMethodActionArg4<Object, R (O::*)(A, B, C, D), T1, T2, T3, T4>(object, method, arg1, arg2, arg3, arg4));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Object, class R, class O, class A, class B, class C, class D, class T1, class T2, class T3, class T4>
|
template <class Object, class R, class O, class A, class B, class C, class D, class T1, class T2, class T3, class T4>
|
||||||
Callback callback4(const Object *object, R (O::*method)(A, B, C, D) const, T1 arg1, T2 arg2, T3 arg3, T4 arg4) {
|
Callback callback4(const Object *object, R (O::*method)(A, B, C, D) const, T1 arg1, T2 arg2, T3 arg3, T4 arg4) {
|
||||||
return Callback(new CallbackMethodActionArg4<Object, R (O::*)(A, B,C,D) const, T1, T2, T3, T4>
|
return Callback(new CallbackMethodActionArg4<Object, R (O::*)(A, B,C,D) const, T1, T2, T3, T4>
|
||||||
(object, method, arg1, arg2, arg3, arg4));
|
(object, method, arg1, arg2, arg3, arg4));
|
||||||
|
|
@ -332,7 +332,7 @@ struct CallbackActionCallArg4 : public CallbackAction {
|
||||||
T4 arg4;
|
T4 arg4;
|
||||||
void Execute() { x(arg1, arg2, arg3, arg4); }
|
void Execute() { x(arg1, arg2, arg3, arg4); }
|
||||||
|
|
||||||
CallbackActionCallArg4(X x, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
CallbackActionCallArg4(X x, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
||||||
: x(x), arg1(arg1), arg2(arg2), arg3(arg3), arg4(arg4) {}
|
: x(x), arg1(arg1), arg2(arg2), arg3(arg3), arg4(arg4) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ public:
|
||||||
virtual bool CreateFolder(String path, String& error) const;
|
virtual bool CreateFolder(String path, String& error) const;
|
||||||
|
|
||||||
bool FolderExists(String path) const;
|
bool FolderExists(String path) const;
|
||||||
|
|
||||||
virtual ~FileSystemInfo() {}
|
virtual ~FileSystemInfo() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,10 @@ public:
|
||||||
bool EndsWith(const tchar *s) const { return EndsWith(s, strlen__(s)); }
|
bool EndsWith(const tchar *s) const { return EndsWith(s, strlen__(s)); }
|
||||||
bool EndsWith(const String& s) const { return EndsWith(~s, s.GetLength()); }
|
bool EndsWith(const String& s) const { return EndsWith(~s, s.GetLength()); }
|
||||||
|
|
||||||
|
int FindFirstOf(int len, const tchar *s, int from) const;
|
||||||
|
int FindFirstOf(const tchar *s, int from = 0) const;
|
||||||
|
int FindFirstOf(const String& s, int from = 0) const { return FindFirstOf(s.GetCount(), ~s, from); }
|
||||||
|
|
||||||
friend bool operator<(const String& a, const String& b) { return a.Compare(b) < 0; }
|
friend bool operator<(const String& a, const String& b) { return a.Compare(b) < 0; }
|
||||||
friend bool operator<(const String& a, const tchar *b) { return a.Compare(b) < 0; }
|
friend bool operator<(const String& a, const tchar *b) { return a.Compare(b) < 0; }
|
||||||
friend bool operator<(const tchar *a, const String& b) { return b.Compare(a) > 0; }
|
friend bool operator<(const tchar *a, const String& b) { return b.Compare(a) > 0; }
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,9 @@ void Panic(const char *msg)
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _DEBUG
|
||||||
__BREAK__;
|
__BREAK__;
|
||||||
|
#endif
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,4 +30,3 @@ COMPRESSED
|
||||||
247,35,184,55,19,97,81,151,225,169,214,239,39,186,131,134,95,22,4,233,52,87,210,105,90,232,32,98,159,242,144,231,17,117,39,171,6,179,58,246,162,64,245,22,23,255,78,200,81,14,38,222,61,27,239,73,118,81,201,131,91,239,173,62,251,251,56,205,23,0,83,63,86,27,240,137,122,13,204,50,22,140,208,44,101,193,121,178,171,73,45,172,173,86,140,217,15,0,239,226,40,102,134,149,227,15,111,211,119,27,223,45,43,182,199,238,43,196,218,138,71,227,46,108,125,169,71,114,151,221,192,118,98,185,238,67,243,41,98,129,75,225,94,31,125,209,71,126,80,148,132,237,155,186,211,96,37,236,24,12,79,128,150,251,86,237,53,116,156,23,119,28,58,70,139,251,14,51,11,83,201,254,170,35,129,133,176,173,184,219,231,22,79,147,56,89,210,196,23,55,111,156,230,184,187,21,239,56,122,177,61,121,195,149,182,7,42,177,215,126,192,197,49,38,242,14,9,241,38,78,144,111,48,90,143,76,55,68,136,249,185,56,136,161,178,252,141,95,234,141,92,143,112,229,162,216,
|
247,35,184,55,19,97,81,151,225,169,214,239,39,186,131,134,95,22,4,233,52,87,210,105,90,232,32,98,159,242,144,231,17,117,39,171,6,179,58,246,162,64,245,22,23,255,78,200,81,14,38,222,61,27,239,73,118,81,201,131,91,239,173,62,251,251,56,205,23,0,83,63,86,27,240,137,122,13,204,50,22,140,208,44,101,193,121,178,171,73,45,172,173,86,140,217,15,0,239,226,40,102,134,149,227,15,111,211,119,27,223,45,43,182,199,238,43,196,218,138,71,227,46,108,125,169,71,114,151,221,192,118,98,185,238,67,243,41,98,129,75,225,94,31,125,209,71,126,80,148,132,237,155,186,211,96,37,236,24,12,79,128,150,251,86,237,53,116,156,23,119,28,58,70,139,251,14,51,11,83,201,254,170,35,129,133,176,173,184,219,231,22,79,147,56,89,210,196,23,55,111,156,230,184,187,21,239,56,122,177,61,121,195,149,182,7,42,177,215,126,192,197,49,38,242,14,9,241,38,78,144,111,48,90,143,76,55,68,136,249,185,56,136,161,178,252,141,95,234,141,92,143,112,229,162,216,
|
||||||
208,145,162,156,251,150,219,126,82,16,134,201,152,160,123,1,175,231,4,37,22,180,208,2,2,235,114,209,59,185,111,115,214,82,61,197,92,37,188,149,236,62,83,182,36,5,100,180,180,12,4,240,194,174,36,221,38,54,161,21,27,152,48,22,250,38,78,161,186,31,139,59,8,70,99,59,124,32,163,139,98,90,234,60,72,143,28,34,120,160,227,197,115,137,8,29,55,164,93,170,118,232,70,217,229,119,244,22,148,178,125,113,144,215,178,51,134,247,96,114,26,204,197,31,116,195,51,202,196,220,145,57,184,216,186,175,151,48,245,159,83,219,207,182,234,124,55,11,45,201,187,250,108,88,238,45,147,179,136,244,26,153,140,224,197,141,132,169,160,115,187,187,114,185,118,165,119,75,154,164,203,50,229,74,9,81,143,8,180,86,186,174,105,117,110,41,237,196,117,48,76,40,208,218,164,59,68,98,182,91,2,15,127,5,176,242,170,88,125,71,32,110,37,208,220,42,139,2,232,101,67,38,14,159,138,135,160,185,216,241,42,12,79,89,42,91,152,122,42,163,189,146,62,201,76,186,
|
208,145,162,156,251,150,219,126,82,16,134,201,152,160,123,1,175,231,4,37,22,180,208,2,2,235,114,209,59,185,111,115,214,82,61,197,92,37,188,149,236,62,83,182,36,5,100,180,180,12,4,240,194,174,36,221,38,54,161,21,27,152,48,22,250,38,78,161,186,31,139,59,8,70,99,59,124,32,163,139,98,90,234,60,72,143,28,34,120,160,227,197,115,137,8,29,55,164,93,170,118,232,70,217,229,119,244,22,148,178,125,113,144,215,178,51,134,247,96,114,26,204,197,31,116,195,51,202,196,220,145,57,184,216,186,175,151,48,245,159,83,219,207,182,234,124,55,11,45,201,187,250,108,88,238,45,147,179,136,244,26,153,140,224,197,141,132,169,160,115,187,187,114,185,118,165,119,75,154,164,203,50,229,74,9,81,143,8,180,86,186,174,105,117,110,41,237,196,117,48,76,40,208,218,164,59,68,98,182,91,2,15,127,5,176,242,170,88,125,71,32,110,37,208,220,42,139,2,232,101,67,38,14,159,138,135,160,185,216,241,42,12,79,89,42,91,152,122,42,163,189,146,62,201,76,186,
|
||||||
59,147,157,255,63,212,16,186,157,
|
59,147,157,255,63,212,16,186,157,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,3 @@ COMPRESSED
|
||||||
1,244,157,183,208,249,188,169,186,182,220,28,31,51,37,142,247,170,5,1,35,88,119,51,33,159,217,121,145,85,81,173,21,241,241,165,54,30,9,26,101,83,6,86,64,154,203,54,212,150,237,134,205,134,119,222,97,2,116,47,155,252,207,35,188,74,103,127,76,188,22,17,79,120,178,250,61,197,182,208,112,39,216,180,59,192,207,46,43,91,0,255,245,215,162,133,30,219,71,83,231,172,47,84,67,220,83,56,48,229,1,224,188,169,31,140,108,197,77,125,78,1,160,246,145,40,128,159,153,108,149,114,248,210,109,234,171,180,245,118,169,20,188,215,154,253,252,47,3,62,122,246,51,192,233,203,236,77,120,131,126,129,128,207,23,149,68,38,16,232,183,19,172,51,58,203,155,246,139,185,183,246,215,243,223,20,88,128,222,85,203,192,191,50,66,126,1,155,154,139,172,93,205,15,252,152,118,114,174,117,13,157,174,179,58,121,101,226,5,242,195,64,51,157,24,34,72,70,165,99,95,180,64,180,62,212,202,240,252,24,253,186,13,144,191,194,100,216,115,199,117,47,129,100,122,135,
|
1,244,157,183,208,249,188,169,186,182,220,28,31,51,37,142,247,170,5,1,35,88,119,51,33,159,217,121,145,85,81,173,21,241,241,165,54,30,9,26,101,83,6,86,64,154,203,54,212,150,237,134,205,134,119,222,97,2,116,47,155,252,207,35,188,74,103,127,76,188,22,17,79,120,178,250,61,197,182,208,112,39,216,180,59,192,207,46,43,91,0,255,245,215,162,133,30,219,71,83,231,172,47,84,67,220,83,56,48,229,1,224,188,169,31,140,108,197,77,125,78,1,160,246,145,40,128,159,153,108,149,114,248,210,109,234,171,180,245,118,169,20,188,215,154,253,252,47,3,62,122,246,51,192,233,203,236,77,120,131,126,129,128,207,23,149,68,38,16,232,183,19,172,51,58,203,155,246,139,185,183,246,215,243,223,20,88,128,222,85,203,192,191,50,66,126,1,155,154,139,172,93,205,15,252,152,118,114,174,117,13,157,174,179,58,121,101,226,5,242,195,64,51,157,24,34,72,70,165,99,95,180,64,180,62,212,202,240,252,24,253,186,13,144,191,194,100,216,115,199,117,47,129,100,122,135,
|
||||||
13,114,12,155,153,57,50,82,8,225,139,232,190,138,106,203,170,124,215,81,193,180,111,118,96,166,68,192,30,40,76,28,75,160,81,153,144,75,211,183,174,228,181,20,22,109,19,19,182,5,174,217,139,182,69,64,155,149,168,151,4,223,13,56,248,149,149,162,91,237,82,187,116,13,155,13,219,1,176,176,191,161,88,104,90,203,180,220,86,236,108,216,135,40,112,255,194,108,171,194,194,150,196,238,98,247,174,194,192,172,53,103,87,28,12,177,33,137,157,198,24,48,177,35,81,171,184,185,58,118,124,21,247,77,189,72,211,225,131,35,113,233,247,255,198,175,98,120,39,18,86,133,230,173,70,228,74,96,179,208,77,207,231,129,103,19,81,209,250,214,66,223,230,74,114,241,13,194,76,61,175,90,232,42,19,138,159,77,220,51,174,112,143,109,173,43,61,72,39,147,45,41,240,204,240,34,203,198,73,11,34,80,142,13,150,178,50,136,141,116,115,68,247,37,237,147,8,92,251,152,150,229,49,86,103,74,159,49,179,226,52,112,38,77,74,176,192,78,36,36,182,115,130,140,88,111,
|
13,114,12,155,153,57,50,82,8,225,139,232,190,138,106,203,170,124,215,81,193,180,111,118,96,166,68,192,30,40,76,28,75,160,81,153,144,75,211,183,174,228,181,20,22,109,19,19,182,5,174,217,139,182,69,64,155,149,168,151,4,223,13,56,248,149,149,162,91,237,82,187,116,13,155,13,219,1,176,176,191,161,88,104,90,203,180,220,86,236,108,216,135,40,112,255,194,108,171,194,194,150,196,238,98,247,174,194,192,172,53,103,87,28,12,177,33,137,157,198,24,48,177,35,81,171,184,185,58,118,124,21,247,77,189,72,211,225,131,35,113,233,247,255,198,175,98,120,39,18,86,133,230,173,70,228,74,96,179,208,77,207,231,129,103,19,81,209,250,214,66,223,230,74,114,241,13,194,76,61,175,90,232,42,19,138,159,77,220,51,174,112,143,109,173,43,61,72,39,147,45,41,240,204,240,34,203,198,73,11,34,80,142,13,150,178,50,136,141,116,115,68,247,37,237,147,8,92,251,152,150,229,49,86,103,74,159,49,179,226,52,112,38,77,74,176,192,78,36,36,182,115,130,140,88,111,
|
||||||
162,142,70,40,124,188,99,182,222,145,88,64,154,103,172,247,117,83,157,30,109,2,105,16,207,222,97,249,119,159,226,240,247,125,206,141,190,36,244,161,122,92,52,116,35,146,64,131,182,192,92,95,221,20,226,172,124,61,186,89,148,248,130,221,59,59,206,137,68,83,146,20,49,55,2,164,30,31,29,47,68,143,248,184,115,241,131,42,24,163,248,104,131,25,18,156,24,167,21,194,178,173,118,142,89,229,187,64,193,205,122,206,76,22,54,1,148,44,129,154,89,57,146,180,206,83,122,96,204,106,24,147,182,173,140,3,116,211,56,53,139,197,155,204,186,93,36,92,243,127,35,201,112,73,
|
162,142,70,40,124,188,99,182,222,145,88,64,154,103,172,247,117,83,157,30,109,2,105,16,207,222,97,249,119,159,226,240,247,125,206,141,190,36,244,161,122,92,52,116,35,146,64,131,182,192,92,95,221,20,226,172,124,61,186,89,148,248,130,221,59,59,206,137,68,83,146,20,49,55,2,164,30,31,29,47,68,143,248,184,115,241,131,42,24,163,248,104,131,25,18,156,24,167,21,194,178,173,118,142,89,229,187,64,193,205,122,206,76,22,54,1,148,44,129,154,89,57,146,180,206,83,122,96,204,106,24,147,182,173,140,3,116,211,56,53,139,197,155,204,186,93,36,92,243,127,35,201,112,73,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,3 +10,4 @@ COMPRESSED
|
||||||
186,53,67,87,175,223,191,125,235,207,228,163,64,30,20,51,165,187,48,111,227,125,197,118,30,197,158,94,244,194,240,77,57,160,230,73,86,65,208,18,94,110,247,134,243,55,243,255,166,27,246,118,114,228,234,245,30,38,52,185,52,72,65,220,211,212,108,15,56,119,225,129,218,186,252,206,91,199,208,20,55,76,149,182,31,135,99,231,232,202,52,62,200,246,138,179,139,255,12,30,240,215,203,31,255,210,91,128,1,88,80,109,105,254,167,231,191,122,187,57,138,61,152,38,108,205,29,118,134,142,231,242,24,43,129,34,46,107,15,243,209,57,57,40,136,205,241,74,148,35,216,230,204,17,137,250,173,183,249,126,225,54,237,96,32,199,126,238,188,145,57,159,116,243,120,96,118,211,63,64,214,151,75,112,230,165,186,104,202,178,121,32,128,187,67,138,20,147,183,134,174,60,227,175,24,196,192,214,241,124,62,250,254,171,115,188,91,245,212,28,127,219,60,24,84,23,120,181,97,88,115,28,2,187,187,219,246,210,182,36,185,152,79,171,166,5,104,182,104,155,106,95,5,205,236,23,
|
186,53,67,87,175,223,191,125,235,207,228,163,64,30,20,51,165,187,48,111,227,125,197,118,30,197,158,94,244,194,240,77,57,160,230,73,86,65,208,18,94,110,247,134,243,55,243,255,166,27,246,118,114,228,234,245,30,38,52,185,52,72,65,220,211,212,108,15,56,119,225,129,218,186,252,206,91,199,208,20,55,76,149,182,31,135,99,231,232,202,52,62,200,246,138,179,139,255,12,30,240,215,203,31,255,210,91,128,1,88,80,109,105,254,167,231,191,122,187,57,138,61,152,38,108,205,29,118,134,142,231,242,24,43,129,34,46,107,15,243,209,57,57,40,136,205,241,74,148,35,216,230,204,17,137,250,173,183,249,126,225,54,237,96,32,199,126,238,188,145,57,159,116,243,120,96,118,211,63,64,214,151,75,112,230,165,186,104,202,178,121,32,128,187,67,138,20,147,183,134,174,60,227,175,24,196,192,214,241,124,62,250,254,171,115,188,91,245,212,28,127,219,60,24,84,23,120,181,97,88,115,28,2,187,187,219,246,210,182,36,185,152,79,171,166,5,104,182,104,155,106,95,5,205,236,23,
|
||||||
80,122,84,11,78,189,246,9,172,174,109,79,122,158,63,252,182,110,113,234,200,221,234,252,168,142,219,97,80,220,61,103,107,2,232,225,103,211,54,120,59,50,109,5,112,132,214,118,45,248,183,236,174,41,231,131,82,118,87,47,223,230,218,29,163,46,101,131,129,88,233,238,238,108,184,200,206,12,78,84,186,51,119,221,176,221,107,175,23,140,110,161,192,123,111,77,27,119,107,176,158,166,217,134,30,193,152,119,41,142,166,18,47,55,36,101,175,160,158,70,76,199,254,141,232,229,207,130,142,247,159,175,126,216,187,190,110,175,131,190,54,66,98,87,38,47,22,148,177,191,169,211,154,83,139,119,25,84,84,206,233,20,249,92,224,34,60,167,104,51,252,42,166,23,132,241,81,113,213,81,93,35,66,185,167,141,222,148,142,173,126,95,223,120,205,218,108,239,167,222,86,251,19,55,111,170,85,235,143,74,111,231,116,81,166,47,154,182,192,139,69,223,142,17,123,75,211,69,73,255,239,183,37,34,236,200,83,94,249,59,122,185,9,6,83,253,251,213,181,20,187,59,187,166,83,7,
|
80,122,84,11,78,189,246,9,172,174,109,79,122,158,63,252,182,110,113,234,200,221,234,252,168,142,219,97,80,220,61,103,107,2,232,225,103,211,54,120,59,50,109,5,112,132,214,118,45,248,183,236,174,41,231,131,82,118,87,47,223,230,218,29,163,46,101,131,129,88,233,238,238,108,184,200,206,12,78,84,186,51,119,221,176,221,107,175,23,140,110,161,192,123,111,77,27,119,107,176,158,166,217,134,30,193,152,119,41,142,166,18,47,55,36,101,175,160,158,70,76,199,254,141,232,229,207,130,142,247,159,175,126,216,187,190,110,175,131,190,54,66,98,87,38,47,22,148,177,191,169,211,154,83,139,119,25,84,84,206,233,20,249,92,224,34,60,167,104,51,252,42,166,23,132,241,81,113,213,81,93,35,66,185,167,141,222,148,142,173,126,95,223,120,205,218,108,239,167,222,86,251,19,55,111,170,85,235,143,74,111,231,116,81,166,47,154,182,192,139,69,223,142,17,123,75,211,69,73,255,239,183,37,34,236,200,83,94,249,59,122,185,9,6,83,253,251,213,181,20,187,59,187,166,83,7,
|
||||||
220,82,254,221,117,173,160,119,68,127,11,219,94,219,142,15,141,239,95,126,215,187,202,186,29,196,113,240,230,89,209,200,140,216,251,154,110,156,111,175,174,223,255,35,32,91,221,127,195,220,157,234,7,59,237,238,197,104,139,14,180,250,235,142,191,4,213,160,175,173,220,227,149,182,61,86,103,132,121,238,168,70,244,214,245,111,134,121,118,253,179,190,129,30,23,133,65,2,154,244,133,166,23,74,58,23,232,23,104,34,96,86,111,8,235,130,238,97,102,169,253,123,15,250,232,247,34,25,225,28,4,125,251,63,70,167,205,3,
|
220,82,254,221,117,173,160,119,68,127,11,219,94,219,142,15,141,239,95,126,215,187,202,186,29,196,113,240,230,89,209,200,140,216,251,154,110,156,111,175,174,223,255,35,32,91,221,127,195,220,157,234,7,59,237,238,197,104,139,14,180,250,235,142,191,4,213,160,175,173,220,227,149,182,61,86,103,132,121,238,168,70,244,214,245,111,134,121,118,253,179,190,129,30,23,133,65,2,154,244,133,166,23,74,58,23,232,23,104,34,96,86,111,8,235,130,238,97,102,169,253,123,15,250,232,247,34,25,225,28,4,125,251,63,70,167,205,3,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,3 +34,4 @@ COMPRESSED
|
||||||
181,175,33,159,15,189,120,1,249,4,10,121,54,10,5,105,158,247,218,249,255,174,228,145,87,208,225,175,72,134,158,67,191,165,67,255,7,144,95,189,147,251,86,253,183,250,244,218,255,111,68,191,30,123,55,199,208,235,239,143,140,246,212,236,141,35,64,159,15,129,18,222,54,233,199,94,191,234,117,221,199,222,206,43,124,54,56,58,248,172,55,111,48,6,29,239,13,25,64,254,229,245,24,72,3,125,1,234,244,102,94,225,127,128,107,99,67,160,121,95,188,107,239,143,244,36,189,248,210,8,232,31,95,129,42,140,189,153,187,248,87,99,10,207,70,70,193,205,87,35,195,207,223,104,245,118,68,226,167,195,159,246,102,29,190,206,9,138,249,59,232,40,20,50,212,243,240,179,23,67,175,190,156,159,248,210,135,111,141,251,4,250,6,230,75,251,159,127,115,46,0,242,139,31,253,253,223,126,252,163,191,253,41,228,233,123,127,243,179,167,63,252,155,159,129,142,31,126,62,242,249,216,211,31,246,70,98,158,190,247,209,59,194,191,250,171,47,89,158,190,247,221,231,111,167,139,
|
181,175,33,159,15,189,120,1,249,4,10,121,54,10,5,105,158,247,218,249,255,174,228,145,87,208,225,175,72,134,158,67,191,165,67,255,7,144,95,189,147,251,86,253,183,250,244,218,255,111,68,191,30,123,55,199,208,235,239,143,140,246,212,236,141,35,64,159,15,129,18,222,54,233,199,94,191,234,117,221,199,222,206,43,124,54,56,58,248,172,55,111,48,6,29,239,13,25,64,254,229,245,24,72,3,125,1,234,244,102,94,225,127,128,107,99,67,160,121,95,188,107,239,143,244,36,189,248,210,8,232,31,95,129,42,140,189,153,187,248,87,99,10,207,70,70,193,205,87,35,195,207,223,104,245,118,68,226,167,195,159,246,102,29,190,206,9,138,249,59,232,40,20,50,212,243,240,179,23,67,175,190,156,159,248,210,135,111,141,251,4,250,6,230,75,251,159,127,115,46,0,242,139,31,253,253,223,126,252,163,191,253,41,228,233,123,127,243,179,167,63,252,155,159,129,142,31,126,62,242,249,216,211,31,246,70,98,158,190,247,209,59,194,191,250,171,47,89,158,190,247,221,231,111,167,139,
|
||||||
190,247,244,189,247,223,45,254,240,255,128,203,35,47,160,227,175,199,190,247,103,166,175,56,62,6,49,191,73,252,243,215,47,71,6,255,13,202,31,191,30,255,38,225,47,160,67,255,22,217,200,171,47,254,76,247,229,231,233,123,255,138,244,215,189,112,63,27,121,249,18,10,38,202,187,152,140,65,7,71,159,125,246,38,254,96,128,193,52,28,7,215,198,71,123,11,79,127,248,6,228,91,25,244,235,193,209,97,112,247,201,215,66,255,244,159,254,0,121,57,56,250,251,49,8,24,145,223,13,253,177,199,217,75,133,65,48,36,195,35,239,50,102,236,109,236,191,242,62,228,243,94,50,129,17,251,228,237,16,13,40,253,25,104,72,15,236,91,18,127,245,217,235,177,111,133,234,87,79,255,249,187,79,223,123,222,27,206,249,167,63,252,183,65,208,252,239,125,147,0,12,209,179,177,31,255,207,183,68,175,95,130,84,63,255,131,149,53,14,29,6,41,33,144,95,143,142,244,44,248,201,200,27,245,254,172,210,59,200,247,222,217,241,159,190,137,249,14,240,107,64,160,148,31,247,82,
|
190,247,244,189,247,223,45,254,240,255,128,203,35,47,160,227,175,199,190,247,103,166,175,56,62,6,49,191,73,252,243,215,47,71,6,255,13,202,31,191,30,255,38,225,47,160,67,255,22,217,200,171,47,254,76,247,229,231,233,123,255,138,244,215,189,112,63,27,121,249,18,10,38,202,187,152,140,65,7,71,159,125,246,38,254,96,128,193,52,28,7,215,198,71,123,11,79,127,248,6,228,91,25,244,235,193,209,97,112,247,201,215,66,255,244,159,254,0,121,57,56,250,251,49,8,24,145,223,13,253,177,199,217,75,133,65,48,36,195,35,239,50,102,236,109,236,191,242,62,228,243,94,50,129,17,251,228,237,16,13,40,253,25,104,72,15,236,91,18,127,245,217,235,177,111,133,234,87,79,255,249,187,79,223,123,222,27,206,249,167,63,252,183,65,208,252,239,125,147,0,12,209,179,177,31,255,207,183,68,175,95,130,84,63,255,131,149,53,14,29,6,41,33,144,95,143,142,244,44,248,201,200,27,245,254,172,210,59,200,247,222,217,241,159,190,137,249,14,240,107,64,160,148,31,247,82,
|
||||||
244,219,115,65,247,63,128,252,227,187,185,162,175,77,4,129,14,248,42,21,255,63,35,70,189,64,188,126,249,38,28,175,160,160,119,71,161,127,24,130,126,254,230,112,131,92,96,25,120,9,29,253,244,237,17,31,3,79,203,51,40,152,253,31,143,65,159,244,82,235,235,112,111,96,158,64,254,110,228,37,20,98,214,65,62,126,179,248,139,161,79,70,7,193,82,241,238,16,127,123,99,168,55,163,3,10,122,59,166,244,4,50,212,247,120,248,125,200,199,195,67,96,225,123,91,18,127,54,12,70,124,248,77,213,26,124,49,244,191,222,220,252,57,71,126,251,255,0,169,222,145,9,
|
244,219,115,65,247,63,128,252,227,187,185,162,175,77,4,129,14,248,42,21,255,63,35,70,189,64,188,126,249,38,28,175,160,160,119,71,161,127,24,130,126,254,230,112,131,92,96,25,120,9,29,253,244,237,17,31,3,79,203,51,40,152,253,31,143,65,159,244,82,235,235,112,111,96,158,64,254,110,228,37,20,98,214,65,62,126,179,248,139,161,79,70,7,193,82,241,238,16,127,123,99,168,55,163,3,10,122,59,166,244,4,50,212,247,120,248,125,200,199,195,67,96,225,123,91,18,127,54,12,70,124,248,77,213,26,124,49,244,191,222,220,252,57,71,126,251,255,0,169,222,145,9,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
class Crc32 {
|
class Crc32 {
|
||||||
dword crc;
|
dword crc;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Put(const void *ptr, int count);
|
void Put(const void *ptr, int count);
|
||||||
void Put(char c);
|
void Put(char c);
|
||||||
void Put(byte c);
|
void Put(byte c);
|
||||||
|
|
||||||
operator dword() const { return crc; }
|
operator dword() const { return crc; }
|
||||||
|
|
||||||
Crc32();
|
Crc32();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -531,7 +531,7 @@ void ArrangeOKCancel(Ctrl& ok, Ctrl& cancel)
|
||||||
Ctrl::LogPos h = ok.GetPos();
|
Ctrl::LogPos h = ok.GetPos();
|
||||||
ok.SetPos(cancel.GetPos());
|
ok.SetPos(cancel.GetPos());
|
||||||
cancel.SetPos(h);
|
cancel.SetPos(h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
END_UPP_NAMESPACE
|
END_UPP_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ private:
|
||||||
void SyncCaption();
|
void SyncCaption();
|
||||||
|
|
||||||
void SetupRect();
|
void SetupRect();
|
||||||
|
|
||||||
void FixIcons();
|
void FixIcons();
|
||||||
|
|
||||||
enum { MINIMIZED, MAXIMIZED, OVERLAPPED };
|
enum { MINIMIZED, MAXIMIZED, OVERLAPPED };
|
||||||
|
|
@ -202,7 +202,7 @@ public:
|
||||||
TopWindow& Icon(const Image& m);
|
TopWindow& Icon(const Image& m);
|
||||||
TopWindow& LargeIcon(const Image& m);
|
TopWindow& LargeIcon(const Image& m);
|
||||||
TopWindow& Icon(const Image& smallicon, const Image& largeicon);
|
TopWindow& Icon(const Image& smallicon, const Image& largeicon);
|
||||||
|
|
||||||
Image GetIcon() const { return icon; }
|
Image GetIcon() const { return icon; }
|
||||||
Image GetLargeIcon() const { return largeicon; }
|
Image GetLargeIcon() const { return largeicon; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ void ChHostSkin()
|
||||||
ColoredOverride(CtrlsImg::Iml(), CtrlsImg::Iml());
|
ColoredOverride(CtrlsImg::Iml(), CtrlsImg::Iml());
|
||||||
CtrlsImg::Reset();
|
CtrlsImg::Reset();
|
||||||
EditFieldIsThin_Write(1);
|
EditFieldIsThin_Write(1);
|
||||||
|
|
||||||
bool vista_aero = IsWinVista() && XpThemeInfo(L"ThemeName") == "Aero";
|
bool vista_aero = IsWinVista() && XpThemeInfo(L"ThemeName") == "Aero";
|
||||||
|
|
||||||
if(vista_aero) {
|
if(vista_aero) {
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ void ColumnList::DoClick(Point p, dword flags)
|
||||||
WhenLeftClickPos(p);
|
WhenLeftClickPos(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnList::LeftDown(Point p, dword flags) {
|
void ColumnList::DoLeftDown(Point p, dword flags) {
|
||||||
selclick = false;
|
selclick = false;
|
||||||
int i = GetDragColumn(p.x);
|
int i = GetDragColumn(p.x);
|
||||||
if(i >= 0) {
|
if(i >= 0) {
|
||||||
|
|
@ -110,6 +110,10 @@ void ColumnList::LeftDown(Point p, dword flags) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ColumnList::LeftDown(Point p, dword flags) {
|
||||||
|
DoLeftDown(p, flags);
|
||||||
|
}
|
||||||
|
|
||||||
void ColumnList::LeftUp(Point p, dword flags)
|
void ColumnList::LeftUp(Point p, dword flags)
|
||||||
{
|
{
|
||||||
if(selclick)
|
if(selclick)
|
||||||
|
|
@ -135,7 +139,7 @@ void ColumnList::RightDown(Point p, dword flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnList::LeftDouble(Point p, dword flags) {
|
void ColumnList::LeftDouble(Point p, dword flags) {
|
||||||
LeftDown(p, flags);
|
DoLeftDown(p, flags);
|
||||||
WhenLeftDouble();
|
WhenLeftDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ private:
|
||||||
void SetCursor0(int c, bool sel);
|
void SetCursor0(int c, bool sel);
|
||||||
void UpdateSelect();
|
void UpdateSelect();
|
||||||
void RefreshSel();
|
void RefreshSel();
|
||||||
|
void DoLeftDown(Point p, dword);
|
||||||
|
|
||||||
bool DnDInsert(int i, int py, PasteClip& d, int q);
|
bool DnDInsert(int i, int py, PasteClip& d, int q);
|
||||||
void DnD(int _drop, bool _insert);
|
void DnD(int _drop, bool _insert);
|
||||||
|
|
|
||||||
|
|
@ -112,3 +112,4 @@ LAYOUT(PrinterLayout, 372, 264)
|
||||||
ITEM(Switch, landscape, SetLabel(t_("Portrait\nLandscape")).LeftPosZ(16, 168).TopPosZ(194, 18))
|
ITEM(Switch, landscape, SetLabel(t_("Portrait\nLandscape")).LeftPosZ(16, 168).TopPosZ(194, 18))
|
||||||
ITEM(LabelBox, dv___21, SetLabel(t_("Placement")).LeftPosZ(8, 356).TopPosZ(176, 48))
|
ITEM(LabelBox, dv___21, SetLabel(t_("Placement")).LeftPosZ(8, 356).TopPosZ(176, 48))
|
||||||
END_LAYOUT
|
END_LAYOUT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,4 +121,3 @@ file
|
||||||
COPYING,
|
COPYING,
|
||||||
COPYING-PLAIN,
|
COPYING-PLAIN,
|
||||||
AUTHORS;
|
AUTHORS;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public:
|
||||||
void Remove(int i);
|
void Remove(int i);
|
||||||
void ClearList();
|
void ClearList();
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
DropList& AddSeparator();
|
DropList& AddSeparator();
|
||||||
|
|
||||||
void Drop();
|
void Drop();
|
||||||
|
|
@ -149,7 +149,7 @@ public:
|
||||||
void Clear();
|
void Clear();
|
||||||
void Add(const Value& data);
|
void Add(const Value& data);
|
||||||
void Serialize(Stream& s);
|
void Serialize(Stream& s);
|
||||||
|
|
||||||
int GetCount() const { return list.GetCount(); }
|
int GetCount() const { return list.GetCount(); }
|
||||||
Value Get(int i) const { return list.Get(i, 0); }
|
Value Get(int i) const { return list.Get(i, 0); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ struct TextArrayOps {
|
||||||
bool GetWordSelection(int c, int& sell, int& selh);
|
bool GetWordSelection(int c, int& sell, int& selh);
|
||||||
int GetNextWord(int c);
|
int GetNextWord(int c);
|
||||||
int GetPrevWord(int c);
|
int GetPrevWord(int c);
|
||||||
|
|
||||||
virtual ~TextArrayOps() {}
|
virtual ~TextArrayOps() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ void FileList::LeftDown(Point p, dword flags) {
|
||||||
|
|
||||||
bool FileList::FindChar(int from, int chr) {
|
bool FileList::FindChar(int from, int chr) {
|
||||||
for(int i = max(0, from); i < GetCount(); i++) {
|
for(int i = max(0, from); i < GetCount(); i++) {
|
||||||
WString x = Get(i).name.ToWString(); // TRC patch 05/09/15; for CXL to check
|
WString x = Get(i).name.ToWString();
|
||||||
if(ToUpper(ToAscii(x[0])) == chr) {
|
if(ToUpper(ToAscii(x[0])) == chr) {
|
||||||
ClearSelection();
|
ClearSelection();
|
||||||
SetCursor(i);
|
SetCursor(i);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ class SliderCtrl : public Ctrl {
|
||||||
int SliderToClient(int value) const;
|
int SliderToClient(int value) const;
|
||||||
int ClientToSlider(int x) const;
|
int ClientToSlider(int x) const;
|
||||||
|
|
||||||
bool IsVert() const;
|
|
||||||
int HoVe(int x, int y) const;
|
int HoVe(int x, int y) const;
|
||||||
int& HoVeR(int& x, int& y) const;
|
int& HoVeR(int& x, int& y) const;
|
||||||
|
|
||||||
|
|
@ -36,6 +35,8 @@ public:
|
||||||
int GetMin() const { return min; }
|
int GetMin() const { return min; }
|
||||||
int GetMax() const { return max; }
|
int GetMax() const { return max; }
|
||||||
|
|
||||||
|
bool IsVert() const;
|
||||||
|
|
||||||
SliderCtrl& Step(int _step, bool _r = true) { step = _step; round_step = _r; return *this; }
|
SliderCtrl& Step(int _step, bool _r = true) { step = _step; round_step = _r; return *this; }
|
||||||
int GetStep() const { return step; }
|
int GetStep() const { return step; }
|
||||||
bool IsRoundStep() const { return round_step; }
|
bool IsRoundStep() const { return round_step; }
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ CH_STYLE(ToolButton, Style, StyleDefault)
|
||||||
|
|
||||||
CH_STYLE(ToolButton, Style, StyleSolid)
|
CH_STYLE(ToolButton, Style, StyleSolid)
|
||||||
{
|
{
|
||||||
const Button::Style& bs = Button::StyleNormal();
|
const Button::Style& bs = Button::StyleNormal();
|
||||||
look[0] = bs.look[0];
|
look[0] = bs.look[0];
|
||||||
look[1] = bs.look[1];
|
look[1] = bs.look[1];
|
||||||
look[2] = bs.look[2];
|
look[2] = bs.look[2];
|
||||||
|
|
|
||||||
|
|
@ -18,3 +18,4 @@ COMPRESSED
|
||||||
235,39,99,202,100,206,249,97,30,142,2,240,148,8,167,204,76,240,156,56,15,88,23,182,7,191,239,62,27,176,89,165,248,45,57,102,157,201,49,112,146,151,36,77,57,53,137,54,204,33,172,66,197,141,35,108,168,205,9,113,183,94,90,198,185,110,225,217,27,227,243,217,187,15,111,15,78,49,193,12,175,145,95,127,237,118,187,157,97,175,215,235,255,136,87,55,254,52,216,239,142,8,66,251,236,135,126,79,41,32,73,200,36,87,195,105,228,38,147,225,144,183,194,70,103,120,7,156,140,223,248,80,27,241,211,146,52,143,78,198,7,175,78,143,143,82,84,207,21,57,225,246,36,254,14,240,143,183,244,129,123,180,99,63,227,227,211,227,195,243,76,63,227,84,38,127,215,241,191,63,120,127,252,97,27,42,75,138,187,62,21,201,126,56,62,56,122,119,118,250,175,20,225,247,9,197,44,50,120,89,160,241,220,115,157,213,238,125,109,7,167,26,27,135,239,78,223,1,233,195,119,31,207,206,211,194,205,214,11,112,110,120,137,40,11,26,147,223,126,211,212,189,192,122,37,90,
|
235,39,99,202,100,206,249,97,30,142,2,240,148,8,167,204,76,240,156,56,15,88,23,182,7,191,239,62,27,176,89,165,248,45,57,102,157,201,49,112,146,151,36,77,57,53,137,54,204,33,172,66,197,141,35,108,168,205,9,113,183,94,90,198,185,110,225,217,27,227,243,217,187,15,111,15,78,49,193,12,175,145,95,127,237,118,187,157,97,175,215,235,255,136,87,55,254,52,216,239,142,8,66,251,236,135,126,79,41,32,73,200,36,87,195,105,228,38,147,225,144,183,194,70,103,120,7,156,140,223,248,80,27,241,211,146,52,143,78,198,7,175,78,143,143,82,84,207,21,57,225,246,36,254,14,240,143,183,244,129,123,180,99,63,227,227,211,227,195,243,76,63,227,84,38,127,215,241,191,63,120,127,252,97,27,42,75,138,187,62,21,201,126,56,62,56,122,119,118,250,175,20,225,247,9,197,44,50,120,89,160,241,220,115,157,213,238,125,109,7,167,26,27,135,239,78,223,1,233,195,119,31,207,206,211,194,205,214,11,112,110,120,137,40,11,26,147,223,126,211,212,189,192,122,37,90,
|
||||||
191,221,124,9,37,148,231,219,117,77,204,55,96,235,111,220,111,193,145,58,190,32,88,223,170,219,5,33,250,56,100,203,181,195,238,41,175,245,114,237,166,209,76,213,163,34,83,201,240,185,27,204,23,50,177,160,95,236,69,180,208,100,205,35,157,0,59,43,190,231,198,51,89,16,156,211,169,81,195,248,181,50,123,9,161,173,252,109,216,194,234,144,164,25,230,127,67,63,98,73,58,114,198,147,70,55,12,61,116,158,104,220,171,171,139,30,76,147,45,1,7,48,61,231,7,175,200,53,91,161,11,127,205,180,148,150,241,189,241,239,208,248,190,176,164,227,204,211,193,168,12,132,78,38,207,199,148,121,162,228,165,218,140,58,1,43,49,188,87,212,188,190,242,113,115,251,142,178,210,73,221,187,180,212,180,84,7,133,208,87,242,169,27,44,41,223,155,90,120,224,109,25,207,249,61,19,98,12,162,8,34,4,11,104,243,83,202,24,163,159,107,45,48,192,198,9,64,241,33,222,126,139,39,17,96,26,212,49,246,21,199,10,226,166,83,6,95,173,84,255,120,9,75,96,195,106,
|
191,221,124,9,37,148,231,219,117,77,204,55,96,235,111,220,111,193,145,58,190,32,88,223,170,219,5,33,250,56,100,203,181,195,238,41,175,245,114,237,166,209,76,213,163,34,83,201,240,185,27,204,23,50,177,160,95,236,69,180,208,100,205,35,157,0,59,43,190,231,198,51,89,16,156,211,169,81,195,248,181,50,123,9,161,173,252,109,216,194,234,144,164,25,230,127,67,63,98,73,58,114,198,147,70,55,12,61,116,158,104,220,171,171,139,30,76,147,45,1,7,48,61,231,7,175,200,53,91,161,11,127,205,180,148,150,241,189,241,239,208,248,190,176,164,227,204,211,193,168,12,132,78,38,207,199,148,121,162,228,165,218,140,58,1,43,49,188,87,212,188,190,242,113,115,251,142,178,210,73,221,187,180,212,180,84,7,133,208,87,242,169,27,44,41,223,155,90,120,224,109,25,207,249,61,19,98,12,162,8,34,4,11,104,243,83,202,24,163,159,107,45,48,192,198,9,64,241,33,222,126,139,39,17,96,26,212,49,246,21,199,10,226,166,83,6,95,173,84,255,120,9,75,96,195,106,
|
||||||
86,23,97,58,191,114,54,185,150,1,77,194,82,56,204,60,148,214,135,133,59,139,172,76,110,104,195,204,41,179,119,171,55,206,153,47,233,76,80,242,170,128,49,70,38,21,48,193,159,201,255,0,167,177,223,165,
|
86,23,97,58,191,114,54,185,150,1,77,194,82,56,204,60,148,214,135,133,59,139,172,76,110,104,195,204,41,179,119,171,55,206,153,47,233,76,80,242,170,128,49,70,38,21,48,193,159,201,255,0,167,177,223,165,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -220,11 +220,11 @@ class FontInfo : Moveable<FontInfo> {
|
||||||
bool operator==(const CharMetrics& b) const
|
bool operator==(const CharMetrics& b) const
|
||||||
{ return width == b.width && lspc == b.lspc && rspc == b.rspc; }
|
{ return width == b.width && lspc == b.lspc && rspc == b.rspc; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Kinfo : Moveable<Kinfo> {
|
struct Kinfo : Moveable<Kinfo> {
|
||||||
CharMetrics std;
|
CharMetrics std;
|
||||||
byte *flags;
|
byte *flags;
|
||||||
|
|
||||||
Kinfo() {
|
Kinfo() {
|
||||||
flags = NULL;
|
flags = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,10 +119,10 @@ struct ChPartMaker {
|
||||||
Image image;
|
Image image;
|
||||||
Color border;
|
Color border;
|
||||||
Color bg;
|
Color bg;
|
||||||
|
|
||||||
bool t, b, l, r;
|
bool t, b, l, r;
|
||||||
byte tl, tr, bl, br;
|
byte tl, tr, bl, br;
|
||||||
|
|
||||||
void ResetShape();
|
void ResetShape();
|
||||||
Image Make() const;
|
Image Make() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,39 +15,39 @@ NAMESPACE_UPP
|
||||||
class GLCtrl : public DHCtrl
|
class GLCtrl : public DHCtrl
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// OpenGL Context
|
// OpenGL Context
|
||||||
GLXContext WindowContext;
|
GLXContext WindowContext;
|
||||||
|
|
||||||
// Number of instances
|
// Number of instances
|
||||||
static int Instances;
|
static int Instances;
|
||||||
|
|
||||||
// Current instance number
|
// Current instance number
|
||||||
int InstanceNum;
|
int InstanceNum;
|
||||||
|
|
||||||
// OpenGL parameters
|
// OpenGL parameters
|
||||||
int DepthSize;
|
int DepthSize;
|
||||||
int StencilSize;
|
int StencilSize;
|
||||||
int NumberOfSamples;
|
int NumberOfSamples;
|
||||||
bool DoubleBuffering;
|
bool DoubleBuffering;
|
||||||
bool MultiSampleBuffering;
|
bool MultiSampleBuffering;
|
||||||
|
|
||||||
// Currently activated context number
|
// Currently activated context number
|
||||||
static int ContextActivated;
|
static int ContextActivated;
|
||||||
|
|
||||||
// Activates current OpenGL context
|
// Activates current OpenGL context
|
||||||
void ActivateContext();
|
void ActivateContext();
|
||||||
|
|
||||||
// Ovverridden method to choose the correct visual
|
// Ovverridden method to choose the correct visual
|
||||||
virtual XVisualInfo *CreateVisual(void);
|
virtual XVisualInfo *CreateVisual(void);
|
||||||
|
|
||||||
// Overridden method for attribute setting
|
// Overridden method for attribute setting
|
||||||
virtual void SetAttributes(unsigned long &ValueMask, XSetWindowAttributes &attr);
|
virtual void SetAttributes(unsigned long &ValueMask, XSetWindowAttributes &attr);
|
||||||
|
|
||||||
// Overridden method to create and destroy OpenGL context
|
// Overridden method to create and destroy OpenGL context
|
||||||
virtual void AfterInit(bool Error);
|
virtual void AfterInit(bool Error);
|
||||||
virtual void BeforeTerminate(void);
|
virtual void BeforeTerminate(void);
|
||||||
|
|
||||||
// Overridden method to resize GL windows
|
// Overridden method to resize GL windows
|
||||||
virtual void Resize(int w, int h);
|
virtual void Resize(int w, int h);
|
||||||
|
|
||||||
|
|
@ -57,46 +57,46 @@ class GLCtrl : public DHCtrl
|
||||||
// Paint method - with graphic context
|
// Paint method - with graphic context
|
||||||
// Called from DHCtrl - Graphic context is *not* uses
|
// Called from DHCtrl - Graphic context is *not* uses
|
||||||
virtual void Paint(Draw &/*draw*/);
|
virtual void Paint(Draw &/*draw*/);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Overridable methods for derived controls
|
// Overridable methods for derived controls
|
||||||
|
|
||||||
// Called after succesful OpenGL initialization
|
// Called after succesful OpenGL initialization
|
||||||
virtual void GLInit() {};
|
virtual void GLInit() {};
|
||||||
|
|
||||||
// Called just before OpenGL termination
|
// Called just before OpenGL termination
|
||||||
virtual void GLDone() {};
|
virtual void GLDone() {};
|
||||||
|
|
||||||
// Called on resize events
|
// Called on resize events
|
||||||
virtual void GLResize( int w, int h ) {};
|
virtual void GLResize( int w, int h ) {};
|
||||||
|
|
||||||
// Called on paint events
|
// Called on paint events
|
||||||
virtual void GLPaint() {};
|
virtual void GLPaint() {};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef GLCtrl CLASSNAME;
|
typedef GLCtrl CLASSNAME;
|
||||||
|
|
||||||
// Constructor class GLCtrl
|
// Constructor class GLCtrl
|
||||||
GLCtrl( int depthsize = 24,
|
GLCtrl( int depthsize = 24,
|
||||||
int stencilsize = 0,
|
int stencilsize = 0,
|
||||||
bool doublebuffer = true,
|
bool doublebuffer = true,
|
||||||
bool multisamplebuffering = false,
|
bool multisamplebuffering = false,
|
||||||
int numberofsamples = 0 );
|
int numberofsamples = 0 );
|
||||||
|
|
||||||
// Destructor class GLCtrl
|
// Destructor class GLCtrl
|
||||||
~GLCtrl();
|
~GLCtrl();
|
||||||
|
|
||||||
// Initializes OpenGL context to a standard view
|
// Initializes OpenGL context to a standard view
|
||||||
void StdView();
|
void StdView();
|
||||||
|
|
||||||
// Forces control repaint
|
// Forces control repaint
|
||||||
void PostPaintGL(); // same as Refresh()
|
void PostPaintGL(); // same as Refresh()
|
||||||
|
|
||||||
// Forces control resize
|
// Forces control resize
|
||||||
void PostResizeGL();
|
void PostResizeGL();
|
||||||
|
|
||||||
}; // END Class GLCtrl
|
}; // END Class GLCtrl
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -11,3 +11,4 @@ file
|
||||||
GLCtrl.h,
|
GLCtrl.h,
|
||||||
Win32GlCtrl.cpp,
|
Win32GlCtrl.cpp,
|
||||||
X11GLCtrl.cpp;
|
X11GLCtrl.cpp;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@ GLCtrl::GLCtrl( int depthsize, int stencilsize, bool doublebuffer,
|
||||||
{
|
{
|
||||||
// Sets the current instance number and updates total instances
|
// Sets the current instance number and updates total instances
|
||||||
InstanceNum = ++Instances;
|
InstanceNum = ++Instances;
|
||||||
|
|
||||||
WindowContext = NULL;
|
WindowContext = NULL;
|
||||||
|
|
||||||
DepthSize = depthsize;
|
DepthSize = depthsize;
|
||||||
StencilSize = stencilsize;
|
StencilSize = stencilsize;
|
||||||
DoubleBuffering = doublebuffer;
|
DoubleBuffering = doublebuffer;
|
||||||
NumberOfSamples = numberofsamples;
|
NumberOfSamples = numberofsamples;
|
||||||
|
|
||||||
} // END Constructor class GLCtrl
|
} // END Constructor class GLCtrl
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -37,7 +37,7 @@ GLCtrl::~GLCtrl()
|
||||||
glXDestroyContext( (Display *)Xdisplay, WindowContext );
|
glXDestroyContext( (Display *)Xdisplay, WindowContext );
|
||||||
WindowContext = NULL;
|
WindowContext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // END Destructor class GLCtrl
|
} // END Destructor class GLCtrl
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -69,12 +69,12 @@ XVisualInfo *GLCtrl::CreateVisual(void)
|
||||||
SetError(true);
|
SetError(true);
|
||||||
SetErrorMessage("GLCtrl : Impossible to find a suitable visual.");
|
SetErrorMessage("GLCtrl : Impossible to find a suitable visual.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return visualInfo;
|
return visualInfo;
|
||||||
|
|
||||||
} // END GLCtrl::CreateVisual()
|
} // END GLCtrl::CreateVisual()
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Overridden method for attribute setting
|
// Overridden method for attribute setting
|
||||||
void GLCtrl::SetAttributes(unsigned long &ValueMask, XSetWindowAttributes &winAttributes)
|
void GLCtrl::SetAttributes(unsigned long &ValueMask, XSetWindowAttributes &winAttributes)
|
||||||
|
|
@ -108,7 +108,7 @@ void GLCtrl::AfterInit(bool Error)
|
||||||
{
|
{
|
||||||
// Gets the activw XVisualInfo
|
// Gets the activw XVisualInfo
|
||||||
XVisualInfo visualInfo = GetVisualInfo();
|
XVisualInfo visualInfo = GetVisualInfo();
|
||||||
|
|
||||||
// Create an OpenGL rendering context
|
// Create an OpenGL rendering context
|
||||||
WindowContext = glXCreateContext
|
WindowContext = glXCreateContext
|
||||||
(
|
(
|
||||||
|
|
@ -123,10 +123,10 @@ void GLCtrl::AfterInit(bool Error)
|
||||||
SetErrorMessage("GLCtrl : Error creating GLX context.");
|
SetErrorMessage("GLCtrl : Error creating GLX context.");
|
||||||
SetError(true);
|
SetError(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activate the created glxwindow
|
// Activate the created glxwindow
|
||||||
glXMakeCurrent( (Display*)Xdisplay, GetWindow(), WindowContext );
|
glXMakeCurrent( (Display*)Xdisplay, GetWindow(), WindowContext );
|
||||||
|
|
||||||
// Call user init function
|
// Call user init function
|
||||||
GLInit();
|
GLInit();
|
||||||
|
|
||||||
|
|
@ -143,7 +143,7 @@ void GLCtrl::BeforeTerminate(void)
|
||||||
{
|
{
|
||||||
// Calls user terminate function
|
// Calls user terminate function
|
||||||
GLDone();
|
GLDone();
|
||||||
|
|
||||||
// Resets context and destroys it
|
// Resets context and destroys it
|
||||||
glXMakeCurrent( (Display*)Xdisplay, None, NULL );
|
glXMakeCurrent( (Display*)Xdisplay, None, NULL );
|
||||||
glXDestroyContext( (Display *)Xdisplay, WindowContext );
|
glXDestroyContext( (Display *)Xdisplay, WindowContext );
|
||||||
|
|
@ -158,7 +158,7 @@ void GLCtrl::Resize(int x, int y)
|
||||||
{
|
{
|
||||||
// Activates the current context
|
// Activates the current context
|
||||||
ActivateContext();
|
ActivateContext();
|
||||||
|
|
||||||
// Calls user resize hook
|
// Calls user resize hook
|
||||||
GLResize(x, y);
|
GLResize(x, y);
|
||||||
|
|
||||||
|
|
@ -190,7 +190,7 @@ void GLCtrl::Paint(Draw &draw)
|
||||||
{
|
{
|
||||||
// Calls internal OpenGL Paint method
|
// Calls internal OpenGL Paint method
|
||||||
doPaint();
|
doPaint();
|
||||||
|
|
||||||
} // END GLCtrl::Paint()
|
} // END GLCtrl::Paint()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -201,7 +201,7 @@ void GLCtrl::PostResizeGL()
|
||||||
// Gets sizes from Control
|
// Gets sizes from Control
|
||||||
int w = GetSize().cx,
|
int w = GetSize().cx,
|
||||||
h = GetSize().cy;
|
h = GetSize().cy;
|
||||||
|
|
||||||
// Calls Resize method
|
// Calls Resize method
|
||||||
Resize(w, h);
|
Resize(w, h);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class TTFReader {
|
||||||
TTFStream& operator%(uint32& q);
|
TTFStream& operator%(uint32& q);
|
||||||
TTFStream& operator%(int16& q);
|
TTFStream& operator%(int16& q);
|
||||||
TTFStream& operator%(uint16& q);
|
TTFStream& operator%(uint16& q);
|
||||||
|
|
||||||
virtual ~TTFStream() {}
|
virtual ~TTFStream() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ class TTFReader {
|
||||||
int Get16();
|
int Get16();
|
||||||
int Get32();
|
int Get32();
|
||||||
String Get(int n);
|
String Get(int n);
|
||||||
|
|
||||||
virtual ~TTFStreamIn() {}
|
virtual ~TTFStreamIn() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -195,3 +195,4 @@ LAYOUT(CellPropertiesLayout, 300, 260)
|
||||||
ITEM(Button, ok, SetLabel(t_("OK")).LeftPosZ(164, 64).TopPosZ(232, 24))
|
ITEM(Button, ok, SetLabel(t_("OK")).LeftPosZ(164, 64).TopPosZ(232, 24))
|
||||||
ITEM(Button, cancel, SetLabel(t_("Cancel")).LeftPosZ(232, 64).TopPosZ(232, 24))
|
ITEM(Button, cancel, SetLabel(t_("Cancel")).LeftPosZ(232, 64).TopPosZ(232, 24))
|
||||||
END_LAYOUT
|
END_LAYOUT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ struct RichPara {
|
||||||
NUMBER_i,
|
NUMBER_i,
|
||||||
NUMBER_I,
|
NUMBER_I,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LINESPACING {
|
enum LINESPACING {
|
||||||
LSP10 = 0,
|
LSP10 = 0,
|
||||||
LSP15 = -1,
|
LSP15 = -1,
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ public:
|
||||||
|
|
||||||
virtual String Savepoint();
|
virtual String Savepoint();
|
||||||
virtual void RollbackTo(const String& savepoint);
|
virtual void RollbackTo(const String& savepoint);
|
||||||
|
|
||||||
virtual bool IsOpen() const;
|
virtual bool IsOpen() const;
|
||||||
|
|
||||||
virtual RunScript GetRunScript() const;
|
virtual RunScript GetRunScript() const;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ enum { ADD_SCHEMA_PREFIX_CPP2(name,_WIDTH) = width, ADD_SCHEMA_PREFIX_CPP2(name,
|
||||||
|
|
||||||
#define COLUMN_ARRAY(type, ctype, name, width, prec, items) \
|
#define COLUMN_ARRAY(type, ctype, name, width, prec, items) \
|
||||||
enum { ADD_SCHEMA_PREFIX_CPP2(name,_WIDTH) = width, ADD_SCHEMA_PREFIX_CPP2(name,_PRECISION) = prec }; ctype ADD_SCHEMA_PREFIX_CPP(name)[items];
|
enum { ADD_SCHEMA_PREFIX_CPP2(name,_WIDTH) = width, ADD_SCHEMA_PREFIX_CPP2(name,_PRECISION) = prec }; ctype ADD_SCHEMA_PREFIX_CPP(name)[items];
|
||||||
|
|
||||||
#define END_TYPE };
|
#define END_TYPE };
|
||||||
|
|
||||||
#include SCHEMADIALECT
|
#include SCHEMADIALECT
|
||||||
|
|
@ -39,7 +39,7 @@ enum { ADD_SCHEMA_PREFIX_CPP2(name,_WIDTH) = width, ADD_SCHEMA_PREFIX_CPP2(name,
|
||||||
|
|
||||||
// SqlId
|
// SqlId
|
||||||
|
|
||||||
#define DOID(x) extern SqlId ADD_SCHEMA_PREFIX_CPP(x);
|
#define DOID(x) extern SqlId ADD_SCHEMA_PREFIX_CPP(x);
|
||||||
//#define DOID(x) extern SqlId x;
|
//#define DOID(x) extern SqlId x;
|
||||||
|
|
||||||
#include SCHEMADIALECT
|
#include SCHEMADIALECT
|
||||||
|
|
|
||||||
|
|
@ -698,6 +698,44 @@ String Socket::ReadUntil(char term, int timeout, int maxlen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Find(const String& s, Gate1<int> term, int seek)
|
||||||
|
{
|
||||||
|
for(int i = seek; i < s.GetCount(); i++)
|
||||||
|
if(term(s[i]))
|
||||||
|
return i;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
String Socket::ReadUntil(Gate1<int> term, int& termchar, int timeout, int maxlen)
|
||||||
|
{
|
||||||
|
SLOG("Socket::RecvUntil(term = " << (int)term << ", maxlen = " << maxlen << ", timeout = " << timeout << ")");
|
||||||
|
ASSERT(IsOpen() && maxlen != 0);
|
||||||
|
int ticks = GetTickCount(), end_ticks = IsNull(timeout) ? int(Null) : ticks + timeout, seek = 0;
|
||||||
|
String out = Read(timeout, maxlen);
|
||||||
|
if(out.IsVoid())
|
||||||
|
return out;
|
||||||
|
|
||||||
|
for(;;) {
|
||||||
|
int f = Find(out, term, seek);
|
||||||
|
if(f >= 0) {
|
||||||
|
termchar = out[f];
|
||||||
|
data->leftover = String(out.Begin() + f + 1, out.GetLength() - f - 1) + data->leftover;
|
||||||
|
return out.Left(f);
|
||||||
|
}
|
||||||
|
seek = out.GetLength();
|
||||||
|
ticks = GetTickCount();
|
||||||
|
if(!IsNull(timeout)) timeout = end_ticks - ticks;
|
||||||
|
if(!IsNull(timeout) && timeout <= 0 || out.GetLength() >= maxlen)
|
||||||
|
return out;
|
||||||
|
String part = Read(timeout, maxlen - out.GetLength());
|
||||||
|
if(part.IsVoid()) {
|
||||||
|
SLOG("term " << (int)term << " not found in: " << out);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
out.Cat(part);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Socket::UnRead(const void *buffer, int len)
|
void Socket::UnRead(const void *buffer, int len)
|
||||||
{
|
{
|
||||||
ASSERT(len >= 0);
|
ASSERT(len >= 0);
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ public:
|
||||||
int ReadCount(void *buffer, int count, int timeout_msec = Null);
|
int ReadCount(void *buffer, int count, int timeout_msec = Null);
|
||||||
String ReadCount(int count, int timeout_msec = Null);
|
String ReadCount(int count, int timeout_msec = Null);
|
||||||
String ReadUntil(char term, int timeout_msec = Null, int maxlen = 1000000);
|
String ReadUntil(char term, int timeout_msec = Null, int maxlen = 1000000);
|
||||||
|
String ReadUntil(Gate1<int> term, int& termchar, int timeout = Null, int maxlen = 1000000);
|
||||||
void UnRead(const void *buffer, int len);
|
void UnRead(const void *buffer, int len);
|
||||||
void UnRead(String data) { UnRead(data.Begin(), data.GetLength()); }
|
void UnRead(String data) { UnRead(data.Begin(), data.GetLength()); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,3 +11,4 @@ file
|
||||||
|
|
||||||
mainconfig
|
mainconfig
|
||||||
"" = "GUI";
|
"" = "GUI";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ XmlView::XmlView()
|
||||||
dir = GetCurrentDirectory();
|
dir = GetCurrentDirectory();
|
||||||
|
|
||||||
Icon(XmlImg::Icon());
|
Icon(XmlImg::Icon());
|
||||||
|
|
||||||
xml.WhenLeftDouble = THISBACK(CopyPath);
|
xml.WhenLeftDouble = THISBACK(CopyPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -365,11 +365,11 @@ public:
|
||||||
|
|
||||||
void Open(const String& grouppath);
|
void Open(const String& grouppath);
|
||||||
void GoTo(const String& topic, const String& link);
|
void GoTo(const String& topic, const String& link);
|
||||||
|
|
||||||
static int GetSerial();
|
static int GetSerial();
|
||||||
|
|
||||||
static void SerializeEditPos(Stream& s);
|
static void SerializeEditPos(Stream& s);
|
||||||
|
|
||||||
void Serialize(Stream& s);
|
void Serialize(Stream& s);
|
||||||
|
|
||||||
TopicEditor();
|
TopicEditor();
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public:
|
||||||
virtual bool IdeDebugUnLock() = 0;
|
virtual bool IdeDebugUnLock() = 0;
|
||||||
virtual bool IdeIsDebugLock() const = 0;
|
virtual bool IdeIsDebugLock() const = 0;
|
||||||
virtual void IdeSetBar() = 0;
|
virtual void IdeSetBar() = 0;
|
||||||
|
|
||||||
virtual ~IdeContext() {}
|
virtual ~IdeContext() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -129,7 +129,7 @@ struct IdeModule {
|
||||||
virtual IdeDesigner *CreateDesigner(Ide *ide, const char *path, byte charset) { return CreateDesigner(path, charset); }
|
virtual IdeDesigner *CreateDesigner(Ide *ide, const char *path, byte charset) { return CreateDesigner(path, charset); }
|
||||||
virtual IdeDesigner *CreateDesigner(const char *path, byte charset) { return NULL; }
|
virtual IdeDesigner *CreateDesigner(const char *path, byte charset) { return NULL; }
|
||||||
virtual void Serialize(Stream& s) {}
|
virtual void Serialize(Stream& s) {}
|
||||||
|
|
||||||
virtual ~IdeModule() {}
|
virtual ~IdeModule() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ void Ide::FormatCode()
|
||||||
Formatter.setTabIndentation(editortabsize, true);
|
Formatter.setTabIndentation(editortabsize, true);
|
||||||
else
|
else
|
||||||
Formatter.setSpaceIndentation(indent_amount);
|
Formatter.setSpaceIndentation(indent_amount);
|
||||||
|
|
||||||
WString Dest = FormatCodeString(Src, Formatter);
|
WString Dest = FormatCodeString(Src, Formatter);
|
||||||
|
|
||||||
editor.NextUndo();
|
editor.NextUndo();
|
||||||
|
|
|
||||||
|
|
@ -261,11 +261,11 @@ String DefaultInstallFolder()
|
||||||
DefaultFolder = "upp-svn";
|
DefaultFolder = "upp-svn";
|
||||||
else if(ExeTitle.Find("DEV") >= 0)
|
else if(ExeTitle.Find("DEV") >= 0)
|
||||||
DefaultFolder = "upp-dev";
|
DefaultFolder = "upp-dev";
|
||||||
else if(ExeTitle.Find("BETA") >= 0)
|
else if(ExeTitle.Find("BETA") >= 0)
|
||||||
DefaultFolder = "upp-beta";
|
DefaultFolder = "upp-beta";
|
||||||
else
|
else
|
||||||
DefaultFolder = "upp";
|
DefaultFolder = "upp";
|
||||||
|
|
||||||
return DefaultFolder;
|
return DefaultFolder;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -329,9 +329,9 @@ bool Install()
|
||||||
Progress pi;
|
Progress pi;
|
||||||
if(dlg.Run() != IDOK) return true;
|
if(dlg.Run() != IDOK) return true;
|
||||||
String upp(dlg.path);
|
String upp(dlg.path);
|
||||||
|
|
||||||
SaveFile(ConfigFile("installpath"), upp);
|
SaveFile(ConfigFile("installpath"), upp);
|
||||||
|
|
||||||
String uppsrc;
|
String uppsrc;
|
||||||
String pp;
|
String pp;
|
||||||
String out = AppendFileName(upp, "out");
|
String out = AppendFileName(upp, "out");
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ struct LayDesModule : public IdeModule {
|
||||||
s / version;
|
s / version;
|
||||||
SerializeLayEditPos(s);
|
SerializeLayEditPos(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~LayDesModule() {}
|
virtual ~LayDesModule() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,4 +56,3 @@ COMPRESSED
|
||||||
31,88,15,187,57,245,126,171,170,37,149,239,239,127,121,170,151,24,111,47,79,117,93,24,247,189,68,21,231,88,2,91,37,219,79,123,48,129,83,120,164,191,209,213,170,206,185,111,114,197,170,165,224,13,175,90,181,118,209,163,92,185,106,37,205,35,92,189,234,169,190,119,95,193,234,98,144,189,220,160,114,241,106,9,209,94,180,197,126,247,160,115,62,232,138,225,187,174,233,141,213,27,232,126,88,135,226,109,191,219,197,75,8,15,222,117,250,71,221,22,62,215,239,226,19,39,167,102,36,61,7,117,199,114,6,130,167,79,233,115,247,47,195,238,201,80,156,117,251,239,123,195,33,140,186,255,73,116,206,206,96,146,206,254,49,60,222,249,104,183,209,253,203,65,247,108,40,62,190,235,158,136,83,156,237,99,15,150,55,24,118,240,189,222,137,248,216,239,13,123,39,71,52,46,118,226,234,247,142,222,13,197,187,211,227,195,110,159,218,117,61,61,237,155,193,104,0,190,82,172,59,16,103,253,211,15,189,67,127,175,163,39,157,1,108,103,244,196,92,112,102,118,3,187,238,156,
|
31,88,15,187,57,245,126,171,170,37,149,239,239,127,121,170,151,24,111,47,79,117,93,24,247,189,68,21,231,88,2,91,37,219,79,123,48,129,83,120,164,191,209,213,170,206,185,111,114,197,170,165,224,13,175,90,181,118,209,163,92,185,106,37,205,35,92,189,234,169,190,119,95,193,234,98,144,189,220,160,114,241,106,9,209,94,180,197,126,247,160,115,62,232,138,225,187,174,233,141,213,27,232,126,88,135,226,109,191,219,197,75,8,15,222,117,250,71,221,22,62,215,239,226,19,39,167,102,36,61,7,117,199,114,6,130,167,79,233,115,247,47,195,238,201,80,156,117,251,239,123,195,33,140,186,255,73,116,206,206,96,146,206,254,49,60,222,249,104,183,209,253,203,65,247,108,40,62,190,235,158,136,83,156,237,99,15,150,55,24,118,240,189,222,137,248,216,239,13,123,39,71,52,46,118,226,234,247,142,222,13,197,187,211,227,195,110,159,218,117,61,61,237,155,193,104,0,190,82,172,59,16,103,253,211,15,189,67,127,175,163,39,157,1,108,103,244,196,92,112,102,118,3,187,238,156,
|
||||||
88,192,253,220,59,57,108,137,110,143,134,236,254,229,172,223,29,32,128,96,203,189,247,176,149,46,252,216,59,57,56,62,63,164,222,96,251,48,210,201,233,16,230,129,45,195,99,195,83,130,157,53,60,248,29,61,27,46,15,230,43,223,142,134,77,197,154,174,71,51,67,217,107,210,8,214,48,24,156,80,191,55,248,89,192,214,212,9,252,249,188,99,6,132,99,128,177,222,119,78,14,232,100,221,85,57,24,128,224,16,159,78,207,49,126,8,112,57,62,244,192,134,160,236,138,195,238,219,238,193,176,247,1,240,2,158,132,233,6,231,239,237,96,124,66,131,33,1,242,248,88,156,116,15,96,31,248,246,160,219,255,208,59,32,56,245,187,103,157,94,95,80,91,181,126,31,71,59,61,169,231,138,47,219,120,252,128,210,221,15,136,76,231,39,199,8,149,126,247,207,231,176,223,26,148,194,49,59,71,128,190,8,124,120,213,162,171,194,160,143,61,88,20,94,103,87,70,163,22,189,10,63,88,244,249,4,8,121,42,222,119,62,113,143,55,139,21,140,112,176,12,211,12,206,199,47,
|
88,192,253,220,59,57,108,137,110,143,134,236,254,229,172,223,29,32,128,96,203,189,247,176,149,46,252,216,59,57,56,62,63,164,222,96,251,48,210,201,233,16,230,129,45,195,99,195,83,130,157,53,60,248,29,61,27,46,15,230,43,223,142,134,77,197,154,174,71,51,67,217,107,210,8,214,48,24,156,80,191,55,248,89,192,214,212,9,252,249,188,99,6,132,99,128,177,222,119,78,14,232,100,221,85,57,24,128,224,16,159,78,207,49,126,8,112,57,62,244,192,134,160,236,138,195,238,219,238,193,176,247,1,240,2,158,132,233,6,231,239,237,96,124,66,131,33,1,242,248,88,156,116,15,96,31,248,246,160,219,255,208,59,32,56,245,187,103,157,94,95,80,91,181,126,31,71,59,61,169,231,138,47,219,120,252,128,210,221,15,136,76,231,39,199,8,149,126,247,207,231,176,223,26,148,194,49,59,71,128,190,8,124,120,213,162,171,194,160,143,61,88,20,94,103,87,70,163,22,189,10,63,88,244,249,4,8,121,42,222,119,62,113,143,55,139,21,140,112,176,12,211,12,206,199,47,
|
||||||
56,2,139,246,157,253,83,132,213,62,254,76,203,132,133,1,224,204,96,120,196,135,157,247,157,163,238,192,65,38,90,138,234,87,215,18,131,179,238,65,15,255,1,191,3,50,3,174,28,11,7,227,15,78,129,108,255,124,142,88,0,63,168,193,68,7,208,1,71,66,252,230,35,23,72,244,136,187,39,26,215,96,45,138,17,84,208,97,203,174,165,138,215,226,248,116,64,200,123,216,25,118,4,237,0,254,222,239,194,211,102,160,126,247,4,224,74,4,220,57,56,56,239,3,49,227,147,248,38,172,110,112,14,228,221,59,225,67,68,68,34,54,210,235,31,26,202,197,243,176,80,234,244,142,207,251,26,119,205,34,97,37,167,0,106,28,154,112,215,30,224,224,244,237,16,232,172,187,221,34,220,17,189,183,86,132,156,31,188,83,167,142,147,184,7,254,14,142,110,191,11,143,119,14,63,244,136,210,121,62,160,181,65,79,193,12,190,194,17,204,112,10,222,141,29,8,225,207,157,151,186,226,165,72,230,210,36,113,241,255,0,68,186,0,53,
|
56,2,139,246,157,253,83,132,213,62,254,76,203,132,133,1,224,204,96,120,196,135,157,247,157,163,238,192,65,38,90,138,234,87,215,18,131,179,238,65,15,255,1,191,3,50,3,174,28,11,7,227,15,78,129,108,255,124,142,88,0,63,168,193,68,7,208,1,71,66,252,230,35,23,72,244,136,187,39,26,215,96,45,138,17,84,208,97,203,174,165,138,215,226,248,116,64,200,123,216,25,118,4,237,0,254,222,239,194,211,102,160,126,247,4,224,74,4,220,57,56,56,239,3,49,227,147,248,38,172,110,112,14,228,221,59,225,67,68,68,34,54,210,235,31,26,202,197,243,176,80,234,244,142,207,251,26,119,205,34,97,37,167,0,106,28,154,112,215,30,224,224,244,237,16,232,172,187,221,34,220,17,189,183,86,132,156,31,188,83,167,142,147,184,7,254,14,142,110,191,11,143,119,14,63,244,136,210,121,62,160,181,65,79,193,12,190,194,17,204,112,10,222,141,29,8,225,207,157,151,186,226,165,72,230,210,36,113,241,255,0,68,186,0,53,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,3 @@ COMPRESSED
|
||||||
201,113,84,194,11,244,77,255,14,67,170,98,248,243,53,30,217,121,120,206,28,114,163,22,253,158,159,64,100,169,102,105,34,77,252,8,239,138,147,227,119,172,173,150,126,53,131,106,161,240,52,175,162,232,216,89,220,186,44,29,58,59,106,105,195,93,176,97,83,122,139,113,150,40,16,246,233,117,228,105,53,25,219,59,188,55,242,218,126,123,147,193,96,228,51,245,115,175,109,203,149,214,173,54,202,189,66,133,107,216,213,97,144,130,221,219,8,127,224,154,73,121,7,234,76,5,187,216,219,85,239,36,11,205,148,79,70,8,16,184,151,242,200,40,27,202,156,172,50,108,11,40,157,201,83,193,68,179,236,157,85,70,69,128,164,238,226,220,94,90,222,92,75,160,101,195,157,84,157,173,42,235,197,195,29,43,253,216,167,197,201,248,194,27,231,89,191,228,222,10,230,84,182,179,45,181,60,28,243,8,201,186,142,61,19,143,93,178,195,152,146,184,147,90,94,224,56,112,55,55,52,81,237,206,181,75,203,113,26,169,121,215,102,89,116,125,94,192,239,119,14,180,77,171,245,16,
|
201,113,84,194,11,244,77,255,14,67,170,98,248,243,53,30,217,121,120,206,28,114,163,22,253,158,159,64,100,169,102,105,34,77,252,8,239,138,147,227,119,172,173,150,126,53,131,106,161,240,52,175,162,232,216,89,220,186,44,29,58,59,106,105,195,93,176,97,83,122,139,113,150,40,16,246,233,117,228,105,53,25,219,59,188,55,242,218,126,123,147,193,96,228,51,245,115,175,109,203,149,214,173,54,202,189,66,133,107,216,213,97,144,130,221,219,8,127,224,154,73,121,7,234,76,5,187,216,219,85,239,36,11,205,148,79,70,8,16,184,151,242,200,40,27,202,156,172,50,108,11,40,157,201,83,193,68,179,236,157,85,70,69,128,164,238,226,220,94,90,222,92,75,160,101,195,157,84,157,173,42,235,197,195,29,43,253,216,167,197,201,248,194,27,231,89,191,228,222,10,230,84,182,179,45,181,60,28,243,8,201,186,142,61,19,143,93,178,195,152,146,184,147,90,94,224,56,112,55,55,52,81,237,206,181,75,203,113,26,169,121,215,102,89,116,125,94,192,239,119,14,180,77,171,245,16,
|
||||||
137,181,239,103,241,108,119,227,158,34,154,191,147,72,98,216,149,81,92,234,137,20,154,202,94,121,143,192,159,191,187,58,173,22,170,205,20,101,167,198,46,85,25,173,96,58,232,84,161,196,155,216,1,93,198,48,37,174,137,123,94,149,223,174,89,222,160,211,176,221,60,150,237,164,248,10,88,170,200,68,93,115,97,179,148,116,135,189,46,110,221,167,106,236,222,35,235,46,242,104,165,180,35,91,137,50,78,77,54,14,77,209,36,91,226,214,56,89,126,234,53,141,118,119,31,232,241,99,138,237,21,158,54,167,40,80,194,55,13,70,138,162,143,63,110,36,109,76,5,97,15,47,71,38,188,29,173,46,239,78,59,114,9,194,138,119,157,85,13,231,174,20,164,6,89,36,246,225,138,89,140,160,190,119,87,120,44,200,238,71,26,148,34,127,77,184,61,217,210,176,43,198,235,81,205,188,200,105,164,241,91,39,171,45,97,205,171,176,27,30,203,163,125,235,38,123,245,38,242,120,51,255,208,183,55,130,58,182,2,183,131,59,44,9,3,115,4,47,74,189,124,80,161,87,220,215,
|
137,181,239,103,241,108,119,227,158,34,154,191,147,72,98,216,149,81,92,234,137,20,154,202,94,121,143,192,159,191,187,58,173,22,170,205,20,101,167,198,46,85,25,173,96,58,232,84,161,196,155,216,1,93,198,48,37,174,137,123,94,149,223,174,89,222,160,211,176,221,60,150,237,164,248,10,88,170,200,68,93,115,97,179,148,116,135,189,46,110,221,167,106,236,222,35,235,46,242,104,165,180,35,91,137,50,78,77,54,14,77,209,36,91,226,214,56,89,126,234,53,141,118,119,31,232,241,99,138,237,21,158,54,167,40,80,194,55,13,70,138,162,143,63,110,36,109,76,5,97,15,47,71,38,188,29,173,46,239,78,59,114,9,194,138,119,157,85,13,231,174,20,164,6,89,36,246,225,138,89,140,160,190,119,87,120,44,200,238,71,26,148,34,127,77,184,61,217,210,176,43,198,235,81,205,188,200,105,164,241,91,39,171,45,97,205,171,176,27,30,203,163,125,235,38,123,245,38,242,120,51,255,208,183,55,130,58,182,2,183,131,59,44,9,3,115,4,47,74,189,124,80,161,87,220,215,
|
||||||
247,168,12,77,188,50,191,178,96,57,32,207,221,9,71,78,165,156,81,185,14,214,240,235,84,93,52,114,79,86,232,135,131,206,60,237,190,113,239,22,177,34,179,241,225,53,105,54,119,221,245,142,204,205,29,99,104,20,26,150,6,97,71,188,227,126,247,47,142,56,136,143,63,206,215,239,172,248,47,255,7,168,39,54,51,
|
247,168,12,77,188,50,191,178,96,57,32,207,221,9,71,78,165,156,81,185,14,214,240,235,84,93,52,114,79,86,232,135,131,206,60,237,190,113,239,22,177,34,179,241,225,53,105,54,119,221,245,142,204,205,29,99,104,20,26,150,6,97,71,188,227,126,247,47,142,56,136,143,63,206,215,239,172,248,47,255,7,168,39,54,51,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,3 @@ COMPRESSED
|
||||||
194,12,234,34,125,118,51,181,87,51,150,28,33,87,72,12,60,145,149,136,158,76,83,200,185,45,123,110,149,189,104,97,157,69,52,231,5,33,154,187,205,17,229,135,153,218,29,140,14,79,164,41,56,59,231,190,1,250,180,103,142,177,162,100,120,146,57,30,217,182,188,205,172,114,3,38,221,130,103,146,200,82,246,210,68,234,208,42,193,30,34,135,46,89,51,69,221,104,28,83,196,16,104,46,249,217,206,220,224,204,94,122,217,118,173,90,201,59,82,22,124,84,103,50,244,18,5,194,50,253,2,189,153,141,4,23,150,111,12,188,43,143,181,192,96,48,146,241,139,109,151,101,198,30,211,142,230,51,183,169,115,174,126,94,139,67,11,230,79,252,252,138,189,39,234,170,168,226,231,248,193,219,121,213,92,36,85,136,186,165,147,222,73,238,158,204,95,75,28,198,55,70,25,150,1,140,214,232,60,199,5,18,236,185,81,198,185,0,77,157,31,115,184,104,201,181,92,24,43,173,206,69,47,216,202,140,78,92,157,51,211,215,221,154,49,41,95,120,108,219,42,167,29,51,7,167,
|
194,12,234,34,125,118,51,181,87,51,150,28,33,87,72,12,60,145,149,136,158,76,83,200,185,45,123,110,149,189,104,97,157,69,52,231,5,33,154,187,205,17,229,135,153,218,29,140,14,79,164,41,56,59,231,190,1,250,180,103,142,177,162,100,120,146,57,30,217,182,188,205,172,114,3,38,221,130,103,146,200,82,246,210,68,234,208,42,193,30,34,135,46,89,51,69,221,104,28,83,196,16,104,46,249,217,206,220,224,204,94,122,217,118,173,90,201,59,82,22,124,84,103,50,244,18,5,194,50,253,2,189,153,141,4,23,150,111,12,188,43,143,181,192,96,48,146,241,139,109,151,101,198,30,211,142,230,51,183,169,115,174,126,94,139,67,11,230,79,252,252,138,189,39,234,170,168,226,231,248,193,219,121,213,92,36,85,136,186,165,147,222,73,238,158,204,95,75,28,198,55,70,25,150,1,140,214,232,60,199,5,18,236,185,81,198,185,0,77,157,31,115,184,104,201,181,92,24,43,173,206,69,47,216,202,140,78,92,157,51,211,215,221,154,49,41,95,120,108,219,42,167,29,51,7,167,
|
||||||
74,203,214,140,74,230,11,58,133,100,237,181,53,30,10,238,177,125,184,180,248,58,58,60,192,217,25,59,62,166,137,114,151,246,121,218,41,39,31,237,183,79,103,68,71,219,41,194,226,245,146,166,96,54,47,163,241,214,197,4,129,237,200,223,80,68,253,151,18,73,16,63,82,11,173,56,253,169,130,226,54,179,48,201,239,191,220,223,204,166,178,133,40,101,46,199,78,103,25,197,131,216,129,77,137,17,79,227,43,116,41,195,24,62,34,46,184,148,30,171,122,120,138,78,195,151,146,120,182,141,226,78,225,169,34,35,117,220,142,79,80,98,215,236,9,113,241,38,154,99,223,222,179,46,253,247,102,202,149,127,38,156,25,83,145,13,85,99,32,194,150,56,212,54,150,135,122,68,163,93,222,120,111,249,65,249,236,8,79,115,42,79,81,124,199,121,70,148,162,11,221,79,69,44,76,249,228,2,65,134,14,187,174,53,218,164,35,182,115,26,158,28,113,77,176,178,190,211,125,57,41,79,22,137,221,99,103,9,156,224,98,225,50,117,159,146,222,212,212,24,121,242,104,242,100,99,
|
74,203,214,140,74,230,11,58,133,100,237,181,53,30,10,238,177,125,184,180,248,58,58,60,192,217,25,59,62,166,137,114,151,246,121,218,41,39,31,237,183,79,103,68,71,219,41,194,226,245,146,166,96,54,47,163,241,214,197,4,129,237,200,223,80,68,253,151,18,73,16,63,82,11,173,56,253,169,130,226,54,179,48,201,239,191,220,223,204,166,178,133,40,101,46,199,78,103,25,197,131,216,129,77,137,17,79,227,43,116,41,195,24,62,34,46,184,148,30,171,122,120,138,78,195,151,146,120,182,141,226,78,225,169,34,35,117,220,142,79,80,98,215,236,9,113,241,38,154,99,223,222,179,46,253,247,102,202,149,127,38,156,25,83,145,13,85,99,32,194,150,56,212,54,150,135,122,68,163,93,222,120,111,249,65,249,236,8,79,115,42,79,81,124,199,121,70,148,162,11,221,79,69,44,76,249,228,2,65,134,14,187,174,53,218,164,35,182,115,26,158,28,113,77,176,178,190,211,125,57,41,79,22,137,221,99,103,9,156,224,98,225,50,117,159,146,222,212,212,24,121,242,104,242,100,99,
|
||||||
70,205,62,55,28,213,114,107,131,156,124,140,48,179,49,90,20,230,92,114,171,254,62,83,91,52,79,179,71,143,253,247,199,253,119,101,107,254,64,203,150,143,205,141,45,167,133,222,190,73,23,70,53,188,116,78,63,119,28,221,96,226,52,241,72,255,200,128,105,137,220,119,41,172,217,20,50,198,249,209,65,142,48,65,213,6,252,55,100,185,174,90,185,238,167,221,228,111,28,34,150,191,55,84,61,34,245,158,30,149,92,181,181,194,156,225,176,118,88,77,87,124,59,161,107,199,171,95,113,196,7,132,208,125,255,197,165,153,240,229,255,1,92,49,248,73,
|
70,205,62,55,28,213,114,107,131,156,124,140,48,179,49,90,20,230,92,114,171,254,62,83,91,52,79,179,71,143,253,247,199,253,119,101,107,254,64,203,150,143,205,141,45,167,133,222,190,73,23,70,53,188,116,78,63,119,28,221,96,226,52,241,72,255,200,128,105,137,220,119,41,172,217,20,50,198,249,209,65,142,48,65,213,6,252,55,100,185,174,90,185,238,167,221,228,111,28,34,150,191,55,84,61,34,245,158,30,149,92,181,181,194,156,225,176,118,88,77,87,124,59,161,107,199,171,95,113,196,7,132,208,125,255,197,165,153,240,229,255,1,92,49,248,73,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -503,7 +503,7 @@ WString ASFormatter::nextLine()
|
||||||
{
|
{
|
||||||
int blockEnd = ASString_ReverseFind(currentLine, AS_CLOSE_BRACKET);
|
int blockEnd = ASString_ReverseFind(currentLine, AS_CLOSE_BRACKET);
|
||||||
assert(blockEnd != -1);
|
assert(blockEnd != -1);
|
||||||
|
|
||||||
// move ending comments to this formattedLine
|
// move ending comments to this formattedLine
|
||||||
if (isBeforeLineEndComment(blockEnd))
|
if (isBeforeLineEndComment(blockEnd))
|
||||||
{
|
{
|
||||||
|
|
@ -1202,7 +1202,7 @@ bool ASFormatter::isBeforeLineEndComment(int startPos) const
|
||||||
if (endNum >= 0)
|
if (endNum >= 0)
|
||||||
if(ASString_Find_First_Not_Of(currentLine, " \t", endNum + 2) < 0)
|
if(ASString_Find_First_Not_Of(currentLine, " \t", endNum + 2) < 0)
|
||||||
foundLineEndComment = true;
|
foundLineEndComment = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return foundLineEndComment;
|
return foundLineEndComment;
|
||||||
|
|
@ -1725,9 +1725,9 @@ void ASFormatter::padOperators(const WString *newOperator)
|
||||||
&& newOperator != &AS_RETURN
|
&& newOperator != &AS_RETURN
|
||||||
&& !(newOperator == &AS_MINUS && isInExponent())
|
&& !(newOperator == &AS_MINUS && isInExponent())
|
||||||
&& !(newOperator == &AS_MINUS // check for negative number
|
&& !(newOperator == &AS_MINUS // check for negative number
|
||||||
&& (previousNonWSChar == '('
|
&& (previousNonWSChar == '('
|
||||||
|| previousNonWSChar == '='
|
|| previousNonWSChar == '='
|
||||||
|| previousNonWSChar == ','))
|
|| previousNonWSChar == ','))
|
||||||
&& !(newOperator == &AS_PLUS && isInExponent())
|
&& !(newOperator == &AS_PLUS && isInExponent())
|
||||||
&& previousOperator != &AS_OPERATOR
|
&& previousOperator != &AS_OPERATOR
|
||||||
&& !((newOperator == &AS_MULT || newOperator == &AS_BIT_AND)
|
&& !((newOperator == &AS_MULT || newOperator == &AS_BIT_AND)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
*
|
*
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
2008-01-26 Patches by Massimo Del Fedele :
|
2008-01-26 Patches by Massimo Del Fedele :
|
||||||
- modified sources to use Ultimate++ containers instead std:: ones
|
- modified sources to use Ultimate++ containers instead std:: ones
|
||||||
|
|
@ -42,7 +42,7 @@ void ASString_Replace(WString &s, int Pos, int Len, WString const &newString)
|
||||||
return;
|
return;
|
||||||
s.Remove(Pos, Len);
|
s.Remove(Pos, Len);
|
||||||
s.Insert(Pos, newString);
|
s.Insert(Pos, newString);
|
||||||
|
|
||||||
} // END ASString_Replace()
|
} // END ASString_Replace()
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -58,7 +58,7 @@ int ASString_Find_First_Not_Of(WString const &s, WString const &Pattern, int pos
|
||||||
return pos;
|
return pos;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
} // END ASString_Find_First_Not_Of()
|
} // END ASString_Find_First_Not_Of()
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -82,5 +82,5 @@ int ASString_ReverseFind(WString const &s, WString const &Pattern)
|
||||||
while( (k = s.Find(Pattern, k)) >= 0)
|
while( (k = s.Find(Pattern, k)) >= 0)
|
||||||
pos = k++;
|
pos = k++;
|
||||||
return pos;
|
return pos;
|
||||||
|
|
||||||
} // END ASString_ReverseFind()
|
} // END ASString_ReverseFind()
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
*
|
*
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
2008-01-26 Patches by Massimo Del Fedele :
|
2008-01-26 Patches by Massimo Del Fedele :
|
||||||
- modified sources to use Ultimate++ containers instead std:: ones
|
- modified sources to use Ultimate++ containers instead std:: ones
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
*
|
*
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
2008-01-26 Patches by Massimo Del Fedele :
|
2008-01-26 Patches by Massimo Del Fedele :
|
||||||
- modified sources to use Ultimate++ containers instead std:: ones
|
- modified sources to use Ultimate++ containers instead std:: ones
|
||||||
|
|
@ -501,3 +501,4 @@ namespace Upp
|
||||||
} // end namespace Upp
|
} // end namespace Upp
|
||||||
|
|
||||||
#endif // closes ASTYLE_H
|
#endif // closes ASTYLE_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,3 +9,4 @@ file
|
||||||
ASEnhancer.cpp,
|
ASEnhancer.cpp,
|
||||||
ASFormatter.cpp,
|
ASFormatter.cpp,
|
||||||
ASResource.cpp;
|
ASResource.cpp;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,4 @@ file
|
||||||
pcxhdr.h,
|
pcxhdr.h,
|
||||||
pcx.cpp,
|
pcx.cpp,
|
||||||
pcxreg.icpp;
|
pcxreg.icpp;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct PCXRGB {
|
struct PCXRGB {
|
||||||
byte r, g, b;
|
byte r, g, b;
|
||||||
}
|
}
|
||||||
#ifdef COMPILER_GCC
|
#ifdef COMPILER_GCC
|
||||||
__attribute__((packed))
|
__attribute__((packed))
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
HOWTO-RELEASE:
|
HOWTO-RELEASE:
|
||||||
|
|
||||||
Notes on releasing. You will need appropriate autoconf, automake and libtool
|
Notes on releasing. You will need appropriate autoconf, automake and libtool
|
||||||
utilities to release a package.
|
utilities to release a package.
|
||||||
|
|
||||||
1. Commit any unsaved changes.
|
1. Commit any unsaved changes.
|
||||||
|
|
||||||
2. "make clean"
|
2. "make clean"
|
||||||
|
|
||||||
3. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
|
3. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
|
||||||
Easist thing to do is take html/vX.(X-1).html and use it as a template.
|
Easist thing to do is take html/vX.(X-1).html and use it as a template.
|
||||||
Add that file to the list of EXTRA_DIST files in the html/Makefile.am.
|
Add that file to the list of EXTRA_DIST files in the html/Makefile.am.
|
||||||
|
|
||||||
3.5. Update html/index.html to refer to this new page as the current release.
|
3.5. Update html/index.html to refer to this new page as the current release.
|
||||||
|
|
||||||
4. Increment version in configure.ac. Put 'alpha' or 'beta' after
|
4. Increment version in configure.ac. Put 'alpha' or 'beta' after
|
||||||
the version, if applicable.
|
the version, if applicable.
|
||||||
|
|
||||||
eg.
|
eg.
|
||||||
3.5.7
|
3.5.7
|
||||||
|
|
@ -29,12 +29,12 @@ utilities to release a package.
|
||||||
6. sh configure
|
6. sh configure
|
||||||
|
|
||||||
7. make release -- this will update "RELEASE-DATE" and "VERSION" in the top
|
7. make release -- this will update "RELEASE-DATE" and "VERSION" in the top
|
||||||
level dir, and libtiff/tiffvers.h.
|
level dir, and libtiff/tiffvers.h.
|
||||||
|
|
||||||
8. Please verify that the version info in RELEASE-DATE, VERSION and
|
8. Please verify that the version info in RELEASE-DATE, VERSION and
|
||||||
libtiff/tiffvers.h is right.
|
libtiff/tiffvers.h is right.
|
||||||
|
|
||||||
9. make; make distcheck (to test).
|
9. make; make distcheck (to test).
|
||||||
|
|
||||||
10. make distclean
|
10. make distclean
|
||||||
|
|
||||||
|
|
@ -46,10 +46,12 @@ utilities to release a package.
|
||||||
Two files with names tiff-version.tar.gz and tiff-version.zip will
|
Two files with names tiff-version.tar.gz and tiff-version.zip will
|
||||||
be created in the top level package directory.
|
be created in the top level package directory.
|
||||||
|
|
||||||
14. Copy to ftp.remotesensing.org ftp site.
|
14. Copy to ftp.remotesensing.org ftp site.
|
||||||
scp tiff-*.tar.gz ftp.remotesensing.org:/var/ftp/libtiff/
|
scp tiff-*.tar.gz ftp.remotesensing.org:/var/ftp/libtiff/
|
||||||
scp tiff-*.zip ftp.remotesensing.org:/var/ftp/libtiff/
|
scp tiff-*.zip ftp.remotesensing.org:/var/ftp/libtiff/
|
||||||
|
|
||||||
15. Announce to list, tiff@lists.maptools.org
|
15. Announce to list, tiff@lists.maptools.org
|
||||||
|
|
||||||
16. Update libtiff page on freshmeat with new version announcement.
|
16. Update libtiff page on freshmeat with new version announcement.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,23 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
|
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and
|
# Permission to use, copy, modify, distribute, and sell this software and
|
||||||
# its documentation for any purpose is hereby granted without fee, provided
|
# its documentation for any purpose is hereby granted without fee, provided
|
||||||
# that (i) the above copyright notices and this permission notice appear in
|
# that (i) the above copyright notices and this permission notice appear in
|
||||||
# all copies of the software and related documentation, and (ii) the names of
|
# all copies of the software and related documentation, and (ii) the names of
|
||||||
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
# publicity relating to the software without the specific, prior written
|
# publicity relating to the software without the specific, prior written
|
||||||
# permission of Sam Leffler and Silicon Graphics.
|
# permission of Sam Leffler and Silicon Graphics.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
# OF THIS SOFTWARE.
|
# OF THIS SOFTWARE.
|
||||||
|
|
||||||
# Process this file with automake to produce Makefile.in.
|
# Process this file with automake to produce Makefile.in.
|
||||||
|
|
@ -135,3 +135,4 @@ mkg3states_LDADD = $(LIBPORT)
|
||||||
|
|
||||||
faxtable: mkg3states
|
faxtable: mkg3states
|
||||||
(rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c)
|
(rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,23 +18,23 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
|
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and
|
# Permission to use, copy, modify, distribute, and sell this software and
|
||||||
# its documentation for any purpose is hereby granted without fee, provided
|
# its documentation for any purpose is hereby granted without fee, provided
|
||||||
# that (i) the above copyright notices and this permission notice appear in
|
# that (i) the above copyright notices and this permission notice appear in
|
||||||
# all copies of the software and related documentation, and (ii) the names of
|
# all copies of the software and related documentation, and (ii) the names of
|
||||||
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
# publicity relating to the software without the specific, prior written
|
# publicity relating to the software without the specific, prior written
|
||||||
# permission of Sam Leffler and Silicon Graphics.
|
# permission of Sam Leffler and Silicon Graphics.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
# OF THIS SOFTWARE.
|
# OF THIS SOFTWARE.
|
||||||
|
|
||||||
# Process this file with automake to produce Makefile.in.
|
# Process this file with automake to produce Makefile.in.
|
||||||
|
|
@ -409,7 +409,7 @@ tif_config.h: stamp-h1
|
||||||
stamp-h1: $(srcdir)/tif_config.h.in $(top_builddir)/config.status
|
stamp-h1: $(srcdir)/tif_config.h.in $(top_builddir)/config.status
|
||||||
@rm -f stamp-h1
|
@rm -f stamp-h1
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status libtiff/tif_config.h
|
cd $(top_builddir) && $(SHELL) ./config.status libtiff/tif_config.h
|
||||||
$(srcdir)/tif_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
$(srcdir)/tif_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
cd $(top_srcdir) && $(AUTOHEADER)
|
cd $(top_srcdir) && $(AUTOHEADER)
|
||||||
rm -f stamp-h1
|
rm -f stamp-h1
|
||||||
touch $@
|
touch $@
|
||||||
|
|
@ -453,9 +453,9 @@ clean-libLTLIBRARIES:
|
||||||
echo "rm -f \"$${dir}/so_locations\""; \
|
echo "rm -f \"$${dir}/so_locations\""; \
|
||||||
rm -f "$${dir}/so_locations"; \
|
rm -f "$${dir}/so_locations"; \
|
||||||
done
|
done
|
||||||
libtiff.la: $(libtiff_la_OBJECTS) $(libtiff_la_DEPENDENCIES)
|
libtiff.la: $(libtiff_la_OBJECTS) $(libtiff_la_DEPENDENCIES)
|
||||||
$(LINK) -rpath $(libdir) $(libtiff_la_LDFLAGS) $(libtiff_la_OBJECTS) $(libtiff_la_LIBADD) $(LIBS)
|
$(LINK) -rpath $(libdir) $(libtiff_la_LDFLAGS) $(libtiff_la_OBJECTS) $(libtiff_la_LIBADD) $(LIBS)
|
||||||
libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES)
|
libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES)
|
||||||
$(CXXLINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_LDFLAGS) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS)
|
$(CXXLINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_LDFLAGS) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
clean-noinstPROGRAMS:
|
clean-noinstPROGRAMS:
|
||||||
|
|
@ -464,7 +464,7 @@ clean-noinstPROGRAMS:
|
||||||
echo " rm -f $$p $$f"; \
|
echo " rm -f $$p $$f"; \
|
||||||
rm -f $$p $$f ; \
|
rm -f $$p $$f ; \
|
||||||
done
|
done
|
||||||
mkg3states$(EXEEXT): $(mkg3states_OBJECTS) $(mkg3states_DEPENDENCIES)
|
mkg3states$(EXEEXT): $(mkg3states_OBJECTS) $(mkg3states_DEPENDENCIES)
|
||||||
@rm -f mkg3states$(EXEEXT)
|
@rm -f mkg3states$(EXEEXT)
|
||||||
$(LINK) $(mkg3states_LDFLAGS) $(mkg3states_OBJECTS) $(mkg3states_LDADD) $(LIBS)
|
$(LINK) $(mkg3states_LDFLAGS) $(mkg3states_OBJECTS) $(mkg3states_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,23 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
|
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and
|
# Permission to use, copy, modify, distribute, and sell this software and
|
||||||
# its documentation for any purpose is hereby granted without fee, provided
|
# its documentation for any purpose is hereby granted without fee, provided
|
||||||
# that (i) the above copyright notices and this permission notice appear in
|
# that (i) the above copyright notices and this permission notice appear in
|
||||||
# all copies of the software and related documentation, and (ii) the names of
|
# all copies of the software and related documentation, and (ii) the names of
|
||||||
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
# publicity relating to the software without the specific, prior written
|
# publicity relating to the software without the specific, prior written
|
||||||
# permission of Sam Leffler and Silicon Graphics.
|
# permission of Sam Leffler and Silicon Graphics.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
# OF THIS SOFTWARE.
|
# OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
# Makefile for MS Visual C and Watcom C compilers.
|
# Makefile for MS Visual C and Watcom C compilers.
|
||||||
|
|
@ -90,7 +90,7 @@ libtiff.lib: tif_config.h tiffconf.h $(OBJ)
|
||||||
$(DLLNAME): tif_config.h tiffconf.h libtiff.def $(OBJ)
|
$(DLLNAME): tif_config.h tiffconf.h libtiff.def $(OBJ)
|
||||||
$(LD) /debug /dll /def:libtiff.def /out:$(DLLNAME) \
|
$(LD) /debug /dll /def:libtiff.def /out:$(DLLNAME) \
|
||||||
/implib:libtiff_i.lib $(OBJ) $(LIBS)
|
/implib:libtiff_i.lib $(OBJ) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-del *.obj
|
-del *.obj
|
||||||
-del *.lib
|
-del *.lib
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2005, Andrey Kiselev <dron@ak4719.spb.edu>
|
# Copyright (C) 2005, Andrey Kiselev <dron@ak4719.spb.edu>
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and
|
# Permission to use, copy, modify, distribute, and sell this software and
|
||||||
# its documentation for any purpose is hereby granted without fee, provided
|
# its documentation for any purpose is hereby granted without fee, provided
|
||||||
# that (i) the above copyright notices and this permission notice appear in
|
# that (i) the above copyright notices and this permission notice appear in
|
||||||
# all copies of the software and related documentation, and (ii) the names of
|
# all copies of the software and related documentation, and (ii) the names of
|
||||||
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
# Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
# publicity relating to the software without the specific, prior written
|
# publicity relating to the software without the specific, prior written
|
||||||
# permission of Sam Leffler and Silicon Graphics.
|
# permission of Sam Leffler and Silicon Graphics.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
# OF THIS SOFTWARE.
|
# OF THIS SOFTWARE.
|
||||||
|
|
||||||
# This file contains rules to build software with the SCons tool
|
# This file contains rules to build software with the SCons tool
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ TIFFOpen(const char* name, const char* mode)
|
||||||
|
|
||||||
strcpy((char*) pname, name);
|
strcpy((char*) pname, name);
|
||||||
ourc2pstr((char*) pname);
|
ourc2pstr((char*) pname);
|
||||||
|
|
||||||
err = FSMakeFSSpec( 0, 0, pname, &fSpec );
|
err = FSMakeFSSpec( 0, 0, pname, &fSpec );
|
||||||
|
|
||||||
switch (_TIFFgetMode(mode, module)) {
|
switch (_TIFFgetMode(mode, module)) {
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -219,7 +219,7 @@ TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
case TIFFTAG_REFERENCEBLACKWHITE:
|
case TIFFTAG_REFERENCEBLACKWHITE:
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static float ycbcr_refblackwhite[] =
|
static float ycbcr_refblackwhite[] =
|
||||||
{ 0.0F, 255.0F, 128.0F, 255.0F, 128.0F, 255.0F };
|
{ 0.0F, 255.0F, 128.0F, 255.0F, 128.0F, 255.0F };
|
||||||
static float rgb_refblackwhite[6];
|
static float rgb_refblackwhite[6];
|
||||||
|
|
||||||
|
|
@ -228,7 +228,7 @@ TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
rgb_refblackwhite[2 * i + 1] =
|
rgb_refblackwhite[2 * i + 1] =
|
||||||
(float)((1L<<td->td_bitspersample)-1L);
|
(float)((1L<<td->td_bitspersample)-1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (td->td_photometric == PHOTOMETRIC_YCBCR) {
|
if (td->td_photometric == PHOTOMETRIC_YCBCR) {
|
||||||
/*
|
/*
|
||||||
* YCbCr (Class Y) images must have the
|
* YCbCr (Class Y) images must have the
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
* completetly freed, so you should save opened file handle and pointer
|
* completetly freed, so you should save opened file handle and pointer
|
||||||
* to the close procedure in external variables before calling
|
* to the close procedure in external variables before calling
|
||||||
* _TIFFCleanup(), if you will need these ones to close the file.
|
* _TIFFCleanup(), if you will need these ones to close the file.
|
||||||
*
|
*
|
||||||
* @param tif A TIFF pointer.
|
* @param tif A TIFF pointer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ TIFFCleanup(TIFF* tif)
|
||||||
|
|
||||||
if (tif->tif_dirlist)
|
if (tif->tif_dirlist)
|
||||||
_TIFFfree(tif->tif_dirlist);
|
_TIFFfree(tif->tif_dirlist);
|
||||||
|
|
||||||
/* Clean up client info links */
|
/* Clean up client info links */
|
||||||
while( tif->tif_clientinfo )
|
while( tif->tif_clientinfo )
|
||||||
{
|
{
|
||||||
|
|
@ -72,21 +72,21 @@ TIFFCleanup(TIFF* tif)
|
||||||
TIFFUnmapFileContents(tif, tif->tif_base, tif->tif_size);
|
TIFFUnmapFileContents(tif, tif->tif_base, tif->tif_size);
|
||||||
|
|
||||||
/* Clean up custom fields */
|
/* Clean up custom fields */
|
||||||
if (tif->tif_nfields > 0)
|
if (tif->tif_nfields > 0)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < tif->tif_nfields; i++)
|
for (i = 0; i < tif->tif_nfields; i++)
|
||||||
{
|
{
|
||||||
TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
|
TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
|
||||||
if (fld->field_bit == FIELD_CUSTOM &&
|
if (fld->field_bit == FIELD_CUSTOM &&
|
||||||
strncmp("Tag ", fld->field_name, 4) == 0)
|
strncmp("Tag ", fld->field_name, 4) == 0)
|
||||||
{
|
{
|
||||||
_TIFFfree(fld->field_name);
|
_TIFFfree(fld->field_name);
|
||||||
_TIFFfree(fld);
|
_TIFFfree(fld);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_TIFFfree(tif->tif_fieldinfo);
|
_TIFFfree(tif->tif_fieldinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -103,7 +103,7 @@ TIFFCleanup(TIFF* tif)
|
||||||
* TIFFClose closes a file that was previously opened with TIFFOpen().
|
* TIFFClose closes a file that was previously opened with TIFFOpen().
|
||||||
* Any buffered data are flushed to the file, including the contents of
|
* Any buffered data are flushed to the file, including the contents of
|
||||||
* the current directory (if modified); and all resources are reclaimed.
|
* the current directory (if modified); and all resources are reclaimed.
|
||||||
*
|
*
|
||||||
* @param tif A TIFF pointer.
|
* @param tif A TIFF pointer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -116,3 +116,4 @@ TIFFClose(TIFF* tif)
|
||||||
TIFFCleanup(tif);
|
TIFFCleanup(tif);
|
||||||
(void) (*closeproc)(fd);
|
(void) (*closeproc)(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -91,7 +91,7 @@ TIFFCodec _TIFFBuiltinCODECS[] = {
|
||||||
{ "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 },
|
{ "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 },
|
||||||
{ "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG },
|
{ "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG },
|
||||||
{ "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP },
|
{ "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP },
|
||||||
{ "AdobeDeflate", COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP },
|
{ "AdobeDeflate", COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP },
|
||||||
{ "PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog },
|
{ "PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog },
|
||||||
{ "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog },
|
{ "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog },
|
||||||
{ "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog },
|
{ "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog },
|
||||||
|
|
@ -112,7 +112,7 @@ static int
|
||||||
NotConfigured(TIFF* tif, int scheme)
|
NotConfigured(TIFF* tif, int scheme)
|
||||||
{
|
{
|
||||||
(void) scheme;
|
(void) scheme;
|
||||||
|
|
||||||
tif->tif_decodestatus = FALSE;
|
tif->tif_decodestatus = FALSE;
|
||||||
tif->tif_setupdecode = _notConfigured;
|
tif->tif_setupdecode = _notConfigured;
|
||||||
tif->tif_encodestatus = FALSE;
|
tif->tif_encodestatus = FALSE;
|
||||||
|
|
@ -126,7 +126,7 @@ NotConfigured(TIFF* tif, int scheme)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether we have working codec for the specific coding scheme.
|
* Check whether we have working codec for the specific coding scheme.
|
||||||
*
|
*
|
||||||
* @return returns 1 if the codec is configured and working. Otherwise
|
* @return returns 1 if the codec is configured and working. Otherwise
|
||||||
* 0 will be returned.
|
* 0 will be returned.
|
||||||
*/
|
*/
|
||||||
|
|
@ -147,3 +147,4 @@ TIFFIsCODECConfigured(uint16 scheme)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -60,13 +60,13 @@ TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32 l, int32 a, int32 b,
|
||||||
tmp = (float)a / 500.0F + cby;
|
tmp = (float)a / 500.0F + cby;
|
||||||
if( tmp < 0.2069F )
|
if( tmp < 0.2069F )
|
||||||
*X = cielab->X0 * (tmp - 0.13793F) / 7.787F;
|
*X = cielab->X0 * (tmp - 0.13793F) / 7.787F;
|
||||||
else
|
else
|
||||||
*X = cielab->X0 * tmp * tmp * tmp;
|
*X = cielab->X0 * tmp * tmp * tmp;
|
||||||
|
|
||||||
tmp = cby - (float)b / 200.0F;
|
tmp = cby - (float)b / 200.0F;
|
||||||
if( tmp < 0.2069F )
|
if( tmp < 0.2069F )
|
||||||
*Z = cielab->Z0 * (tmp - 0.13793F) / 7.787F;
|
*Z = cielab->Z0 * (tmp - 0.13793F) / 7.787F;
|
||||||
else
|
else
|
||||||
*Z = cielab->Z0 * tmp * tmp * tmp;
|
*Z = cielab->Z0 * tmp * tmp * tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -117,7 +117,7 @@ TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z,
|
||||||
}
|
}
|
||||||
#undef RINT
|
#undef RINT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate conversion state structures and make look_up tables for
|
* Allocate conversion state structures and make look_up tables for
|
||||||
* the Yr,Yb,Yg <=> r,g,b conversions.
|
* the Yr,Yb,Yg <=> r,g,b conversions.
|
||||||
*/
|
*/
|
||||||
|
|
@ -167,7 +167,7 @@ TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert color value from the YCbCr space to CIE XYZ.
|
* Convert color value from the YCbCr space to CIE XYZ.
|
||||||
* The colorspace conversion algorithm comes from the IJG v5a code;
|
* The colorspace conversion algorithm comes from the IJG v5a code;
|
||||||
* see below for more information on how it works.
|
* see below for more information on how it works.
|
||||||
|
|
@ -213,7 +213,7 @@ TIFFYCbCrToRGBInit(TIFFYCbCrToRGB* ycbcr, float *luma, float *refBlackWhite)
|
||||||
{
|
{
|
||||||
TIFFRGBValue* clamptab;
|
TIFFRGBValue* clamptab;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#define LumaRed luma[0]
|
#define LumaRed luma[0]
|
||||||
#define LumaGreen luma[1]
|
#define LumaGreen luma[1]
|
||||||
#define LumaBlue luma[2]
|
#define LumaBlue luma[2]
|
||||||
|
|
@ -240,7 +240,7 @@ TIFFYCbCrToRGBInit(TIFFYCbCrToRGB* ycbcr, float *luma, float *refBlackWhite)
|
||||||
#undef LumaBlue
|
#undef LumaBlue
|
||||||
#undef LumaGreen
|
#undef LumaGreen
|
||||||
#undef LumaRed
|
#undef LumaRed
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* i is the actual input pixel value in the range 0..255
|
* i is the actual input pixel value in the range 0..255
|
||||||
* Cb and Cr values are in the range -128..127 (actually
|
* Cb and Cr values are in the range -128..127 (actually
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -36,10 +36,10 @@ TIFFNoEncode(TIFF* tif, const char* method)
|
||||||
{
|
{
|
||||||
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
|
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
|
||||||
|
|
||||||
if (c) {
|
if (c) {
|
||||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%s %s encoding is not implemented",
|
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%s %s encoding is not implemented",
|
||||||
c->name, method);
|
c->name, method);
|
||||||
} else {
|
} else {
|
||||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||||
"Compression scheme %u %s encoding is not implemented",
|
"Compression scheme %u %s encoding is not implemented",
|
||||||
tif->tif_dir.td_compression, method);
|
tif->tif_dir.td_compression, method);
|
||||||
|
|
@ -234,7 +234,7 @@ TIFFUnRegisterCODEC(TIFFCodec* c)
|
||||||
/**
|
/**
|
||||||
* Get list of configured codecs, both built-in and registered by user.
|
* Get list of configured codecs, both built-in and registered by user.
|
||||||
* Caller is responsible to free this structure.
|
* Caller is responsible to free this structure.
|
||||||
*
|
*
|
||||||
* @return returns array of TIFFCodec records (the last record should be NULL)
|
* @return returns array of TIFFCodec records (the last record should be NULL)
|
||||||
* or NULL if function failed.
|
* or NULL if function failed.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -121,7 +121,7 @@ static int
|
||||||
_TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
_TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
{
|
{
|
||||||
static const char module[] = "_TIFFVSetField";
|
static const char module[] = "_TIFFVSetField";
|
||||||
|
|
||||||
TIFFDirectory* td = &tif->tif_dir;
|
TIFFDirectory* td = &tif->tif_dir;
|
||||||
int status = 1;
|
int status = 1;
|
||||||
uint32 v32, i, v;
|
uint32 v32, i, v;
|
||||||
|
|
@ -326,11 +326,11 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
td->td_sampleformat = (uint16) v;
|
td->td_sampleformat = (uint16) v;
|
||||||
|
|
||||||
/* Try to fix up the SWAB function for complex data. */
|
/* Try to fix up the SWAB function for complex data. */
|
||||||
if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT
|
if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT
|
||||||
&& td->td_bitspersample == 32
|
&& td->td_bitspersample == 32
|
||||||
&& tif->tif_postdecode == _TIFFSwab32BitData )
|
&& tif->tif_postdecode == _TIFFSwab32BitData )
|
||||||
tif->tif_postdecode = _TIFFSwab16BitData;
|
tif->tif_postdecode = _TIFFSwab16BitData;
|
||||||
else if( (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT
|
else if( (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT
|
||||||
|| td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP)
|
|| td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP)
|
||||||
&& td->td_bitspersample == 64
|
&& td->td_bitspersample == 64
|
||||||
&& tif->tif_postdecode == _TIFFSwab64BitData )
|
&& tif->tif_postdecode == _TIFFSwab64BitData )
|
||||||
|
|
@ -417,7 +417,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
*/
|
*/
|
||||||
if(tv == NULL) {
|
if(tv == NULL) {
|
||||||
TIFFTagValue *new_customValues;
|
TIFFTagValue *new_customValues;
|
||||||
|
|
||||||
td->td_customValueCount++;
|
td->td_customValueCount++;
|
||||||
new_customValues = (TIFFTagValue *)
|
new_customValues = (TIFFTagValue *)
|
||||||
_TIFFrealloc(td->td_customValues,
|
_TIFFrealloc(td->td_customValues,
|
||||||
|
|
@ -450,7 +450,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
fip->field_name);
|
fip->field_name);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fip->field_passcount) {
|
if(fip->field_passcount) {
|
||||||
if (fip->field_writecount == TIFF_VARIABLE2)
|
if (fip->field_writecount == TIFF_VARIABLE2)
|
||||||
tv->count = (uint32) va_arg(ap, uint32);
|
tv->count = (uint32) va_arg(ap, uint32);
|
||||||
|
|
@ -463,8 +463,8 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
tv->count = td->td_samplesperpixel;
|
tv->count = td->td_samplesperpixel;
|
||||||
else
|
else
|
||||||
tv->count = fip->field_writecount;
|
tv->count = fip->field_writecount;
|
||||||
|
|
||||||
|
|
||||||
if (fip->field_type == TIFF_ASCII)
|
if (fip->field_type == TIFF_ASCII)
|
||||||
_TIFFsetString((char **)&tv->value, va_arg(ap, char *));
|
_TIFFsetString((char **)&tv->value, va_arg(ap, char *));
|
||||||
else {
|
else {
|
||||||
|
|
@ -804,12 +804,12 @@ _TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
{
|
{
|
||||||
const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
|
const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This can happen if multiple images are open with
|
* This can happen if multiple images are open with
|
||||||
* different codecs which have private tags. The
|
* different codecs which have private tags. The
|
||||||
* global tag information table may then have tags
|
* global tag information table may then have tags
|
||||||
* that are valid for one file but not the other.
|
* that are valid for one file but not the other.
|
||||||
* If the client tries to get a tag that is not valid
|
* If the client tries to get a tag that is not valid
|
||||||
* for the image's codec then we'll arrive here.
|
* for the image's codec then we'll arrive here.
|
||||||
*/
|
*/
|
||||||
|
|
@ -832,9 +832,9 @@ _TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
|
|
||||||
if (tv->info->field_tag != tag)
|
if (tv->info->field_tag != tag)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (fip->field_passcount) {
|
if (fip->field_passcount) {
|
||||||
if (fip->field_readcount == TIFF_VARIABLE2)
|
if (fip->field_readcount == TIFF_VARIABLE2)
|
||||||
*va_arg(ap, uint32*) = (uint32)tv->count;
|
*va_arg(ap, uint32*) = (uint32)tv->count;
|
||||||
else /* Assume TIFF_VARIABLE */
|
else /* Assume TIFF_VARIABLE */
|
||||||
*va_arg(ap, uint16*) = (uint16)tv->count;
|
*va_arg(ap, uint16*) = (uint16)tv->count;
|
||||||
|
|
@ -1150,7 +1150,7 @@ TIFFNumberOfDirectories(TIFF* tif)
|
||||||
{
|
{
|
||||||
toff_t nextdir = tif->tif_header.tiff_diroff;
|
toff_t nextdir = tif->tif_header.tiff_diroff;
|
||||||
tdir_t n = 0;
|
tdir_t n = 0;
|
||||||
|
|
||||||
while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
|
while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
|
||||||
n++;
|
n++;
|
||||||
return (n);
|
return (n);
|
||||||
|
|
@ -1327,7 +1327,7 @@ TIFFReassignTagToIgnore (enum TIFFIgnoreSense task, int TIFFtagID)
|
||||||
return (TRUE) ;
|
return (TRUE) ;
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case TIS_EXTRACT:
|
case TIS_EXTRACT:
|
||||||
for ( i = 0 ; i < tagcount ; ++i )
|
for ( i = 0 ; i < tagcount ; ++i )
|
||||||
{
|
{
|
||||||
|
|
@ -1335,15 +1335,15 @@ TIFFReassignTagToIgnore (enum TIFFIgnoreSense task, int TIFFtagID)
|
||||||
return (TRUE) ;
|
return (TRUE) ;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TIS_EMPTY:
|
case TIS_EMPTY:
|
||||||
tagcount = 0 ; /* Clear the list */
|
tagcount = 0 ; /* Clear the list */
|
||||||
return (TRUE) ;
|
return (TRUE) ;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ typedef struct {
|
||||||
* Note that a bit *is* allocated for ignored tags;
|
* Note that a bit *is* allocated for ignored tags;
|
||||||
* this is understood by the directory reading logic
|
* this is understood by the directory reading logic
|
||||||
* which uses this fact to avoid special-case handling
|
* which uses this fact to avoid special-case handling
|
||||||
*/
|
*/
|
||||||
#define FIELD_IGNORE 0
|
#define FIELD_IGNORE 0
|
||||||
|
|
||||||
/* multi-item fields */
|
/* multi-item fields */
|
||||||
|
|
@ -162,9 +162,9 @@ typedef struct {
|
||||||
(v) & (tif)->tif_typemask[type]))
|
(v) & (tif)->tif_typemask[type]))
|
||||||
|
|
||||||
|
|
||||||
#define BITn(n) (((unsigned long)1L)<<((n)&0x1f))
|
#define BITn(n) (((unsigned long)1L)<<((n)&0x1f))
|
||||||
#define BITFIELDn(tif, n) ((tif)->tif_dir.td_fieldsset[(n)/32])
|
#define BITFIELDn(tif, n) ((tif)->tif_dir.td_fieldsset[(n)/32])
|
||||||
#define TIFFFieldSet(tif, field) (BITFIELDn(tif, field) & BITn(field))
|
#define TIFFFieldSet(tif, field) (BITFIELDn(tif, field) & BITn(field))
|
||||||
#define TIFFSetFieldBit(tif, field) (BITFIELDn(tif, field) |= BITn(field))
|
#define TIFFSetFieldBit(tif, field) (BITFIELDn(tif, field) |= BITn(field))
|
||||||
#define TIFFClrFieldBit(tif, field) (BITFIELDn(tif, field) &= ~BITn(field))
|
#define TIFFClrFieldBit(tif, field) (BITFIELDn(tif, field) &= ~BITn(field))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -39,8 +39,8 @@
|
||||||
*
|
*
|
||||||
* NOTE: The second field (field_readcount) and third field (field_writecount)
|
* NOTE: The second field (field_readcount) and third field (field_writecount)
|
||||||
* sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3)
|
* sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3)
|
||||||
* and TIFFTAG_SPP (-2). The macros should be used but would throw off
|
* and TIFFTAG_SPP (-2). The macros should be used but would throw off
|
||||||
* the formatting of the code, so please interprete the -1, -2 and -3
|
* the formatting of the code, so please interprete the -1, -2 and -3
|
||||||
* values accordingly.
|
* values accordingly.
|
||||||
*/
|
*/
|
||||||
static const TIFFFieldInfo
|
static const TIFFFieldInfo
|
||||||
|
|
@ -255,9 +255,9 @@ tiffFieldInfo[] = {
|
||||||
{ TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
{ TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
||||||
1, 0, "Copyright" },
|
1, 0, "Copyright" },
|
||||||
/* end Pixar tags */
|
/* end Pixar tags */
|
||||||
{ TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 1, "RichTIFFIPTC" },
|
0, 1, "RichTIFFIPTC" },
|
||||||
{ TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, FIELD_CUSTOM,
|
{ TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, FIELD_CUSTOM,
|
||||||
0, 1, "Photoshop" },
|
0, 1, "Photoshop" },
|
||||||
{ TIFFTAG_EXIFIFD, 1, 1, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_EXIFIFD, 1, 1, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 0, "EXIFIFDOffset" },
|
0, 0, "EXIFIFDOffset" },
|
||||||
|
|
@ -270,9 +270,9 @@ tiffFieldInfo[] = {
|
||||||
{ TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 0, "InteroperabilityIFDOffset" },
|
0, 0, "InteroperabilityIFDOffset" },
|
||||||
/* begin DNG tags */
|
/* begin DNG tags */
|
||||||
{ TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, FIELD_CUSTOM,
|
{ TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, FIELD_CUSTOM,
|
||||||
0, 0, "DNGVersion" },
|
0, 0, "DNGVersion" },
|
||||||
{ TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, FIELD_CUSTOM,
|
{ TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, FIELD_CUSTOM,
|
||||||
0, 0, "DNGBackwardVersion" },
|
0, 0, "DNGBackwardVersion" },
|
||||||
{ TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
{ TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
||||||
1, 0, "UniqueCameraModel" },
|
1, 0, "UniqueCameraModel" },
|
||||||
|
|
@ -280,93 +280,93 @@ tiffFieldInfo[] = {
|
||||||
1, 0, "LocalizedCameraModel" },
|
1, 0, "LocalizedCameraModel" },
|
||||||
{ TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, FIELD_CUSTOM,
|
{ TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, FIELD_CUSTOM,
|
||||||
1, 1, "LocalizedCameraModel" },
|
1, 1, "LocalizedCameraModel" },
|
||||||
{ TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, FIELD_CUSTOM,
|
{ TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, FIELD_CUSTOM,
|
||||||
0, 1, "CFAPlaneColor" },
|
0, 1, "CFAPlaneColor" },
|
||||||
{ TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "CFALayout" },
|
0, 0, "CFALayout" },
|
||||||
{ TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 1, "LinearizationTable" },
|
0, 1, "LinearizationTable" },
|
||||||
{ TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "BlackLevelRepeatDim" },
|
0, 0, "BlackLevelRepeatDim" },
|
||||||
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 1, "BlackLevel" },
|
0, 1, "BlackLevel" },
|
||||||
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 1, "BlackLevel" },
|
0, 1, "BlackLevel" },
|
||||||
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "BlackLevel" },
|
0, 1, "BlackLevel" },
|
||||||
{ TIFFTAG_BLACKLEVELDELTAH, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_BLACKLEVELDELTAH, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "BlackLevelDeltaH" },
|
0, 1, "BlackLevelDeltaH" },
|
||||||
{ TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "BlackLevelDeltaV" },
|
0, 1, "BlackLevelDeltaV" },
|
||||||
{ TIFFTAG_WHITELEVEL, -2, -2, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_WHITELEVEL, -2, -2, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 0, "WhiteLevel" },
|
0, 0, "WhiteLevel" },
|
||||||
{ TIFFTAG_WHITELEVEL, -2, -2, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_WHITELEVEL, -2, -2, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "WhiteLevel" },
|
0, 0, "WhiteLevel" },
|
||||||
{ TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "DefaultScale" },
|
0, 0, "DefaultScale" },
|
||||||
{ TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "BestQualityScale" },
|
0, 0, "BestQualityScale" },
|
||||||
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 0, "DefaultCropOrigin" },
|
0, 0, "DefaultCropOrigin" },
|
||||||
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "DefaultCropOrigin" },
|
0, 0, "DefaultCropOrigin" },
|
||||||
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "DefaultCropOrigin" },
|
0, 0, "DefaultCropOrigin" },
|
||||||
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 0, "DefaultCropSize" },
|
0, 0, "DefaultCropSize" },
|
||||||
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "DefaultCropSize" },
|
0, 0, "DefaultCropSize" },
|
||||||
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "DefaultCropSize" },
|
0, 0, "DefaultCropSize" },
|
||||||
{ TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "ColorMatrix1" },
|
0, 1, "ColorMatrix1" },
|
||||||
{ TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "ColorMatrix2" },
|
0, 1, "ColorMatrix2" },
|
||||||
{ TIFFTAG_CAMERACALIBRATION1, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_CAMERACALIBRATION1, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "CameraCalibration1" },
|
0, 1, "CameraCalibration1" },
|
||||||
{ TIFFTAG_CAMERACALIBRATION2, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_CAMERACALIBRATION2, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "CameraCalibration2" },
|
0, 1, "CameraCalibration2" },
|
||||||
{ TIFFTAG_REDUCTIONMATRIX1, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_REDUCTIONMATRIX1, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "ReductionMatrix1" },
|
0, 1, "ReductionMatrix1" },
|
||||||
{ TIFFTAG_REDUCTIONMATRIX2, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_REDUCTIONMATRIX2, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "ReductionMatrix2" },
|
0, 1, "ReductionMatrix2" },
|
||||||
{ TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "AnalogBalance" },
|
0, 1, "AnalogBalance" },
|
||||||
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 1, "AsShotNeutral" },
|
0, 1, "AsShotNeutral" },
|
||||||
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "AsShotNeutral" },
|
0, 1, "AsShotNeutral" },
|
||||||
{ TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "AsShotWhiteXY" },
|
0, 0, "AsShotWhiteXY" },
|
||||||
{ TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "BaselineExposure" },
|
0, 0, "BaselineExposure" },
|
||||||
{ TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "BaselineNoise" },
|
0, 0, "BaselineNoise" },
|
||||||
{ TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "BaselineSharpness" },
|
0, 0, "BaselineSharpness" },
|
||||||
{ TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 0, "BayerGreenSplit" },
|
0, 0, "BayerGreenSplit" },
|
||||||
{ TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "LinearResponseLimit" },
|
0, 0, "LinearResponseLimit" },
|
||||||
{ TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
{ TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
||||||
1, 0, "CameraSerialNumber" },
|
1, 0, "CameraSerialNumber" },
|
||||||
{ TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "LensInfo" },
|
0, 0, "LensInfo" },
|
||||||
{ TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "ChromaBlurRadius" },
|
0, 0, "ChromaBlurRadius" },
|
||||||
{ TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "AntiAliasStrength" },
|
0, 0, "AntiAliasStrength" },
|
||||||
{ TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
0, 0, "ShadowScale" },
|
0, 0, "ShadowScale" },
|
||||||
{ TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, FIELD_CUSTOM,
|
{ TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, FIELD_CUSTOM,
|
||||||
0, 1, "DNGPrivateData" },
|
0, 1, "DNGPrivateData" },
|
||||||
{ TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "MakerNoteSafety" },
|
0, 0, "MakerNoteSafety" },
|
||||||
{ TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "CalibrationIlluminant1" },
|
0, 0, "CalibrationIlluminant1" },
|
||||||
{ TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "CalibrationIlluminant2" },
|
0, 0, "CalibrationIlluminant2" },
|
||||||
{ TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, FIELD_CUSTOM,
|
{ TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, FIELD_CUSTOM,
|
||||||
0, 0, "RawDataUniqueID" },
|
0, 0, "RawDataUniqueID" },
|
||||||
{ TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
{ TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_ASCII, FIELD_CUSTOM,
|
||||||
1, 0, "OriginalRawFileName" },
|
1, 0, "OriginalRawFileName" },
|
||||||
|
|
@ -374,28 +374,28 @@ tiffFieldInfo[] = {
|
||||||
1, 1, "OriginalRawFileName" },
|
1, 1, "OriginalRawFileName" },
|
||||||
{ TIFFTAG_ORIGINALRAWFILEDATA, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
{ TIFFTAG_ORIGINALRAWFILEDATA, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
||||||
0, 1, "OriginalRawFileData" },
|
0, 1, "OriginalRawFileData" },
|
||||||
{ TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 0, "ActiveArea" },
|
0, 0, "ActiveArea" },
|
||||||
{ TIFFTAG_ACTIVEAREA, 4, 4, TIFF_SHORT, FIELD_CUSTOM,
|
{ TIFFTAG_ACTIVEAREA, 4, 4, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
0, 0, "ActiveArea" },
|
0, 0, "ActiveArea" },
|
||||||
{ TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, FIELD_CUSTOM,
|
{ TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, FIELD_CUSTOM,
|
||||||
0, 1, "MaskedAreas" },
|
0, 1, "MaskedAreas" },
|
||||||
{ TIFFTAG_ASSHOTICCPROFILE, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
{ TIFFTAG_ASSHOTICCPROFILE, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
||||||
0, 1, "AsShotICCProfile" },
|
0, 1, "AsShotICCProfile" },
|
||||||
{ TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "AsShotPreProfileMatrix" },
|
0, 1, "AsShotPreProfileMatrix" },
|
||||||
{ TIFFTAG_CURRENTICCPROFILE, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
{ TIFFTAG_CURRENTICCPROFILE, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
||||||
0, 1, "CurrentICCProfile" },
|
0, 1, "CurrentICCProfile" },
|
||||||
{ TIFFTAG_CURRENTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ TIFFTAG_CURRENTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
0, 1, "CurrentPreProfileMatrix" },
|
0, 1, "CurrentPreProfileMatrix" },
|
||||||
/* end DNG tags */
|
/* end DNG tags */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const TIFFFieldInfo
|
static const TIFFFieldInfo
|
||||||
exifFieldInfo[] = {
|
exifFieldInfo[] = {
|
||||||
{ EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "ExposureTime" },
|
1, 0, "ExposureTime" },
|
||||||
{ EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "FNumber" },
|
1, 0, "FNumber" },
|
||||||
{ EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "ExposureProgram" },
|
1, 0, "ExposureProgram" },
|
||||||
|
|
@ -415,17 +415,17 @@ exifFieldInfo[] = {
|
||||||
1, 0, "ComponentsConfiguration" },
|
1, 0, "ComponentsConfiguration" },
|
||||||
{ EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "CompressedBitsPerPixel" },
|
1, 0, "CompressedBitsPerPixel" },
|
||||||
{ EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "ShutterSpeedValue" },
|
1, 0, "ShutterSpeedValue" },
|
||||||
{ EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "ApertureValue" },
|
1, 0, "ApertureValue" },
|
||||||
{ EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "BrightnessValue" },
|
1, 0, "BrightnessValue" },
|
||||||
{ EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "ExposureBiasValue" },
|
1, 0, "ExposureBiasValue" },
|
||||||
{ EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "MaxApertureValue" },
|
1, 0, "MaxApertureValue" },
|
||||||
{ EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "SubjectDistance" },
|
1, 0, "SubjectDistance" },
|
||||||
{ EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "MeteringMode" },
|
1, 0, "MeteringMode" },
|
||||||
|
|
@ -433,7 +433,7 @@ exifFieldInfo[] = {
|
||||||
1, 0, "LightSource" },
|
1, 0, "LightSource" },
|
||||||
{ EXIFTAG_FLASH, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_FLASH, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "Flash" },
|
1, 0, "Flash" },
|
||||||
{ EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "FocalLength" },
|
1, 0, "FocalLength" },
|
||||||
{ EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 1, "SubjectArea" },
|
1, 1, "SubjectArea" },
|
||||||
|
|
@ -459,19 +459,19 @@ exifFieldInfo[] = {
|
||||||
1, 0, "PixelYDimension" },
|
1, 0, "PixelYDimension" },
|
||||||
{ EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, FIELD_CUSTOM,
|
{ EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, FIELD_CUSTOM,
|
||||||
1, 0, "RelatedSoundFile" },
|
1, 0, "RelatedSoundFile" },
|
||||||
{ EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "FlashEnergy" },
|
1, 0, "FlashEnergy" },
|
||||||
{ EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
{ EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, FIELD_CUSTOM,
|
||||||
1, 1, "SpatialFrequencyResponse" },
|
1, 1, "SpatialFrequencyResponse" },
|
||||||
{ EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "FocalPlaneXResolution" },
|
1, 0, "FocalPlaneXResolution" },
|
||||||
{ EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "FocalPlaneYResolution" },
|
1, 0, "FocalPlaneYResolution" },
|
||||||
{ EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "FocalPlaneResolutionUnit" },
|
1, 0, "FocalPlaneResolutionUnit" },
|
||||||
{ EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "SubjectLocation" },
|
1, 0, "SubjectLocation" },
|
||||||
{ EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "ExposureIndex" },
|
1, 0, "ExposureIndex" },
|
||||||
{ EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "SensingMethod" },
|
1, 0, "SensingMethod" },
|
||||||
|
|
@ -487,13 +487,13 @@ exifFieldInfo[] = {
|
||||||
1, 0, "ExposureMode" },
|
1, 0, "ExposureMode" },
|
||||||
{ EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "WhiteBalance" },
|
1, 0, "WhiteBalance" },
|
||||||
{ EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "DigitalZoomRatio" },
|
1, 0, "DigitalZoomRatio" },
|
||||||
{ EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "FocalLengthIn35mmFilm" },
|
1, 0, "FocalLengthIn35mmFilm" },
|
||||||
{ EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "SceneCaptureType" },
|
1, 0, "SceneCaptureType" },
|
||||||
{ EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
{ EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, FIELD_CUSTOM,
|
||||||
1, 0, "GainControl" },
|
1, 0, "GainControl" },
|
||||||
{ EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
{ EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, FIELD_CUSTOM,
|
||||||
1, 0, "Contrast" },
|
1, 0, "Contrast" },
|
||||||
|
|
@ -529,16 +529,16 @@ _TIFFSetupFieldInfo(TIFF* tif, const TIFFFieldInfo info[], size_t n)
|
||||||
if (tif->tif_fieldinfo) {
|
if (tif->tif_fieldinfo) {
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < tif->tif_nfields; i++)
|
for (i = 0; i < tif->tif_nfields; i++)
|
||||||
{
|
{
|
||||||
TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
|
TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
|
||||||
if (fld->field_bit == FIELD_CUSTOM &&
|
if (fld->field_bit == FIELD_CUSTOM &&
|
||||||
strncmp("Tag ", fld->field_name, 4) == 0) {
|
strncmp("Tag ", fld->field_name, 4) == 0) {
|
||||||
_TIFFfree(fld->field_name);
|
_TIFFfree(fld->field_name);
|
||||||
_TIFFfree(fld);
|
_TIFFfree(fld);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_TIFFfree(tif->tif_fieldinfo);
|
_TIFFfree(tif->tif_fieldinfo);
|
||||||
tif->tif_nfields = 0;
|
tif->tif_nfields = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -719,9 +719,9 @@ _TIFFFindFieldInfo(TIFF* tif, ttag_t tag, TIFFDataType dt)
|
||||||
key.field_type = dt;
|
key.field_type = dt;
|
||||||
|
|
||||||
ret = (const TIFFFieldInfo **) bsearch(&pkey,
|
ret = (const TIFFFieldInfo **) bsearch(&pkey,
|
||||||
tif->tif_fieldinfo,
|
tif->tif_fieldinfo,
|
||||||
tif->tif_nfields,
|
tif->tif_nfields,
|
||||||
sizeof(TIFFFieldInfo *),
|
sizeof(TIFFFieldInfo *),
|
||||||
tagCompare);
|
tagCompare);
|
||||||
return (ret) ? (*ret) : NULL;
|
return (ret) ? (*ret) : NULL;
|
||||||
} else for (i = 0, n = tif->tif_nfields; i < n; i++) {
|
} else for (i = 0, n = tif->tif_nfields; i < n; i++) {
|
||||||
|
|
@ -752,7 +752,7 @@ _TIFFFindFieldInfoByName(TIFF* tif, const char *field_name, TIFFDataType dt)
|
||||||
key.field_type = dt;
|
key.field_type = dt;
|
||||||
|
|
||||||
ret = (const TIFFFieldInfo **) lfind(&pkey,
|
ret = (const TIFFFieldInfo **) lfind(&pkey,
|
||||||
tif->tif_fieldinfo,
|
tif->tif_fieldinfo,
|
||||||
&tif->tif_nfields,
|
&tif->tif_nfields,
|
||||||
sizeof(TIFFFieldInfo *),
|
sizeof(TIFFFieldInfo *),
|
||||||
tagNameCompare);
|
tagNameCompare);
|
||||||
|
|
@ -840,7 +840,7 @@ _TIFFCreateAnonFieldInfo(TIFF *tif, ttag_t tag, TIFFDataType field_type)
|
||||||
*/
|
*/
|
||||||
sprintf(fld->field_name, "Tag %d", (int) tag);
|
sprintf(fld->field_name, "Tag %d", (int) tag);
|
||||||
|
|
||||||
return fld;
|
return fld;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set ts=8 sts=8 sw=8 noet: */
|
/* vim: set ts=8 sts=8 sw=8 noet: */
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -216,7 +216,7 @@ TIFFReadDirectory(TIFF* tif)
|
||||||
*
|
*
|
||||||
* It sure would have been nice if Aldus had really thought
|
* It sure would have been nice if Aldus had really thought
|
||||||
* this stuff through carefully.
|
* this stuff through carefully.
|
||||||
*/
|
*/
|
||||||
for (dp = dir, n = dircount; n > 0; n--, dp++) {
|
for (dp = dir, n = dircount; n > 0; n--, dp++) {
|
||||||
if (tif->tif_flags & TIFF_SWAB) {
|
if (tif->tif_flags & TIFF_SWAB) {
|
||||||
TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
|
TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
|
||||||
|
|
@ -236,7 +236,7 @@ TIFFReadDirectory(TIFF* tif)
|
||||||
|
|
||||||
if (fix >= tif->tif_nfields || dp->tdir_tag == IGNORE)
|
if (fix >= tif->tif_nfields || dp->tdir_tag == IGNORE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Silicon Beach (at least) writes unordered
|
* Silicon Beach (at least) writes unordered
|
||||||
* directory tags (violating the spec). Handle
|
* directory tags (violating the spec). Handle
|
||||||
|
|
@ -368,7 +368,7 @@ TIFFReadDirectory(TIFF* tif)
|
||||||
MissingRequired(tif, "ImageLength");
|
MissingRequired(tif, "ImageLength");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Setup appropriate structures (by strip or by tile)
|
* Setup appropriate structures (by strip or by tile)
|
||||||
*/
|
*/
|
||||||
if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) {
|
if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) {
|
||||||
|
|
@ -559,7 +559,7 @@ TIFFReadDirectory(TIFF* tif)
|
||||||
_TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
|
_TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
|
||||||
if (EstimateStripByteCounts(tif, dir, dircount) < 0)
|
if (EstimateStripByteCounts(tif, dir, dircount) < 0)
|
||||||
goto bad;
|
goto bad;
|
||||||
/*
|
/*
|
||||||
* Assume we have wrong StripByteCount value (in case of single strip) in
|
* Assume we have wrong StripByteCount value (in case of single strip) in
|
||||||
* following cases:
|
* following cases:
|
||||||
* - it is equal to zero along with StripOffset;
|
* - it is equal to zero along with StripOffset;
|
||||||
|
|
@ -577,8 +577,8 @@ TIFFReadDirectory(TIFF* tif)
|
||||||
td->td_compression == COMPRESSION_NONE && \
|
td->td_compression == COMPRESSION_NONE && \
|
||||||
td->td_stripbytecount[0] < TIFFScanlineSize(tif) * td->td_imagelength) )
|
td->td_stripbytecount[0] < TIFFScanlineSize(tif) * td->td_imagelength) )
|
||||||
|
|
||||||
} else if (td->td_nstrips == 1
|
} else if (td->td_nstrips == 1
|
||||||
&& td->td_stripoffset[0] != 0
|
&& td->td_stripoffset[0] != 0
|
||||||
&& BYTECOUNTLOOKSBAD) {
|
&& BYTECOUNTLOOKSBAD) {
|
||||||
/*
|
/*
|
||||||
* XXX: Plexus (and others) sometimes give a value of zero for
|
* XXX: Plexus (and others) sometimes give a value of zero for
|
||||||
|
|
@ -688,7 +688,7 @@ bad:
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read custom directory from the arbitarry offset.
|
* Read custom directory from the arbitarry offset.
|
||||||
* The code is very similar to TIFFReadDirectory().
|
* The code is very similar to TIFFReadDirectory().
|
||||||
*/
|
*/
|
||||||
|
|
@ -838,7 +838,7 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff,
|
||||||
|
|
||||||
(void) TIFFFetchNormalTag(tif, dp);
|
(void) TIFFFetchNormalTag(tif, dp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dir)
|
if (dir)
|
||||||
_TIFFfree(dir);
|
_TIFFfree(dir);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -910,7 +910,7 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
|
||||||
* should begin. Since a strip of data must be contiguous,
|
* should begin. Since a strip of data must be contiguous,
|
||||||
* it's safe to assume that we've overestimated the amount
|
* it's safe to assume that we've overestimated the amount
|
||||||
* of data in the strip and trim this number back accordingly.
|
* of data in the strip and trim this number back accordingly.
|
||||||
*/
|
*/
|
||||||
i--;
|
i--;
|
||||||
if (((toff_t)(td->td_stripoffset[i]+td->td_stripbytecount[i]))
|
if (((toff_t)(td->td_stripoffset[i]+td->td_stripbytecount[i]))
|
||||||
> filesize)
|
> filesize)
|
||||||
|
|
@ -1442,7 +1442,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp)
|
||||||
case TIFF_SLONG:
|
case TIFF_SLONG:
|
||||||
{ uint32 v32 =
|
{ uint32 v32 =
|
||||||
TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
|
TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
|
||||||
ok = (fip->field_passcount ?
|
ok = (fip->field_passcount ?
|
||||||
TIFFSetField(tif, dp->tdir_tag, 1, &v32)
|
TIFFSetField(tif, dp->tdir_tag, 1, &v32)
|
||||||
: TIFFSetField(tif, dp->tdir_tag, v32));
|
: TIFFSetField(tif, dp->tdir_tag, v32));
|
||||||
}
|
}
|
||||||
|
|
@ -1450,7 +1450,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp)
|
||||||
case TIFF_RATIONAL:
|
case TIFF_RATIONAL:
|
||||||
case TIFF_SRATIONAL:
|
case TIFF_SRATIONAL:
|
||||||
case TIFF_FLOAT:
|
case TIFF_FLOAT:
|
||||||
{ float v = (dp->tdir_type == TIFF_FLOAT ?
|
{ float v = (dp->tdir_type == TIFF_FLOAT ?
|
||||||
TIFFFetchFloat(tif, dp)
|
TIFFFetchFloat(tif, dp)
|
||||||
: TIFFFetchRational(tif, dp));
|
: TIFFFetchRational(tif, dp));
|
||||||
ok = (fip->field_passcount ?
|
ok = (fip->field_passcount ?
|
||||||
|
|
@ -1485,7 +1485,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp)
|
||||||
|
|
||||||
#define NITEMS(x) (sizeof (x) / sizeof (x[0]))
|
#define NITEMS(x) (sizeof (x) / sizeof (x[0]))
|
||||||
/*
|
/*
|
||||||
* Fetch samples/pixel short values for
|
* Fetch samples/pixel short values for
|
||||||
* the specified tag and verify that
|
* the specified tag and verify that
|
||||||
* all values are the same.
|
* all values are the same.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1526,7 +1526,7 @@ TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, uint16* pl)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fetch samples/pixel long values for
|
* Fetch samples/pixel long values for
|
||||||
* the specified tag and verify that
|
* the specified tag and verify that
|
||||||
* all values are the same.
|
* all values are the same.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1639,7 +1639,7 @@ TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
|
||||||
return (0);
|
return (0);
|
||||||
if( (status = TIFFFetchShortArray(tif, dir, dp)) != 0 ) {
|
if( (status = TIFFFetchShortArray(tif, dir, dp)) != 0 ) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for( i = 0; i < nstrips && i < (int) dir->tdir_count; i++ )
|
for( i = 0; i < nstrips && i < (int) dir->tdir_count; i++ )
|
||||||
{
|
{
|
||||||
lp[i] = dp[i];
|
lp[i] = dp[i];
|
||||||
|
|
@ -1668,7 +1668,7 @@ TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
|
||||||
_TIFFfree( (char *) dp );
|
_TIFFfree( (char *) dp );
|
||||||
} else
|
} else
|
||||||
status = TIFFFetchLongArray(tif, dir, lp);
|
status = TIFFFetchLongArray(tif, dir, lp);
|
||||||
|
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1737,7 +1737,7 @@ ChopUpSingleUncompressedStrip(TIFF* tif)
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* never increase the number of strips in an image
|
* never increase the number of strips in an image
|
||||||
*/
|
*/
|
||||||
if (rowsperstrip >= td->td_rowsperstrip)
|
if (rowsperstrip >= td->td_rowsperstrip)
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -179,7 +179,7 @@ _TIFFWriteDirectory(TIFF* tif, int done)
|
||||||
/*
|
/*
|
||||||
** For custom fields, we test to see if the custom field
|
** For custom fields, we test to see if the custom field
|
||||||
** is set or not. For normal fields, we just use the
|
** is set or not. For normal fields, we just use the
|
||||||
** FieldSet test.
|
** FieldSet test.
|
||||||
*/
|
*/
|
||||||
if( fip->field_bit == FIELD_CUSTOM )
|
if( fip->field_bit == FIELD_CUSTOM )
|
||||||
{
|
{
|
||||||
|
|
@ -212,7 +212,7 @@ _TIFFWriteDirectory(TIFF* tif, int done)
|
||||||
TIFFTAG_TILEOFFSETS : TIFFTAG_STRIPOFFSETS;
|
TIFFTAG_TILEOFFSETS : TIFFTAG_STRIPOFFSETS;
|
||||||
if (tag != fip->field_tag)
|
if (tag != fip->field_tag)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dir->tdir_tag = (uint16) tag;
|
dir->tdir_tag = (uint16) tag;
|
||||||
dir->tdir_type = (uint16) TIFF_LONG;
|
dir->tdir_type = (uint16) TIFF_LONG;
|
||||||
dir->tdir_count = (uint32) td->td_nstrips;
|
dir->tdir_count = (uint32) td->td_nstrips;
|
||||||
|
|
@ -230,7 +230,7 @@ _TIFFWriteDirectory(TIFF* tif, int done)
|
||||||
TIFFTAG_TILEBYTECOUNTS : TIFFTAG_STRIPBYTECOUNTS;
|
TIFFTAG_TILEBYTECOUNTS : TIFFTAG_STRIPBYTECOUNTS;
|
||||||
if (tag != fip->field_tag)
|
if (tag != fip->field_tag)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dir->tdir_tag = (uint16) tag;
|
dir->tdir_tag = (uint16) tag;
|
||||||
dir->tdir_type = (uint16) TIFF_LONG;
|
dir->tdir_type = (uint16) TIFF_LONG;
|
||||||
dir->tdir_count = (uint32) td->td_nstrips;
|
dir->tdir_count = (uint32) td->td_nstrips;
|
||||||
|
|
@ -345,7 +345,7 @@ _TIFFWriteDirectory(TIFF* tif, int done)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dir++;
|
dir++;
|
||||||
|
|
||||||
if( fip->field_bit != FIELD_CUSTOM )
|
if( fip->field_bit != FIELD_CUSTOM )
|
||||||
ResetFieldBit(fields, fip->field_bit);
|
ResetFieldBit(fields, fip->field_bit);
|
||||||
}
|
}
|
||||||
|
|
@ -417,7 +417,7 @@ TIFFWriteDirectory(TIFF* tif)
|
||||||
* but leaves all data structures in memory so that it can be
|
* but leaves all data structures in memory so that it can be
|
||||||
* written again. This will make a partially written TIFF file
|
* written again. This will make a partially written TIFF file
|
||||||
* readable before it is successfully completed/closed.
|
* readable before it is successfully completed/closed.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
TIFFCheckpointDirectory(TIFF* tif)
|
TIFFCheckpointDirectory(TIFF* tif)
|
||||||
{
|
{
|
||||||
|
|
@ -442,7 +442,7 @@ TIFFWriteNormalTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip)
|
||||||
dir->tdir_tag = (uint16) fip->field_tag;
|
dir->tdir_tag = (uint16) fip->field_tag;
|
||||||
dir->tdir_type = (uint16) fip->field_type;
|
dir->tdir_type = (uint16) fip->field_type;
|
||||||
dir->tdir_count = wc;
|
dir->tdir_count = wc;
|
||||||
|
|
||||||
switch (fip->field_type) {
|
switch (fip->field_type) {
|
||||||
case TIFF_SHORT:
|
case TIFF_SHORT:
|
||||||
case TIFF_SSHORT:
|
case TIFF_SSHORT:
|
||||||
|
|
@ -578,7 +578,7 @@ TIFFWriteNormalTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TIFF_ASCII:
|
case TIFF_ASCII:
|
||||||
{
|
{
|
||||||
char* cp;
|
char* cp;
|
||||||
if (fip->field_passcount)
|
if (fip->field_passcount)
|
||||||
TIFFGetField(tif, fip->field_tag, &wc, &cp);
|
TIFFGetField(tif, fip->field_tag, &wc, &cp);
|
||||||
|
|
@ -592,7 +592,7 @@ TIFFWriteNormalTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TIFF_BYTE:
|
case TIFF_BYTE:
|
||||||
case TIFF_SBYTE:
|
case TIFF_SBYTE:
|
||||||
if (fip->field_passcount) {
|
if (fip->field_passcount) {
|
||||||
char* cp;
|
char* cp;
|
||||||
if (wc == (uint16) TIFF_VARIABLE2) {
|
if (wc == (uint16) TIFF_VARIABLE2) {
|
||||||
|
|
@ -627,7 +627,7 @@ TIFFWriteNormalTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip)
|
||||||
} else if (wc == (unsigned short) TIFF_VARIABLE2) {
|
} else if (wc == (unsigned short) TIFF_VARIABLE2) {
|
||||||
TIFFGetField(tif, fip->field_tag, &wc2, &cp);
|
TIFFGetField(tif, fip->field_tag, &wc2, &cp);
|
||||||
dir->tdir_count = wc2;
|
dir->tdir_count = wc2;
|
||||||
} else
|
} else
|
||||||
TIFFGetField(tif, fip->field_tag, &cp);
|
TIFFGetField(tif, fip->field_tag, &cp);
|
||||||
if (!TIFFWriteByteArray(tif, dir, cp))
|
if (!TIFFWriteByteArray(tif, dir, cp))
|
||||||
return (0);
|
return (0);
|
||||||
|
|
@ -697,7 +697,7 @@ TIFFWritePerSampleShorts(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
|
||||||
TIFFGetField(tif, tag, &v);
|
TIFFGetField(tif, tag, &v);
|
||||||
for (i = 0; i < samples; i++)
|
for (i = 0; i < samples; i++)
|
||||||
w[i] = v;
|
w[i] = v;
|
||||||
|
|
||||||
dir->tdir_tag = (uint16) tag;
|
dir->tdir_tag = (uint16) tag;
|
||||||
dir->tdir_type = (uint16) TIFF_SHORT;
|
dir->tdir_type = (uint16) TIFF_SHORT;
|
||||||
dir->tdir_count = samples;
|
dir->tdir_count = samples;
|
||||||
|
|
@ -925,7 +925,7 @@ TIFFWriteAnyArray(TIFF* tif,
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TIFF_BYTE:
|
case TIFF_BYTE:
|
||||||
{
|
{
|
||||||
uint8* bp = (uint8*) w;
|
uint8* bp = (uint8*) w;
|
||||||
for (i = 0; i < (int) n; i++)
|
for (i = 0; i < (int) n; i++)
|
||||||
bp[i] = (uint8) v[i];
|
bp[i] = (uint8) v[i];
|
||||||
|
|
@ -934,7 +934,7 @@ TIFFWriteAnyArray(TIFF* tif,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TIFF_SBYTE:
|
case TIFF_SBYTE:
|
||||||
{
|
{
|
||||||
int8* bp = (int8*) w;
|
int8* bp = (int8*) w;
|
||||||
for (i = 0; i < (int) n; i++)
|
for (i = 0; i < (int) n; i++)
|
||||||
bp[i] = (int8) v[i];
|
bp[i] = (int8) v[i];
|
||||||
|
|
@ -952,7 +952,7 @@ TIFFWriteAnyArray(TIFF* tif,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TIFF_SSHORT:
|
case TIFF_SSHORT:
|
||||||
{
|
{
|
||||||
int16* bp = (int16*) w;
|
int16* bp = (int16*) w;
|
||||||
for (i = 0; i < (int) n; i++)
|
for (i = 0; i < (int) n; i++)
|
||||||
bp[i] = (int16) v[i];
|
bp[i] = (int16) v[i];
|
||||||
|
|
@ -979,7 +979,7 @@ TIFFWriteAnyArray(TIFF* tif,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TIFF_FLOAT:
|
case TIFF_FLOAT:
|
||||||
{
|
{
|
||||||
float* bp = (float*) w;
|
float* bp = (float*) w;
|
||||||
for (i = 0; i < (int) n; i++)
|
for (i = 0; i < (int) n; i++)
|
||||||
bp[i] = (float) v[i];
|
bp[i] = (float) v[i];
|
||||||
|
|
@ -1081,11 +1081,11 @@ TIFFWriteData(TIFF* tif, TIFFDirEntry* dir, char* cp)
|
||||||
/*
|
/*
|
||||||
* Similar to TIFFWriteDirectory(), but if the directory has already
|
* Similar to TIFFWriteDirectory(), but if the directory has already
|
||||||
* been written once, it is relocated to the end of the file, in case it
|
* been written once, it is relocated to the end of the file, in case it
|
||||||
* has changed in size. Note that this will result in the loss of the
|
* has changed in size. Note that this will result in the loss of the
|
||||||
* previously used directory space.
|
* previously used directory space.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
TIFFRewriteDirectory( TIFF *tif )
|
TIFFRewriteDirectory( TIFF *tif )
|
||||||
{
|
{
|
||||||
static const char module[] = "TIFFRewriteDirectory";
|
static const char module[] = "TIFFRewriteDirectory";
|
||||||
|
|
@ -1098,17 +1098,17 @@ TIFFRewriteDirectory( TIFF *tif )
|
||||||
** Find and zero the pointer to this directory, so that TIFFLinkDirectory
|
** Find and zero the pointer to this directory, so that TIFFLinkDirectory
|
||||||
** will cause it to be added after this directories current pre-link.
|
** will cause it to be added after this directories current pre-link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Is it the first directory in the file? */
|
/* Is it the first directory in the file? */
|
||||||
if (tif->tif_header.tiff_diroff == tif->tif_diroff)
|
if (tif->tif_header.tiff_diroff == tif->tif_diroff)
|
||||||
{
|
{
|
||||||
tif->tif_header.tiff_diroff = 0;
|
tif->tif_header.tiff_diroff = 0;
|
||||||
tif->tif_diroff = 0;
|
tif->tif_diroff = 0;
|
||||||
|
|
||||||
TIFFSeekFile(tif, (toff_t)(TIFF_MAGIC_SIZE+TIFF_VERSION_SIZE),
|
TIFFSeekFile(tif, (toff_t)(TIFF_MAGIC_SIZE+TIFF_VERSION_SIZE),
|
||||||
SEEK_SET);
|
SEEK_SET);
|
||||||
if (!WriteOK(tif, &(tif->tif_header.tiff_diroff),
|
if (!WriteOK(tif, &(tif->tif_header.tiff_diroff),
|
||||||
sizeof (tif->tif_diroff)))
|
sizeof (tif->tif_diroff)))
|
||||||
{
|
{
|
||||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error updating TIFF header");
|
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error updating TIFF header");
|
||||||
return (0);
|
return (0);
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
|
||||||
n = tif->tif_rawdatasize - tif->tif_rawcc;
|
n = tif->tif_rawdatasize - tif->tif_rawcc;
|
||||||
|
|
||||||
assert( n > 0 );
|
assert( n > 0 );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Avoid copy if client has setup raw
|
* Avoid copy if client has setup raw
|
||||||
* data buffer to avoid extra copy.
|
* data buffer to avoid extra copy.
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -70,3 +70,4 @@ TIFFErrorExt(thandle_t fd, const char* module, const char* fmt, ...)
|
||||||
(*_TIFFerrorHandlerExt)(fd, module, fmt, ap);
|
(*_TIFFerrorHandlerExt)(fd, module, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1990-1997 Sam Leffler
|
* Copyright (c) 1990-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -562,7 +562,7 @@ static const int _msbmask[9] =
|
||||||
if (bit == 0) \
|
if (bit == 0) \
|
||||||
_FlushBits(tif); \
|
_FlushBits(tif); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write a variable-length bit-value to
|
* Write a variable-length bit-value to
|
||||||
* the output stream. Values are
|
* the output stream. Values are
|
||||||
|
|
@ -667,7 +667,7 @@ Fax3PutEOL(TIFF* tif)
|
||||||
else
|
else
|
||||||
align = sp->bit - align;
|
align = sp->bit - align;
|
||||||
code = 0;
|
code = 0;
|
||||||
tparm=align;
|
tparm=align;
|
||||||
_PutBits(tif, 0, tparm);
|
_PutBits(tif, 0, tparm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1069,7 +1069,7 @@ static void
|
||||||
Fax3Cleanup(TIFF* tif)
|
Fax3Cleanup(TIFF* tif)
|
||||||
{
|
{
|
||||||
Fax3CodecState* sp = DecoderState(tif);
|
Fax3CodecState* sp = DecoderState(tif);
|
||||||
|
|
||||||
assert(sp != 0);
|
assert(sp != 0);
|
||||||
|
|
||||||
tif->tif_tagmethods.vgetfield = sp->b.vgetparent;
|
tif->tif_tagmethods.vgetfield = sp->b.vgetparent;
|
||||||
|
|
@ -1082,7 +1082,7 @@ Fax3Cleanup(TIFF* tif)
|
||||||
|
|
||||||
if (Fax3State(tif)->subaddress)
|
if (Fax3State(tif)->subaddress)
|
||||||
_TIFFfree(Fax3State(tif)->subaddress);
|
_TIFFfree(Fax3State(tif)->subaddress);
|
||||||
|
|
||||||
//Patch by cxl, 08-01-29
|
//Patch by cxl, 08-01-29
|
||||||
if (Fax3State(tif)->faxdcs)
|
if (Fax3State(tif)->faxdcs)
|
||||||
_TIFFfree(Fax3State(tif)->faxdcs);
|
_TIFFfree(Fax3State(tif)->faxdcs);
|
||||||
|
|
@ -1325,7 +1325,7 @@ InitCCITTFax3(TIFF* tif)
|
||||||
sp->vsetparent = tif->tif_tagmethods.vsetfield;
|
sp->vsetparent = tif->tif_tagmethods.vsetfield;
|
||||||
tif->tif_tagmethods.vsetfield = Fax3VSetField; /* hook for codec tags */
|
tif->tif_tagmethods.vsetfield = Fax3VSetField; /* hook for codec tags */
|
||||||
tif->tif_tagmethods.printdir = Fax3PrintDir; /* hook for codec tags */
|
tif->tif_tagmethods.printdir = Fax3PrintDir; /* hook for codec tags */
|
||||||
sp->groupoptions = 0;
|
sp->groupoptions = 0;
|
||||||
sp->recvparams = 0;
|
sp->recvparams = 0;
|
||||||
sp->subaddress = NULL;
|
sp->subaddress = NULL;
|
||||||
sp->faxdcs = NULL;
|
sp->faxdcs = NULL;
|
||||||
|
|
@ -1415,7 +1415,7 @@ Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
|
||||||
#ifdef FAX3_DEBUG
|
#ifdef FAX3_DEBUG
|
||||||
if( GetBits(13) != 0x1001 )
|
if( GetBits(13) != 0x1001 )
|
||||||
fputs( "Bad RTC\n", stderr );
|
fputs( "Bad RTC\n", stderr );
|
||||||
#endif
|
#endif
|
||||||
ClrBits( 13 );
|
ClrBits( 13 );
|
||||||
(*sp->fill)(buf, thisrun, pa, lastx);
|
(*sp->fill)(buf, thisrun, pa, lastx);
|
||||||
UNCACHE_STATE(tif, sp);
|
UNCACHE_STATE(tif, sp);
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1990-1997 Sam Leffler
|
* Copyright (c) 1990-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ static int pickTileSeparateCase(TIFFRGBAImage*);
|
||||||
|
|
||||||
static const char photoTag[] = "PhotometricInterpretation";
|
static const char photoTag[] = "PhotometricInterpretation";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper constants used in Orientation tag handling
|
* Helper constants used in Orientation tag handling
|
||||||
*/
|
*/
|
||||||
#define FLIP_VERTICALLY 0x01
|
#define FLIP_VERTICALLY 0x01
|
||||||
|
|
@ -56,7 +56,7 @@ TIFFDisplay display_sRGB = {
|
||||||
{ 3.2410F, -1.5374F, -0.4986F },
|
{ 3.2410F, -1.5374F, -0.4986F },
|
||||||
{ -0.9692F, 1.8760F, 0.0416F },
|
{ -0.9692F, 1.8760F, 0.0416F },
|
||||||
{ 0.0556F, -0.2040F, 1.0570F }
|
{ 0.0556F, -0.2040F, 1.0570F }
|
||||||
},
|
},
|
||||||
100.0F, 100.0F, 100.0F, /* Light o/p for reference white */
|
100.0F, 100.0F, 100.0F, /* Light o/p for reference white */
|
||||||
255, 255, 255, /* Pixel values for ref. white */
|
255, 255, 255, /* Pixel values for ref. white */
|
||||||
1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */
|
1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */
|
||||||
|
|
@ -107,7 +107,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||||
case PHOTOMETRIC_MINISWHITE:
|
case PHOTOMETRIC_MINISWHITE:
|
||||||
case PHOTOMETRIC_MINISBLACK:
|
case PHOTOMETRIC_MINISBLACK:
|
||||||
case PHOTOMETRIC_PALETTE:
|
case PHOTOMETRIC_PALETTE:
|
||||||
if (td->td_planarconfig == PLANARCONFIG_CONTIG
|
if (td->td_planarconfig == PLANARCONFIG_CONTIG
|
||||||
&& td->td_samplesperpixel != 1
|
&& td->td_samplesperpixel != 1
|
||||||
&& td->td_bitspersample < 8 ) {
|
&& td->td_bitspersample < 8 ) {
|
||||||
sprintf(emsg,
|
sprintf(emsg,
|
||||||
|
|
@ -121,7 +121,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||||
/*
|
/*
|
||||||
** We should likely validate that any extra samples are either
|
** We should likely validate that any extra samples are either
|
||||||
** to be ignored, or are alpha, and if alpha we should try to use
|
** to be ignored, or are alpha, and if alpha we should try to use
|
||||||
** them. But for now we won't bother with this.
|
** them. But for now we won't bother with this.
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
case PHOTOMETRIC_YCBCR:
|
case PHOTOMETRIC_YCBCR:
|
||||||
|
|
@ -131,7 +131,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PHOTOMETRIC_RGB:
|
case PHOTOMETRIC_RGB:
|
||||||
if (colorchannels < 3) {
|
if (colorchannels < 3) {
|
||||||
sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
|
sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
|
||||||
"Color channels", colorchannels);
|
"Color channels", colorchannels);
|
||||||
|
|
@ -236,7 +236,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
|
||||||
img->greencmap = NULL;
|
img->greencmap = NULL;
|
||||||
img->bluecmap = NULL;
|
img->bluecmap = NULL;
|
||||||
img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */
|
img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */
|
||||||
|
|
||||||
img->tif = tif;
|
img->tif = tif;
|
||||||
img->stoponerr = stop;
|
img->stoponerr = stop;
|
||||||
TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
|
TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
|
||||||
|
|
@ -271,8 +271,8 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
|
||||||
if( !TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric))
|
if( !TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric))
|
||||||
img->photometric = PHOTOMETRIC_MINISWHITE;
|
img->photometric = PHOTOMETRIC_MINISWHITE;
|
||||||
|
|
||||||
if( extrasamples == 0
|
if( extrasamples == 0
|
||||||
&& img->samplesperpixel == 4
|
&& img->samplesperpixel == 4
|
||||||
&& img->photometric == PHOTOMETRIC_RGB )
|
&& img->photometric == PHOTOMETRIC_RGB )
|
||||||
{
|
{
|
||||||
img->alpha = EXTRASAMPLE_ASSOCALPHA;
|
img->alpha = EXTRASAMPLE_ASSOCALPHA;
|
||||||
|
|
@ -320,11 +320,11 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
|
||||||
_TIFFmemcpy( img->redcmap, red_orig, n_color * 2 );
|
_TIFFmemcpy( img->redcmap, red_orig, n_color * 2 );
|
||||||
_TIFFmemcpy( img->greencmap, green_orig, n_color * 2 );
|
_TIFFmemcpy( img->greencmap, green_orig, n_color * 2 );
|
||||||
_TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 );
|
_TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 );
|
||||||
|
|
||||||
/* fall thru... */
|
/* fall thru... */
|
||||||
case PHOTOMETRIC_MINISWHITE:
|
case PHOTOMETRIC_MINISWHITE:
|
||||||
case PHOTOMETRIC_MINISBLACK:
|
case PHOTOMETRIC_MINISBLACK:
|
||||||
if (planarconfig == PLANARCONFIG_CONTIG
|
if (planarconfig == PLANARCONFIG_CONTIG
|
||||||
&& img->samplesperpixel != 1
|
&& img->samplesperpixel != 1
|
||||||
&& img->bitspersample < 8 ) {
|
&& img->bitspersample < 8 ) {
|
||||||
sprintf(emsg,
|
sprintf(emsg,
|
||||||
|
|
@ -358,7 +358,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PHOTOMETRIC_RGB:
|
case PHOTOMETRIC_RGB:
|
||||||
if (colorchannels < 3) {
|
if (colorchannels < 3) {
|
||||||
sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
|
sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
|
||||||
"Color channels", colorchannels);
|
"Color channels", colorchannels);
|
||||||
|
|
@ -491,7 +491,7 @@ TIFFReadRGBAImage(TIFF* tif,
|
||||||
ORIENTATION_BOTLEFT, stop);
|
ORIENTATION_BOTLEFT, stop);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
setorientation(TIFFRGBAImage* img)
|
setorientation(TIFFRGBAImage* img)
|
||||||
{
|
{
|
||||||
switch (img->orientation) {
|
switch (img->orientation) {
|
||||||
|
|
@ -557,7 +557,7 @@ setorientation(TIFFRGBAImage* img)
|
||||||
* PlanarConfiguration contiguous if SamplesPerPixel > 1
|
* PlanarConfiguration contiguous if SamplesPerPixel > 1
|
||||||
* or
|
* or
|
||||||
* SamplesPerPixel == 1
|
* SamplesPerPixel == 1
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
{
|
{
|
||||||
|
|
@ -589,12 +589,12 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
y = 0;
|
y = 0;
|
||||||
toskew = -(int32)(tw - w);
|
toskew = -(int32)(tw - w);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (row = 0; row < h; row += nrow)
|
for (row = 0; row < h; row += nrow)
|
||||||
{
|
{
|
||||||
rowstoread = th - (row + img->row_offset) % th;
|
rowstoread = th - (row + img->row_offset) % th;
|
||||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||||
for (col = 0; col < w; col += tw)
|
for (col = 0; col < w; col += tw)
|
||||||
{
|
{
|
||||||
if (TIFFReadTile(tif, buf, col+img->col_offset,
|
if (TIFFReadTile(tif, buf, col+img->col_offset,
|
||||||
row+img->row_offset, 0, 0) < 0 && img->stoponerr)
|
row+img->row_offset, 0, 0) < 0 && img->stoponerr)
|
||||||
|
|
@ -602,10 +602,10 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
|
pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
|
||||||
|
|
||||||
if (col + tw > w)
|
if (col + tw > w)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Tile is clipped horizontally. Calculate
|
* Tile is clipped horizontally. Calculate
|
||||||
|
|
@ -616,7 +616,7 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
(*put)(img, raster+y*w+col, col, y,
|
(*put)(img, raster+y*w+col, col, y,
|
||||||
npix, nrow, fromskew, toskew + fromskew, buf + pos);
|
npix, nrow, fromskew, toskew + fromskew, buf + pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(*put)(img, raster+y*w+col, col, y, tw, nrow, 0, toskew, buf + pos);
|
(*put)(img, raster+y*w+col, col, y, tw, nrow, 0, toskew, buf + pos);
|
||||||
}
|
}
|
||||||
|
|
@ -632,7 +632,7 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
for (line = 0; line < h; line++) {
|
for (line = 0; line < h; line++) {
|
||||||
uint32 *left = raster + (line * w);
|
uint32 *left = raster + (line * w);
|
||||||
uint32 *right = left + w - 1;
|
uint32 *right = left + w - 1;
|
||||||
|
|
||||||
while ( left < right ) {
|
while ( left < right ) {
|
||||||
uint32 temp = *left;
|
uint32 temp = *left;
|
||||||
*left = *right;
|
*left = *right;
|
||||||
|
|
@ -650,7 +650,7 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
* SamplesPerPixel > 1
|
* SamplesPerPixel > 1
|
||||||
* PlanarConfiguration separated
|
* PlanarConfiguration separated
|
||||||
* We assume that all such images are RGB.
|
* We assume that all such images are RGB.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
{
|
{
|
||||||
|
|
@ -696,11 +696,11 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
toskew = -(int32)(tw - w);
|
toskew = -(int32)(tw - w);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (row = 0; row < h; row += nrow)
|
for (row = 0; row < h; row += nrow)
|
||||||
{
|
{
|
||||||
rowstoread = th - (row + img->row_offset) % th;
|
rowstoread = th - (row + img->row_offset) % th;
|
||||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||||
for (col = 0; col < w; col += tw)
|
for (col = 0; col < w; col += tw)
|
||||||
{
|
{
|
||||||
if (TIFFReadTile(tif, r, col+img->col_offset,
|
if (TIFFReadTile(tif, r, col+img->col_offset,
|
||||||
row+img->row_offset,0,0) < 0 && img->stoponerr)
|
row+img->row_offset,0,0) < 0 && img->stoponerr)
|
||||||
|
|
@ -729,7 +729,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
|
|
||||||
pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
|
pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
|
||||||
|
|
||||||
if (col + tw > w)
|
if (col + tw > w)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Tile is clipped horizontally. Calculate
|
* Tile is clipped horizontally. Calculate
|
||||||
|
|
@ -738,7 +738,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
uint32 npix = w - col;
|
uint32 npix = w - col;
|
||||||
fromskew = tw - npix;
|
fromskew = tw - npix;
|
||||||
(*put)(img, raster+y*w+col, col, y,
|
(*put)(img, raster+y*w+col, col, y,
|
||||||
npix, nrow, fromskew, toskew + fromskew,
|
npix, nrow, fromskew, toskew + fromskew,
|
||||||
r + pos, g + pos, b + pos, a + pos);
|
r + pos, g + pos, b + pos, a + pos);
|
||||||
} else {
|
} else {
|
||||||
(*put)(img, raster+y*w+col, col, y,
|
(*put)(img, raster+y*w+col, col, y,
|
||||||
|
|
@ -755,7 +755,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
for (line = 0; line < h; line++) {
|
for (line = 0; line < h; line++) {
|
||||||
uint32 *left = raster + (line * w);
|
uint32 *left = raster + (line * w);
|
||||||
uint32 *right = left + w - 1;
|
uint32 *right = left + w - 1;
|
||||||
|
|
||||||
while ( left < right ) {
|
while ( left < right ) {
|
||||||
uint32 temp = *left;
|
uint32 temp = *left;
|
||||||
*left = *right;
|
*left = *right;
|
||||||
|
|
@ -774,7 +774,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
* PlanarConfiguration contiguous if SamplesPerPixel > 1
|
* PlanarConfiguration contiguous if SamplesPerPixel > 1
|
||||||
* or
|
* or
|
||||||
* SamplesPerPixel == 1
|
* SamplesPerPixel == 1
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
{
|
{
|
||||||
|
|
@ -808,13 +808,13 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
|
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
|
||||||
scanline = TIFFScanlineSize(tif);
|
scanline = TIFFScanlineSize(tif);
|
||||||
fromskew = (w < imagewidth ? imagewidth - w : 0);
|
fromskew = (w < imagewidth ? imagewidth - w : 0);
|
||||||
for (row = 0; row < h; row += nrow)
|
for (row = 0; row < h; row += nrow)
|
||||||
{
|
{
|
||||||
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
||||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||||
if (TIFFReadEncodedStrip(tif,
|
if (TIFFReadEncodedStrip(tif,
|
||||||
TIFFComputeStrip(tif,row+img->row_offset, 0),
|
TIFFComputeStrip(tif,row+img->row_offset, 0),
|
||||||
buf,
|
buf,
|
||||||
((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
|
|
@ -833,7 +833,7 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
for (line = 0; line < h; line++) {
|
for (line = 0; line < h; line++) {
|
||||||
uint32 *left = raster + (line * w);
|
uint32 *left = raster + (line * w);
|
||||||
uint32 *right = left + w - 1;
|
uint32 *right = left + w - 1;
|
||||||
|
|
||||||
while ( left < right ) {
|
while ( left < right ) {
|
||||||
uint32 temp = *left;
|
uint32 temp = *left;
|
||||||
*left = *right;
|
*left = *right;
|
||||||
|
|
@ -896,27 +896,27 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
|
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
|
||||||
scanline = TIFFScanlineSize(tif);
|
scanline = TIFFScanlineSize(tif);
|
||||||
fromskew = (w < imagewidth ? imagewidth - w : 0);
|
fromskew = (w < imagewidth ? imagewidth - w : 0);
|
||||||
for (row = 0; row < h; row += nrow)
|
for (row = 0; row < h; row += nrow)
|
||||||
{
|
{
|
||||||
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
||||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||||
offset_row = row + img->row_offset;
|
offset_row = row + img->row_offset;
|
||||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
|
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
|
||||||
r, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
r, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
|
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
|
||||||
g, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
g, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
|
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
|
||||||
b, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
b, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
@ -924,7 +924,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
}
|
}
|
||||||
if (alpha &&
|
if (alpha &&
|
||||||
(TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
|
(TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
|
||||||
a, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
a, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr))
|
&& img->stoponerr))
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
@ -932,7 +932,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = ((row + img->row_offset) % rowsperstrip) * scanline;
|
pos = ((row + img->row_offset) % rowsperstrip) * scanline;
|
||||||
(*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, r + pos, g + pos,
|
(*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, r + pos, g + pos,
|
||||||
b + pos, a + pos);
|
b + pos, a + pos);
|
||||||
y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
|
y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
|
||||||
}
|
}
|
||||||
|
|
@ -943,7 +943,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
for (line = 0; line < h; line++) {
|
for (line = 0; line < h; line++) {
|
||||||
uint32 *left = raster + (line * w);
|
uint32 *left = raster + (line * w);
|
||||||
uint32 *right = left + w - 1;
|
uint32 *right = left + w - 1;
|
||||||
|
|
||||||
while ( left < right ) {
|
while ( left < right ) {
|
||||||
uint32 temp = *left;
|
uint32 temp = *left;
|
||||||
*left = *right;
|
*left = *right;
|
||||||
|
|
@ -1012,7 +1012,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||||
op2; \
|
op2; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SKEW(r,g,b,skew) { r += skew; g += skew; b += skew; }
|
#define SKEW(r,g,b,skew) { r += skew; g += skew; b += skew; }
|
||||||
#define SKEW4(r,g,b,a,skew) { r += skew; g += skew; b += skew; a+= skew; }
|
#define SKEW4(r,g,b,a,skew) { r += skew; g += skew; b += skew; a+= skew; }
|
||||||
|
|
||||||
|
|
@ -1349,7 +1349,7 @@ DECLAREContigPutFunc(putRGBUAcontig16bittile)
|
||||||
* we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
|
* we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
|
||||||
*/
|
*/
|
||||||
for (x = w; x-- > 0;) {
|
for (x = w; x-- > 0;) {
|
||||||
a = wp[3] >> 4;
|
a = wp[3] >> 4;
|
||||||
r = (wp[0] * a) / 0x10eff;
|
r = (wp[0] * a) / 0x10eff;
|
||||||
g = (wp[1] * a) / 0x10eff;
|
g = (wp[1] * a) / 0x10eff;
|
||||||
b = (wp[2] * a) / 0x10eff;
|
b = (wp[2] * a) / 0x10eff;
|
||||||
|
|
@ -1544,7 +1544,7 @@ DECLARESepPutFunc(putRGBUAseparate16bittile)
|
||||||
* we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
|
* we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
|
||||||
*/
|
*/
|
||||||
for (x = w; x-- > 0;) {
|
for (x = w; x-- > 0;) {
|
||||||
a = *wa++ >> 4;
|
a = *wa++ >> 4;
|
||||||
r = (*wr++ * a) / 0x10eff;
|
r = (*wr++ * a) / 0x10eff;
|
||||||
g = (*wg++ * a) / 0x10eff;
|
g = (*wg++ * a) / 0x10eff;
|
||||||
b = (*wb++ * a) / 0x10eff;
|
b = (*wb++ * a) / 0x10eff;
|
||||||
|
|
@ -1591,22 +1591,22 @@ DECLAREContigPutFunc(putcontig8bitCIELab)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 8-bit packed YCbCr samples => RGB
|
* 8-bit packed YCbCr samples => RGB
|
||||||
* This function is generic for different sampling sizes,
|
* This function is generic for different sampling sizes,
|
||||||
* and can handle blocks sizes that aren't multiples of the
|
* and can handle blocks sizes that aren't multiples of the
|
||||||
* sampling size. However, it is substantially less optimized
|
* sampling size. However, it is substantially less optimized
|
||||||
* than the specific sampling cases. It is used as a fallback
|
* than the specific sampling cases. It is used as a fallback
|
||||||
* for difficult blocks.
|
* for difficult blocks.
|
||||||
*/
|
*/
|
||||||
#ifdef notdef
|
#ifdef notdef
|
||||||
static void putcontig8bitYCbCrGenericTile(
|
static void putcontig8bitYCbCrGenericTile(
|
||||||
TIFFRGBAImage* img,
|
TIFFRGBAImage* img,
|
||||||
uint32* cp,
|
uint32* cp,
|
||||||
uint32 x, uint32 y,
|
uint32 x, uint32 y,
|
||||||
uint32 w, uint32 h,
|
uint32 w, uint32 h,
|
||||||
int32 fromskew, int32 toskew,
|
int32 fromskew, int32 toskew,
|
||||||
unsigned char* pp,
|
unsigned char* pp,
|
||||||
int h_group,
|
int h_group,
|
||||||
int v_group )
|
int v_group )
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -1626,9 +1626,9 @@ static void putcontig8bitYCbCrGenericTile(
|
||||||
int y_line_group = yy / v_group;
|
int y_line_group = yy / v_group;
|
||||||
int y_remainder = yy - y_line_group * v_group;
|
int y_remainder = yy - y_line_group * v_group;
|
||||||
|
|
||||||
pp_line = pp + v_line_group *
|
pp_line = pp + v_line_group *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for( xx = 0; xx < w; xx++ )
|
for( xx = 0; xx < w; xx++ )
|
||||||
{
|
{
|
||||||
Cb = pp
|
Cb = pp
|
||||||
|
|
@ -1679,7 +1679,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile)
|
||||||
(void) y;
|
(void) y;
|
||||||
/* adjust fromskew */
|
/* adjust fromskew */
|
||||||
fromskew = (fromskew * 18) / 4;
|
fromskew = (fromskew * 18) / 4;
|
||||||
if ((h & 3) == 0 && (w & 3) == 0) {
|
if ((h & 3) == 0 && (w & 3) == 0) {
|
||||||
for (; h >= 4; h -= 4) {
|
for (; h >= 4; h -= 4) {
|
||||||
x = w>>2;
|
x = w>>2;
|
||||||
do {
|
do {
|
||||||
|
|
@ -1779,7 +1779,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
|
||||||
do {
|
do {
|
||||||
int32 Cb = pp[8];
|
int32 Cb = pp[8];
|
||||||
int32 Cr = pp[9];
|
int32 Cr = pp[9];
|
||||||
|
|
||||||
YCbCrtoRGB(cp [0], pp[0]);
|
YCbCrtoRGB(cp [0], pp[0]);
|
||||||
YCbCrtoRGB(cp [1], pp[1]);
|
YCbCrtoRGB(cp [1], pp[1]);
|
||||||
YCbCrtoRGB(cp [2], pp[2]);
|
YCbCrtoRGB(cp [2], pp[2]);
|
||||||
|
|
@ -1788,7 +1788,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
|
||||||
YCbCrtoRGB(cp1[1], pp[5]);
|
YCbCrtoRGB(cp1[1], pp[5]);
|
||||||
YCbCrtoRGB(cp1[2], pp[6]);
|
YCbCrtoRGB(cp1[2], pp[6]);
|
||||||
YCbCrtoRGB(cp1[3], pp[7]);
|
YCbCrtoRGB(cp1[3], pp[7]);
|
||||||
|
|
||||||
cp += 4, cp1 += 4;
|
cp += 4, cp1 += 4;
|
||||||
pp += 10;
|
pp += 10;
|
||||||
} while (--x);
|
} while (--x);
|
||||||
|
|
@ -1962,7 +1962,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
|
||||||
int32 Cb = pp[2];
|
int32 Cb = pp[2];
|
||||||
int32 Cr = pp[3];
|
int32 Cr = pp[3];
|
||||||
|
|
||||||
YCbCrtoRGB(cp[0], pp[0]);
|
YCbCrtoRGB(cp[0], pp[0]);
|
||||||
YCbCrtoRGB(cp[1], pp[1]);
|
YCbCrtoRGB(cp[1], pp[1]);
|
||||||
|
|
||||||
cp += 2;
|
cp += 2;
|
||||||
|
|
@ -1973,7 +1973,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
|
||||||
{
|
{
|
||||||
int32 Cb = pp[2];
|
int32 Cb = pp[2];
|
||||||
int32 Cr = pp[3];
|
int32 Cr = pp[3];
|
||||||
|
|
||||||
YCbCrtoRGB(cp [0], pp[0]);
|
YCbCrtoRGB(cp [0], pp[0]);
|
||||||
|
|
||||||
cp += 1;
|
cp += 1;
|
||||||
|
|
@ -1993,7 +1993,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr11tile)
|
||||||
(void) y;
|
(void) y;
|
||||||
fromskew *= 3;
|
fromskew *= 3;
|
||||||
do {
|
do {
|
||||||
x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */
|
x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */
|
||||||
do {
|
do {
|
||||||
int32 Cb = pp[1];
|
int32 Cb = pp[1];
|
||||||
int32 Cr = pp[2];
|
int32 Cr = pp[2];
|
||||||
|
|
@ -2154,14 +2154,14 @@ makebwmap(TIFFRGBAImage* img)
|
||||||
* Construct a mapping table to convert from the range
|
* Construct a mapping table to convert from the range
|
||||||
* of the data samples to [0,255] --for display. This
|
* of the data samples to [0,255] --for display. This
|
||||||
* process also handles inverting B&W images when needed.
|
* process also handles inverting B&W images when needed.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
setupMap(TIFFRGBAImage* img)
|
setupMap(TIFFRGBAImage* img)
|
||||||
{
|
{
|
||||||
int32 x, range;
|
int32 x, range;
|
||||||
|
|
||||||
range = (int32)((1L<<img->bitspersample)-1);
|
range = (int32)((1L<<img->bitspersample)-1);
|
||||||
|
|
||||||
/* treat 16 bit the same as eight bit */
|
/* treat 16 bit the same as eight bit */
|
||||||
if( img->bitspersample == 16 )
|
if( img->bitspersample == 16 )
|
||||||
range = (int32) 255;
|
range = (int32) 255;
|
||||||
|
|
@ -2284,7 +2284,7 @@ makecmap(TIFFRGBAImage* img)
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Construct any mapping table used
|
* Construct any mapping table used
|
||||||
* by the associated put routine.
|
* by the associated put routine.
|
||||||
*/
|
*/
|
||||||
|
|
@ -2461,7 +2461,7 @@ TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )
|
||||||
"Can't use TIFFReadRGBAStrip() with tiled file.");
|
"Can't use TIFFReadRGBAStrip() with tiled file.");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
|
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
|
||||||
if( (row % rowsperstrip) != 0 )
|
if( (row % rowsperstrip) != 0 )
|
||||||
{
|
{
|
||||||
|
|
@ -2479,15 +2479,15 @@ TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )
|
||||||
rows_to_read = img.height - row;
|
rows_to_read = img.height - row;
|
||||||
else
|
else
|
||||||
rows_to_read = rowsperstrip;
|
rows_to_read = rowsperstrip;
|
||||||
|
|
||||||
ok = TIFFRGBAImageGet(&img, raster, img.width, rows_to_read );
|
ok = TIFFRGBAImageGet(&img, raster, img.width, rows_to_read );
|
||||||
|
|
||||||
TIFFRGBAImageEnd(&img);
|
TIFFRGBAImageEnd(&img);
|
||||||
} else {
|
} else {
|
||||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
|
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
|
||||||
ok = 0;
|
ok = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ok);
|
return (ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2512,14 +2512,14 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
|
||||||
* Verify that our request is legal - on a tile file, and on a
|
* Verify that our request is legal - on a tile file, and on a
|
||||||
* tile boundary.
|
* tile boundary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if( !TIFFIsTiled( tif ) )
|
if( !TIFFIsTiled( tif ) )
|
||||||
{
|
{
|
||||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif),
|
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif),
|
||||||
"Can't use TIFFReadRGBATile() with stripped file.");
|
"Can't use TIFFReadRGBATile() with stripped file.");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tile_xsize);
|
TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tile_xsize);
|
||||||
TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tile_ysize);
|
TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tile_ysize);
|
||||||
if( (col % tile_xsize) != 0 || (row % tile_ysize) != 0 )
|
if( (col % tile_xsize) != 0 || (row % tile_ysize) != 0 )
|
||||||
|
|
@ -2533,8 +2533,8 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
|
||||||
/*
|
/*
|
||||||
* Setup the RGBA reader.
|
* Setup the RGBA reader.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!TIFFRGBAImageOK(tif, emsg)
|
if (!TIFFRGBAImageOK(tif, emsg)
|
||||||
|| !TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
|
|| !TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
|
||||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
|
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), emsg);
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
|
@ -2551,7 +2551,7 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
|
||||||
read_ysize = img.height - row;
|
read_ysize = img.height - row;
|
||||||
else
|
else
|
||||||
read_ysize = tile_ysize;
|
read_ysize = tile_ysize;
|
||||||
|
|
||||||
if( col + tile_xsize > img.width )
|
if( col + tile_xsize > img.width )
|
||||||
read_xsize = img.width - col;
|
read_xsize = img.width - col;
|
||||||
else
|
else
|
||||||
|
|
@ -2560,12 +2560,12 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
|
||||||
/*
|
/*
|
||||||
* Read the chunk of imagery.
|
* Read the chunk of imagery.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
img.row_offset = row;
|
img.row_offset = row;
|
||||||
img.col_offset = col;
|
img.col_offset = col;
|
||||||
|
|
||||||
ok = TIFFRGBAImageGet(&img, raster, read_xsize, read_ysize );
|
ok = TIFFRGBAImageGet(&img, raster, read_xsize, read_ysize );
|
||||||
|
|
||||||
TIFFRGBAImageEnd(&img);
|
TIFFRGBAImageEnd(&img);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -2573,7 +2573,7 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
|
||||||
* shifting the data around as if a full tile of data is being returned.
|
* shifting the data around as if a full tile of data is being returned.
|
||||||
*
|
*
|
||||||
* This is all the more complicated because the image is organized in
|
* This is all the more complicated because the image is organized in
|
||||||
* bottom to top format.
|
* bottom to top format.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if( read_xsize == tile_xsize && read_ysize == tile_ysize )
|
if( read_xsize == tile_xsize && read_ysize == tile_ysize )
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1994-1997 Sam Leffler
|
* Copyright (c) 1994-1997 Sam Leffler
|
||||||
* Copyright (c) 1994-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1994-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -726,9 +726,9 @@ JPEGPreDecode(TIFF* tif, tsample_t s)
|
||||||
sp->cinfo.d.image_height != segment_height) {
|
sp->cinfo.d.image_height != segment_height) {
|
||||||
TIFFWarningExt(tif->tif_clientdata, module,
|
TIFFWarningExt(tif->tif_clientdata, module,
|
||||||
"Improper JPEG strip/tile size, expected %dx%d, got %dx%d",
|
"Improper JPEG strip/tile size, expected %dx%d, got %dx%d",
|
||||||
segment_width,
|
segment_width,
|
||||||
segment_height,
|
segment_height,
|
||||||
sp->cinfo.d.image_width,
|
sp->cinfo.d.image_width,
|
||||||
sp->cinfo.d.image_height);
|
sp->cinfo.d.image_height);
|
||||||
}
|
}
|
||||||
if (sp->cinfo.d.num_components !=
|
if (sp->cinfo.d.num_components !=
|
||||||
|
|
@ -863,38 +863,38 @@ JPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
|
||||||
JSAMPROW line_work_buf = NULL;
|
JSAMPROW line_work_buf = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** For 6B, only use temporary buffer for 12 bit imagery.
|
** For 6B, only use temporary buffer for 12 bit imagery.
|
||||||
** For Mk1 always use it.
|
** For Mk1 always use it.
|
||||||
*/
|
*/
|
||||||
#if !defined(JPEG_LIB_MK1)
|
#if !defined(JPEG_LIB_MK1)
|
||||||
if( sp->cinfo.d.data_precision == 12 )
|
if( sp->cinfo.d.data_precision == 12 )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
line_work_buf = (JSAMPROW)
|
line_work_buf = (JSAMPROW)
|
||||||
_TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width
|
_TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width
|
||||||
* sp->cinfo.d.num_components );
|
* sp->cinfo.d.num_components );
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if( line_work_buf != NULL )
|
if( line_work_buf != NULL )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
** In the MK1 case, we aways read into a 16bit buffer, and then
|
** In the MK1 case, we aways read into a 16bit buffer, and then
|
||||||
** pack down to 12bit or 8bit. In 6B case we only read into 16
|
** pack down to 12bit or 8bit. In 6B case we only read into 16
|
||||||
** bit buffer for 12bit data, which we need to repack.
|
** bit buffer for 12bit data, which we need to repack.
|
||||||
*/
|
*/
|
||||||
if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1)
|
if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if( sp->cinfo.d.data_precision == 12 )
|
if( sp->cinfo.d.data_precision == 12 )
|
||||||
{
|
{
|
||||||
int value_pairs = (sp->cinfo.d.output_width
|
int value_pairs = (sp->cinfo.d.output_width
|
||||||
* sp->cinfo.d.num_components) / 2;
|
* sp->cinfo.d.num_components) / 2;
|
||||||
int iPair;
|
int iPair;
|
||||||
|
|
||||||
for( iPair = 0; iPair < value_pairs; iPair++ )
|
for( iPair = 0; iPair < value_pairs; iPair++ )
|
||||||
{
|
{
|
||||||
unsigned char *out_ptr =
|
unsigned char *out_ptr =
|
||||||
((unsigned char *) buf) + iPair * 3;
|
((unsigned char *) buf) + iPair * 3;
|
||||||
JSAMPLE *in_ptr = line_work_buf + iPair * 2;
|
JSAMPLE *in_ptr = line_work_buf + iPair * 2;
|
||||||
|
|
||||||
|
|
@ -906,13 +906,13 @@ JPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
|
||||||
}
|
}
|
||||||
else if( sp->cinfo.d.data_precision == 8 )
|
else if( sp->cinfo.d.data_precision == 8 )
|
||||||
{
|
{
|
||||||
int value_count = (sp->cinfo.d.output_width
|
int value_count = (sp->cinfo.d.output_width
|
||||||
* sp->cinfo.d.num_components);
|
* sp->cinfo.d.num_components);
|
||||||
int iValue;
|
int iValue;
|
||||||
|
|
||||||
for( iValue = 0; iValue < value_count; iValue++ )
|
for( iValue = 0; iValue < value_count; iValue++ )
|
||||||
{
|
{
|
||||||
((unsigned char *) buf)[iValue] =
|
((unsigned char *) buf)[iValue] =
|
||||||
line_work_buf[iValue] & 0xff;
|
line_work_buf[iValue] & 0xff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -920,11 +920,11 @@ JPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
** In the libjpeg6b 8bit case. We read directly into the
|
** In the libjpeg6b 8bit case. We read directly into the
|
||||||
** TIFF buffer.
|
** TIFF buffer.
|
||||||
*/
|
*/
|
||||||
JSAMPROW bufptr = (JSAMPROW)buf;
|
JSAMPROW bufptr = (JSAMPROW)buf;
|
||||||
|
|
||||||
if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1)
|
if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
@ -959,13 +959,13 @@ JPEGDecodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
|
||||||
/* Cb,Cr both have sampling factors 1, so this is correct */
|
/* Cb,Cr both have sampling factors 1, so this is correct */
|
||||||
JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
|
JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
|
||||||
int samples_per_clump = sp->samplesperclump;
|
int samples_per_clump = sp->samplesperclump;
|
||||||
|
|
||||||
#ifdef JPEG_LIB_MK1
|
#ifdef JPEG_LIB_MK1
|
||||||
unsigned short* tmpbuf = _TIFFmalloc(sizeof(unsigned short) *
|
unsigned short* tmpbuf = _TIFFmalloc(sizeof(unsigned short) *
|
||||||
sp->cinfo.d.output_width *
|
sp->cinfo.d.output_width *
|
||||||
sp->cinfo.d.num_components);
|
sp->cinfo.d.num_components);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
do {
|
do {
|
||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
int ci, clumpoffset;
|
int ci, clumpoffset;
|
||||||
|
|
@ -1053,7 +1053,7 @@ JPEGDecodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
|
||||||
buf += sp->bytesperline;
|
buf += sp->bytesperline;
|
||||||
cc -= sp->bytesperline;
|
cc -= sp->bytesperline;
|
||||||
} while (--nrows > 0);
|
} while (--nrows > 0);
|
||||||
|
|
||||||
#ifdef JPEG_LIB_MK1
|
#ifdef JPEG_LIB_MK1
|
||||||
_TIFFfree(tmpbuf);
|
_TIFFfree(tmpbuf);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1195,9 +1195,9 @@ JPEGSetupEncode(TIFF* tif)
|
||||||
*/
|
*/
|
||||||
#ifdef JPEG_LIB_MK1
|
#ifdef JPEG_LIB_MK1
|
||||||
/* BITS_IN_JSAMPLE now permits 8 and 12 --- dgilbert */
|
/* BITS_IN_JSAMPLE now permits 8 and 12 --- dgilbert */
|
||||||
if (td->td_bitspersample != 8 && td->td_bitspersample != 12)
|
if (td->td_bitspersample != 8 && td->td_bitspersample != 12)
|
||||||
#else
|
#else
|
||||||
if (td->td_bitspersample != BITS_IN_JSAMPLE )
|
if (td->td_bitspersample != BITS_IN_JSAMPLE )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
TIFFErrorExt(tif->tif_clientdata, module, "BitsPerSample %d not allowed for JPEG",
|
TIFFErrorExt(tif->tif_clientdata, module, "BitsPerSample %d not allowed for JPEG",
|
||||||
|
|
@ -1520,7 +1520,7 @@ static void
|
||||||
JPEGCleanup(TIFF* tif)
|
JPEGCleanup(TIFF* tif)
|
||||||
{
|
{
|
||||||
JPEGState *sp = JState(tif);
|
JPEGState *sp = JState(tif);
|
||||||
|
|
||||||
assert(sp != 0);
|
assert(sp != 0);
|
||||||
|
|
||||||
tif->tif_tagmethods.vgetfield = sp->vgetparent;
|
tif->tif_tagmethods.vgetfield = sp->vgetparent;
|
||||||
|
|
@ -1621,18 +1621,18 @@ JPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
* order to get the sampling values from the jpeg data stream. Various
|
* order to get the sampling values from the jpeg data stream. Various
|
||||||
* hacks are various places are done to ensure this function gets called
|
* hacks are various places are done to ensure this function gets called
|
||||||
* before the td_ycbcrsubsampling values are used from the directory structure,
|
* before the td_ycbcrsubsampling values are used from the directory structure,
|
||||||
* including calling TIFFGetField() for the YCBCRSUBSAMPLING field from
|
* including calling TIFFGetField() for the YCBCRSUBSAMPLING field from
|
||||||
* TIFFStripSize(), and the printing code in tif_print.c.
|
* TIFFStripSize(), and the printing code in tif_print.c.
|
||||||
*
|
*
|
||||||
* Note that JPEGPreDeocode() will produce a fairly loud warning when the
|
* Note that JPEGPreDeocode() will produce a fairly loud warning when the
|
||||||
* discovered sampling does not match the default sampling (2,2) or whatever
|
* discovered sampling does not match the default sampling (2,2) or whatever
|
||||||
* was actually in the tiff tags.
|
* was actually in the tiff tags.
|
||||||
*
|
*
|
||||||
* Problems:
|
* Problems:
|
||||||
* o This code will cause one whole strip/tile of compressed data to be
|
* o This code will cause one whole strip/tile of compressed data to be
|
||||||
* loaded just to get the tags right, even if the imagery is never read.
|
* loaded just to get the tags right, even if the imagery is never read.
|
||||||
* It would be more efficient to just load a bit of the header, and
|
* It would be more efficient to just load a bit of the header, and
|
||||||
* initialize things from that.
|
* initialize things from that.
|
||||||
*
|
*
|
||||||
* See the bug in bugzilla for details:
|
* See the bug in bugzilla for details:
|
||||||
*
|
*
|
||||||
|
|
@ -1641,7 +1641,7 @@ JPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
|
||||||
* Frank Warmerdam, July 2002
|
* Frank Warmerdam, July 2002
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
JPEGFixupTestSubsampling( TIFF * tif )
|
JPEGFixupTestSubsampling( TIFF * tif )
|
||||||
{
|
{
|
||||||
#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING
|
#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING
|
||||||
|
|
@ -1651,13 +1651,13 @@ JPEGFixupTestSubsampling( TIFF * tif )
|
||||||
JPEGInitializeLibJPEG( tif, 0, 0 );
|
JPEGInitializeLibJPEG( tif, 0, 0 );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some JPEG-in-TIFF files don't provide the ycbcrsampling tags,
|
* Some JPEG-in-TIFF files don't provide the ycbcrsampling tags,
|
||||||
* and use a sampling schema other than the default 2,2. To handle
|
* and use a sampling schema other than the default 2,2. To handle
|
||||||
* this we actually have to scan the header of a strip or tile of
|
* this we actually have to scan the header of a strip or tile of
|
||||||
* jpeg data to get the sampling.
|
* jpeg data to get the sampling.
|
||||||
*/
|
*/
|
||||||
if( !sp->cinfo.comm.is_decompressor
|
if( !sp->cinfo.comm.is_decompressor
|
||||||
|| sp->ycbcrsampling_fetched
|
|| sp->ycbcrsampling_fetched
|
||||||
|| td->td_photometric != PHOTOMETRIC_YCBCR )
|
|| td->td_photometric != PHOTOMETRIC_YCBCR )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -1673,7 +1673,7 @@ JPEGFixupTestSubsampling( TIFF * tif )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TIFFSetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
|
TIFFSetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
|
||||||
(uint16) sp->h_sampling, (uint16) sp->v_sampling );
|
(uint16) sp->h_sampling, (uint16) sp->v_sampling );
|
||||||
#endif /* CHECK_JPEG_YCBCR_SUBSAMPLING */
|
#endif /* CHECK_JPEG_YCBCR_SUBSAMPLING */
|
||||||
}
|
}
|
||||||
|
|
@ -1771,15 +1771,15 @@ JPEGDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
|
||||||
* The JPEG library initialized used to be done in TIFFInitJPEG(), but
|
* The JPEG library initialized used to be done in TIFFInitJPEG(), but
|
||||||
* now that we allow a TIFF file to be opened in update mode it is necessary
|
* now that we allow a TIFF file to be opened in update mode it is necessary
|
||||||
* to have some way of deciding whether compression or decompression is
|
* to have some way of deciding whether compression or decompression is
|
||||||
* desired other than looking at tif->tif_mode. We accomplish this by
|
* desired other than looking at tif->tif_mode. We accomplish this by
|
||||||
* examining {TILE/STRIP}BYTECOUNTS to see if there is a non-zero entry.
|
* examining {TILE/STRIP}BYTECOUNTS to see if there is a non-zero entry.
|
||||||
* If so, we assume decompression is desired.
|
* If so, we assume decompression is desired.
|
||||||
*
|
*
|
||||||
* This is tricky, because TIFFInitJPEG() is called while the directory is
|
* This is tricky, because TIFFInitJPEG() is called while the directory is
|
||||||
* being read, and generally speaking the BYTECOUNTS tag won't have been read
|
* being read, and generally speaking the BYTECOUNTS tag won't have been read
|
||||||
* at that point. So we try to defer jpeg library initialization till we
|
* at that point. So we try to defer jpeg library initialization till we
|
||||||
* do have that tag ... basically any access that might require the compressor
|
* do have that tag ... basically any access that might require the compressor
|
||||||
* or decompressor that occurs after the reading of the directory.
|
* or decompressor that occurs after the reading of the directory.
|
||||||
*
|
*
|
||||||
* In an ideal world compressors or decompressors would be setup
|
* In an ideal world compressors or decompressors would be setup
|
||||||
* at the point where a single tile or strip was accessed (for read or write)
|
* at the point where a single tile or strip was accessed (for read or write)
|
||||||
|
|
@ -1802,16 +1802,16 @@ static int JPEGInitializeLibJPEG( TIFF * tif, int force_encode, int force_decode
|
||||||
/*
|
/*
|
||||||
* Do we have tile data already? Make sure we initialize the
|
* Do we have tile data already? Make sure we initialize the
|
||||||
* the state in decompressor mode if we have tile data, even if we
|
* the state in decompressor mode if we have tile data, even if we
|
||||||
* are not in read-only file access mode.
|
* are not in read-only file access mode.
|
||||||
*/
|
*/
|
||||||
if( TIFFIsTiled( tif )
|
if( TIFFIsTiled( tif )
|
||||||
&& TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &byte_counts )
|
&& TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &byte_counts )
|
||||||
&& byte_counts != NULL )
|
&& byte_counts != NULL )
|
||||||
{
|
{
|
||||||
data_is_empty = byte_counts[0] == 0;
|
data_is_empty = byte_counts[0] == 0;
|
||||||
}
|
}
|
||||||
if( !TIFFIsTiled( tif )
|
if( !TIFFIsTiled( tif )
|
||||||
&& TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &byte_counts)
|
&& TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &byte_counts)
|
||||||
&& byte_counts != NULL )
|
&& byte_counts != NULL )
|
||||||
{
|
{
|
||||||
data_is_empty = byte_counts[0] == 0;
|
data_is_empty = byte_counts[0] == 0;
|
||||||
|
|
@ -1914,10 +1914,10 @@ TIFFInitJPEG(TIFF* tif, int scheme)
|
||||||
sp->cinfo_initialized = FALSE;
|
sp->cinfo_initialized = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Create a JPEGTables field if no directory has yet been created.
|
** Create a JPEGTables field if no directory has yet been created.
|
||||||
** We do this just to ensure that sufficient space is reserved for
|
** We do this just to ensure that sufficient space is reserved for
|
||||||
** the JPEGTables field. It will be properly created the right
|
** the JPEGTables field. It will be properly created the right
|
||||||
** size later.
|
** size later.
|
||||||
*/
|
*/
|
||||||
if( tif->tif_diroff == 0 )
|
if( tif->tif_diroff == 0 )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1997 Greg Ward Larson
|
* Copyright (c) 1997 Greg Ward Larson
|
||||||
* Copyright (c) 1997 Silicon Graphics, Inc.
|
* Copyright (c) 1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler, Greg Larson and Silicon Graphics may not be used in any
|
* Sam Leffler, Greg Larson and Silicon Graphics may not be used in any
|
||||||
* advertising or publicity relating to the software without the specific,
|
* advertising or publicity relating to the software without the specific,
|
||||||
* prior written permission of Sam Leffler, Greg Larson and Silicon Graphics.
|
* prior written permission of Sam Leffler, Greg Larson and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER, GREG LARSON OR SILICON GRAPHICS BE LIABLE
|
* IN NO EVENT SHALL SAM LEFFLER, GREG LARSON OR SILICON GRAPHICS BE LIABLE
|
||||||
* FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
* LogLuv image support uses the TIFF library to store 16 or 10-bit
|
* LogLuv image support uses the TIFF library to store 16 or 10-bit
|
||||||
* log luminance values with 8 bits each of u and v or a 14-bit index.
|
* log luminance values with 8 bits each of u and v or a 14-bit index.
|
||||||
*
|
*
|
||||||
* The codec can take as input and produce as output 32-bit IEEE float values
|
* The codec can take as input and produce as output 32-bit IEEE float values
|
||||||
* as well as 16-bit integer values. A 16-bit luminance is interpreted
|
* as well as 16-bit integer values. A 16-bit luminance is interpreted
|
||||||
* as a sign bit followed by a 15-bit integer that is converted
|
* as a sign bit followed by a 15-bit integer that is converted
|
||||||
* to and from a linear magnitude using the transformation:
|
* to and from a linear magnitude using the transformation:
|
||||||
|
|
@ -760,7 +760,7 @@ oog_encode(double u, double v) /* encode out-of-gamut chroma */
|
||||||
static int oog_table[NANGLES];
|
static int oog_table[NANGLES];
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
register int i;
|
register int i;
|
||||||
|
|
||||||
if (!initialized) { /* set up perimeter table */
|
if (!initialized) { /* set up perimeter table */
|
||||||
double eps[NANGLES], ua, va, ang, epsa;
|
double eps[NANGLES], ua, va, ang, epsa;
|
||||||
int ui, vi, ustep;
|
int ui, vi, ustep;
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -198,7 +198,7 @@ LZWSetupDecode(TIFF* tif)
|
||||||
if( sp == NULL )
|
if( sp == NULL )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Allocate state block so tag methods have storage to record
|
* Allocate state block so tag methods have storage to record
|
||||||
* values.
|
* values.
|
||||||
*/
|
*/
|
||||||
tif->tif_data = (tidata_t) _TIFFmalloc(sizeof(LZWCodecState));
|
tif->tif_data = (tidata_t) _TIFFmalloc(sizeof(LZWCodecState));
|
||||||
|
|
@ -210,7 +210,7 @@ LZWSetupDecode(TIFF* tif)
|
||||||
|
|
||||||
DecoderState(tif)->dec_codetab = NULL;
|
DecoderState(tif)->dec_codetab = NULL;
|
||||||
DecoderState(tif)->dec_decode = NULL;
|
DecoderState(tif)->dec_decode = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup predictor setup.
|
* Setup predictor setup.
|
||||||
*/
|
*/
|
||||||
|
|
@ -218,7 +218,7 @@ LZWSetupDecode(TIFF* tif)
|
||||||
|
|
||||||
sp = DecoderState(tif);
|
sp = DecoderState(tif);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(sp != NULL);
|
assert(sp != NULL);
|
||||||
|
|
||||||
if (sp->dec_codetab == NULL) {
|
if (sp->dec_codetab == NULL) {
|
||||||
|
|
@ -459,7 +459,7 @@ LZWDecode(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
|
||||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||||
"LZWDecode: Wrong length of decoded string: "
|
"LZWDecode: Wrong length of decoded string: "
|
||||||
"data probably corrupted at scanline %d",
|
"data probably corrupted at scanline %d",
|
||||||
tif->tif_row);
|
tif->tif_row);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (codep->length > occ) {
|
if (codep->length > occ) {
|
||||||
|
|
@ -655,7 +655,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
|
||||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||||
"LZWDecodeCompat: Wrong length of decoded "
|
"LZWDecodeCompat: Wrong length of decoded "
|
||||||
"string: data probably corrupted at scanline %d",
|
"string: data probably corrupted at scanline %d",
|
||||||
tif->tif_row);
|
tif->tif_row);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (codep->length > occ) {
|
if (codep->length > occ) {
|
||||||
|
|
@ -775,16 +775,16 @@ LZWPreEncode(TIFF* tif, tsample_t s)
|
||||||
/*
|
/*
|
||||||
* Encode a chunk of pixels.
|
* Encode a chunk of pixels.
|
||||||
*
|
*
|
||||||
* Uses an open addressing double hashing (no chaining) on the
|
* Uses an open addressing double hashing (no chaining) on the
|
||||||
* prefix code/next character combination. We do a variant of
|
* prefix code/next character combination. We do a variant of
|
||||||
* Knuth's algorithm D (vol. 3, sec. 6.4) along with G. Knott's
|
* Knuth's algorithm D (vol. 3, sec. 6.4) along with G. Knott's
|
||||||
* relatively-prime secondary probe. Here, the modular division
|
* relatively-prime secondary probe. Here, the modular division
|
||||||
* first probe is gives way to a faster exclusive-or manipulation.
|
* first probe is gives way to a faster exclusive-or manipulation.
|
||||||
* Also do block compression with an adaptive reset, whereby the
|
* Also do block compression with an adaptive reset, whereby the
|
||||||
* code table is cleared when the compression ratio decreases,
|
* code table is cleared when the compression ratio decreases,
|
||||||
* but after the table fills. The variable-length output codes
|
* but after the table fills. The variable-length output codes
|
||||||
* are re-sized at this point, and a CODE_CLEAR is generated
|
* are re-sized at this point, and a CODE_CLEAR is generated
|
||||||
* for the decoder.
|
* for the decoder.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
LZWEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
|
LZWEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
|
||||||
|
|
@ -968,7 +968,7 @@ LZWPostEncode(TIFF* tif)
|
||||||
sp->enc_oldcode = (hcode_t) -1;
|
sp->enc_oldcode = (hcode_t) -1;
|
||||||
}
|
}
|
||||||
PutNextCode(op, CODE_EOI);
|
PutNextCode(op, CODE_EOI);
|
||||||
if (nextbits > 0)
|
if (nextbits > 0)
|
||||||
*op++ = (unsigned char)(nextdata << (8-nextbits));
|
*op++ = (unsigned char)(nextdata << (8-nextbits));
|
||||||
tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata);
|
tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata);
|
||||||
return (1);
|
return (1);
|
||||||
|
|
@ -1054,7 +1054,7 @@ TIFFInitLZW(TIFF* tif, int scheme)
|
||||||
(void) TIFFPredictorInit(tif);
|
(void) TIFFPredictorInit(tif);
|
||||||
return (1);
|
return (1);
|
||||||
bad:
|
bad:
|
||||||
TIFFErrorExt(tif->tif_clientdata, "TIFFInitLZW",
|
TIFFErrorExt(tif->tif_clientdata, "TIFFInitLZW",
|
||||||
"No space for LZW state block");
|
"No space for LZW state block");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "tiffiop.h"
|
#include "tiffiop.h"
|
||||||
|
|
||||||
static tsize_t
|
static tsize_t
|
||||||
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||||
{
|
{
|
||||||
return (read((int) fd, buf, size));
|
return (read((int) fd, buf, size));
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
|
entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /*
|
+ /*
|
||||||
+ * BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in-
|
+ * BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in-
|
||||||
+ * TIFF encapsulations produced by Microsoft's Wang Imaging
|
+ * TIFF encapsulations produced by Microsoft's Wang Imaging
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
+ jpeg_reset_huff_decode (register j_decompress_ptr cinfo)
|
+ jpeg_reset_huff_decode (register j_decompress_ptr cinfo)
|
||||||
+ { register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy;
|
+ { register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy;
|
||||||
+ register int ci = 0;
|
+ register int ci = 0;
|
||||||
+
|
+
|
||||||
+ /* Discard encoded input bits, up to the next Byte boundary */
|
+ /* Discard encoded input bits, up to the next Byte boundary */
|
||||||
+ entropy->bitstate.bits_left &= ~7;
|
+ entropy->bitstate.bits_left &= ~7;
|
||||||
+ /* Re-initialize DC predictions to 0 */
|
+ /* Re-initialize DC predictions to 0 */
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
|
entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /*
|
+ /*
|
||||||
+ * BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in-
|
+ * BEWARE OF KLUDGE: This subroutine is a hack for decoding illegal JPEG-in-
|
||||||
+ * TIFF encapsulations produced by Microsoft's Wang Imaging
|
+ * TIFF encapsulations produced by Microsoft's Wang Imaging
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
+ { register shuff_entropy_ptr entropy = (shuff_entropy_ptr)
|
+ { register shuff_entropy_ptr entropy = (shuff_entropy_ptr)
|
||||||
+ ((j_lossy_d_ptr)cinfo->codec)->entropy_private;
|
+ ((j_lossy_d_ptr)cinfo->codec)->entropy_private;
|
||||||
+ register int ci = 0;
|
+ register int ci = 0;
|
||||||
+
|
+
|
||||||
+ /* Discard encoded input bits, up to the next Byte boundary */
|
+ /* Discard encoded input bits, up to the next Byte boundary */
|
||||||
+ entropy->bitstate.bits_left &= ~7;
|
+ entropy->bitstate.bits_left &= ~7;
|
||||||
+ /* Re-initialize DC predictions to 0 */
|
+ /* Re-initialize DC predictions to 0 */
|
||||||
|
|
@ -739,7 +739,7 @@ OJPEGSetupEncode(register TIFF *tif)
|
||||||
if (!TIFFFieldSet(tif,FIELD_REFBLACKWHITE))
|
if (!TIFFFieldSet(tif,FIELD_REFBLACKWHITE))
|
||||||
{ float refbw[6];
|
{ float refbw[6];
|
||||||
long top = 1L << td->td_bitspersample;
|
long top = 1L << td->td_bitspersample;
|
||||||
|
|
||||||
refbw[0] = 0;
|
refbw[0] = 0;
|
||||||
refbw[1] = (float)(top-1L);
|
refbw[1] = (float)(top-1L);
|
||||||
refbw[2] = (float)(top>>1);
|
refbw[2] = (float)(top>>1);
|
||||||
|
|
@ -874,7 +874,7 @@ OJPEGSetupEncode(register TIFF *tif)
|
||||||
&& CALLVJPEG(sp,jpeg_write_tables(&sp->cinfo.c))
|
&& CALLVJPEG(sp,jpeg_write_tables(&sp->cinfo.c))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Mark the field "present". We can't use "TIFFSetField()" because
|
/* Mark the field "present". We can't use "TIFFSetField()" because
|
||||||
"BEENWRITING" is already set!
|
"BEENWRITING" is already set!
|
||||||
*/
|
*/
|
||||||
|
|
@ -929,9 +929,9 @@ OJPEGPreEncode(register TIFF *tif,tsample_t s)
|
||||||
sp->cinfo.c.comp_info[0].ac_tbl_no = 1;
|
sp->cinfo.c.comp_info[0].ac_tbl_no = 1;
|
||||||
sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
|
sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
|
||||||
sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
|
sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
|
||||||
|
|
||||||
/* Scale expected strip/tile size to match a downsampled component. */
|
/* Scale expected strip/tile size to match a downsampled component. */
|
||||||
|
|
||||||
sp->cinfo.c.image_width = TIFFhowmany(segment_width,sp->h_sampling);
|
sp->cinfo.c.image_width = TIFFhowmany(segment_width,sp->h_sampling);
|
||||||
sp->cinfo.c.image_height=TIFFhowmany(segment_height,sp->v_sampling);
|
sp->cinfo.c.image_height=TIFFhowmany(segment_height,sp->v_sampling);
|
||||||
};
|
};
|
||||||
|
|
@ -1570,7 +1570,7 @@ OJPEGSetupDecode(register TIFF *tif)
|
||||||
!= JPEG_HEADER_OK
|
!= JPEG_HEADER_OK
|
||||||
) return 0;
|
) return 0;
|
||||||
if ( sp->cinfo.d.image_width != segment_width
|
if ( sp->cinfo.d.image_width != segment_width
|
||||||
|| sp->cinfo.d.image_height != td->td_imagelength
|
|| sp->cinfo.d.image_height != td->td_imagelength
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
TIFFError(module,"Improper JPEG strip/tile size");
|
TIFFError(module,"Improper JPEG strip/tile size");
|
||||||
|
|
@ -2069,7 +2069,7 @@ OJPEGVSetField(register TIFF *tif,ttag_t tag,va_list ap)
|
||||||
if (v32)
|
if (v32)
|
||||||
{
|
{
|
||||||
sp->cinfo.d.Ss = *va_arg(ap,uint16 *);
|
sp->cinfo.d.Ss = *va_arg(ap,uint16 *);
|
||||||
sp->jpeglosslesspredictors =
|
sp->jpeglosslesspredictors =
|
||||||
_TIFFmalloc(sp->jpeglosslesspredictors_length
|
_TIFFmalloc(sp->jpeglosslesspredictors_length
|
||||||
* sizeof(uint16));
|
* sizeof(uint16));
|
||||||
if(sp->jpeglosslesspredictors==NULL){return(0);}
|
if(sp->jpeglosslesspredictors==NULL){return(0);}
|
||||||
|
|
@ -2177,7 +2177,7 @@ OJPEGVSetField(register TIFF *tif,ttag_t tag,va_list ap)
|
||||||
if(sp->jpegdctables==NULL){return(0);}
|
if(sp->jpegdctables==NULL){return(0);}
|
||||||
tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
|
tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
|
||||||
bufoff=0;
|
bufoff=0;
|
||||||
code_count=0;
|
code_count=0;
|
||||||
for(i2=0;i2<sp->jpegdctables_length;i2++){
|
for(i2=0;i2<sp->jpegdctables_length;i2++){
|
||||||
TIFFSeekFile(tif, v[i2], SEEK_SET);
|
TIFFSeekFile(tif, v[i2], SEEK_SET);
|
||||||
TIFFReadFile(tif,
|
TIFFReadFile(tif,
|
||||||
|
|
@ -2201,7 +2201,7 @@ OJPEGVSetField(register TIFF *tif,ttag_t tag,va_list ap)
|
||||||
if(sp->jpegactables==NULL){return(0);}
|
if(sp->jpegactables==NULL){return(0);}
|
||||||
tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
|
tiffoff = TIFFSeekFile(tif, 0, SEEK_CUR);
|
||||||
bufoff=0;
|
bufoff=0;
|
||||||
code_count=0;
|
code_count=0;
|
||||||
for(i2=0;i2<sp->jpegactables_length;i2++){
|
for(i2=0;i2<sp->jpegactables_length;i2++){
|
||||||
TIFFSeekFile(tif, v[i2], SEEK_SET);
|
TIFFSeekFile(tif, v[i2], SEEK_SET);
|
||||||
TIFFReadFile(tif, &(((unsigned char*)(sp->jpegactables))[bufoff]), 16);
|
TIFFReadFile(tif, &(((unsigned char*)(sp->jpegactables))[bufoff]), 16);
|
||||||
|
|
@ -2367,7 +2367,7 @@ OJPEGVGetField(register TIFF *tif,ttag_t tag,va_list ap)
|
||||||
*va_arg(ap, void**)=sp->jpegdctables;
|
*va_arg(ap, void**)=sp->jpegdctables;
|
||||||
return(1);
|
return(1);
|
||||||
break;
|
break;
|
||||||
case TIFFTAG_JPEGACTABLES :
|
case TIFFTAG_JPEGACTABLES :
|
||||||
*va_arg(ap, uint32*)=sp->jpegactables_length;
|
*va_arg(ap, uint32*)=sp->jpegactables_length;
|
||||||
*va_arg(ap, void**)=sp->jpegactables;
|
*va_arg(ap, void**)=sp->jpegactables;
|
||||||
return(1);
|
return(1);
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -327,14 +327,14 @@ TIFFClientOpen(
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The doc for "fopen" for some STD_C_LIBs says that if you
|
* The doc for "fopen" for some STD_C_LIBs says that if you
|
||||||
* open a file for modify ("+"), then you must fseek (or
|
* open a file for modify ("+"), then you must fseek (or
|
||||||
* fflush?) between any freads and fwrites. This is not
|
* fflush?) between any freads and fwrites. This is not
|
||||||
* necessary on most systems, but has been shown to be needed
|
* necessary on most systems, but has been shown to be needed
|
||||||
* on Solaris.
|
* on Solaris.
|
||||||
*/
|
*/
|
||||||
TIFFSeekFile( tif, 0, SEEK_SET );
|
TIFFSeekFile( tif, 0, SEEK_SET );
|
||||||
|
|
||||||
if (!WriteOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
|
if (!WriteOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
|
||||||
TIFFErrorExt(tif->tif_clientdata, name, "Error writing TIFF header");
|
TIFFErrorExt(tif->tif_clientdata, name, "Error writing TIFF header");
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
@ -398,7 +398,7 @@ TIFFClientOpen(
|
||||||
TIFFErrorExt(tif->tif_clientdata, name,
|
TIFFErrorExt(tif->tif_clientdata, name,
|
||||||
"Not a TIFF file, bad version number %d (0x%x)",
|
"Not a TIFF file, bad version number %d (0x%x)",
|
||||||
tif->tif_header.tiff_version,
|
tif->tif_header.tiff_version,
|
||||||
tif->tif_header.tiff_version);
|
tif->tif_header.tiff_version);
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
tif->tif_flags |= TIFF_MYBUFFER;
|
tif->tif_flags |= TIFF_MYBUFFER;
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -202,7 +202,7 @@ PackBitsEncodeChunk(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
|
||||||
|
|
||||||
while ((long)cc > 0) {
|
while ((long)cc > 0) {
|
||||||
int chunk = rowsize;
|
int chunk = rowsize;
|
||||||
|
|
||||||
if( cc < chunk )
|
if( cc < chunk )
|
||||||
chunk = cc;
|
chunk = cc;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1996-1997 Sam Leffler
|
* Copyright (c) 1996-1997 Sam Leffler
|
||||||
* Copyright (c) 1996 Pixar
|
* Copyright (c) 1996 Pixar
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Pixar, Sam Leffler and Silicon Graphics.
|
* permission of Pixar, Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -34,10 +34,10 @@
|
||||||
* Contributed by Dan McCoy.
|
* Contributed by Dan McCoy.
|
||||||
*
|
*
|
||||||
* PixarLog film support uses the TIFF library to store companded
|
* PixarLog film support uses the TIFF library to store companded
|
||||||
* 11 bit values into a tiff file, which are compressed using the
|
* 11 bit values into a tiff file, which are compressed using the
|
||||||
* zip compressor.
|
* zip compressor.
|
||||||
*
|
*
|
||||||
* The codec can take as input and produce as output 32-bit IEEE float values
|
* The codec can take as input and produce as output 32-bit IEEE float values
|
||||||
* as well as 16-bit or 8-bit unsigned integer values.
|
* as well as 16-bit or 8-bit unsigned integer values.
|
||||||
*
|
*
|
||||||
* On writing any of the above are converted into the internal
|
* On writing any of the above are converted into the internal
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
* than the human eye can perceive with extra room to allow for
|
* than the human eye can perceive with extra room to allow for
|
||||||
* error introduced by further image computation. As with any quantized
|
* error introduced by further image computation. As with any quantized
|
||||||
* color format, it is possible to perform image calculations which
|
* color format, it is possible to perform image calculations which
|
||||||
* expose the quantization error. This format should certainly be less
|
* expose the quantization error. This format should certainly be less
|
||||||
* susceptable to such errors than standard 8-bit encodings, but more
|
* susceptable to such errors than standard 8-bit encodings, but more
|
||||||
* susceptable than straight 16-bit or 32-bit encodings.
|
* susceptable than straight 16-bit or 32-bit encodings.
|
||||||
*
|
*
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
* The codec also handle byte swapping the encoded values as necessary
|
* The codec also handle byte swapping the encoded values as necessary
|
||||||
* since the library does not have the information necessary
|
* since the library does not have the information necessary
|
||||||
* to know the bit depth of the raw unencoded buffer.
|
* to know the bit depth of the raw unencoded buffer.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tif_predict.h"
|
#include "tif_predict.h"
|
||||||
|
|
@ -108,7 +108,7 @@ static float LogK1, LogK2;
|
||||||
#define REPEAT(n, op) { int i; i=n; do { i--; op; } while (i>0); }
|
#define REPEAT(n, op) { int i; i=n; do { i--; op; } while (i>0); }
|
||||||
|
|
||||||
static void
|
static void
|
||||||
horizontalAccumulateF(uint16 *wp, int n, int stride, float *op,
|
horizontalAccumulateF(uint16 *wp, int n, int stride, float *op,
|
||||||
float *ToLinearF)
|
float *ToLinearF)
|
||||||
{
|
{
|
||||||
register unsigned int cr, cg, cb, ca, mask;
|
register unsigned int cr, cg, cb, ca, mask;
|
||||||
|
|
@ -286,7 +286,7 @@ horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the log encoded 11-bit values with the horizontal
|
* Returns the log encoded 11-bit values with the horizontal
|
||||||
* differencing undone.
|
* differencing undone.
|
||||||
*/
|
*/
|
||||||
|
|
@ -320,7 +320,7 @@ horizontalAccumulate11(uint16 *wp, int n, int stride, uint16 *op)
|
||||||
op[1] = (cg += wp[1]) & mask;
|
op[1] = (cg += wp[1]) & mask;
|
||||||
op[2] = (cb += wp[2]) & mask;
|
op[2] = (cb += wp[2]) & mask;
|
||||||
op[3] = (ca += wp[3]) & mask;
|
op[3] = (ca += wp[3]) & mask;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
REPEAT(stride, *op = *wp&mask; wp++; op++)
|
REPEAT(stride, *op = *wp&mask; wp++; op++)
|
||||||
n -= stride;
|
n -= stride;
|
||||||
|
|
@ -454,7 +454,7 @@ horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
|
||||||
typedef struct {
|
typedef struct {
|
||||||
TIFFPredictorState predict;
|
TIFFPredictorState predict;
|
||||||
z_stream stream;
|
z_stream stream;
|
||||||
uint16 *tbuf;
|
uint16 *tbuf;
|
||||||
uint16 stride;
|
uint16 stride;
|
||||||
int state;
|
int state;
|
||||||
int user_datafmt;
|
int user_datafmt;
|
||||||
|
|
@ -470,7 +470,7 @@ typedef struct {
|
||||||
uint16 *FromLT2;
|
uint16 *FromLT2;
|
||||||
uint16 *From14; /* Really for 16-bit data, but we shift down 2 */
|
uint16 *From14; /* Really for 16-bit data, but we shift down 2 */
|
||||||
uint16 *From8;
|
uint16 *From8;
|
||||||
|
|
||||||
} PixarLogState;
|
} PixarLogState;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
@ -483,7 +483,7 @@ PixarLogMakeTables(PixarLogState *sp)
|
||||||
* 11-bit companded representation. The 11-bit representation has two
|
* 11-bit companded representation. The 11-bit representation has two
|
||||||
* distinct regions. A linear bottom end up through .018316 in steps
|
* distinct regions. A linear bottom end up through .018316 in steps
|
||||||
* of about .000073, and a region of constant ratio up to about 25.
|
* of about .000073, and a region of constant ratio up to about 25.
|
||||||
* These floating point numbers are stored in the main table ToLinearF.
|
* These floating point numbers are stored in the main table ToLinearF.
|
||||||
* All other tables are derived from this one. The tables (and the
|
* All other tables are derived from this one. The tables (and the
|
||||||
* ratios) are continuous at the internal seam.
|
* ratios) are continuous at the internal seam.
|
||||||
*/
|
*/
|
||||||
|
|
@ -498,7 +498,7 @@ PixarLogMakeTables(PixarLogState *sp)
|
||||||
uint16 *From14; /* Really for 16-bit data, but we shift down 2 */
|
uint16 *From14; /* Really for 16-bit data, but we shift down 2 */
|
||||||
uint16 *From8;
|
uint16 *From8;
|
||||||
|
|
||||||
c = log(RATIO);
|
c = log(RATIO);
|
||||||
nlin = (int)(1./c); /* nlin must be an integer */
|
nlin = (int)(1./c); /* nlin must be an integer */
|
||||||
c = 1./nlin;
|
c = 1./nlin;
|
||||||
b = exp(-c*ONE); /* multiplicative scale factor [b*exp(c*ONE) = 1] */
|
b = exp(-c*ONE); /* multiplicative scale factor [b*exp(c*ONE) = 1] */
|
||||||
|
|
@ -671,7 +671,7 @@ PixarLogSetupDecode(TIFF* tif)
|
||||||
sp->user_datafmt = PixarLogGuessDataFmt(td);
|
sp->user_datafmt = PixarLogGuessDataFmt(td);
|
||||||
if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
|
if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
|
||||||
TIFFErrorExt(tif->tif_clientdata, module,
|
TIFFErrorExt(tif->tif_clientdata, module,
|
||||||
"PixarLog compression can't handle bits depth/data format combination (depth: %d)",
|
"PixarLog compression can't handle bits depth/data format combination (depth: %d)",
|
||||||
td->td_bitspersample);
|
td->td_bitspersample);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
@ -802,7 +802,7 @@ PixarLogDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||||
"PixarLogDecode: unsupported bits/sample: %d",
|
"PixarLogDecode: unsupported bits/sample: %d",
|
||||||
td->td_bitspersample);
|
td->td_bitspersample);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
@ -922,7 +922,7 @@ horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
horizontalDifference16(unsigned short *ip, int n, int stride,
|
horizontalDifference16(unsigned short *ip, int n, int stride,
|
||||||
unsigned short *wp, uint16 *From14)
|
unsigned short *wp, uint16 *From14)
|
||||||
{
|
{
|
||||||
register int r1, g1, b1, a1, r2, g2, b2, a2, mask;
|
register int r1, g1, b1, a1, r2, g2, b2, a2, mask;
|
||||||
|
|
@ -976,7 +976,7 @@ horizontalDifference16(unsigned short *ip, int n, int stride,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
horizontalDifference8(unsigned char *ip, int n, int stride,
|
horizontalDifference8(unsigned char *ip, int n, int stride,
|
||||||
unsigned short *wp, uint16 *From8)
|
unsigned short *wp, uint16 *From8)
|
||||||
{
|
{
|
||||||
register int r1, g1, b1, a1, r2, g2, b2, a2, mask;
|
register int r1, g1, b1, a1, r2, g2, b2, a2, mask;
|
||||||
|
|
@ -1066,17 +1066,17 @@ PixarLogEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
|
||||||
for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
|
for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
|
||||||
switch (sp->user_datafmt) {
|
switch (sp->user_datafmt) {
|
||||||
case PIXARLOGDATAFMT_FLOAT:
|
case PIXARLOGDATAFMT_FLOAT:
|
||||||
horizontalDifferenceF((float *)bp, llen,
|
horizontalDifferenceF((float *)bp, llen,
|
||||||
sp->stride, up, sp->FromLT2);
|
sp->stride, up, sp->FromLT2);
|
||||||
bp += llen * sizeof(float);
|
bp += llen * sizeof(float);
|
||||||
break;
|
break;
|
||||||
case PIXARLOGDATAFMT_16BIT:
|
case PIXARLOGDATAFMT_16BIT:
|
||||||
horizontalDifference16((uint16 *)bp, llen,
|
horizontalDifference16((uint16 *)bp, llen,
|
||||||
sp->stride, up, sp->From14);
|
sp->stride, up, sp->From14);
|
||||||
bp += llen * sizeof(uint16);
|
bp += llen * sizeof(uint16);
|
||||||
break;
|
break;
|
||||||
case PIXARLOGDATAFMT_8BIT:
|
case PIXARLOGDATAFMT_8BIT:
|
||||||
horizontalDifference8((unsigned char *)bp, llen,
|
horizontalDifference8((unsigned char *)bp, llen,
|
||||||
sp->stride, up, sp->From8);
|
sp->stride, up, sp->From8);
|
||||||
bp += llen * sizeof(unsigned char);
|
bp += llen * sizeof(unsigned char);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1087,7 +1087,7 @@ PixarLogEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sp->stream.next_in = (unsigned char *) sp->tbuf;
|
sp->stream.next_in = (unsigned char *) sp->tbuf;
|
||||||
sp->stream.avail_in = n * sizeof(uint16);
|
sp->stream.avail_in = n * sizeof(uint16);
|
||||||
|
|
||||||
|
|
@ -1321,13 +1321,13 @@ TIFFInitPixarLog(TIFF* tif, int scheme)
|
||||||
sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */
|
sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */
|
||||||
sp->state = 0;
|
sp->state = 0;
|
||||||
|
|
||||||
/* we don't wish to use the predictor,
|
/* we don't wish to use the predictor,
|
||||||
* the default is none, which predictor value 1
|
* the default is none, which predictor value 1
|
||||||
*/
|
*/
|
||||||
(void) TIFFPredictorInit(tif);
|
(void) TIFFPredictorInit(tif);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* build the companding tables
|
* build the companding tables
|
||||||
*/
|
*/
|
||||||
PixarLogMakeTables(sp);
|
PixarLogMakeTables(sp);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -187,7 +187,7 @@ PredictorSetupEncode(TIFF* tif)
|
||||||
sp->codetile = tif->tif_encodetile;
|
sp->codetile = tif->tif_encodetile;
|
||||||
tif->tif_encodetile = PredictorEncodeTile;
|
tif->tif_encodetile = PredictorEncodeTile;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (sp->predictor == 3) {
|
else if (sp->predictor == 3) {
|
||||||
sp->pfunc = fpDiff;
|
sp->pfunc = fpDiff;
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1995-1997 Sam Leffler
|
* Copyright (c) 1995-1997 Sam Leffler
|
||||||
* Copyright (c) 1995-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1995-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -65,7 +65,7 @@ _TIFFPrintField(FILE* fd, const TIFFFieldInfo *fip,
|
||||||
uint32 value_count, void *raw_data)
|
uint32 value_count, void *raw_data)
|
||||||
{
|
{
|
||||||
uint32 j;
|
uint32 j;
|
||||||
|
|
||||||
fprintf(fd, " %s: ", fip->field_name);
|
fprintf(fd, " %s: ", fip->field_name);
|
||||||
|
|
||||||
for(j = 0; j < value_count; j++) {
|
for(j = 0; j < value_count; j++) {
|
||||||
|
|
@ -153,7 +153,7 @@ _TIFFPrettyPrintField(TIFF* tif, FILE* fd, ttag_t tag,
|
||||||
case TIFFTAG_XMLPACKET:
|
case TIFFTAG_XMLPACKET:
|
||||||
{
|
{
|
||||||
uint32 i;
|
uint32 i;
|
||||||
|
|
||||||
fprintf(fd, " XMLPacket (XMP Metadata):\n" );
|
fprintf(fd, " XMLPacket (XMP Metadata):\n" );
|
||||||
for(i = 0; i < value_count; i++)
|
for(i = 0; i < value_count; i++)
|
||||||
fputc(((char *)raw_data)[i], fd);
|
fputc(((char *)raw_data)[i], fd);
|
||||||
|
|
@ -393,7 +393,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
||||||
*/
|
*/
|
||||||
uint16 subsampling[2];
|
uint16 subsampling[2];
|
||||||
|
|
||||||
TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
|
TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
|
||||||
subsampling + 0, subsampling + 1 );
|
subsampling + 0, subsampling + 1 );
|
||||||
fprintf(fd, " YCbCr Subsampling: %u, %u\n",
|
fprintf(fd, " YCbCr Subsampling: %u, %u\n",
|
||||||
subsampling[0], subsampling[1] );
|
subsampling[0], subsampling[1] );
|
||||||
|
|
@ -552,7 +552,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* XXX: Should be fixed and removed, see the
|
* XXX: Should be fixed and removed, see the
|
||||||
* notes related to TIFFTAG_PAGENUMBER,
|
* notes related to TIFFTAG_PAGENUMBER,
|
||||||
* TIFFTAG_HALFTONEHINTS,
|
* TIFFTAG_HALFTONEHINTS,
|
||||||
|
|
@ -590,7 +590,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
||||||
_TIFFfree(raw_data);
|
_TIFFfree(raw_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tif->tif_tagmethods.printdir)
|
if (tif->tif_tagmethods.printdir)
|
||||||
(*tif->tif_tagmethods.printdir)(tif, fd, flags);
|
(*tif->tif_tagmethods.printdir)(tif, fd, flags);
|
||||||
if ((flags & TIFFPRINT_STRIPS) &&
|
if ((flags & TIFFPRINT_STRIPS) &&
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -155,8 +155,8 @@ TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
|
||||||
size = stripsize;
|
size = stripsize;
|
||||||
else if (size > stripsize)
|
else if (size > stripsize)
|
||||||
size = stripsize;
|
size = stripsize;
|
||||||
if (TIFFFillStrip(tif, strip)
|
if (TIFFFillStrip(tif, strip)
|
||||||
&& (*tif->tif_decodestrip)(tif, (tidata_t) buf, size,
|
&& (*tif->tif_decodestrip)(tif, (tidata_t) buf, size,
|
||||||
(tsample_t)(strip / td->td_stripsperimage)) > 0 ) {
|
(tsample_t)(strip / td->td_stripsperimage)) > 0 ) {
|
||||||
(*tif->tif_postdecode)(tif, (tidata_t) buf, size);
|
(*tif->tif_postdecode)(tif, (tidata_t) buf, size);
|
||||||
return (size);
|
return (size);
|
||||||
|
|
@ -237,7 +237,7 @@ TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the specified strip and setup for decoding.
|
* Read the specified strip and setup for decoding.
|
||||||
* The data buffer is expanded, as necessary, to
|
* The data buffer is expanded, as necessary, to
|
||||||
* hold the strip's data.
|
* hold the strip's data.
|
||||||
*/
|
*/
|
||||||
|
|
@ -435,7 +435,7 @@ TIFFReadRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the specified tile and setup for decoding.
|
* Read the specified tile and setup for decoding.
|
||||||
* The data buffer is expanded, as necessary, to
|
* The data buffer is expanded, as necessary, to
|
||||||
* hold the tile's data.
|
* hold the tile's data.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1996 Sam Leffler
|
* Copyright (c) 1988-1996 Sam Leffler
|
||||||
* Copyright (c) 1991-1996 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1996 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -128,13 +128,13 @@ _tiffosSeekProc(thandle_t fd, toff_t off, int whence)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// restore original stream state
|
// restore original stream state
|
||||||
os->clear(old_state);
|
os->clear(old_state);
|
||||||
|
|
||||||
// only do something if desired seek position is valid
|
// only do something if desired seek position is valid
|
||||||
if( origin + off > data->myStreamStartPos ) {
|
if( origin + off > data->myStreamStartPos ) {
|
||||||
toff_t num_fill;
|
toff_t num_fill;
|
||||||
|
|
||||||
// clear the fail bit
|
// clear the fail bit
|
||||||
os->clear(os->rdstate() & ~ios::failbit);
|
os->clear(os->rdstate() & ~ios::failbit);
|
||||||
|
|
||||||
// extend the stream to the expected size
|
// extend the stream to the expected size
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -124,8 +124,8 @@ TIFFVStripSize(TIFF* tif, uint32 nrows)
|
||||||
uint16 ycbcrsubsampling[2];
|
uint16 ycbcrsubsampling[2];
|
||||||
tsize_t w, scanline, samplingarea;
|
tsize_t w, scanline, samplingarea;
|
||||||
|
|
||||||
TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
|
TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING,
|
||||||
ycbcrsubsampling + 0,
|
ycbcrsubsampling + 0,
|
||||||
ycbcrsubsampling + 1 );
|
ycbcrsubsampling + 1 );
|
||||||
|
|
||||||
samplingarea = ycbcrsubsampling[0]*ycbcrsubsampling[1];
|
samplingarea = ycbcrsubsampling[0]*ycbcrsubsampling[1];
|
||||||
|
|
@ -228,13 +228,13 @@ TIFFScanlineSize(TIFF* tif)
|
||||||
{
|
{
|
||||||
TIFFDirectory *td = &tif->tif_dir;
|
TIFFDirectory *td = &tif->tif_dir;
|
||||||
tsize_t scanline;
|
tsize_t scanline;
|
||||||
|
|
||||||
if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
|
if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
|
||||||
if (td->td_photometric == PHOTOMETRIC_YCBCR
|
if (td->td_photometric == PHOTOMETRIC_YCBCR
|
||||||
&& !isUpSampled(tif)) {
|
&& !isUpSampled(tif)) {
|
||||||
uint16 ycbcrsubsampling[2];
|
uint16 ycbcrsubsampling[2];
|
||||||
|
|
||||||
TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING,
|
TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING,
|
||||||
ycbcrsubsampling + 0,
|
ycbcrsubsampling + 0,
|
||||||
ycbcrsubsampling + 1);
|
ycbcrsubsampling + 1);
|
||||||
|
|
||||||
|
|
@ -278,7 +278,7 @@ TIFFRasterScanlineSize(TIFF* tif)
|
||||||
{
|
{
|
||||||
TIFFDirectory *td = &tif->tif_dir;
|
TIFFDirectory *td = &tif->tif_dir;
|
||||||
tsize_t scanline;
|
tsize_t scanline;
|
||||||
|
|
||||||
scanline = multiply (tif, td->td_bitspersample, td->td_imagewidth,
|
scanline = multiply (tif, td->td_bitspersample, td->td_imagewidth,
|
||||||
"TIFFRasterScanlineSize");
|
"TIFFRasterScanlineSize");
|
||||||
if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
|
if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -174,38 +174,38 @@ static const unsigned char TIFFBitRevTable[256] = {
|
||||||
0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
|
0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
|
||||||
};
|
};
|
||||||
static const unsigned char TIFFNoBitRevTable[256] = {
|
static const unsigned char TIFFNoBitRevTable[256] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
|
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
|
||||||
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
|
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
|
||||||
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
|
||||||
0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
|
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
|
||||||
0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
||||||
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
||||||
0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
|
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
|
||||||
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
|
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
|
||||||
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
|
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
|
||||||
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
|
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
|
||||||
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
|
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
|
||||||
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
|
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
|
||||||
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
|
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
|
||||||
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
||||||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||||
};
|
};
|
||||||
|
|
||||||
const unsigned char*
|
const unsigned char*
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -134,7 +134,7 @@ static int
|
||||||
ThunderDecodeRow(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
|
ThunderDecodeRow(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
|
||||||
{
|
{
|
||||||
tidata_t row = buf;
|
tidata_t row = buf;
|
||||||
|
|
||||||
(void) s;
|
(void) s;
|
||||||
while ((long)occ > 0) {
|
while ((long)occ > 0) {
|
||||||
if (!ThunderDecode(tif, row, tif->tif_dir.td_imagewidth))
|
if (!ThunderDecode(tif, row, tif->tif_dir.td_imagewidth))
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -82,11 +82,11 @@ TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t s)
|
||||||
if (dz == (uint32) -1)
|
if (dz == (uint32) -1)
|
||||||
dz = td->td_imagedepth;
|
dz = td->td_imagedepth;
|
||||||
if (dx != 0 && dy != 0 && dz != 0) {
|
if (dx != 0 && dy != 0 && dz != 0) {
|
||||||
uint32 xpt = TIFFhowmany(td->td_imagewidth, dx);
|
uint32 xpt = TIFFhowmany(td->td_imagewidth, dx);
|
||||||
uint32 ypt = TIFFhowmany(td->td_imagelength, dy);
|
uint32 ypt = TIFFhowmany(td->td_imagelength, dy);
|
||||||
uint32 zpt = TIFFhowmany(td->td_imagedepth, dz);
|
uint32 zpt = TIFFhowmany(td->td_imagedepth, dz);
|
||||||
|
|
||||||
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
|
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
|
||||||
tile = (xpt*ypt*zpt)*s +
|
tile = (xpt*ypt*zpt)*s +
|
||||||
(xpt*ypt)*(z/dz) +
|
(xpt*ypt)*(z/dz) +
|
||||||
xpt*(y/dy) +
|
xpt*(y/dy) +
|
||||||
|
|
@ -175,7 +175,7 @@ TIFFTileRowSize(TIFF* tif)
|
||||||
{
|
{
|
||||||
TIFFDirectory *td = &tif->tif_dir;
|
TIFFDirectory *td = &tif->tif_dir;
|
||||||
tsize_t rowsize;
|
tsize_t rowsize;
|
||||||
|
|
||||||
if (td->td_tilelength == 0 || td->td_tilewidth == 0)
|
if (td->td_tilelength == 0 || td->td_tilewidth == 0)
|
||||||
return ((tsize_t) 0);
|
return ((tsize_t) 0);
|
||||||
rowsize = multiply(tif, td->td_bitspersample, td->td_tilewidth,
|
rowsize = multiply(tif, td->td_bitspersample, td->td_tilewidth,
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -160,11 +160,11 @@ TIFFOpen(const char* name, const char* mode)
|
||||||
if (m == -1)
|
if (m == -1)
|
||||||
return ((TIFF*)0);
|
return ((TIFF*)0);
|
||||||
|
|
||||||
/* for cygwin and mingw */
|
/* for cygwin and mingw */
|
||||||
#ifdef O_BINARY
|
#ifdef O_BINARY
|
||||||
m |= O_BINARY;
|
m |= O_BINARY;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AM29K
|
#ifdef _AM29K
|
||||||
fd = open(name, m);
|
fd = open(name, m);
|
||||||
#else
|
#else
|
||||||
|
|
@ -199,11 +199,11 @@ TIFFOpenW(const wchar_t* name, const char* mode)
|
||||||
if (m == -1)
|
if (m == -1)
|
||||||
return ((TIFF*)0);
|
return ((TIFF*)0);
|
||||||
|
|
||||||
/* for cygwin and mingw */
|
/* for cygwin and mingw */
|
||||||
#ifdef O_BINARY
|
#ifdef O_BINARY
|
||||||
m |= O_BINARY;
|
m |= O_BINARY;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fd = _wopen(name, m, 0666);
|
fd = _wopen(name, m, 0666);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
TIFFErrorExt(0, module, "%s: Cannot open", name);
|
TIFFErrorExt(0, module, "%s: Cannot open", name);
|
||||||
|
|
@ -226,9 +226,9 @@ TIFFOpenW(const wchar_t* name, const char* mode)
|
||||||
|
|
||||||
tif = TIFFFdOpen((int)fd, (mbname != NULL) ? mbname : "<unknown>",
|
tif = TIFFFdOpen((int)fd, (mbname != NULL) ? mbname : "<unknown>",
|
||||||
mode);
|
mode);
|
||||||
|
|
||||||
_TIFFfree(mbname);
|
_TIFFfree(mbname);
|
||||||
|
|
||||||
if(!tif)
|
if(!tif)
|
||||||
close(fd);
|
close(fd);
|
||||||
return tif;
|
return tif;
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -70,3 +70,5 @@ TIFFWarningExt(thandle_t fd, const char* module, const char* fmt, ...)
|
||||||
(*_TIFFwarningHandlerExt)(fd, module, fmt, ap);
|
(*_TIFFwarningHandlerExt)(fd, module, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|
||||||
static tsize_t
|
static tsize_t
|
||||||
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||||
{
|
{
|
||||||
return (_hread(fd, buf, size));
|
return (_hread(fd, buf, size));
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ _tiffSeekProc(thandle_t fd, toff_t off, int whence)
|
||||||
/* we use this as a special code, so avoid accepting it */
|
/* we use this as a special code, so avoid accepting it */
|
||||||
if( off == 0xFFFFFFFF )
|
if( off == 0xFFFFFFFF )
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
|
|
||||||
switch(whence)
|
switch(whence)
|
||||||
{
|
{
|
||||||
case SEEK_SET:
|
case SEEK_SET:
|
||||||
|
|
@ -358,7 +358,7 @@ Win32WarningHandler(const char* module, const char* fmt, va_list ap)
|
||||||
fprintf(stderr, "Warning, ");
|
fprintf(stderr, "Warning, ");
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
fprintf(stderr, ".\n");
|
fprintf(stderr, ".\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler;
|
TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler;
|
||||||
|
|
||||||
|
|
@ -385,7 +385,7 @@ Win32ErrorHandler(const char* module, const char* fmt, va_list ap)
|
||||||
fprintf(stderr, "%s: ", module);
|
fprintf(stderr, "%s: ", module);
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
fprintf(stderr, ".\n");
|
fprintf(stderr, ".\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler;
|
TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)
|
||||||
return (-1);
|
return (-1);
|
||||||
tif->tif_flags |= TIFF_CODERSETUP;
|
tif->tif_flags |= TIFF_CODERSETUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
tif->tif_rawcc = 0;
|
tif->tif_rawcc = 0;
|
||||||
tif->tif_rawcp = tif->tif_rawdata;
|
tif->tif_rawcp = tif->tif_rawdata;
|
||||||
|
|
||||||
|
|
@ -221,7 +221,7 @@ TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
|
||||||
return ((tsize_t) -1);
|
return ((tsize_t) -1);
|
||||||
tif->tif_flags |= TIFF_CODERSETUP;
|
tif->tif_flags |= TIFF_CODERSETUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
tif->tif_rawcc = 0;
|
tif->tif_rawcc = 0;
|
||||||
tif->tif_rawcp = tif->tif_rawdata;
|
tif->tif_rawcp = tif->tif_rawdata;
|
||||||
|
|
||||||
|
|
@ -233,7 +233,7 @@ TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
|
||||||
/* this forces TIFFAppendToStrip() to do a seek */
|
/* this forces TIFFAppendToStrip() to do a seek */
|
||||||
tif->tif_curoff = 0;
|
tif->tif_curoff = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tif->tif_flags &= ~TIFF_POSTENCODE;
|
tif->tif_flags &= ~TIFF_POSTENCODE;
|
||||||
sample = (tsample_t)(strip / td->td_stripsperimage);
|
sample = (tsample_t)(strip / td->td_stripsperimage);
|
||||||
if (!(*tif->tif_preencode)(tif, sample))
|
if (!(*tif->tif_preencode)(tif, sample))
|
||||||
|
|
@ -369,8 +369,8 @@ TIFFWriteEncodedTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc)
|
||||||
/* this forces TIFFAppendToStrip() to do a seek */
|
/* this forces TIFFAppendToStrip() to do a seek */
|
||||||
tif->tif_curoff = 0;
|
tif->tif_curoff = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compute tiles per row & per column to compute
|
* Compute tiles per row & per column to compute
|
||||||
* current row and column
|
* current row and column
|
||||||
*/
|
*/
|
||||||
|
|
@ -497,7 +497,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
|
||||||
"Can not write scanlines to a tiled image");
|
"Can not write scanlines to a tiled image");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On the first write verify all the required information
|
* On the first write verify all the required information
|
||||||
* has been setup and initialize any data structures that
|
* has been setup and initialize any data structures that
|
||||||
|
|
@ -515,7 +515,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (tif->tif_dir.td_samplesperpixel == 1) {
|
if (tif->tif_dir.td_samplesperpixel == 1) {
|
||||||
/*
|
/*
|
||||||
* Planarconfiguration is irrelevant in case of single band
|
* Planarconfiguration is irrelevant in case of single band
|
||||||
* images and need not be included. We will set it anyway,
|
* images and need not be included. We will set it anyway,
|
||||||
* because this field is used in other parts of library even
|
* because this field is used in other parts of library even
|
||||||
|
|
@ -652,7 +652,7 @@ TIFFAppendToStrip(TIFF* tif, tstrip_t strip, tidata_t data, tsize_t cc)
|
||||||
} else {
|
} else {
|
||||||
tstrip_t i;
|
tstrip_t i;
|
||||||
for (i = 0; i < td->td_nstrips; i++) {
|
for (i = 0; i < td->td_nstrips; i++) {
|
||||||
if (td->td_stripoffset[i] >
|
if (td->td_stripoffset[i] >
|
||||||
td->td_stripoffset[strip]
|
td->td_stripoffset[strip]
|
||||||
&& td->td_stripoffset[i] <
|
&& td->td_stripoffset[i] <
|
||||||
td->td_stripoffset[strip] + cc) {
|
td->td_stripoffset[strip] + cc) {
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1995-1997 Sam Leffler
|
* Copyright (c) 1995-1997 Sam Leffler
|
||||||
* Copyright (c) 1995-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1995-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,23 @@
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and
|
* Permission to use, copy, modify, distribute, and sell this software and
|
||||||
* its documentation for any purpose is hereby granted without fee, provided
|
* its documentation for any purpose is hereby granted without fee, provided
|
||||||
* that (i) the above copyright notices and this permission notice appear in
|
* that (i) the above copyright notices and this permission notice appear in
|
||||||
* all copies of the software and related documentation, and (ii) the names of
|
* all copies of the software and related documentation, and (ii) the names of
|
||||||
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
* publicity relating to the software without the specific, prior written
|
* publicity relating to the software without the specific, prior written
|
||||||
* permission of Sam Leffler and Silicon Graphics.
|
* permission of Sam Leffler and Silicon Graphics.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
* OF THIS SOFTWARE.
|
* OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
* Suite 200
|
* Suite 200
|
||||||
* Seattle, WA 98104
|
* Seattle, WA 98104
|
||||||
* 206-622-5500
|
* 206-622-5500
|
||||||
*
|
*
|
||||||
* (http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf)
|
* (http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf)
|
||||||
*
|
*
|
||||||
* For Big TIFF design notes see the following link
|
* For Big TIFF design notes see the following link
|
||||||
|
|
@ -368,7 +368,7 @@ typedef enum {
|
||||||
/* tags 33300-33309 are private tags registered to Pixar */
|
/* tags 33300-33309 are private tags registered to Pixar */
|
||||||
/*
|
/*
|
||||||
* TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH
|
* TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH
|
||||||
* are set when an image has been cropped out of a larger image.
|
* are set when an image has been cropped out of a larger image.
|
||||||
* They reflect the size of the original uncropped image.
|
* They reflect the size of the original uncropped image.
|
||||||
* The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used
|
* The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used
|
||||||
* to determine the position of the smaller image in the larger one.
|
* to determine the position of the smaller image in the larger one.
|
||||||
|
|
@ -411,7 +411,7 @@ typedef enum {
|
||||||
/* tags 34232-34236 are private tags registered to Texas Instruments */
|
/* tags 34232-34236 are private tags registered to Texas Instruments */
|
||||||
#define TIFFTAG_FRAMECOUNT 34232 /* Sequence Frame Count */
|
#define TIFFTAG_FRAMECOUNT 34232 /* Sequence Frame Count */
|
||||||
/* tag 34377 is private tag registered to Adobe for PhotoShop */
|
/* tag 34377 is private tag registered to Adobe for PhotoShop */
|
||||||
#define TIFFTAG_PHOTOSHOP 34377
|
#define TIFFTAG_PHOTOSHOP 34377
|
||||||
/* tags 34665, 34853 and 40965 are documented in EXIF specification */
|
/* tags 34665, 34853 and 40965 are documented in EXIF specification */
|
||||||
#define TIFFTAG_EXIFIFD 34665 /* Pointer to EXIF private directory */
|
#define TIFFTAG_EXIFIFD 34665 /* Pointer to EXIF private directory */
|
||||||
/* tag 34750 is a private tag registered to Adobe? */
|
/* tag 34750 is a private tag registered to Adobe? */
|
||||||
|
|
@ -451,7 +451,7 @@ typedef enum {
|
||||||
#define TIFFTAG_DEFAULTSCALE 50718 /* &default scale factors */
|
#define TIFFTAG_DEFAULTSCALE 50718 /* &default scale factors */
|
||||||
#define TIFFTAG_DEFAULTCROPORIGIN 50719 /* &origin of the final image
|
#define TIFFTAG_DEFAULTCROPORIGIN 50719 /* &origin of the final image
|
||||||
area */
|
area */
|
||||||
#define TIFFTAG_DEFAULTCROPSIZE 50720 /* &size of the final image
|
#define TIFFTAG_DEFAULTCROPSIZE 50720 /* &size of the final image
|
||||||
area */
|
area */
|
||||||
#define TIFFTAG_COLORMATRIX1 50721 /* &XYZ->reference color space
|
#define TIFFTAG_COLORMATRIX1 50721 /* &XYZ->reference color space
|
||||||
transformation matrix 1 */
|
transformation matrix 1 */
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue