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
129f2292
Commit
129f2292
authored
Aug 24, 2010
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Aug 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Write ICNS files.
parent
bbf039fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
icnsformat.c
dlls/windowscodecs/icnsformat.c
+39
-2
No files found.
dlls/windowscodecs/icnsformat.c
View file @
129f2292
...
...
@@ -82,6 +82,7 @@ typedef struct IcnsEncoder {
icns_family_t
*
icns_family
;
BOOL
any_frame_committed
;
int
outstanding_commits
;
BOOL
committed
;
CRITICAL_SECTION
lock
;
}
IcnsEncoder
;
...
...
@@ -688,9 +689,44 @@ end:
static
HRESULT
WINAPI
IcnsEncoder_Commit
(
IWICBitmapEncoder
*
iface
)
{
FIXME
(
"(%p): stub
\n
"
,
iface
);
IcnsEncoder
*
This
=
(
IcnsEncoder
*
)
iface
;
icns_byte_t
*
buffer
=
NULL
;
icns_size_t
buffer_size
;
int
ret
;
HRESULT
hr
=
S_OK
;
ULONG
byteswritten
;
return
E_NOTIMPL
;
TRACE
(
"(%p)
\n
"
,
iface
);
EnterCriticalSection
(
&
This
->
lock
);
if
(
!
This
->
any_frame_committed
||
This
->
outstanding_commits
>
0
||
This
->
committed
)
{
hr
=
WINCODEC_ERR_WRONGSTATE
;
goto
end
;
}
ret
=
picns_export_family_data
(
This
->
icns_family
,
&
buffer_size
,
&
buffer
);
if
(
ret
!=
ICNS_STATUS_OK
)
{
WARN
(
"icns_export_family_data failed with error %d
\n
"
,
ret
);
hr
=
E_FAIL
;
goto
end
;
}
hr
=
IStream_Write
(
This
->
stream
,
buffer
,
buffer_size
,
&
byteswritten
);
if
(
FAILED
(
hr
)
||
byteswritten
!=
buffer_size
)
{
WARN
(
"writing file failed, hr = 0x%08X
\n
"
,
hr
);
hr
=
E_FAIL
;
goto
end
;
}
This
->
committed
=
TRUE
;
end:
LeaveCriticalSection
(
&
This
->
lock
);
free
(
buffer
);
return
hr
;
}
static
HRESULT
WINAPI
IcnsEncoder_GetMetadataQueryWriter
(
IWICBitmapEncoder
*
iface
,
...
...
@@ -742,6 +778,7 @@ HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
This
->
icns_family
=
NULL
;
This
->
any_frame_committed
=
FALSE
;
This
->
outstanding_commits
=
0
;
This
->
committed
=
FALSE
;
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": IcnsEncoder.lock"
);
...
...
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