Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a3711295
Commit
a3711295
authored
Nov 21, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement QueryCapability in the TIFF decoder.
parent
9e5ecdb7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
tiffformat.c
dlls/windowscodecs/tests/tiffformat.c
+0
-7
tiffformat.c
dlls/windowscodecs/tiffformat.c
+15
-4
No files found.
dlls/windowscodecs/tests/tiffformat.c
View file @
a3711295
...
...
@@ -212,31 +212,25 @@ static void test_QueryCapability(void)
capability
=
0xdeadbeef
;
hr
=
IWICBitmapDecoder_QueryCapability
(
decoder
,
stream
,
&
capability
);
todo_wine
ok
(
hr
==
S_OK
,
"QueryCapability error %#x
\n
"
,
hr
);
todo_wine
ok
(
capability
==
exp_caps
||
capability
==
exp_caps_xp
,
"expected %#x, got %#x
\n
"
,
exp_caps
,
capability
);
frame_count
=
0xdeadbeef
;
hr
=
IWICBitmapDecoder_GetFrameCount
(
decoder
,
&
frame_count
);
ok
(
hr
==
S_OK
,
"GetFrameCount error %#x
\n
"
,
hr
);
todo_wine
ok
(
frame_count
==
1
,
"expected 1, got %u
\n
"
,
frame_count
);
pos
.
QuadPart
=
0
;
hr
=
IStream_Seek
(
stream
,
pos
,
SEEK_CUR
,
&
cur_pos
);
ok
(
hr
==
S_OK
,
"IStream_Seek error %#x
\n
"
,
hr
);
todo_wine
ok
(
cur_pos
.
QuadPart
>
4
&&
cur_pos
.
QuadPart
<
sizeof
(
tiff_1bpp_data
),
"current stream pos is at %x/%x
\n
"
,
cur_pos
.
u
.
LowPart
,
cur_pos
.
u
.
HighPart
);
hr
=
IWICBitmapDecoder_QueryCapability
(
decoder
,
stream
,
&
capability
);
todo_wine
ok
(
hr
==
WINCODEC_ERR_WRONGSTATE
,
"expected WINCODEC_ERR_WRONGSTATE, got %#x
\n
"
,
hr
);
hr
=
IWICBitmapDecoder_Initialize
(
decoder
,
stream
,
WICDecodeMetadataCacheOnDemand
);
todo_wine
ok
(
hr
==
WINCODEC_ERR_WRONGSTATE
,
"expected WINCODEC_ERR_WRONGSTATE, got %#x
\n
"
,
hr
);
IWICBitmapDecoder_Release
(
decoder
);
...
...
@@ -261,7 +255,6 @@ todo_wine
ok
(
hr
==
WINCODEC_ERR_WRONGSTATE
,
"expected WINCODEC_ERR_WRONGSTATE, got %#x
\n
"
,
hr
);
hr
=
IWICBitmapDecoder_QueryCapability
(
decoder
,
stream
,
&
capability
);
todo_wine
ok
(
hr
==
WINCODEC_ERR_WRONGSTATE
,
"expected WINCODEC_ERR_WRONGSTATE, got %#x
\n
"
,
hr
);
IWICBitmapDecoder_Release
(
decoder
);
...
...
dlls/windowscodecs/tiffformat.c
View file @
a3711295
...
...
@@ -550,11 +550,22 @@ static ULONG WINAPI TiffDecoder_Release(IWICBitmapDecoder *iface)
return
ref
;
}
static
HRESULT
WINAPI
TiffDecoder_QueryCapability
(
IWICBitmapDecoder
*
iface
,
IStream
*
pIS
tream
,
DWORD
*
pdwC
apability
)
static
HRESULT
WINAPI
TiffDecoder_QueryCapability
(
IWICBitmapDecoder
*
iface
,
IStream
*
s
tream
,
DWORD
*
c
apability
)
{
FIXME
(
"(%p,%p,%p): stub
\n
"
,
iface
,
pIStream
,
pdwCapability
);
return
E_NOTIMPL
;
HRESULT
hr
;
TRACE
(
"(%p,%p,%p)
\n
"
,
iface
,
stream
,
capability
);
if
(
!
stream
||
!
capability
)
return
E_INVALIDARG
;
hr
=
IWICBitmapDecoder_Initialize
(
iface
,
stream
,
WICDecodeMetadataCacheOnDemand
);
if
(
hr
!=
S_OK
)
return
hr
;
*
capability
=
WICBitmapDecoderCapabilityCanDecodeAllImages
|
WICBitmapDecoderCapabilityCanDecodeSomeImages
|
WICBitmapDecoderCapabilityCanEnumerateMetadata
;
return
S_OK
;
}
static
HRESULT
WINAPI
TiffDecoder_Initialize
(
IWICBitmapDecoder
*
iface
,
IStream
*
pIStream
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment