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
162d95a3
Commit
162d95a3
authored
May 14, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the bitmap info size computation when masks are present.
parent
91948f9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
dib.c
dlls/gdi32/dib.c
+3
-3
cursoricon.c
dlls/user32/cursoricon.c
+3
-3
dib.c
dlls/winex11.drv/dib.c
+3
-3
No files found.
dlls/gdi32/dib.c
View file @
162d95a3
...
...
@@ -123,7 +123,7 @@ int DIB_GetDIBImageBytes( int width, int height, int depth )
*/
int
bitmap_info_size
(
const
BITMAPINFO
*
info
,
WORD
coloruse
)
{
int
colors
,
masks
=
0
;
unsigned
int
colors
,
size
,
masks
=
0
;
if
(
info
->
bmiHeader
.
biSize
==
sizeof
(
BITMAPCOREHEADER
))
{
...
...
@@ -139,8 +139,8 @@ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse )
if
(
!
colors
&&
(
info
->
bmiHeader
.
biBitCount
<=
8
))
colors
=
1
<<
info
->
bmiHeader
.
biBitCount
;
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
masks
=
3
;
return
info
->
bmiHeader
.
biSize
+
masks
*
sizeof
(
DWORD
)
+
colors
*
((
coloruse
==
DIB_RGB_COLORS
)
?
sizeof
(
RGBQUAD
)
:
sizeof
(
WORD
));
size
=
max
(
info
->
bmiHeader
.
biSize
,
sizeof
(
BITMAPINFOHEADER
)
+
masks
*
sizeof
(
DWORD
)
);
return
size
+
colors
*
((
coloruse
==
DIB_RGB_COLORS
)
?
sizeof
(
RGBQUAD
)
:
sizeof
(
WORD
));
}
}
...
...
dlls/user32/cursoricon.c
View file @
162d95a3
...
...
@@ -304,7 +304,7 @@ static int get_dib_width_bytes( int width, int depth )
*/
static
int
bitmap_info_size
(
const
BITMAPINFO
*
info
,
WORD
coloruse
)
{
int
colors
,
masks
=
0
;
unsigned
int
colors
,
size
,
masks
=
0
;
if
(
info
->
bmiHeader
.
biSize
==
sizeof
(
BITMAPCOREHEADER
))
{
...
...
@@ -321,8 +321,8 @@ static int bitmap_info_size( const BITMAPINFO * info, WORD coloruse )
if
(
!
colors
&&
(
info
->
bmiHeader
.
biBitCount
<=
8
))
colors
=
1
<<
info
->
bmiHeader
.
biBitCount
;
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
masks
=
3
;
return
info
->
bmiHeader
.
biSize
+
masks
*
sizeof
(
DWORD
)
+
colors
*
((
coloruse
==
DIB_RGB_COLORS
)
?
sizeof
(
RGBQUAD
)
:
sizeof
(
WORD
));
size
=
max
(
info
->
bmiHeader
.
biSize
,
sizeof
(
BITMAPINFOHEADER
)
+
masks
*
sizeof
(
DWORD
)
);
return
size
+
colors
*
((
coloruse
==
DIB_RGB_COLORS
)
?
sizeof
(
RGBQUAD
)
:
sizeof
(
WORD
));
}
}
...
...
dlls/winex11.drv/dib.c
View file @
162d95a3
...
...
@@ -193,7 +193,7 @@ static int X11DRV_DIB_GetDIBImageBytes( int width, int height, int depth )
*/
int
bitmap_info_size
(
const
BITMAPINFO
*
info
,
WORD
coloruse
)
{
unsigned
int
colors
,
masks
=
0
;
unsigned
int
colors
,
size
,
masks
=
0
;
if
(
info
->
bmiHeader
.
biSize
==
sizeof
(
BITMAPCOREHEADER
))
{
...
...
@@ -208,8 +208,8 @@ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse )
if
(
!
colors
&&
(
info
->
bmiHeader
.
biBitCount
<=
8
))
colors
=
1
<<
info
->
bmiHeader
.
biBitCount
;
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
masks
=
3
;
return
info
->
bmiHeader
.
biSize
+
masks
*
sizeof
(
DWORD
)
+
colors
*
((
coloruse
==
DIB_RGB_COLORS
)
?
sizeof
(
RGBQUAD
)
:
sizeof
(
WORD
));
size
=
max
(
info
->
bmiHeader
.
biSize
,
sizeof
(
BITMAPINFOHEADER
)
+
masks
*
sizeof
(
DWORD
)
);
return
size
+
colors
*
((
coloruse
==
DIB_RGB_COLORS
)
?
sizeof
(
RGBQUAD
)
:
sizeof
(
WORD
));
}
}
...
...
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