Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cfb91803
Commit
cfb91803
authored
Nov 15, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICBitmapFrameDecode::GetColorContexts for PNG images.
parent
96ebc618
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
pngformat.c
dlls/windowscodecs/pngformat.c
+32
-3
No files found.
dlls/windowscodecs/pngformat.c
View file @
cfb91803
...
...
@@ -166,6 +166,7 @@ MAKE_FUNCPTR(png_error);
MAKE_FUNCPTR
(
png_get_bit_depth
);
MAKE_FUNCPTR
(
png_get_color_type
);
MAKE_FUNCPTR
(
png_get_error_ptr
);
MAKE_FUNCPTR
(
png_get_iCCP
);
MAKE_FUNCPTR
(
png_get_image_height
);
MAKE_FUNCPTR
(
png_get_image_width
);
MAKE_FUNCPTR
(
png_get_io_ptr
);
...
...
@@ -213,6 +214,7 @@ static void *load_libpng(void)
LOAD_FUNCPTR
(
png_get_bit_depth
);
LOAD_FUNCPTR
(
png_get_color_type
);
LOAD_FUNCPTR
(
png_get_error_ptr
);
LOAD_FUNCPTR
(
png_get_iCCP
);
LOAD_FUNCPTR
(
png_get_image_height
);
LOAD_FUNCPTR
(
png_get_image_width
);
LOAD_FUNCPTR
(
png_get_io_ptr
);
...
...
@@ -624,7 +626,7 @@ static HRESULT WINAPI PngDecoder_GetPreview(IWICBitmapDecoder *iface,
static
HRESULT
WINAPI
PngDecoder_GetColorContexts
(
IWICBitmapDecoder
*
iface
,
UINT
cCount
,
IWICColorContext
**
ppIColorContexts
,
UINT
*
pcActualCount
)
{
FIXM
E
(
"(%p,%u,%p,%p)
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
TRAC
E
(
"(%p,%u,%p,%p)
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
return
WINCODEC_ERR_UNSUPPORTEDOPERATION
;
}
...
...
@@ -844,8 +846,35 @@ static HRESULT WINAPI PngDecoder_Frame_GetMetadataQueryReader(IWICBitmapFrameDec
static
HRESULT
WINAPI
PngDecoder_Frame_GetColorContexts
(
IWICBitmapFrameDecode
*
iface
,
UINT
cCount
,
IWICColorContext
**
ppIColorContexts
,
UINT
*
pcActualCount
)
{
FIXME
(
"(%p,%u,%p,%p): stub
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
return
WINCODEC_ERR_UNSUPPORTEDOPERATION
;
PngDecoder
*
This
=
impl_from_IWICBitmapFrameDecode
(
iface
);
png_charp
name
,
profile
;
png_uint_32
len
;
int
compression_type
;
HRESULT
hr
;
TRACE
(
"(%p,%u,%p,%p)
\n
"
,
iface
,
cCount
,
ppIColorContexts
,
pcActualCount
);
EnterCriticalSection
(
&
This
->
lock
);
if
(
ppng_get_iCCP
(
This
->
png_ptr
,
This
->
info_ptr
,
&
name
,
&
compression_type
,
&
profile
,
&
len
))
{
if
(
cCount
&&
ppIColorContexts
)
{
hr
=
IWICColorContext_InitializeFromMemory
(
*
ppIColorContexts
,
(
const
BYTE
*
)
profile
,
len
);
if
(
FAILED
(
hr
))
{
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
}
}
*
pcActualCount
=
1
;
}
else
*
pcActualCount
=
0
;
LeaveCriticalSection
(
&
This
->
lock
);
return
S_OK
;
}
static
HRESULT
WINAPI
PngDecoder_Frame_GetThumbnail
(
IWICBitmapFrameDecode
*
iface
,
...
...
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