1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-09 21:15:57 +00:00

tif.c: Use palette/bilevel/LZW to reduce file size, alpha/CMYK support

This commit is contained in:
gitlost
2021-03-19 13:09:21 +00:00
parent badd9e59ad
commit 2c053c325a
33 changed files with 983 additions and 203 deletions

View File

@@ -2,7 +2,7 @@
/*
libzint - the open source barcode library
Copyright (C) 2016-2017 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2016-2021 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -29,10 +29,12 @@
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
#ifndef TIF_H
#define TIF_H
/* vim: set ts=4 sw=4 et : */
#ifdef __cplusplus
#ifndef TIF_H
#define TIF_H
#ifdef __cplusplus
extern "C" {
#endif
@@ -58,31 +60,16 @@ extern "C" {
uint32_t offset;
} tiff_tag_t;
typedef struct tiff_ifd {
uint16_t entries;
tiff_tag_t new_subset;
tiff_tag_t image_width;
tiff_tag_t image_length;
tiff_tag_t bits_per_sample;
tiff_tag_t compression;
tiff_tag_t photometric;
tiff_tag_t strip_offsets;
tiff_tag_t samples_per_pixel;
tiff_tag_t rows_per_strip;
tiff_tag_t strip_byte_counts;
tiff_tag_t x_resolution;
tiff_tag_t y_resolution;
tiff_tag_t planar_config;
tiff_tag_t resolution_unit;
uint32_t offset;
} tiff_ifd_t;
typedef struct tiff_color {
uint16_t red;
uint16_t green;
uint16_t blue;
} tiff_color_t;
#pragma pack()
#ifdef __cplusplus
#ifdef __cplusplus
}
#endif
#endif /* TIF_H */
#endif /* TIF_H */