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
39fc092b
Commit
39fc092b
authored
Mar 29, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement TiffEncoder_Initialize.
parent
fb356a3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
2 deletions
+43
-2
tiffformat.c
dlls/windowscodecs/tiffformat.c
+43
-2
No files found.
dlls/windowscodecs/tiffformat.c
View file @
39fc092b
...
...
@@ -1117,6 +1117,10 @@ HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
typedef
struct
TiffEncoder
{
IWICBitmapEncoder
IWICBitmapEncoder_iface
;
LONG
ref
;
IStream
*
stream
;
CRITICAL_SECTION
lock
;
/* Must be held when tiff is used or initiailzed is set */
TIFF
*
tiff
;
BOOL
initialized
;
}
TiffEncoder
;
static
inline
TiffEncoder
*
impl_from_IWICBitmapEncoder
(
IWICBitmapEncoder
*
iface
)
...
...
@@ -1166,6 +1170,10 @@ static ULONG WINAPI TiffEncoder_Release(IWICBitmapEncoder *iface)
if
(
ref
==
0
)
{
if
(
This
->
tiff
)
pTIFFClose
(
This
->
tiff
);
if
(
This
->
stream
)
IStream_Release
(
This
->
stream
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -1175,8 +1183,36 @@ static ULONG WINAPI TiffEncoder_Release(IWICBitmapEncoder *iface)
static
HRESULT
WINAPI
TiffEncoder_Initialize
(
IWICBitmapEncoder
*
iface
,
IStream
*
pIStream
,
WICBitmapEncoderCacheOption
cacheOption
)
{
FIXME
(
"(%p,%p,%u): stub
\n
"
,
iface
,
pIStream
,
cacheOption
);
return
E_NOTIMPL
;
TiffEncoder
*
This
=
impl_from_IWICBitmapEncoder
(
iface
);
TIFF
*
tiff
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p,%p,%u)
\n
"
,
iface
,
pIStream
,
cacheOption
);
EnterCriticalSection
(
&
This
->
lock
);
if
(
This
->
initialized
)
{
hr
=
WINCODEC_ERR_WRONGSTATE
;
goto
exit
;
}
tiff
=
tiff_open_stream
(
pIStream
,
"w"
);
if
(
!
tiff
)
{
hr
=
E_FAIL
;
goto
exit
;
}
This
->
tiff
=
tiff
;
This
->
stream
=
pIStream
;
IStream_AddRef
(
pIStream
);
This
->
initialized
=
TRUE
;
exit:
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
}
static
HRESULT
WINAPI
TiffEncoder_GetContainerFormat
(
IWICBitmapEncoder
*
iface
,
...
...
@@ -1276,6 +1312,11 @@ HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
This
->
IWICBitmapEncoder_iface
.
lpVtbl
=
&
TiffEncoder_Vtbl
;
This
->
ref
=
1
;
This
->
stream
=
NULL
;
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": TiffEncoder.lock"
);
This
->
tiff
=
NULL
;
This
->
initialized
=
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