Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 124241 | Differences between
and this patch

Collapse All | Expand All

(-)Code/IO/itkTIFFImageIO.cxx (-3 / +78 lines)
Lines 66-71 Link Here
66
  float             m_YResolution;
66
  float             m_YResolution;
67
  short             m_SampleFormat;
67
  short             m_SampleFormat;
68
};
68
};
69
typedef enum {
70
TIFF_SETGET_UNDEFINED = 0,
71
TIFF_SETGET_ASCII = 1,
72
TIFF_SETGET_UINT8 = 2,
73
TIFF_SETGET_SINT8 = 3,
74
TIFF_SETGET_UINT16 = 4,
75
TIFF_SETGET_SINT16 = 5,
76
TIFF_SETGET_UINT32 = 6,
77
TIFF_SETGET_SINT32 = 7,
78
TIFF_SETGET_UINT64 = 8,
79
TIFF_SETGET_SINT64 = 9,
80
TIFF_SETGET_FLOAT = 10,
81
TIFF_SETGET_DOUBLE = 11,
82
TIFF_SETGET_IFD8 = 12,
83
TIFF_SETGET_INT = 13,
84
TIFF_SETGET_UINT16_PAIR = 14,
85
TIFF_SETGET_C0_ASCII = 15,
86
TIFF_SETGET_C0_UINT8 = 16,
87
TIFF_SETGET_C0_SINT8 = 17,
88
TIFF_SETGET_C0_UINT16 = 18,
89
TIFF_SETGET_C0_SINT16 = 19,
90
TIFF_SETGET_C0_UINT32 = 20,
91
TIFF_SETGET_C0_SINT32 = 21,
92
TIFF_SETGET_C0_UINT64 = 22,
93
TIFF_SETGET_C0_SINT64 = 23,
94
TIFF_SETGET_C0_FLOAT = 24,
95
TIFF_SETGET_C0_DOUBLE = 25,
96
TIFF_SETGET_C0_IFD8 = 26,
97
TIFF_SETGET_C16_ASCII = 27,
98
TIFF_SETGET_C16_UINT8 = 28,
99
TIFF_SETGET_C16_SINT8 = 29,
100
TIFF_SETGET_C16_UINT16 = 30,
101
TIFF_SETGET_C16_SINT16 = 31,
102
TIFF_SETGET_C16_UINT32 = 32,
103
TIFF_SETGET_C16_SINT32 = 33,
104
TIFF_SETGET_C16_UINT64 = 34,
105
TIFF_SETGET_C16_SINT64 = 35,
106
TIFF_SETGET_C16_FLOAT = 36,
107
TIFF_SETGET_C16_DOUBLE = 37,
108
TIFF_SETGET_C16_IFD8 = 38,
109
TIFF_SETGET_C32_ASCII = 39,
110
TIFF_SETGET_C32_UINT8 = 40,
111
TIFF_SETGET_C32_SINT8 = 41,
112
TIFF_SETGET_C32_UINT16 = 42,
113
TIFF_SETGET_C32_SINT16 = 43,
114
TIFF_SETGET_C32_UINT32 = 44,
115
TIFF_SETGET_C32_SINT32 = 45,
116
TIFF_SETGET_C32_UINT64 = 46,
117
TIFF_SETGET_C32_SINT64 = 47,
118
TIFF_SETGET_C32_FLOAT = 48,
119
TIFF_SETGET_C32_DOUBLE = 49,
120
TIFF_SETGET_C32_IFD8 = 50,
121
TIFF_SETGET_OTHER = 51
122
} __TIFFSetGetFieldType;
123
124
struct __TIFFField {
125
uint32 field_tag;                       /* field's tag */
126
short field_readcount;                  /* read count/TIFF_VARIABLE/TIFF_SPP */
127
short field_writecount;                 /* write count/TIFF_VARIABLE */
128
TIFFDataType field_type;                /* type of associated data */
129
uint32 reserved;                        /* reserved for future extension */
130
__TIFFSetGetFieldType set_field_type;     /* type to be passed to TIFFSetField */
131
__TIFFSetGetFieldType get_field_type;     /* type to be passed to TIFFGetField */
132
unsigned short field_bit;               /* bit in fieldsset bit vector */
133
unsigned char field_oktochange;         /* if true, can change while writing */
134
unsigned char field_passcount;          /* if true, pass dir count on set */
135
	char* field_name;                       /* ASCII name */
136
	TIFFFieldArray* field_subfields;        /* if field points to child ifds, child ifd field definition array */
137
};
69
138
70
int TIFFReaderInternal::Open( const char *filename )
139
int TIFFReaderInternal::Open( const char *filename )
71
{
140
{
Lines 1866-1872 Link Here
1866
    }
1935
    }
1867
1936
1868
  ttag_t tag = t; // 32bits integer
1937
  ttag_t tag = t; // 32bits integer
1869
  const TIFFFieldInfo *fld = TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1938
  //const TIFFFieldInfo *fld = (const TIFFFieldInfo *)TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1939
  //const TIFFField *fld = TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1940
  const __TIFFField *fld = (const __TIFFField *)TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1941
1870
  if( fld == NULL )
1942
  if( fld == NULL )
1871
    {
1943
    {
1872
    return false;
1944
    return false;
Lines 1884-1890 Link Here
1884
    }
1956
    }
1885
  ttag_t tag = t;
1957
  ttag_t tag = t;
1886
  void *raw_data = NULL;
1958
  void *raw_data = NULL;
1887
  const TIFFFieldInfo *fld = TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1959
  //const TIFFFieldInfo *fld = (const TIFFFieldInfo *)TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1960
  //const TIFFField *fld = TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1961
  const __TIFFField *fld = (const __TIFFField *)TIFFFieldWithTag( m_InternalImage->m_Image, tag );
1962
1888
  if( fld == NULL )
1963
  if( fld == NULL )
1889
    {
1964
    {
1890
    itkExceptionMacro( << "fld is NULL" );
1965
    itkExceptionMacro( << "fld is NULL" );
Lines 1901-1907 Link Here
1901
        }
1976
        }
1902
      else
1977
      else
1903
        {
1978
        {
1904
        if( fld->field_type != TIFF_BYTE )
1979
       if( fld->field_type != TIFF_BYTE )
1905
          {
1980
          {
1906
          itkExceptionMacro( << "Tag is not of type TIFF_BYTE" );
1981
          itkExceptionMacro( << "Tag is not of type TIFF_BYTE" );
1907
          return NULL;
1982
          return NULL;

Return to bug 124241