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
10dd6700
Commit
10dd6700
authored
Apr 15, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add support for converting from 32bppPBGRA.
parent
80470260
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
converter.c
dlls/windowscodecs/converter.c
+25
-0
regsvr.c
dlls/windowscodecs/regsvr.c
+1
-0
No files found.
dlls/windowscodecs/converter.c
View file @
10dd6700
...
...
@@ -51,6 +51,7 @@ enum pixelformat {
format_24bppBGR
,
format_32bppBGR
,
format_32bppBGRA
,
format_32bppPBGRA
,
format_48bppRGB
,
format_64bppRGBA
,
format_32bppCMYK
,
...
...
@@ -639,6 +640,28 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe
if
(
prc
)
return
IWICBitmapSource_CopyPixels
(
This
->
source
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
return
S_OK
;
case
format_32bppPBGRA
:
if
(
prc
)
{
HRESULT
res
;
UINT
x
,
y
;
res
=
IWICBitmapSource_CopyPixels
(
This
->
source
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
if
(
FAILED
(
res
))
return
res
;
for
(
y
=
0
;
y
<
prc
->
Height
;
y
++
)
for
(
x
=
0
;
x
<
prc
->
Width
;
x
++
)
{
BYTE
alpha
=
pbBuffer
[
cbStride
*
y
+
4
*
x
+
3
];
if
(
alpha
!=
0
&&
alpha
!=
255
)
{
pbBuffer
[
cbStride
*
y
+
4
*
x
]
=
pbBuffer
[
cbStride
*
y
+
4
*
x
]
*
255
/
alpha
;
pbBuffer
[
cbStride
*
y
+
4
*
x
+
1
]
=
pbBuffer
[
cbStride
*
y
+
4
*
x
+
1
]
*
255
/
alpha
;
pbBuffer
[
cbStride
*
y
+
4
*
x
+
2
]
=
pbBuffer
[
cbStride
*
y
+
4
*
x
+
2
]
*
255
/
alpha
;
}
}
}
return
S_OK
;
case
format_48bppRGB
:
if
(
prc
)
{
...
...
@@ -761,6 +784,7 @@ static HRESULT copypixels_to_32bppBGR(struct FormatConverter *This, const WICRec
{
case
format_32bppBGR
:
case
format_32bppBGRA
:
case
format_32bppPBGRA
:
if
(
prc
)
return
IWICBitmapSource_CopyPixels
(
This
->
source
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
return
S_OK
;
...
...
@@ -785,6 +809,7 @@ static const struct pixelformatinfo supported_formats[] = {
{
format_24bppBGR
,
&
GUID_WICPixelFormat24bppBGR
,
NULL
},
{
format_32bppBGR
,
&
GUID_WICPixelFormat32bppBGR
,
copypixels_to_32bppBGR
},
{
format_32bppBGRA
,
&
GUID_WICPixelFormat32bppBGRA
,
copypixels_to_32bppBGRA
},
{
format_32bppPBGRA
,
&
GUID_WICPixelFormat32bppPBGRA
,
NULL
},
{
format_48bppRGB
,
&
GUID_WICPixelFormat48bppRGB
,
NULL
},
{
format_64bppRGBA
,
&
GUID_WICPixelFormat64bppRGBA
,
NULL
},
{
format_32bppCMYK
,
&
GUID_WICPixelFormat32bppCMYK
,
NULL
},
...
...
dlls/windowscodecs/regsvr.c
View file @
10dd6700
...
...
@@ -983,6 +983,7 @@ static GUID const * const converter_formats[] = {
&
GUID_WICPixelFormat24bppBGR
,
&
GUID_WICPixelFormat32bppBGR
,
&
GUID_WICPixelFormat32bppBGRA
,
&
GUID_WICPixelFormat32bppPBGRA
,
&
GUID_WICPixelFormat48bppRGB
,
&
GUID_WICPixelFormat64bppRGBA
,
&
GUID_WICPixelFormat32bppCMYK
,
...
...
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