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
25400497
Commit
25400497
authored
Jan 11, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Jan 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipCreateBitmapFromHBITMAP for 16-bit dibs.
parent
52150d21
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
3 deletions
+34
-3
image.c
dlls/gdiplus/image.c
+31
-0
image.c
dlls/gdiplus/tests/image.c
+3
-3
No files found.
dlls/gdiplus/image.c
View file @
25400497
...
...
@@ -3526,6 +3526,7 @@ GpStatus WINGDIPAPI GdipGetEncoderParameterListSize(GpImage *image,
GpStatus
WINGDIPAPI
GdipCreateBitmapFromHBITMAP
(
HBITMAP
hbm
,
HPALETTE
hpal
,
GpBitmap
**
bitmap
)
{
BITMAP
bm
;
DIBSECTION
dib
;
GpStatus
retval
;
PixelFormat
format
;
BitmapData
lockeddata
;
...
...
@@ -3550,6 +3551,36 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi
case
8
:
format
=
PixelFormat8bppIndexed
;
break
;
case
16
:
{
if
(
GetObjectA
(
hbm
,
sizeof
(
dib
),
&
dib
)
==
sizeof
(
dib
))
{
if
(
dib
.
dsBitfields
[
0
]
==
0x7c00
&&
dib
.
dsBitfields
[
1
]
==
0x3e0
&&
dib
.
dsBitfields
[
2
]
==
0x1f
)
{
format
=
PixelFormat16bppRGB555
;
}
else
if
(
dib
.
dsBitfields
[
0
]
==
0xf800
&&
dib
.
dsBitfields
[
1
]
==
0x7e0
&&
dib
.
dsBitfields
[
2
]
==
0x1f
)
{
format
=
PixelFormat16bppRGB565
;
}
else
{
FIXME
(
"unrecognized bitfields %x,%x,%x
\n
"
,
dib
.
dsBitfields
[
0
],
dib
.
dsBitfields
[
1
],
dib
.
dsBitfields
[
2
]);
return
InvalidParameter
;
}
}
else
{
FIXME
(
"unimplemented for 16-bit ddb
\n
"
);
return
InvalidParameter
;
}
break
;
}
case
24
:
format
=
PixelFormat24bppRGB
;
break
;
...
...
dlls/gdiplus/tests/image.c
View file @
25400497
...
...
@@ -949,7 +949,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
bits
[
0
]
=
0
;
stat
=
GdipCreateBitmapFromHBITMAP
(
hbm
,
NULL
,
&
gpbm
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
...
...
@@ -979,7 +979,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
bits
[
0
]
=
0
;
stat
=
GdipCreateBitmapFromHBITMAP
(
hbm
,
NULL
,
&
gpbm
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
...
...
@@ -1007,7 +1007,7 @@ static void test_GdipCreateBitmapFromHBITMAP(void)
bits
[
0
]
=
0
;
stat
=
GdipCreateBitmapFromHBITMAP
(
hbm
,
NULL
,
&
gpbm
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
...
...
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