26#define WIN32_NO_STATUS
106 ERR(
"unknown whence value %i\n", whence);
189 uint16_t extra_sample_count, extra_sample, *extra_samples;
191 UINT resolution_unit;
192 float xres=0.0, yres=0.0;
200 decode_info->
tiled = 0;
206 WARN(
"missing PhotometricInterpretation tag\n");
212 decode_info->
bps = bps;
223 if (!
ret) planar = 1;
226 FIXME(
"unhandled planar configuration %u\n", planar);
230 decode_info->
planar = planar;
232 TRACE(
"planar %u, photometric %u, samples %u, bps %u\n", planar, photometric,
samples, bps);
245 extra_sample_count = 1;
247 extra_samples = &extra_sample;
252 FIXME(
"unhandled %dbpp sample count %u\n", bps,
samples);
266 decode_info->
frame.pixel_format = GUID_WICPixelFormatBlackWhite;
271 FIXME(
"unhandled 4bpp grayscale sample count %u\n",
samples);
274 decode_info->
frame.pixel_format = GUID_WICPixelFormat4bppGray;
278 decode_info->
frame.pixel_format = GUID_WICPixelFormat8bppGray;
281 decode_info->
frame.bpp = 32;
283 switch(extra_samples[0])
286 decode_info->
frame.pixel_format = GUID_WICPixelFormat32bppPBGRA;
290 decode_info->
frame.pixel_format = GUID_WICPixelFormat32bppBGRA;
293 FIXME(
"unhandled extra sample type %u\n", extra_samples[0]);
301 FIXME(
"unhandled 16bpp grayscale sample count %u\n",
samples);
304 decode_info->
frame.pixel_format = GUID_WICPixelFormat16bppGray;
309 FIXME(
"unhandled 32bpp grayscale sample count %u\n",
samples);
312 decode_info->
frame.pixel_format = GUID_WICPixelFormat32bppGrayFloat;
315 WARN(
"unhandled greyscale bit count %u\n", bps);
325 extra_sample_count = 1;
327 extra_samples = &extra_sample;
345 decode_info->
frame.pixel_format = GUID_WICPixelFormat24bppBGR;
347 switch(extra_samples[0])
350 decode_info->
frame.pixel_format = GUID_WICPixelFormat32bppPBGRA;
354 decode_info->
frame.pixel_format = GUID_WICPixelFormat32bppBGRA;
357 FIXME(
"unhandled extra sample type %i\n", extra_samples[0]);
363 decode_info->
frame.pixel_format = GUID_WICPixelFormat48bppRGB;
365 switch(extra_samples[0])
368 decode_info->
frame.pixel_format = GUID_WICPixelFormat64bppPRGBA;
372 decode_info->
frame.pixel_format = GUID_WICPixelFormat64bppRGBA;
375 FIXME(
"unhandled extra sample type %i\n", extra_samples[0]);
381 decode_info->
frame.pixel_format = GUID_WICPixelFormat96bppRGBFloat;
383 switch(extra_samples[0])
386 decode_info->
frame.pixel_format = GUID_WICPixelFormat128bppPRGBAFloat;
390 decode_info->
frame.pixel_format = GUID_WICPixelFormat128bppRGBAFloat;
393 FIXME(
"unhandled extra sample type %i\n", extra_samples[0]);
398 WARN(
"unhandled RGB bit count %u\n", bps);
410 decode_info->
frame.bpp = bps;
414 decode_info->
frame.pixel_format = GUID_WICPixelFormat1bppIndexed;
417 decode_info->
frame.pixel_format = GUID_WICPixelFormat2bppIndexed;
420 decode_info->
frame.pixel_format = GUID_WICPixelFormat4bppIndexed;
423 decode_info->
frame.pixel_format = GUID_WICPixelFormat8bppIndexed;
426 FIXME(
"unhandled indexed bit count %u\n", bps);
434 FIXME(
"unhandled Separated sample count %u\n",
samples);
442 decode_info->
frame.pixel_format = GUID_WICPixelFormat32bppCMYK;
445 decode_info->
frame.pixel_format = GUID_WICPixelFormat64bppCMYK;
449 WARN(
"unhandled Separated bit count %u\n", bps);
458 FIXME(
"unhandled PhotometricInterpretation %u\n", photometric);
465 WARN(
"missing image width\n");
472 WARN(
"missing image length\n");
478 decode_info->
tiled = 1;
483 WARN(
"missing tile height\n");
514 WARN(
"missing X resolution\n");
526 WARN(
"missing Y resolution\n");
533 if (xres == 0.0 || yres == 0.0)
535 decode_info->
frame.dpix = decode_info->
frame.dpiy = 96.0;
539 switch (resolution_unit)
542 FIXME(
"unknown resolution unit %i\n", resolution_unit);
547 decode_info->
frame.dpix = xres;
548 decode_info->
frame.dpiy = yres;
551 decode_info->
frame.dpix = xres * 2.54;
552 decode_info->
frame.dpiy = yres * 2.54;
560 decode_info->
frame.num_colors = 1 << decode_info->
bps;
561 for (
i=0;
i<decode_info->
frame.num_colors;
i++)
563 decode_info->
frame.palette[
i] = 0xff000000 |
564 ((
red[
i]<<8) & 0xff0000) |
566 ((
blue[
i]>>8) & 0xff);
571 decode_info->
frame.num_colors = 0;
575 decode_info->
frame.num_color_contexts = 1;
577 decode_info->
frame.num_color_contexts = 0;
592 This->cached_frame = 0;
615 if (frame >=
This->frame_count)
618 if (
This->cached_frame == frame)
621 prev_tile_size =
This->cached_tile ?
This->cached_decode_info.tile_size : 0;
629 This->cached_tile_x = -1;
633 This->cached_frame = frame;
634 if (
This->cached_decode_info.tile_size > prev_tile_size)
643 This->cached_frame =
This->frame_count;
659 *
info =
This->cached_decode_info.frame;
682 if (
info->source_bpp == 3 &&
info->samples == 3 &&
info->frame.bpp == 24)
693 for (
y = 0;
y <
info->tile_height;
y++)
698 for (
x = 0;
x <
info->tile_width;
x += 8)
700 dst[2] = (
src[0] & 0x80) ? 0xff : 0;
701 dst[1] = (
src[0] & 0x40) ? 0xff : 0;
702 dst[0] = (
src[0] & 0x20) ? 0xff : 0;
703 if (
x + 1 <
info->tile_width)
705 dst[5] = (
src[0] & 0x10) ? 0xff : 0;
706 dst[4] = (
src[0] & 0x08) ? 0xff : 0;
707 dst[3] = (
src[0] & 0x04) ? 0xff : 0;
709 if (
x + 2 <
info->tile_width)
711 dst[8] = (
src[0] & 0x02) ? 0xff : 0;
712 dst[7] = (
src[0] & 0x01) ? 0xff : 0;
713 dst[6] = (
src[1] & 0x80) ? 0xff : 0;
715 if (
x + 3 <
info->tile_width)
717 dst[11] = (
src[1] & 0x40) ? 0xff : 0;
718 dst[10] = (
src[1] & 0x20) ? 0xff : 0;
719 dst[9] = (
src[1] & 0x10) ? 0xff : 0;
721 if (
x + 4 <
info->tile_width)
723 dst[14] = (
src[1] & 0x08) ? 0xff : 0;
724 dst[13] = (
src[1] & 0x04) ? 0xff : 0;
725 dst[12] = (
src[1] & 0x02) ? 0xff : 0;
727 if (
x + 5 <
info->tile_width)
729 dst[17] = (
src[1] & 0x01) ? 0xff : 0;
730 dst[16] = (
src[2] & 0x80) ? 0xff : 0;
731 dst[15] = (
src[2] & 0x40) ? 0xff : 0;
733 if (
x + 6 <
info->tile_width)
735 dst[20] = (
src[2] & 0x20) ? 0xff : 0;
736 dst[19] = (
src[2] & 0x10) ? 0xff : 0;
737 dst[18] = (
src[2] & 0x08) ? 0xff : 0;
739 if (
x + 7 <
info->tile_width)
741 dst[23] = (
src[2] & 0x04) ? 0xff : 0;
742 dst[22] = (
src[2] & 0x02) ? 0xff : 0;
743 dst[21] = (
src[2] & 0x01) ? 0xff : 0;
753 else if (
info->source_bpp == 12 &&
info->samples == 3 &&
info->frame.bpp == 24)
764 for (
y = 0;
y <
info->tile_height;
y++)
769 for (
x = 0;
x <
info->tile_width;
x += 2)
771 dst[0] = ((
src[1] & 0xf0) >> 4) * 17;
772 dst[1] = (
src[0] & 0x0f) * 17;
773 dst[2] = ((
src[0] & 0xf0) >> 4) * 17;
774 if (
x + 1 <
info->tile_width)
776 dst[5] = (
src[1] & 0x0f) * 17;
777 dst[4] = ((
src[2] & 0xf0) >> 4) * 17;
778 dst[3] = (
src[2] & 0x0f) * 17;
788 else if (
info->source_bpp == 4 &&
info->samples == 4 &&
info->frame.bpp == 32)
799 for (
y = 0;
y <
info->tile_height;
y++)
806 for (
x = 0;
x <
info->tile_width;
x += 2)
808 dst[0] = (
src[0] & 0x20) ? 0xff : 0;
809 dst[1] = (
src[0] & 0x40) ? 0xff : 0;
810 dst[2] = (
src[0] & 0x80) ? 0xff : 0;
811 dst[3] = (
src[0] & 0x10) ? 0xff : 0;
812 if (
x + 1 <
info->tile_width)
814 dst[4] = (
src[0] & 0x02) ? 0xff : 0;
815 dst[5] = (
src[0] & 0x04) ? 0xff : 0;
816 dst[6] = (
src[0] & 0x08) ? 0xff : 0;
817 dst[7] = (
src[0] & 0x01) ? 0xff : 0;
827 else if (
info->source_bpp == 16 &&
info->samples == 4 &&
info->frame.bpp == 32)
838 for (
y = 0;
y <
info->tile_height;
y++)
843 for (
x = 0;
x <
info->tile_width;
x++)
845 dst[0] = ((
src[1] & 0xf0) >> 4) * 17;
846 dst[1] = (
src[0] & 0x0f) * 17;
847 dst[2] = ((
src[0] & 0xf0) >> 4) * 17;
848 dst[3] = (
src[1] & 0x0f) * 17;
857 else if (
info->source_bpp == 16 &&
info->samples == 2 &&
info->frame.bpp == 32)
862 src =
This->cached_tile +
info->tile_width *
info->tile_height * 2 - 2;
872 if (
info->reverse_bgr)
879 info->tile_height,
info->tile_width * sample_count);
888 samples_per_row =
info->tile_width *
info->samples;
896 for (
i=0;
i<samples_per_row;
i++)
906 ERR(
"unhandled bps for byte swap %u\n",
info->bps);
911 if (
info->invert_grayscale)
915 if (
info->samples != 1)
917 ERR(
"cannot invert grayscale image with %u samples\n",
info->samples);
923 for (
byte =
This->cached_tile;
byte !=
end;
byte++)
927 This->cached_tile_x = tile_x;
928 This->cached_tile_y = tile_y;
938 UINT min_tile_x, max_tile_x, min_tile_y, max_tile_y;
948 if (!
This->cached_tile)
951 if (!
This->cached_tile)
955 min_tile_x =
prc->X /
info->tile_width;
956 min_tile_y =
prc->Y /
info->tile_height;
957 max_tile_x = (
prc->X+
prc->Width-1) /
info->tile_width;
958 max_tile_y = (
prc->Y+
prc->Height-1) /
info->tile_height;
960 for (tile_x=min_tile_x; tile_x <= max_tile_x; tile_x++)
962 for (tile_y=min_tile_y; tile_y <= max_tile_y; tile_y++)
964 if (tile_x !=
This->cached_tile_x || tile_y !=
This->cached_tile_y)
971 if (
prc->X < tile_x *
info->tile_width)
974 rc.
X =
prc->X - tile_x *
info->tile_width;
976 if (
prc->Y < tile_y *
info->tile_height)
979 rc.
Y =
prc->Y - tile_y *
info->tile_height;
981 if (
prc->X+
prc->Width > (tile_x+1) *
info->tile_width)
983 else if (
prc->X < tile_x *
info->tile_width)
988 if (
prc->Y+
prc->Height > (tile_y+1) *
info->tile_height)
990 else if (
prc->Y < tile_y *
info->tile_height)
996 ((
info->frame.bpp * ((rc.
X + tile_x *
info->tile_width) -
prc->X) + 7) / 8);
1000 &rc,
stride, buffersize, dst_tilepos);
1059#ifdef WORDS_BIGENDIAN
1065 result.reader_clsid = CLSID_WICIfdMetadataReader;
1100 This->cached_tile_x = -1;
1103 info->container_format = GUID_ContainerFormatTiff;
1104 info->block_format = GUID_ContainerFormatTiff;
1105 info->clsid = CLSID_WICTiffDecoder;
1125 {&GUID_WICPixelFormat24bppBGR, 2, 8, 3, 24, 0, 0, 1},
1126 {&GUID_WICPixelFormat24bppRGB, 2, 8, 3, 24, 0, 0, 0},
1127 {&GUID_WICPixelFormatBlackWhite, 1, 1, 1, 1, 0, 0, 0},
1128 {&GUID_WICPixelFormat4bppGray, 1, 4, 1, 4, 0, 0, 0},
1129 {&GUID_WICPixelFormat8bppGray, 1, 8, 1, 8, 0, 0, 0},
1130 {&GUID_WICPixelFormat32bppBGRA, 2, 8, 4, 32, 1, 2, 1},
1131 {&GUID_WICPixelFormat32bppPBGRA, 2, 8, 4, 32, 1, 1, 1},
1132 {&GUID_WICPixelFormat48bppRGB, 2, 16, 3, 48, 0, 0, 0},
1133 {&GUID_WICPixelFormat64bppRGBA, 2, 16, 4, 64, 1, 2, 0},
1134 {&GUID_WICPixelFormat64bppPRGBA, 2, 16, 4, 64, 1, 1, 0},
1135 {&GUID_WICPixelFormat1bppIndexed, 3, 1, 1, 1, 0, 0, 0, 1},
1136 {&GUID_WICPixelFormat4bppIndexed, 3, 4, 1, 4, 0, 0, 0, 1},
1137 {&GUID_WICPixelFormat8bppIndexed, 3, 8, 1, 8, 0, 0, 0, 1},
1198 if (
This->num_frames != 0)
1202 This->lines_written = 0;
1203 This->encoder_frame = *frame;
1218 if (
This->format->extra_sample)
1221 extra_samples =
This->format->extra_sample_type;
1229 if (frame->
dpix != 0.0 && frame->
dpiy != 0.0)
1258 BYTE *row_data, *swapped_data =
NULL;
1261 line_size = ((
This->encoder_frame.width *
This->format->bpp)+7)/8;
1263 if (
This->format->reverse_bgr)
1265 swapped_data =
malloc(line_size);
1270 for (
i=0;
i<line_count;
i++)
1274 if (
This->format->reverse_bgr &&
This->format->bps == 8)
1276 memcpy(swapped_data, row_data, line_size);
1277 for (
j=0;
j<line_size;
j +=
This->format->samples)
1280 temp = swapped_data[
j];
1281 swapped_data[
j] = swapped_data[
j+2];
1282 swapped_data[
j+2] =
temp;
1284 row_data = swapped_data;
1290 This->lines_written += line_count;
1337 This->num_frames = 0;
1340 info->container_format = GUID_ContainerFormatTiff;
1341 info->clsid = CLSID_WICTiffEncoder;
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *size, const struct pixel_format_desc *format)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
int(* __wine_dbg_vlog)(unsigned int cls, const char *channel, const char *function, const char *format, va_list args)
HRESULT CDECL tiff_decoder_create(struct decoder_info *info, struct decoder **result)
static HRESULT CDECL tiff_encoder_commit_frame(struct encoder *iface)
static struct tiff_decoder * impl_from_decoder(struct decoder *iface)
static HRESULT tiff_decoder_read_tile(struct tiff_decoder *This, UINT tile_x, UINT tile_y)
static TIFF * tiff_open_stream(IStream *stream, const char *mode)
static void CDECL tiff_encoder_destroy(struct encoder *iface)
static void CDECL tiff_decoder_destroy(struct decoder *iface)
static HRESULT CDECL tiff_encoder_write_lines(struct encoder *iface, BYTE *data, DWORD line_count, DWORD stride)
static void tiff_warning_handler(const char *module, const char *format, va_list args)
static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info)
static toff_t tiff_stream_size(thandle_t client_data)
static HRESULT CDECL tiff_encoder_initialize(struct encoder *iface, IStream *stream)
static HRESULT tiff_decoder_select_frame(struct tiff_decoder *This, DWORD frame)
static toff_t tiff_stream_seek(thandle_t client_data, toff_t offset, int whence)
static void tiff_error_handler(const char *module, const char *format, va_list args)
static HRESULT CDECL tiff_encoder_create_frame(struct encoder *iface, const struct encoder_frame *frame)
static tsize_t tiff_stream_read(thandle_t client_data, tdata_t data, tsize_t size)
static tsize_t tiff_stream_write(thandle_t client_data, tdata_t data, tsize_t size)
static HRESULT CDECL tiff_decoder_get_color_context(struct decoder *iface, UINT frame, UINT num, BYTE **data, DWORD *datasize)
static const struct encoder_funcs tiff_encoder_vtable
static int tiff_stream_map(thandle_t client_data, tdata_t *addr, toff_t *size)
static HRESULT CDECL tiff_decoder_get_metadata_blocks(struct decoder *iface, UINT frame, UINT *count, struct decoder_block **blocks)
static void tiff_stream_unmap(thandle_t client_data, tdata_t addr, toff_t size)
static HRESULT CDECL tiff_decoder_initialize(struct decoder *iface, IStream *stream, struct decoder_stat *st)
static HRESULT CDECL tiff_encoder_commit_file(struct encoder *iface)
HRESULT CDECL tiff_encoder_create(struct encoder_info *info, struct encoder **result)
static const struct tiff_encode_format formats[]
static HRESULT CDECL tiff_decoder_copy_pixels(struct decoder *iface, UINT frame, const WICRect *prc, UINT stride, UINT buffersize, BYTE *buffer)
static int tiff_stream_close(thandle_t client_data)
static HRESULT CDECL tiff_decoder_get_frame_info(struct decoder *iface, UINT frame, struct decoder_frame *info)
static const struct decoder_funcs tiff_decoder_vtable
static HRESULT CDECL tiff_encoder_get_supported_format(struct encoder *iface, GUID *pixel_format, DWORD *bpp, BOOL *indexed)
static struct tiff_encoder * impl_from_encoder(struct encoder *iface)
#define memcpy(s1, s2, n)
#define IsEqualGUID(rguid1, rguid2)
const char int int __cdecl __wine_dbg_output(const char *str)
struct decoder_frame frame
tiff_decode_info cached_decode_info
const struct tiff_encode_format * format
static void swap_bytes(void *buf, size_t samplesize, size_t samplecount)
void TIFFClose(TIFF *tif)
tdir_t TIFFNumberOfDirectories(TIFF *tif)
int TIFFSetField(TIFF *tif, uint32_t tag,...)
int TIFFSetDirectory(TIFF *tif, tdir_t dirn)
int TIFFGetField(TIFF *tif, uint32_t tag,...)
uint64_t TIFFCurrentDirOffset(TIFF *tif)
int TIFFWriteDirectory(TIFF *tif)
TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler)
TIFF * TIFFClientOpen(const char *name, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc)
int TIFFIsByteSwapped(TIFF *tif)
tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
tmsize_t TIFFReadEncodedTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size)
TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler handler)
int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, uint16_t sample)
#define TIFFTAG_BITSPERSAMPLE
#define TIFFTAG_RESOLUTIONUNIT
#define TIFFTAG_SAMPLESPERPIXEL
#define TIFFTAG_PHOTOMETRIC
#define TIFFTAG_TILELENGTH
#define TIFFTAG_EXTRASAMPLES
#define TIFFTAG_IMAGEWIDTH
#define TIFFTAG_XRESOLUTION
#define TIFFTAG_ICCPROFILE
#define TIFFTAG_YRESOLUTION
#define TIFFTAG_ROWSPERSTRIP
#define TIFFTAG_TILEWIDTH
#define TIFFTAG_IMAGELENGTH
#define TIFFTAG_PLANARCONFIG
#define CONTAINING_RECORD(address, type, field)
@ WICBitmapDecoderCapabilityCanDecodeSomeImages
@ WICBitmapDecoderCapabilityCanEnumerateMetadata
@ WICBitmapDecoderCapabilityCanDecodeAllImages
HRESULT CDECL stream_write(IStream *stream, const void *buffer, ULONG write, ULONG *bytes_written)
HRESULT CDECL stream_getsize(IStream *stream, ULONGLONG *size)
HRESULT CDECL stream_seek(IStream *stream, LONGLONG ofs, DWORD origin, ULONGLONG *new_position)
void reverse_bgr8(UINT bytesperpixel, LPBYTE bits, UINT width, UINT height, INT stride)
#define DECODER_BLOCK_READER_CLSID
#define DECODER_BLOCK_FULL_STREAM
#define ENCODER_FLAGS_MULTI_FRAME
#define ENCODER_FLAGS_SUPPORTS_METADATA
@ ENCODER_OPTION_COMPRESSION_METHOD
@ ENCODER_OPTION_COMPRESSION_QUALITY
@ WICPersistOptionBigEndian
@ WICPersistOptionLittleEndian
@ WICPersistOptionNoCacheStream
#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT