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
1138c28e
Commit
1138c28e
authored
Jan 15, 2009
by
Andrey Turkin
Committed by
Alexandre Julliard
Jan 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: GdipLoadImageFromStream should use well-known pixel format constants when possible.
parent
d20ab01e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
image.c
dlls/gdiplus/image.c
+29
-1
No files found.
dlls/gdiplus/image.c
View file @
1138c28e
...
...
@@ -1068,7 +1068,35 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image)
else
GetDIBits
(
hdc
,
hbm
,
0
,
0
,
NULL
,
pbmi
,
DIB_RGB_COLORS
);
(
*
((
GpBitmap
**
)
image
))
->
format
=
(
bmch
->
bcBitCount
<<
8
)
|
PixelFormatGDI
;
switch
(
bmch
->
bcBitCount
)
{
case
1
:
(
*
((
GpBitmap
**
)
image
))
->
format
=
PixelFormat1bppIndexed
;
break
;
case
4
:
(
*
((
GpBitmap
**
)
image
))
->
format
=
PixelFormat4bppIndexed
;
break
;
case
8
:
(
*
((
GpBitmap
**
)
image
))
->
format
=
PixelFormat8bppIndexed
;
break
;
case
16
:
(
*
((
GpBitmap
**
)
image
))
->
format
=
PixelFormat16bppRGB565
;
break
;
case
24
:
(
*
((
GpBitmap
**
)
image
))
->
format
=
PixelFormat24bppRGB
;
break
;
case
32
:
(
*
((
GpBitmap
**
)
image
))
->
format
=
PixelFormat32bppRGB
;
break
;
case
48
:
(
*
((
GpBitmap
**
)
image
))
->
format
=
PixelFormat48bppRGB
;
break
;
default:
FIXME
(
"Bit depth %d is not fully supported yet
\n
"
,
bmch
->
bcBitCount
);
(
*
((
GpBitmap
**
)
image
))
->
format
=
(
bmch
->
bcBitCount
<<
8
)
|
PixelFormatGDI
;
break
;
}
GdipFree
(
pbmi
);
}
else
if
(
type
==
PICTYPE_METAFILE
||
type
==
PICTYPE_ENHMETAFILE
){
...
...
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