@@ -74,6 +74,9 @@ void RafImage::printStructure(std::ostream& out, PrintStructureOption option, si
74
74
throw Error (ErrorCode::kerNotAnImage, " RAF" );
75
75
}
76
76
77
+ // The following is based on https://libopenraw.freedesktop.org/formats/raf/ and
78
+ // https://exiftool.org/TagNames/FujiFilm.html#RAFHeader
79
+
77
80
const bool bPrint = option == kpsBasic || option == kpsRecursive;
78
81
if (bPrint) {
79
82
io_->seek (0 , BasicIo::beg); // rewind
@@ -159,7 +162,7 @@ void RafImage::printStructure(std::ostream& out, PrintStructureOption option, si
159
162
160
163
// RAFs can carry the payload in one or two parts
161
164
uint32_t meta_off[2 ], meta_len[2 ];
162
- uint32_t cfa_off[2 ], cfa_len[2 ], cfa_skip [2 ], cfa_size[2 ], cfa_stride [2 ];
165
+ uint32_t cfa_off[2 ], cfa_len[2 ], comp [2 ], cfa_size[2 ], cfa_data [2 ];
163
166
for (size_t i = 0 ; i < 2 ; i++) {
164
167
address = io_->tell ();
165
168
byte data[4 ];
@@ -187,34 +190,34 @@ void RafImage::printStructure(std::ostream& out, PrintStructureOption option, si
187
190
cfa_len[i] = Exiv2::getULong (data, bigEndian);
188
191
size_t address3 = io_->tell ();
189
192
io_->readOrThrow (data, 4 );
190
- cfa_skip [i] = Exiv2::getULong (data, bigEndian);
193
+ comp [i] = Exiv2::getULong (data, bigEndian);
191
194
size_t address4 = io_->tell ();
192
195
io_->readOrThrow (data, 4 );
193
196
cfa_size[i] = Exiv2::getULong (data, bigEndian);
194
197
size_t address5 = io_->tell ();
195
198
io_->readOrThrow (data, 4 );
196
- cfa_stride [i] = Exiv2::getULong (data, bigEndian);
199
+ cfa_data [i] = Exiv2::getULong (data, bigEndian);
197
200
{
198
201
std::stringstream c_off;
199
202
std::stringstream c_len;
200
- std::stringstream c_skip ;
203
+ std::stringstream c_comp ;
201
204
std::stringstream c_size;
202
- std::stringstream c_stride ;
205
+ std::stringstream c_data ;
203
206
c_off << cfa_off[i];
204
207
c_len << cfa_len[i];
205
- c_skip << cfa_skip [i];
208
+ c_comp << comp [i];
206
209
c_size << cfa_size[i];
207
- c_stride << cfa_stride [i];
210
+ c_data << cfa_data [i];
208
211
out << Internal::indent (depth) << Internal::stringFormat (format, address, 4U ) << " CFA offset" << i + 1 << " : "
209
212
<< c_off.str () << std::endl;
210
213
out << Internal::indent (depth) << Internal::stringFormat (format, address2, 4U ) << " CFA length" << i + 1
211
214
<< " : " << c_len.str () << std::endl;
212
- out << Internal::indent (depth) << Internal::stringFormat (format, address3, 4U ) << " CFA skip " << i + 1
213
- << " : " << c_skip .str () << std::endl;
215
+ out << Internal::indent (depth) << Internal::stringFormat (format, address3, 4U ) << " compression " << i + 1
216
+ << " : " << c_comp .str () << std::endl;
214
217
out << Internal::indent (depth) << Internal::stringFormat (format, address4, 4U ) << " CFA chunk" << i + 1
215
218
<< " : " << c_size.str () << std::endl;
216
- out << Internal::indent (depth) << Internal::stringFormat (format, address5, 4U ) << " CFA stride " << i + 1
217
- << " : " << c_stride .str () << std::endl;
219
+ out << Internal::indent (depth) << Internal::stringFormat (format, address5, 4U ) << " unknown " << i + 1
220
+ << " : " << c_data .str () << std::endl;
218
221
}
219
222
}
220
223
0 commit comments