Commit Graph

1006 Commits

Author SHA1 Message Date
Ziqing Hui 82d90fc2a1 windowscodecs: Implement DdsFrameDecode_GetPixelFormat().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:17:12 +02:00
Ziqing Hui 7b24d3efc7 windowscodecs/tests: Format ok() message for tests/ddsformat.c.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Ziqing Hui a2fa0e76b1 windowscodecs: Fix MIME types of DDS decoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:42:12 +02:00
Ziqing Hui f69619791d windowscodecs/tests: Add decoder info tests for DDS decoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:42:08 +02:00
Ziqing Hui 67a50f1252 windowscodecs/tests: Add tests for DdsFrameDecode_GetPixelFormat().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:42:06 +02:00
Ziqing Hui fed3784ab0 windowscodecs: Implement DdsFrameDecode_Dds_CopyBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:32:04 +02:00
Ziqing Hui e51a707487 windowscodecs/tests: Add more tests for DdsFrameDecode_Dds_CopyBlocks() when "boundsInBlocks" is NULL.
The added tests shows that when boundsInBlocks parameter is NULL,
stride parameter will be checked to ensure it is bigger or equal to
frame stride, but it will be ignored in the call. This can be proved
by:

* CopyBlocks(NULL, frame_stride - 1, sizeof(buffer), buffer) return
error.

