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
df5a150b
Commit
df5a150b
authored
Jun 07, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement GetPixelFormat for the TGA decoder.
parent
bb6d9eaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
2 deletions
+60
-2
tgaformat.c
dlls/windowscodecs/tgaformat.c
+60
-2
No files found.
dlls/windowscodecs/tgaformat.c
View file @
df5a150b
...
...
@@ -354,8 +354,66 @@ static HRESULT WINAPI TgaDecoder_Frame_GetSize(IWICBitmapFrameDecode *iface,
static
HRESULT
WINAPI
TgaDecoder_Frame_GetPixelFormat
(
IWICBitmapFrameDecode
*
iface
,
WICPixelFormatGUID
*
pPixelFormat
)
{
TRACE
(
"(%p,%p): stub
\n
"
,
iface
,
pPixelFormat
);
return
E_NOTIMPL
;
TgaDecoder
*
This
=
decoder_from_frame
(
iface
);
int
attribute_bitcount
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pPixelFormat
);
attribute_bitcount
=
This
->
header
.
image_descriptor
&
IMAGE_ATTRIBUTE_BITCOUNT_MASK
;
if
(
attribute_bitcount
)
{
FIXME
(
"Need to read footer to find meaning of attribute bits
\n
"
);
return
E_NOTIMPL
;
}
switch
(
This
->
header
.
image_type
&
~
IMAGETYPE_RLE
)
{
case
IMAGETYPE_COLORMAPPED
:
switch
(
This
->
header
.
depth
)
{
case
8
:
memcpy
(
pPixelFormat
,
&
GUID_WICPixelFormat8bppIndexed
,
sizeof
(
GUID
));
break
;
default:
FIXME
(
"Unhandled indexed color depth %u
\n
"
,
This
->
header
.
depth
);
return
E_NOTIMPL
;
}
break
;
case
IMAGETYPE_TRUECOLOR
:
switch
(
This
->
header
.
depth
)
{
case
16
:
memcpy
(
pPixelFormat
,
&
GUID_WICPixelFormat16bppBGR555
,
sizeof
(
GUID
));
break
;
case
24
:
memcpy
(
pPixelFormat
,
&
GUID_WICPixelFormat24bppBGR
,
sizeof
(
GUID
));
break
;
default:
FIXME
(
"Unhandled truecolor depth %u
\n
"
,
This
->
header
.
depth
);
return
E_NOTIMPL
;
}
break
;
case
IMAGETYPE_GRAYSCALE
:
switch
(
This
->
header
.
depth
)
{
case
8
:
memcpy
(
pPixelFormat
,
&
GUID_WICPixelFormat8bppGray
,
sizeof
(
GUID
));
break
;
case
16
:
memcpy
(
pPixelFormat
,
&
GUID_WICPixelFormat16bppGray
,
sizeof
(
GUID
));
break
;
default:
FIXME
(
"Unhandled grayscale depth %u
\n
"
,
This
->
header
.
depth
);
return
E_NOTIMPL
;
}
break
;
default:
ERR
(
"Unknown image type %u
\n
"
,
This
->
header
.
image_type
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
TgaDecoder_Frame_GetResolution
(
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