| 1 |
/* 'checkit_tiff' is a conformance checker for baseline TIFFs |
| 2 |
* |
| 3 |
* author: Andreas Romeyke, 2015-2022 |
| 4 |
* licensed under conditions of libtiff |
| 5 |
* (see http://libtiff.maptools.org/misc.html) |
| 6 |
* |
| 7 |
*/ |
| 8 |
|
| 9 |
#include "check.h" |
| 10 |
#include "check_helper.h" |
| 11 |
#include "ctstring.h" |
| 12 |
/* #define DEBUG */ |
| 13 |
|
| 14 |
/* checks if TIF has a specified tag */ |
| 15 |
ret_t check_tag(ctiff_t * ctif, tag_t tag) { |
| 16 |
GET_EMPTY_RET(ret); |
| 17 |
TIFP_CHECK(ctif, ret); |
| 18 |
if (no_index_found < TIFFGetRawTagListIndex(ctif->ifd0, tag)) { |
| 19 |
ret.returncode=is_valid; |
| 20 |
} else { |
| 21 |
ret = set_value_found_ret_formatted(&ret, "tag %i is missing", tag); |
| 22 |
ret.returncode=tag_does_not_exist; |
| 23 |
} |
| 24 |
return ret;} |
| 25 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 smarttab expandtab :*/ |