Added patch to ignore unsupported alpha channels in TIFF decoder.

This commit is contained in:
Sebastian Lackner 2015-02-21 11:25:55 +01:00
parent ea6d6ce494
commit 65895dcd33
5 changed files with 61 additions and 1 deletions

View File

@ -38,7 +38,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
===================================
**Bugfixes and features included in the next upcoming release [12]:**
**Bugfixes and features included in the next upcoming release [13]:**
* Add semi-stub for GetFileVersionInfoExA/W ([Wine Bug #38098](https://bugs.winehq.org/show_bug.cgi?id=38098))
* Add semi-stub for GetFileVersionInfoSizeExA/W ([Wine Bug #38090](https://bugs.winehq.org/show_bug.cgi?id=38090))
@ -49,6 +49,7 @@ Included bug fixes and improvements
* Avoid race-conditions with write watches in WS2_async_accept.
* Basic handling of write watches triggered while we're on the signal stack.
* Do not access stack below ESP when restoring thread context.
* Ignore unsupported alpha channels in TIFF decoder ([Wine Bug #38027](https://bugs.winehq.org/show_bug.cgi?id=38027))
* Implement D3DXGetShaderOutputSemantics
* Improve stubs for AEV_{Get,Set}MasterVolumeLevel
* Improve stubs for AEV_{Get,Set}Mute

1
debian/changelog vendored
View File

@ -16,6 +16,7 @@ wine-staging (1.7.37) UNRELEASED; urgency=low
* Added patch to improve stubs for AEV_{Get,Set}Mute.
* Added patch to implement semi-stub for GetFileVersionInfoSizeExA/W.
* Added patch to implement semi-stub for GetFileVersionInfoExA/W.
* Added patch to ignore unsupported alpha channels in TIFF decoder.
* Removed patches for UTF7 support (accepted upstream).
* Removed patches for SIO_ADDRESS_LIST_CHANGE ioctl (accepted upstream).
* Removed patch for IApplicationAssociationRegistration::QueryCurrentDefault (accepted upstream).

View File

@ -180,6 +180,7 @@ patch_enable_all ()
enable_vcomp_Stub_Functions="$1"
enable_version_VersionInfoEx="$1"
enable_windowscodecs_TGA_Decoder="$1"
enable_windowscodecs_TIFF_Decoder="$1"
enable_wine_inf_Performance="$1"
enable_wineboot_HKEY_DYN_DATA="$1"
enable_winebuild_LinkerVersion="$1"
@ -569,6 +570,9 @@ patch_enable ()
windowscodecs-TGA_Decoder)
enable_windowscodecs_TGA_Decoder="$2"
;;
windowscodecs-TIFF_Decoder)
enable_windowscodecs_TIFF_Decoder="$2"
;;
wine.inf-Performance)
enable_wine_inf_Performance="$2"
;;
@ -3126,6 +3130,21 @@ if test "$enable_windowscodecs_TGA_Decoder" -eq 1; then
) >> "$patchlist"
fi
# Patchset windowscodecs-TIFF_Decoder
# |
# | This patchset fixes the following Wine bugs:
# | * [#38027] Ignore unsupported alpha channels in TIFF decoder
# |
# | Modified files:
# | * dlls/windowscodecs/tiffformat.c
# |
if test "$enable_windowscodecs_TIFF_Decoder" -eq 1; then
patch_apply windowscodecs-TIFF_Decoder/0001-windowscodecs-Ignore-unsupported-alpha-channel-in-ti.patch
(
echo '+ { "Dmitry Timoshkov", "windowscodecs: Ignore unsupported alpha channel in tiff_get_decode_info.", 1 },';
) >> "$patchlist"
fi
# Patchset wine.inf-Performance
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,38 @@
From 905f0a28d10fa0e67b8c2580d65f9001bc15f92a Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 21 Feb 2015 11:23:58 +0100
Subject: windowscodecs: Ignore unsupported alpha channel in
tiff_get_decode_info.
---
dlls/windowscodecs/tiffformat.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c
index 74a73bc..6302c28 100644
--- a/dlls/windowscodecs/tiffformat.c
+++ b/dlls/windowscodecs/tiffformat.c
@@ -326,7 +326,19 @@ static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info)
decode_info->invert_grayscale = 1;
/* fall through */
case 1: /* BlackIsZero */
- if (samples != 1)
+ if (samples == 2)
+ {
+ ret = pTIFFGetField(tiff, TIFFTAG_EXTRASAMPLES, &extra_sample_count, &extra_samples);
+ if (!ret)
+ {
+ extra_sample_count = 1;
+ extra_sample = 0;
+ extra_samples = &extra_sample;
+ }
+ else
+ FIXME("ignoring extra alpha %u/%u bps %u\n", extra_sample_count, extra_samples[0], bps);
+ }
+ else if (samples != 1)
{
FIXME("unhandled grayscale sample count %u\n", samples);
return E_FAIL;
--
2.3.0

View File

@ -0,0 +1 @@
Fixes: [38027] Ignore unsupported alpha channels in TIFF decoder