Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
07538b79
Commit
07538b79
authored
Jul 01, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Simplify the BMP GetSize code and fix for top-down dibs.
parent
02d0462f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
bmpdecode.c
dlls/windowscodecs/bmpdecode.c
+12
-24
No files found.
dlls/windowscodecs/bmpdecode.c
View file @
07538b79
...
...
@@ -118,36 +118,24 @@ static ULONG WINAPI BmpFrameDecode_Release(IWICBitmapFrameDecode *iface)
return
ref
;
}
static
HRESULT
BmpHeader_GetSize
(
BITMAPV5HEADER
*
bih
,
UINT
*
puiWidth
,
UINT
*
puiHeight
)
{
switch
(
bih
->
bV5Size
)
{
case
sizeof
(
BITMAPCOREHEADER
):
{
BITMAPCOREHEADER
*
bch
=
(
BITMAPCOREHEADER
*
)
bih
;
*
puiWidth
=
bch
->
bcWidth
;
*
puiHeight
=
bch
->
bcHeight
;
return
S_OK
;
}
case
sizeof
(
BITMAPCOREHEADER2
):
case
sizeof
(
BITMAPINFOHEADER
):
case
sizeof
(
BITMAPV4HEADER
):
case
sizeof
(
BITMAPV5HEADER
):
*
puiWidth
=
bih
->
bV5Width
;
*
puiHeight
=
bih
->
bV5Height
;
return
S_OK
;
default:
return
E_FAIL
;
}
}
static
HRESULT
WINAPI
BmpFrameDecode_GetSize
(
IWICBitmapFrameDecode
*
iface
,
UINT
*
puiWidth
,
UINT
*
puiHeight
)
{
BmpFrameDecode
*
This
=
(
BmpFrameDecode
*
)
iface
;
TRACE
(
"(%p,%p,%p)
\n
"
,
iface
,
puiWidth
,
puiHeight
);
return
BmpHeader_GetSize
(
&
This
->
bih
,
puiWidth
,
puiHeight
);
if
(
This
->
bih
.
bV5Size
==
sizeof
(
BITMAPCOREHEADER
))
{
BITMAPCOREHEADER
*
bch
=
(
BITMAPCOREHEADER
*
)
&
This
->
bih
;
*
puiWidth
=
bch
->
bcWidth
;
*
puiHeight
=
bch
->
bcHeight
;
}
else
{
*
puiWidth
=
This
->
bih
.
bV5Width
;
*
puiHeight
=
abs
(
This
->
bih
.
bV5Height
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
BmpFrameDecode_GetPixelFormat
(
IWICBitmapFrameDecode
*
iface
,
...
...
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