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
3b1fde16
Commit
3b1fde16
authored
Aug 27, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement conversion from BlackWhite to 32bppBGRA.
parent
80adebf7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
converter.c
dlls/windowscodecs/converter.c
+18
-7
regsvr.c
dlls/windowscodecs/regsvr.c
+1
-0
No files found.
dlls/windowscodecs/converter.c
View file @
3b1fde16
...
...
@@ -39,6 +39,7 @@ enum pixelformat {
format_1bppIndexed
,
format_4bppIndexed
,
format_8bppIndexed
,
format_BlackWhite
,
format_8bppGray
,
format_16bppBGR555
,
format_16bppBGR565
,
...
...
@@ -72,6 +73,7 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe
switch
(
source_format
)
{
case
format_1bppIndexed
:
case
format_BlackWhite
:
if
(
prc
)
{
HRESULT
res
;
...
...
@@ -86,16 +88,24 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe
IWICPalette
*
palette
;
UINT
actualcolors
;
res
=
PaletteImpl_Create
(
&
palette
);
if
(
FAILED
(
res
))
return
res
;
if
(
source_format
==
format_1bppIndexed
)
{
res
=
PaletteImpl_Create
(
&
palette
);
if
(
FAILED
(
res
))
return
res
;
res
=
IWICBitmapSource_CopyPalette
(
This
->
source
,
palette
);
if
(
SUCCEEDED
(
res
))
res
=
IWICPalette_GetColors
(
palette
,
2
,
colors
,
&
actualcolors
);
res
=
IWICBitmapSource_CopyPalette
(
This
->
source
,
palette
);
if
(
SUCCEEDED
(
res
))
res
=
IWICPalette_GetColors
(
palette
,
2
,
colors
,
&
actualcolors
);
IWICPalette_Release
(
palette
);
IWICPalette_Release
(
palette
);
if
(
FAILED
(
res
))
return
res
;
if
(
FAILED
(
res
))
return
res
;
}
else
{
colors
[
0
]
=
0xff000000
;
colors
[
1
]
=
0xffffffff
;
}
srcstride
=
(
prc
->
Width
+
7
)
/
8
;
srcdatasize
=
srcstride
*
prc
->
Height
;
...
...
@@ -468,6 +478,7 @@ static const struct pixelformatinfo supported_formats[] = {
{
format_1bppIndexed
,
&
GUID_WICPixelFormat1bppIndexed
,
NULL
},
{
format_4bppIndexed
,
&
GUID_WICPixelFormat4bppIndexed
,
NULL
},
{
format_8bppIndexed
,
&
GUID_WICPixelFormat8bppIndexed
,
NULL
},
{
format_BlackWhite
,
&
GUID_WICPixelFormatBlackWhite
,
NULL
},
{
format_8bppGray
,
&
GUID_WICPixelFormat8bppGray
,
NULL
},
{
format_16bppBGR555
,
&
GUID_WICPixelFormat16bppBGR555
,
NULL
},
{
format_16bppBGR565
,
&
GUID_WICPixelFormat16bppBGR565
,
NULL
},
...
...
dlls/windowscodecs/regsvr.c
View file @
3b1fde16
...
...
@@ -920,6 +920,7 @@ static GUID const * const converter_formats[] = {
&
GUID_WICPixelFormat1bppIndexed
,
&
GUID_WICPixelFormat4bppIndexed
,
&
GUID_WICPixelFormat8bppIndexed
,
&
GUID_WICPixelFormatBlackWhite
,
&
GUID_WICPixelFormat8bppGray
,
&
GUID_WICPixelFormat16bppBGR555
,
&
GUID_WICPixelFormat16bppBGR565
,
...
...
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