2003.04.29 16:12 "Newbie Question (StripOffsets/StripByteCount)", by Harring Figueiredo

2003.04.29 19:51 "RE: Newbie Question (StripOffsets/StripByteCount)", by John Carter

Hi Harring

I think I'm right in making a correction to your condition. I think it should be ( count * size_of_type >= 4) rather than ( count * size_of_type > 4)

I made that mistake too, and it took me a while to spot it.

also (on slightly related point)
don't forget to cast the ifd_entry.value_offset
such as compression below, switching on ifd_entry.value_offset
directly can give you some strange results.

                case COMPRESSION:
                       tiff_data->compression = (TIFF_SHORT)ifd_entry.value_offset;
                                 case 1:
                                         printf("        Image is not compressed\n");
                                  case 2:
                                         printf("        Uses 1d Huffman run length encoding\n");
                                  case 3:
                                         printf("        T4 Bilevel compression\n");
                                  case 4:
                                         printf("        T6 Bilevel compression\n");
                                  case 5:
                                         printf("        LZW compression\n");
                                  case 6:
                                         printf("        JPEG compression\n");
                                  case 32773:
                                             printf("        PackBits on Raster image data\n");
                                                printf("        No case for compression type %d\n",
                                                printf("        in file %s %d\n",__FILE__,__LINE__);