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
48cf4536
Commit
48cf4536
authored
Sep 23, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement GetResolution for the PNG decoder.
parent
de45a380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
pngformat.c
dlls/windowscodecs/pngformat.c
+22
-2
No files found.
dlls/windowscodecs/pngformat.c
View file @
48cf4536
...
...
@@ -52,6 +52,7 @@ MAKE_FUNCPTR(png_get_color_type);
MAKE_FUNCPTR
(
png_get_image_height
);
MAKE_FUNCPTR
(
png_get_image_width
);
MAKE_FUNCPTR
(
png_get_io_ptr
);
MAKE_FUNCPTR
(
png_get_pHYs
);
MAKE_FUNCPTR
(
png_get_PLTE
);
MAKE_FUNCPTR
(
png_get_tRNS
);
MAKE_FUNCPTR
(
png_set_bgr
);
...
...
@@ -83,6 +84,7 @@ static void *load_libpng(void)
LOAD_FUNCPTR
(
png_get_image_height
);
LOAD_FUNCPTR
(
png_get_image_width
);
LOAD_FUNCPTR
(
png_get_io_ptr
);
LOAD_FUNCPTR
(
png_get_pHYs
);
LOAD_FUNCPTR
(
png_get_PLTE
);
LOAD_FUNCPTR
(
png_get_tRNS
);
LOAD_FUNCPTR
(
png_set_bgr
);
...
...
@@ -510,8 +512,26 @@ static HRESULT WINAPI PngDecoder_Frame_GetPixelFormat(IWICBitmapFrameDecode *ifa
static
HRESULT
WINAPI
PngDecoder_Frame_GetResolution
(
IWICBitmapFrameDecode
*
iface
,
double
*
pDpiX
,
double
*
pDpiY
)
{
FIXME
(
"(%p,%p,%p): stub
\n
"
,
iface
,
pDpiX
,
pDpiY
);
return
E_NOTIMPL
;
PngDecoder
*
This
=
impl_from_frame
(
iface
);
png_uint_32
ret
,
xres
,
yres
;
int
unit_type
;
ret
=
ppng_get_pHYs
(
This
->
png_ptr
,
This
->
info_ptr
,
&
xres
,
&
yres
,
&
unit_type
);
if
(
ret
&&
unit_type
==
PNG_RESOLUTION_METER
)
{
*
pDpiX
=
xres
*
0
.
0254
;
*
pDpiY
=
yres
*
0
.
0254
;
}
else
{
WARN
(
"no pHYs block present
\n
"
);
*
pDpiX
=
*
pDpiY
=
96
.
0
;
}
TRACE
(
"(%p)->(%0.2f,%0.2f)
\n
"
,
iface
,
*
pDpiX
,
*
pDpiY
);
return
S_OK
;
}
static
HRESULT
WINAPI
PngDecoder_Frame_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