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
387b8427
Commit
387b8427
authored
Jul 06, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Return proper error codes in unneeded BMP decoder methods.
parent
6caca236
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
14 deletions
+39
-14
bmpdecode.c
dlls/windowscodecs/bmpdecode.c
+14
-14
bmpformat.c
dlls/windowscodecs/tests/bmpformat.c
+24
-0
wincodec.idl
include/wincodec.idl
+1
-0
No files found.
dlls/windowscodecs/bmpdecode.c
View file @
387b8427
...
...
@@ -311,22 +311,22 @@ static HRESULT WINAPI BmpFrameDecode_CopyPixels(IWICBitmapFrameDecode *iface,
static
HRESULT
WINAPI
BmpFrameDecode_GetMetadataQueryReader
(
IWICBitmapFrameDecode
*
iface
,
IWICMetadataQueryReader
**
ppIMetadataQueryReader
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIMetadataQueryReader
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIMetadataQueryReader
);
return
WINCODEC_ERR_UNSUPPORTEDOPERATION
;
}
static
HRESULT
WINAPI
BmpFrameDecode_GetColorContexts
(
IWICBitmapFrameDecode
*
iface
,
UINT
cCount
,
IWICColorContext
**
ppIColorContexts
,
UINT
*
pcActualCount
)
{
FIXME
(
"(%p,%u,%p,%p): stub
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%u,%p,%p)
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
return
WINCODEC_ERR_UNSUPPORTEDOPERATION
;
}
static
HRESULT
WINAPI
BmpFrameDecode_GetThumbnail
(
IWICBitmapFrameDecode
*
iface
,
IWICBitmapSource
**
ppIThumbnail
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIThumbnail
);
return
E_NOTIMP
L
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIThumbnail
);
return
WINCODEC_ERR_CODECNOTHUMBNAI
L
;
}
static
HRESULT
BmpFrameDecode_ReadUncompressed
(
BmpFrameDecode
*
This
)
...
...
@@ -637,29 +637,29 @@ static HRESULT WINAPI BmpDecoder_CopyPalette(IWICBitmapDecoder *iface,
static
HRESULT
WINAPI
BmpDecoder_GetMetadataQueryReader
(
IWICBitmapDecoder
*
iface
,
IWICMetadataQueryReader
**
ppIMetadataQueryReader
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIMetadataQueryReader
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIMetadataQueryReader
);
return
WINCODEC_ERR_UNSUPPORTEDOPERATION
;
}
static
HRESULT
WINAPI
BmpDecoder_GetPreview
(
IWICBitmapDecoder
*
iface
,
IWICBitmapSource
**
ppIBitmapSource
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIBitmapSource
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIBitmapSource
);
return
WINCODEC_ERR_UNSUPPORTEDOPERATION
;
}
static
HRESULT
WINAPI
BmpDecoder_GetColorContexts
(
IWICBitmapDecoder
*
iface
,
UINT
cCount
,
IWICColorContext
**
ppIColorContexts
,
UINT
*
pcActualCount
)
{
FIXME
(
"(%p,%u,%p,%p): stub
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%u,%p,%p)
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
return
WINCODEC_ERR_UNSUPPORTEDOPERATION
;
}
static
HRESULT
WINAPI
BmpDecoder_GetThumbnail
(
IWICBitmapDecoder
*
iface
,
IWICBitmapSource
**
ppIThumbnail
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIThumbnail
);
return
E_NOTIMP
L
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIThumbnail
);
return
WINCODEC_ERR_CODECNOTHUMBNAI
L
;
}
static
HRESULT
WINAPI
BmpDecoder_GetFrameCount
(
IWICBitmapDecoder
*
iface
,
...
...
dlls/windowscodecs/tests/bmpformat.c
View file @
387b8427
...
...
@@ -49,6 +49,9 @@ static void test_decode_24bpp(void)
{
IWICBitmapDecoder
*
decoder
,
*
decoder2
;
IWICBitmapFrameDecode
*
framedecode
;
IWICMetadataQueryReader
*
queryreader
;
IWICColorContext
*
colorcontext
;
IWICBitmapSource
*
thumbnail
;
HRESULT
hr
;
HGLOBAL
hbmpdata
;
char
*
bmpdata
;
...
...
@@ -88,6 +91,18 @@ static void test_decode_24bpp(void)
ok
(
SUCCEEDED
(
hr
),
"GetContainerFormat failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guidresult
,
&
GUID_ContainerFormatBmp
),
"unexpected container format
\n
"
);
hr
=
IWICBitmapDecoder_GetMetadataQueryReader
(
decoder
,
&
queryreader
);
ok
(
hr
==
WINCODEC_ERR_UNSUPPORTEDOPERATION
,
"expected WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x
\n
"
,
hr
);
hr
=
IWICBitmapDecoder_GetColorContexts
(
decoder
,
1
,
&
colorcontext
,
&
count
);
ok
(
hr
==
WINCODEC_ERR_UNSUPPORTEDOPERATION
,
"expected WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x
\n
"
,
hr
);
hr
=
IWICBitmapDecoder_GetThumbnail
(
decoder
,
&
thumbnail
);
ok
(
hr
==
WINCODEC_ERR_CODECNOTHUMBNAIL
,
"expected WINCODEC_ERR_CODECNOTHUMBNAIL, got %x
\n
"
,
hr
);
hr
=
IWICBitmapDecoder_GetPreview
(
decoder
,
&
thumbnail
);
ok
(
hr
==
WINCODEC_ERR_UNSUPPORTEDOPERATION
,
"expected WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x
\n
"
,
hr
);
hr
=
IWICBitmapDecoder_GetFrameCount
(
decoder
,
&
count
);
ok
(
SUCCEEDED
(
hr
),
"GetFrameCount failed, hr=%x
\n
"
,
hr
);
ok
(
count
==
1
,
"unexpected count %u
\n
"
,
count
);
...
...
@@ -116,6 +131,15 @@ static void test_decode_24bpp(void)
ok
(
SUCCEEDED
(
hr
),
"GetPixelFormat failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guidresult
,
&
GUID_WICPixelFormat24bppBGR
),
"unexpected pixel format
\n
"
);
hr
=
IWICBitmapFrameDecode_GetMetadataQueryReader
(
framedecode
,
&
queryreader
);
ok
(
hr
==
WINCODEC_ERR_UNSUPPORTEDOPERATION
,
"expected WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x
\n
"
,
hr
);
hr
=
IWICBitmapFrameDecode_GetColorContexts
(
framedecode
,
1
,
&
colorcontext
,
&
count
);
ok
(
hr
==
WINCODEC_ERR_UNSUPPORTEDOPERATION
,
"expected WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x
\n
"
,
hr
);
hr
=
IWICBitmapFrameDecode_GetThumbnail
(
framedecode
,
&
thumbnail
);
ok
(
hr
==
WINCODEC_ERR_CODECNOTHUMBNAIL
,
"expected WINCODEC_ERR_CODECNOTHUMBNAIL, got %x
\n
"
,
hr
);
hr
=
CoCreateInstance
(
&
CLSID_WICImagingFactory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICImagingFactory
,
(
void
**
)
&
factory
);
ok
(
SUCCEEDED
(
hr
),
"CoCreateInstance failed, hr=%x
\n
"
,
hr
);
...
...
include/wincodec.idl
View file @
387b8427
...
...
@@ -96,6 +96,7 @@ typedef UINT32 WICColor;
cpp_quote
(
"#define WINCODEC_ERR_WRONGSTATE 0x88982f04"
)
cpp_quote
(
"#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44"
)
cpp_quote
(
"#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45"
)
cpp_quote
(
"#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81"
)
interface
IWICBitmap
;
interface
IWICComponentInfo
;
...
...
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