Browse Source

- minor fixes

development
Andreas Romeyke 7 months ago
parent
commit
61c7ad4c99
  1. 9
      src/helper/check_tiffparse.c

9
src/helper/check_tiffparse.c

@ -333,9 +333,8 @@ ret_t get_first_IFD(ctiff_t * ctif, uint32 * ifd) {
}
/* scans first IDF and returns the n-th tag */
/* scans first IDF and returns the n-th tag, if errorneous it returns a value 0 */
tag_t TIFFGetRawTagListEntry( ctiff_t * ctif, int tagidx ) {
int byteswapped = is_byteswapped(ctif);
get_ifd0_count( ctif); /* return code ignored, used to read TIFF header */
/* ct_read count of tags (2 Bytes) */
uint32 adress = ctif->ifd0pos+2+tagidx*12;
@ -350,9 +349,9 @@ tag_t TIFFGetRawTagListEntry( ctiff_t * ctif, int tagidx ) {
// exit( EXIT_FAILURE );
return 0;
}
if (byteswapped) {
if (is_byteswapped(ctif)) {
TIFFSwabShort(&tagid);
}
}
//printf("tag idx=%i, tag=%u (0x%04x) (0x%02x) (0x%02x)\n", i, tagid, tagid, hi, lo);
return tagid;
}
@ -674,7 +673,7 @@ if (tagidx >= 0) {
TIFFDataType TIFFGetRawTagType(ctiff_t * ctif, tag_t tag) {
int tagidx = -1;
for (uint16 i= 0; i < get_ifd0_count( ctif ); i++) {
if (tag > 253 && tag == TIFFGetRawTagListEntry( ctif, i )) {
if ((tag > 253) && (tag == TIFFGetRawTagListEntry( ctif, i ))) {
tagidx= i;
break;
};

Loading…
Cancel
Save