Lines Matching refs:entry

168 print_ifd_value(IFDEntry &entry, BFile &file, swap_action swp)
170 switch (entry.tag) {
172 if (entry.count == 1 && entry.fieldType == TIFF_LONG) {
173 if (entry.longval & 1)
175 if (entry.longval & 2)
177 if (entry.longval & 4)
180 printf("(0x%.8lx)", entry.longval);
187 if (entry.count == 1) {
189 ((entry.fieldType == TIFF_SHORT) ?
190 entry.shortvals[0] : static_cast<unsigned int>(entry.longval)));
196 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
197 switch (entry.shortvals[0]) {
221 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
222 switch (entry.shortvals[0]) {
224 printf("White is Zero (%d)", entry.shortvals[0]);
227 printf("Black is Zero (%d)", entry.shortvals[0]);
230 printf("RGB (%d)", entry.shortvals[0]);
233 printf("Palette Color (%d)", entry.shortvals[0]);
236 printf("Transparency Mask (%d)", entry.shortvals[0]);
243 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
244 switch (entry.shortvals[0]) {
277 static_cast<unsigned int>(entry.longval));
278 if (entry.longval == ksinglestrip)
284 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
285 if (entry.shortvals[0] == 1) {
286 printf("Chunky (%d)", entry.shortvals[0]);
289 else if (entry.shortvals[0] == 2) {
290 printf("Planar (%d)", entry.shortvals[0]);
297 if (entry.count == 1 && entry.fieldType == TIFF_SHORT) {
298 switch (entry.shortvals[0]) {
300 printf("None (%d)", entry.shortvals[0]);
303 printf("Inch (%d)", entry.shortvals[0]);
306 printf("Cenimeter (%d)", entry.shortvals[0]);
313 if (entry.fieldType == TIFF_ASCII) {
316 if (entry.count <= 4)
317 memcpy(ascfield, &entry.longval, entry.count);
318 else if (entry.count > 4 && entry.count < 256) {
319 ssize_t nread = file.ReadAt(entry.longval, ascfield, entry.count);
320 if (nread != static_cast<ssize_t>(entry.count))
328 } else if (entry.fieldType == TIFF_RATIONAL && entry.count == 1) {
331 ssize_t nread = file.ReadAt(entry.longval, &rational, 8);
338 entry.longval);
341 } else if (entry.fieldType == TIFF_SRATIONAL && entry.count == 1) {
344 ssize_t nread = file.ReadAt(entry.longval, &srational, 8);
351 entry.longval);
354 } else if (entry.fieldType == TIFF_LONG && entry.count == 1) {
356 static_cast<unsigned int>(entry.longval));
358 } else if (entry.fieldType == TIFF_SLONG && entry.count == 1) {
360 static_cast<int>(entry.longval));
362 } else if (entry.fieldType == TIFF_SHORT && entry.count <= 2) {
363 for (uint32 i = 0; i < entry.count; i++) {
366 printf("%u", entry.shortvals[i]);
369 } else if (entry.fieldType == TIFF_SSHORT && entry.count <= 2) {
370 for (uint32 i = 0; i < entry.count; i++) {
373 printf("%d", entry.shortvals[i]);
376 } else if (entry.fieldType == TIFF_BYTE && entry.count <= 4) {
377 for (uint32 i = 0; i < entry.count; i++) {
380 printf("%u", entry.bytevals[i]);
383 } else if (entry.fieldType == TIFF_SBYTE && entry.count <= 4) {
384 for (uint32 i = 0; i < entry.count; i++) {
387 printf("%d", entry.bytevals[i]);
390 } else if (entry.fieldType == TIFF_UNDEFINED && entry.count <= 4) {
391 for (uint32 i = 0; i < entry.count; i++) {
395 static_cast<unsigned long>(entry.bytevals[i]));
401 printf("0x%.8lx", entry.longval);
404 int swap_value_field(IFDEntry &entry, swap_action swp)
406 switch (entry.fieldType) {
411 if (entry.count > 4) {
412 if (swap_data(B_UINT32_TYPE, &entry.longval, 4, swp) != B_OK)
422 if (swap_data(B_UINT32_TYPE, &entry.longval, 4, swp) != B_OK)
427 if (swap_data(B_FLOAT_TYPE, &entry.floatval, 4, swp) != B_OK)
433 if (entry.count <= 2) {
434 if (swap_data(B_UINT16_TYPE, &entry.shortvals,
435 entry.count * 2, swp) != B_OK)
438 if (swap_data(B_UINT32_TYPE, &entry.longval, 4, swp) != B_OK)
452 IFDEntry entry;
461 ssize_t nread = file.Read(&entry, 12);
463 printf("unable to read entire ifd entry\n");
466 if (swap_data(B_UINT16_TYPE, &entry.tag, 4, swp) != B_OK ||
467 swap_data(B_UINT32_TYPE, &entry.count, 4, swp) != B_OK) {
472 if (!swap_value_field(entry, swp)) {
478 printf( " Tag: %s (%d)\n", get_tag_string(entry.tag), entry.tag);
479 printf( " Type: %s (%d)\n", get_type_string(entry.fieldType),
480 entry.fieldType);
481 printf( " Count: %d\n", static_cast<int>(entry.count));
483 print_ifd_value(entry, file, swp);
504 printf("unable to read entry count\n");