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
562267a7
Commit
562267a7
authored
Apr 05, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement TiffDecoder_GetResolution.
parent
f989011b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
2 deletions
+48
-2
tiffformat.c
dlls/windowscodecs/tiffformat.c
+48
-2
No files found.
dlls/windowscodecs/tiffformat.c
View file @
562267a7
...
...
@@ -219,6 +219,8 @@ typedef struct {
UINT
tile_size
;
int
tiled
;
UINT
tiles_across
;
UINT
resolution_unit
;
float
xres
,
yres
;
}
tiff_decode_info
;
typedef
struct
{
...
...
@@ -458,6 +460,25 @@ static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info)
return
E_FAIL
;
}
decode_info
->
resolution_unit
=
0
;
pTIFFGetField
(
tiff
,
TIFFTAG_RESOLUTIONUNIT
,
&
decode_info
->
resolution_unit
);
if
(
decode_info
->
resolution_unit
!=
0
)
{
ret
=
pTIFFGetField
(
tiff
,
TIFFTAG_XRESOLUTION
,
&
decode_info
->
xres
);
if
(
!
ret
)
{
WARN
(
"missing X resolution
\n
"
);
decode_info
->
resolution_unit
=
0
;
}
ret
=
pTIFFGetField
(
tiff
,
TIFFTAG_YRESOLUTION
,
&
decode_info
->
yres
);
if
(
!
ret
)
{
WARN
(
"missing Y resolution
\n
"
);
decode_info
->
resolution_unit
=
0
;
}
}
return
S_OK
;
}
...
...
@@ -769,8 +790,33 @@ static HRESULT WINAPI TiffFrameDecode_GetPixelFormat(IWICBitmapFrameDecode *ifac
static
HRESULT
WINAPI
TiffFrameDecode_GetResolution
(
IWICBitmapFrameDecode
*
iface
,
double
*
pDpiX
,
double
*
pDpiY
)
{
FIXME
(
"(%p,%p,%p)
\n
"
,
iface
,
pDpiX
,
pDpiY
);
return
E_NOTIMPL
;
TiffFrameDecode
*
This
=
impl_from_IWICBitmapFrameDecode
(
iface
);
switch
(
This
->
decode_info
.
resolution_unit
)
{
default:
FIXME
(
"unknown resolution unit %i
\n
"
,
This
->
decode_info
.
resolution_unit
);
/* fall through */
case
0
:
/* Not set */
*
pDpiX
=
*
pDpiY
=
96
.
0
;
break
;
case
1
:
/* Relative measurements */
*
pDpiX
=
96
.
0
;
*
pDpiY
=
96
.
0
*
This
->
decode_info
.
yres
/
This
->
decode_info
.
xres
;
break
;
case
2
:
/* Inch */
*
pDpiX
=
This
->
decode_info
.
xres
;
*
pDpiY
=
This
->
decode_info
.
yres
;
break
;
case
3
:
/* Centimeter */
*
pDpiX
=
This
->
decode_info
.
xres
/
2
.
54
;
*
pDpiY
=
This
->
decode_info
.
yres
/
2
.
54
;
break
;
}
TRACE
(
"(%p) <-- %f,%f unit=%i
\n
"
,
iface
,
*
pDpiX
,
*
pDpiY
,
This
->
decode_info
.
resolution_unit
);
return
S_OK
;
}
static
HRESULT
WINAPI
TiffFrameDecode_CopyPalette
(
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