tif.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* tif.h - Aldus Tagged Image File Format */
  2. /*
  3. libzint - the open source barcode library
  4. Copyright (C) 2016-2024 Robin Stuart <rstuart114@gmail.com>
  5. Redistribution and use in source and binary forms, with or without
  6. modification, are permitted provided that the following conditions
  7. are met:
  8. 1. Redistributions of source code must retain the above copyright
  9. notice, this list of conditions and the following disclaimer.
  10. 2. Redistributions in binary form must reproduce the above copyright
  11. notice, this list of conditions and the following disclaimer in the
  12. documentation and/or other materials provided with the distribution.
  13. 3. Neither the name of the project nor the names of its contributors
  14. may be used to endorse or promote products derived from this software
  15. without specific prior written permission.
  16. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  17. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  19. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  20. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  21. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  22. OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  23. HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  24. LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  25. OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  26. SUCH DAMAGE.
  27. */
  28. /* SPDX-License-Identifier: BSD-3-Clause */
  29. #ifndef Z_TIF_H
  30. #define Z_TIF_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif /* __cplusplus */
  34. #ifdef OUT_USE_PRAGMA_PACK
  35. #pragma pack(1)
  36. #endif
  37. typedef struct tiff_header {
  38. uint16_t byte_order;
  39. uint16_t identity;
  40. uint32_t offset;
  41. } OUT_PACK tiff_header_t;
  42. typedef struct tiff_tag {
  43. uint16_t tag;
  44. uint16_t type;
  45. uint32_t count;
  46. uint32_t offset;
  47. } OUT_PACK tiff_tag_t;
  48. typedef struct tiff_color {
  49. uint16_t red;
  50. uint16_t green;
  51. uint16_t blue;
  52. } OUT_PACK tiff_color_t;
  53. #ifdef OUT_USE_PRAGMA_PACK
  54. #pragma pack()
  55. #endif
  56. #ifdef __cplusplus
  57. }
  58. #endif /* __cplusplus */
  59. /* vim: set ts=4 sw=4 et : */
  60. #endif /* Z_TIF_H */