* CopyBlocks(NULL, frame_stride, sizeof(buffer), buffer) and
CopyBlocks(NULL, frame_stride * 2, sizeof(buffer), buffer) works fine
and result in same buffer content.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:31:46 +02:00
Ziqing Hui 71e92c029a windowscodecs/tests: Add a DXT3 test image for DDS decoder.
We only tested DXT1 images with 1 blocks before. That's not enough.
Also, for CopyBlocks(), when boundsInBlocks parameter is NULL, the
stride should be the stride of the frame itself.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:31:42 +02:00
Ziqing Hui a805c1f198 windowscodecs: Initialize block data in DdsDecoder_Dds_GetFrame().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:31:27 +02:00
Ziqing Hui ac1adfc512 windowscodecs/tests: Add more tests for DdsFrameDecode_Dds_CopyBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 19:30:42 +02:00
Ziqing Hui b3eabfdd93 windowscodecs: Add tests for DdsFrameDecode_Dds_CopyBlocks().
Some code in test_dds_decoder_frame_properties() are moved to
test_dds_decoder_frame() bacause there are some same code in
test_dds_decoder_frame_properties() and test_dds_decoder_frame_data().

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 22:55:03 +02:00
Ziqing Hui a31cadae42 windowscodecs: Implement DdsFrameDecode_Dds_GetSizeInBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 81da1f6b5d windowscodecs/tests: Add tests for DdsFrameDecode_Dds_GetSizeInBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 2e39b43c5d windowscodecs: Implement DdsFrameDecode_Dds_GetFormatInfo().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui febf29ba9d windowscodecs/tests: Add tests for DdsFrameDecode_Dds_GetFormatInfo().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 0d263f9fda windowscodecs: Check NULL parameters for DdsFrameDecode_GetSize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 9a6108cf43 windowscodecs: Implement DdsFrameDecode_GetSize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:36 +02:00
Ziqing Hui 870b08b7fd windowscodecs: Implement DdsDecoder_Dds_GetFrame().
DdsDecoder_GetFrame() is implemented on top of DdsDecoder_Dds_GetFrame().

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:34 +02:00
Ziqing Hui ab0d2b1434 windowscodecs: Get DDS parameters when initialize.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:32 +02:00
Ziqing Hui ff9b2936ed windowscodecs/tests: Add tests for DdsDecoder_GetFrame() and DdsFrameDecode_GetSize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 19:50:47 +02:00
Francois Gouget fe2435c93f windowscodecs/tests: Fix the spelling of a couple of variable names.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 11:52:33 +02:00
Ziqing Hui d622b134dd windowsccodecs: Implement DdsDecoder_Dds_GetParameters().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 08:48:15 +02:00
Ziqing Hui a9c70877f3 windowscodecs/tests: Add tests for IWICDdsDecoder_GetParameters().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 08:48:10 +02:00
Ziqing Hui 2531b927c7 windowscodecs: Add stub implementation for IWICDdsFrameDecode.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 21:59:13 +02:00
Ziqing Hui d42946ea43 windowscodecs: Add stub implementation for IWICDdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 21:59:11 +02:00
Ziqing Hui db0f5027d7 windowscodecs: Add stub for DdsFrameDecode.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 21:59:07 +02:00
Dmitry Timoshkov c1d02a5fdf windowscodecs/tests: Add the tests for GIF encoder and decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 21:36:12 +02:00
Dmitry Timoshkov 18a915ef3c windowscodecs: Fix IWICBitmapDecoder::CopyPalette for a not initialized case in the GIF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 21:36:12 +02:00
Dmitry Timoshkov 7eb1f5d6ad windowscodecs: Add initial implementation of the GIF encoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 21:36:12 +02:00
Ziqing Hui 79664eb1cf windowscodecs: Implement DdsDecoder_GetFrameCount().
The added tests code is to test the return value of
DdsDecoder_GetFrameCount() when decoder is not initialized or
parameter is NULL.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 20:20:15 +02:00
Dmitry Timoshkov 962bb99352 windowscodecs/tests: Add a separate test for 4bps BGRA TIFF format.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:35:06 +02:00
Dmitry Timoshkov d9ac191542 windowscodecs/tests: Add some tests for various TIFF color formats.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:35:03 +02:00
Dmitry Timoshkov a0b1f229c7 windowscodecs: Add support for 96bppRGBFloat and 128bppPRGBAFloat formats to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:35:00 +02:00
Ziqing Hui 2e7056b4ac windowscodecs: Add support for extended DDS header.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:34:54 +02:00
Ziqing Hui 3d247caab5 windowscodecs/tests: Add tests for DdsDecoder_GetFrameCount().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:34:49 +02:00
Ziqing Hui ceddeadc14 windowscodecs/tests: Add more DDS test images.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:34:44 +02:00
Ziqing Hui fc5ef918d5 windowscodecs: Add TRACE in DdsDecoder_GetContainerFormat().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:34:41 +02:00
Ziqing Hui 656e13b41e windowscodecs: Implement DdsDecoder_GetDecoderInfo().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:34:34 +02:00
Jacek Caban 27c4648507 windowscodecs: Provide UUIDs in importlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:32:46 +02:00
Dmitry Timoshkov 3b9560c6f3 windowscodecs: Add support for 16bps RGBA format to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:44 +02:00
Dmitry Timoshkov 0cd8502b49 windowscodecs: Add support for 4bps RGBA format to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:42 +02:00
Dmitry Timoshkov d5830ff9bd windowscodecs: Add support for 12bps RGB format to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:40 +02:00
Dmitry Timoshkov a1fb3bb4da windowscodecs: Add support for 3bps RGB format to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:37 +02:00
Dmitry Timoshkov 948e5dffcd windowscodecs: Add support for 32bppCMYK and 64bppCMYK formats to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:35 +02:00
Dmitry Timoshkov 462c650ea4 windowscodecs: Add support for 128bppRGBAFloat format to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:32 +02:00
Dmitry Timoshkov fa753b5cf2 windowscodecs: Add support for 16bppGray and 32bppGrayFloat formats to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:30 +02:00
Ziqing Hui b34d4bdcb8 windowscodecs/tests: Avoid using SUCCEEDED() and FAILED() in ddsformat.c.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:23 +02:00
Ziqing Hui f634aa2836 windowscodecs: Implement global property functions for DdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:20 +02:00
Ziqing Hui f74797d3da windowscodecs/tests: Add tests for global properties of DdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:16 +02:00
Ziqing Hui 8467b61a3e windowscodecs: Implement DdsDecoder_Initialize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Ziqing Hui e167f90eca windowscodecs/tests: Add tests for DdsDecoder_Initialize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Ziqing Hui 9e81463de9 windowscodecs: Implement stub for DdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 22:53:48 +02:00
Ziqing Hui 66a82d2595 windowscodecs/tests: Add tests for DDS format.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 22:53:48 +02:00
Alexandre Julliard 7cb1ac7ba2 windowscodecs: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:20 +02:00
Vincent Povirk fea96a5739 windowscodecs: Fix ICNS encoder write_source call.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:55:48 +01:00
Vincent Povirk 4f53be1a6e windowscodecs: Set palette in WriteSource when necessary.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 20:27:55 +01:00
Vincent Povirk 9891afcb68 windowscodecs/tests: Add test for WriteSource with indexed formats.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 20:27:55 +01:00
Nikolay Sivov 5f6851fb29 wincodecs: Return WINCODEC_ERR_PALETTEUNAVAILABLE for jpeg decoder frame.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:47:45 +01:00
Nikolay Sivov ec51875730 wincodecs: Add 32RGBA -> 24BGR conversion path.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 16:22:06 +01:00
Vincent Povirk 546ab20cf3 windowscodecs: Fix tiffformat test on current Windows 10.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 09:34:48 +01:00
Nikolay Sivov 544fd5b942 wincodecs: Remove unused function.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Piotr Caban 88d30985dd windowscodecs: Include png.h only if SONAME_LIBPNG is defined.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 22:20:28 +01:00
Vincent Povirk 98c2c9a9c9 windowscodecs: Implement IWICStream_Commit.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 21:45:43 +02:00
Vincent Povirk f704c36568 windowscodecs/tests: Expect success from IWICStream_Commit.
Windows 10 implemented this.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 21:45:40 +02:00
Alex Henrie f3c1123aec windowscodecs: Avoid dead assignment (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 18:49:42 +02:00
Sven Baars 4321cd9d7e windowscodecs/tests: Fix a memory leak (Valgrind).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43387
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-20 21:29:37 +02:00
Francois Gouget e9f5e26cc5 windowscodecs/tests: A couple of spelling fixes in comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Gerald Pfeifer ae5a1f44fc windowscodecs: Move from_sRGB_component into the same section as its sole sole user.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 10:52:03 +02:00
Dmitry Timoshkov 6ebc9dd42f windowscodecs: Simplify some IMILBitmapScaler forwarders.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Dmitry Timoshkov b4035288b7 windowscodecs: Correct IWICBitmapScaler::CopyPixels() error for not initialized case.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Alexandre Julliard 0a79eb3608 include: Use the __thiscall attribute directly for the Mingw build.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 19:00:10 +02:00
Dmitry Timoshkov d074fbe723 windowscodecs/tests: Add some tests for IMILBitmap and IMILBitmapScaler interfaces.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 20:18:54 +02:00
Dmitry Timoshkov 36095e2ded windowscodecs: Add support for IMILBitmapScaler interface.
Makes the GOG downloader work.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 20:18:52 +02:00
Dmitry Timoshkov f6cab98d4b windowscodecs: Improve compatibility of IMILBitmap interface.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34764
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 20:14:49 +02:00
Vincent Povirk 2b7b3abc5b windowscodecs: Treat 16-bit channels as little endian.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-10 17:05:00 +02:00
Bryon Roche 0c0def962f windowscodecs: Byte swap png read/write for 16-bpp data.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46558
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-10 17:04:58 +02:00
Alexandre Julliard 3d6febc997 include: Get rid of the DPRINTF() macro.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:34:44 +02:00
Francois Gouget 17276a8e40 windowscodecs/tests: Add a trailing '\n' to an ok() call.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 17:43:14 +01:00
Francois Gouget 603bd85a09 windowscodecs: Spelling fixes in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 17:42:41 +01:00
Michael Stefaniuc 12eeed3816 windowscodecs: Remove redundant not-NULL checks (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 20:35:36 +01:00
Michael Stefaniuc f34f621291 windowscodecs: Remove redundant not-NULL check (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Dmitry Timoshkov 361b0ed5ba windowscodecs: Move JPEG frame image data initialization from Frame::CopyPixels to Decoder::Initialize.
This is how PNG decoder does things, and it avoids image data corruption
in some cases (presumably when libjpeg reuses existing scanline data).

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 18:21:42 +01:00
Dmitry Timoshkov 812d03129d windowscodecs: Add support for CMYK to BGR conversion.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 20:25:02 +01:00
Dmitry Timoshkov 493fbabb85 windowscodecs: Avoid redundant checks when reading a TIFF tile.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 18:42:55 +01:00
Dmitry Timoshkov ea6118e9b7 windowscodecs: Fail earlier in TIFF decoder's Initialize method for unsupported pixel formats.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 18:42:53 +01:00
Dmitry Timoshkov 4af1c0c246 windowscodecs: Fix the SupportsTransparency flag value for various pixel formats.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 18:42:51 +01:00
Dmitry Timoshkov 7e9c178454 windowscodecs/tests: Add a test for 8bpp indexed TIFF format.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 18:42:48 +01:00
Sven Baars 1d8882e04b windowscodecs: Add missing source_bpp initialization (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-18 19:29:52 +01:00
Sven Baars 13eb82922c windowscodecs/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-18 19:29:50 +01:00
Dmitry Timoshkov 4cbea6a5c2 windowscodecs: Add support for 32bppRGB, 32bppRGBA and 32bppPRGBA to format converter.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-18 19:29:46 +01:00
Dmitry Timoshkov 6e7a2bd349 windowscodecs/tests: Add some tests for converting 24bppBGR to 8bppIndexed format.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 17:47:40 +01:00
Dmitry Timoshkov 4883556add windowscodecs/tests: Add a bunch of new tests for indexed format conversions.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 17:47:38 +01:00
Dmitry Timoshkov 312cd7b588 windowscodecs: Fix behaviour of format converter for indexed formats when NULL or empty palette has been provided.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 17:47:36 +01:00
Dmitry Timoshkov 603ac6ad21 windowscodecs: WICConvertBitmapSource should ask IWICFormatConverter::Initialize to use an optimized palette.
This matches Windows' behaviour, and makes a simple test application that
converts any WIC compatible RGB(A) source image to 8bppIndexed format work.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 17:47:32 +01:00
Dmitry Timoshkov 453aa45980 windowscodecs: Add a NULL check to 8bpp gray converter.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-04 15:26:29 +01:00
Dmitry Timoshkov d6c2734d72 windowscodecs: Add support for converting to 8bppIndexed format.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-04 15:26:25 +01:00
Michael Stefaniuc eb271ec4ba windowscodecs: Remove redundant NULL check before HeapFree().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:13:18 +01:00
Michael Stefaniuc 52066ee092 windowscodecs: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:13:18 +01:00
Dmitry Timoshkov d102d6e9f7 windowscodecs: Implement IWICPalette::InitializeFromBitmap.
Based on median cut implementation created by Sebastian Lackner.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:13:18 +01:00
Sven Baars 1f132865ec windowscodecs: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 10:28:58 +01:00