Lines Matching refs:entry

169 print_ifd_value(IFDEntry &entry, BFile &file, swap_action swp)
171 switch (entry.tag) {
173 if (entry.count == 1 && entry.fieldType == TIFF_LONG) {
174 if (entry.longval & 1)
176 if (entry.longval & 2)
178 if (entry.longval & 4)
181 printf("(0x%.8lx)", entry.longval);
188 if (entry.count == 1) {
190 ((entry.fieldType == TIFF_SHORT) ?
191 entry.shortvals[0] : static_cast<unsigned int>(entry.longval)));
197 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
198 switch (entry.shortvals[0]) {
222 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
223 switch (entry.shortvals[0]) {
225 printf("White is Zero (%d)", entry.shortvals[0]);
228 printf("Black is Zero (%d)", entry.shortvals[0]);
231 printf("RGB (%d)", entry.shortvals[0]);
234 printf("Palette Color (%d)", entry.shortvals[0]);
237 printf("Transparency Mask (%d)", entry.shortvals[0]);
244 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
245 switch (entry.shortvals[0]) {
278 static_cast<unsigned int>(entry.longval));
279 if (entry.longval == ksinglestrip)
285 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
286 if (entry.shortvals[0] == 1) {
287 printf("Chunky (%d)", entry.shortvals[0]);
290 else if (entry.shortvals[0] == 2) {
291 printf("Planar (%d)", entry.shortvals[0]);
298 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
299 switch (entry.shortvals[0]) {
301 printf("None (%d)", entry.shortvals[0]);
304 printf("Inch (%d)", entry.shortvals[0]);
307 printf("Cenimeter (%d)", entry.shortvals[0]);
314 if (entry.fieldType == TIFF_ASCII) {
317 if (entry.count <= 4)
318 memcpy(ascfield, &entry.longval, entry.count);
319 else if (entry.count > 4 && entry.count < 256) {
320 ssize_t nread = file.ReadAt(entry.longval, ascfield, entry.count);
321 if (nread != static_cast<ssize_t>(entry.count))
329 } else if (entry.fieldType == TIFF_RATIONAL && entry.count == 1) {
332 ssize_t nread = file.ReadAt(entry.longval, &rational, 8);
339 entry.longval);
342 } else if (entry.fieldType == TIFF_SRATIONAL && entry.count == 1) {
345 ssize_t nread = file.ReadAt(entry.longval, &srational, 8);
352 entry.longval);
355 } else if (entry.fieldType == TIFF_LONG && entry.count == 1) {
357 static_cast<unsigned int>(entry.longval));
359 } else if (entry.fieldType == TIFF_SLONG && entry.count == 1) {
361 static_cast<int>(entry.longval));
363 } else if (entry.fieldType == TIFF_SHORT && entry.count <= 2) {
364 for (uint32 i = 0; i < entry.count; i++) {
367 printf("%u", entry.shortvals[i]);
370 } else if (entry.fieldType == TIFF_SSHORT && entry.count <= 2) {
371 for (uint32 i = 0; i < entry.count; i++) {
374 printf("%d", entry.shortvals[i]);
377 } else if (entry.fieldType == TIFF_BYTE && entry.count <= 4) {
378 for (uint32 i = 0; i < entry.count; i++) {
381 printf("%u", entry.bytevals[i]);
384 } else if (entry.fieldType == TIFF_SBYTE && entry.count <= 4) {
385 for (uint32 i = 0; i < entry.count; i++) {
388 printf("%d", entry.bytevals[i]);
391 } else if (entry.fieldType == TIFF_UNDEFINED && entry.count <= 4) {
392 for (uint32 i = 0; i < entry.count; i++) {
396 static_cast<unsigned long>(entry.bytevals[i]));
402 printf("0x%.8lx", entry.longval);
405 int swap_value_field(IFDEntry &entry, swap_action swp)
407 switch (entry.fieldType) {
412 if (entry.count > 4) {
413 if (swap_data(B_UINT32_TYPE, &entry.longval, 4, swp) != B_OK)
423 if (swap_data(B_UINT32_TYPE, &entry.longval, 4, swp) != B_OK)
428 if (swap_data(B_FLOAT_TYPE, &entry.floatval, 4, swp) != B_OK)
434 if (entry.count <= 2) {
435 if (swap_data(B_UINT16_TYPE, &entry.shortvals,
436 entry.count * 2, swp) != B_OK)
439 if (swap_data(B_UINT32_TYPE, &entry.longval, 4, swp) != B_OK)
453 IFDEntry entry;
462 ssize_t nread = file.Read(&entry, 12);
464 printf("unable to read entire ifd entry\n");
467 if (swap_data(B_UINT16_TYPE, &entry.tag, 4, swp) != B_OK ||
468 swap_data(B_UINT32_TYPE, &entry.count, 4, swp) != B_OK) {
473 if (!swap_value_field(entry, swp)) {
479 printf( " Tag: %s (%d)\n", get_tag_string(entry.tag), entry.tag);
480 printf( " Type: %s (%d)\n", get_type_string(entry.fieldType),
481 entry.fieldType);
482 printf( " Count: %d\n", static_cast<int>(entry.count));
484 print_ifd_value(entry, file, swp);
505 printf("unable to read entry count\n");