Subversion Repositories Kolibri OS

Rev

Rev 2388 | Rev 2992 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;;================================================================================================;;
  2. ;;//// tiff.inc //// (c) dunkaist, 2011-2012 /////////////////////////////////////////////////////;;
  3. ;;================================================================================================;;
  4. ;;                                                                                                ;;
  5. ;; This file is part of Common development libraries (Libs-Dev).                                  ;;
  6. ;;                                                                                                ;;
  7. ;; Libs-Dev is free software: you can redistribute it and/or modify it under the terms of the GNU ;;
  8. ;; Lesser General Public License as published by the Free Software Foundation, either version 2.1 ;;
  9. ;; of the License, or (at your option) any later version.                                         ;;
  10. ;;                                                                                                ;;
  11. ;; Libs-Dev is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  ;;
  12. ;; even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU  ;;
  13. ;; Lesser General Public License for more details.                                                ;;
  14. ;;                                                                                                ;;
  15. ;; You should have received a copy of the GNU Lesser General Public License along with Libs-Dev.  ;;
  16. ;; If not, see <http://www.gnu.org/licenses/>.                                                    ;;
  17. ;;                                                                                                ;;
  18. ;;================================================================================================;;
  19.  
  20. struct tiff_header
  21.         magic_1                 rw      1
  22.         magic_2                 rw      1
  23.         first_IFD               rd      1
  24. ends
  25.  
  26. struct tiff_extra
  27.         image_width                     rd      1       ; SHORT or LONG
  28.         image_height                    rd      1       ; SHORT or LONG
  29.         bits_per_sample                 rd      1       ; SHORT
  30.         samples_per_pixel               rd      1       ; SHORT
  31.         compression                     rd      1       ; SHORT
  32.         photometric                     rd      1       ; SHORT
  33.         offsets_number                  rd      1
  34.         strip_offsets                   rd      1       ; SHORT or LONG
  35.         strip_offsets_length            rd      1
  36.         rows_per_strip                  rd      1       ; SHORT or LONG
  37.         strip_byte_counts               rd      1       ; LONG or SHORT
  38.         strip_byte_counts_length        rd      1
  39.         palette                         rd      1       ; SHORT
  40.         palette_size                    rd      1       ; in colors, not samples
  41.         extra_samples                   rd      1       ; pointer to array of SHORTs
  42.         extra_samples_number            rd      1
  43. ends
  44.  
  45.  
  46. TIFF.IFDE_TYPE.BYTE             =       1
  47. TIFF.IFDE_TYPE.ASCII            =       2
  48. TIFF.IFDE_TYPE.SHORT            =       3
  49. TIFF.IFDE_TYPE.LONG             =       4
  50. TIFF.IFDE_TYPE.RATIONAL         =       5
  51. TIFF.IFDE_TYPE.SBYTE            =       6
  52. TIFF.IFDE_TYPE.UNDEFINED        =       7
  53. TIFF.IFDE_TYPE.SSHORT           =       8
  54. TIFF.IFDE_TYPE.SLONG            =       9
  55. TIFF.IFDE_TYPE.SRATIONAL        =       10
  56. TIFF.IFDE_TYPE.FLOAT            =       11
  57. TIFF.IFDE_TYPE.DOUBLE           =       12
  58.  
  59. TIFF.IFDE_TYPE_LENGTH.BYTE      =       1
  60. TIFF.IFDE_TYPE_LENGTH.ASCII     =       1
  61. TIFF.IFDE_TYPE_LENGTH.SHORT     =       2
  62. TIFF.IFDE_TYPE_LENGTH.LONG      =       4
  63. TIFF.IFDE_TYPE_LENGTH.RATIONAL  =       8
  64. TIFF.IFDE_TYPE_LENGTH.SBYTE     =       1
  65. TIFF.IFDE_TYPE_LENGTH.UNDEFINED =       1
  66. TIFF.IFDE_TYPE_LENGTH.SSHORT    =       2
  67. TIFF.IFDE_TYPE_LENGTH.SLONG     =       4
  68. TIFF.IFDE_TYPE_LENGTH.SRATIONAL =       8
  69. TIFF.IFDE_TYPE_LENGTH.FLOAT     =       4
  70. TIFF.IFDE_TYPE_LENGTH.DOUBLE    =       8
  71.  
  72. TIFF.COMPRESSION.UNCOMPRESSED   =       1
  73. TIFF.COMPRESSION.CCITT1D        =       2
  74. TIFF.COMPRESSION.GROUP3FAX      =       3
  75. TIFF.COMPRESSION.GROUP4FAX      =       4
  76. TIFF.COMPRESSION.LZW            =       5
  77. TIFF.COMPRESSION.JPEG           =       6
  78. TIFF.COMPRESSION.PACKBITS       =       32773
  79.  
  80. TIFF.PHOTOMETRIC.WHITE_IS_ZERO  =       0
  81. TIFF.PHOTOMETRIC.BLACK_IS_ZERO  =       1
  82. TIFF.PHOTOMETRIC.RGB            =       2
  83. TIFF.PHOTOMETRIC.RGB_PALETTE    =       3
  84. TIFF.PHOTOMETRIC.MASK           =       4
  85. TIFF.PHOTOMETRIC.CMYK           =       5
  86. TIFF.PHOTOMETRIC.YCbCr          =       6
  87. TIFF.PHOTOMETRIC.CIELAB         =       8
  88.  
  89.  
  90. macro   lodsw_
  91. {
  92.         stdcall tiff._.get_word, [_endianness]
  93. }
  94.  
  95. macro   lodsd_
  96. {
  97.         stdcall tiff._.get_dword, [_endianness]
  98. }
  99.  
  100.