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
7dfc6744
Commit
7dfc6744
authored
May 08, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
May 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipGetImageThumbnail.
parent
635fe30e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
7 deletions
+44
-7
image.c
dlls/gdiplus/image.c
+39
-2
image.c
dlls/gdiplus/tests/image.c
+5
-5
No files found.
dlls/gdiplus/image.c
View file @
7dfc6744
...
...
@@ -3515,9 +3515,46 @@ GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage *image, UINT width, UINT heigh
GpImage
**
ret_image
,
GetThumbnailImageAbort
cb
,
VOID
*
cb_data
)
{
FIXME
(
"(%p %u %u %p %p %p) stub
\n
"
,
GpStatus
stat
;
GpGraphics
*
graphics
;
UINT
srcwidth
,
srcheight
;
TRACE
(
"(%p %u %u %p %p %p)
\n
"
,
image
,
width
,
height
,
ret_image
,
cb
,
cb_data
);
return
NotImplemented
;
if
(
!
image
||
!
ret_image
)
return
InvalidParameter
;
if
(
!
width
)
width
=
120
;
if
(
!
height
)
height
=
120
;
GdipGetImageWidth
(
image
,
&
srcwidth
);
GdipGetImageHeight
(
image
,
&
srcheight
);
stat
=
GdipCreateBitmapFromScan0
(
width
,
height
,
0
,
PixelFormat32bppARGB
,
NULL
,
(
GpBitmap
**
)
ret_image
);
if
(
stat
==
Ok
)
{
stat
=
GdipGetImageGraphicsContext
(
*
ret_image
,
&
graphics
);
if
(
stat
==
Ok
)
{
stat
=
GdipDrawImageRectRectI
(
graphics
,
image
,
0
,
0
,
width
,
height
,
0
,
0
,
srcwidth
,
srcheight
,
UnitPixel
,
NULL
,
NULL
,
NULL
);
GdipDeleteGraphics
(
graphics
);
}
if
(
stat
!=
Ok
)
{
GdipDisposeImage
(
*
ret_image
);
*
ret_image
=
NULL
;
}
}
return
stat
;
}
/*****************************************************************************
...
...
dlls/gdiplus/tests/image.c
View file @
7dfc6744
...
...
@@ -1219,16 +1219,16 @@ static void test_getthumbnail(void)
UINT
width
,
height
;
stat
=
GdipGetImageThumbnail
(
NULL
,
0
,
0
,
&
bitmap2
,
NULL
,
NULL
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipCreateBitmapFromScan0
(
128
,
128
,
0
,
PixelFormat32bppRGB
,
NULL
,
(
GpBitmap
**
)
&
bitmap1
);
expect
(
Ok
,
stat
);
stat
=
GdipGetImageThumbnail
(
bitmap1
,
0
,
0
,
NULL
,
NULL
,
NULL
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetImageThumbnail
(
bitmap1
,
0
,
0
,
&
bitmap2
,
NULL
,
NULL
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
...
...
@@ -1250,7 +1250,7 @@ static void test_getthumbnail(void)
expect
(
Ok
,
stat
);
stat
=
GdipGetImageThumbnail
(
bitmap1
,
32
,
32
,
&
bitmap2
,
NULL
,
NULL
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
...
...
@@ -1266,7 +1266,7 @@ static void test_getthumbnail(void)
}
stat
=
GdipGetImageThumbnail
(
bitmap1
,
0
,
0
,
&
bitmap2
,
NULL
,
NULL
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
...
...
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