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
e7eadeec
Commit
e7eadeec
authored
Sep 23, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement Commit for the PNG frame encoder.
parent
b3790010
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
pngformat.c
dlls/windowscodecs/pngformat.c
+21
-2
No files found.
dlls/windowscodecs/pngformat.c
View file @
e7eadeec
...
...
@@ -70,6 +70,7 @@ MAKE_FUNCPTR(png_set_write_fn);
MAKE_FUNCPTR
(
png_read_end
);
MAKE_FUNCPTR
(
png_read_image
);
MAKE_FUNCPTR
(
png_read_info
);
MAKE_FUNCPTR
(
png_write_end
);
MAKE_FUNCPTR
(
png_write_info
);
MAKE_FUNCPTR
(
png_write_rows
);
#undef MAKE_FUNCPTR
...
...
@@ -110,6 +111,7 @@ static void *load_libpng(void)
LOAD_FUNCPTR
(
png_read_end
);
LOAD_FUNCPTR
(
png_read_image
);
LOAD_FUNCPTR
(
png_read_info
);
LOAD_FUNCPTR
(
png_write_end
);
LOAD_FUNCPTR
(
png_write_info
);
LOAD_FUNCPTR
(
png_write_rows
);
...
...
@@ -712,6 +714,7 @@ typedef struct PngEncoder {
UINT
width
,
height
;
double
xres
,
yres
;
UINT
lines_written
;
BOOL
frame_committed
;
}
PngEncoder
;
static
inline
PngEncoder
*
encoder_from_frame
(
IWICBitmapFrameEncode
*
iface
)
...
...
@@ -973,8 +976,23 @@ static HRESULT WINAPI PngFrameEncode_WriteSource(IWICBitmapFrameEncode *iface,
static
HRESULT
WINAPI
PngFrameEncode_Commit
(
IWICBitmapFrameEncode
*
iface
)
{
FIXME
(
"(%p): stub
\n
"
,
iface
);
return
E_NOTIMPL
;
PngEncoder
*
This
=
encoder_from_frame
(
iface
);
TRACE
(
"(%p)
\n
"
,
iface
);
if
(
!
This
->
info_written
||
This
->
lines_written
!=
This
->
height
||
This
->
frame_committed
)
return
WINCODEC_ERR_WRONGSTATE
;
/* set up setjmp/longjmp error handling */
if
(
setjmp
(
png_jmpbuf
(
This
->
png_ptr
)))
{
return
E_FAIL
;
}
ppng_write_end
(
This
->
png_ptr
,
This
->
info_ptr
);
This
->
frame_committed
=
TRUE
;
return
S_OK
;
}
static
HRESULT
WINAPI
PngFrameEncode_GetMetadataQueryWriter
(
IWICBitmapFrameEncode
*
iface
,
...
...
@@ -1239,6 +1257,7 @@ HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
This
->
xres
=
0
.
0
;
This
->
yres
=
0
.
0
;
This
->
lines_written
=
0
;
This
->
frame_committed
=
FALSE
;
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
This
,
iid
,
ppv
);
IUnknown_Release
((
IUnknown
*
)
This
);
...
...
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