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
d87b1d49
Commit
d87b1d49
authored
Dec 24, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipImageGetFrameDimensionsList.
parent
7d62e1f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
7 deletions
+40
-7
image.c
dlls/gdiplus/image.c
+31
-4
image.c
dlls/gdiplus/tests/image.c
+9
-3
No files found.
dlls/gdiplus/image.c
View file @
d87b1d49
...
...
@@ -1708,6 +1708,19 @@ GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT* size, UINT* num)
return
InvalidParameter
;
}
struct
image_format_dimension
{
const
GUID
*
format
;
const
GUID
*
dimension
;
};
struct
image_format_dimension
image_format_dimensions
[]
=
{
{
&
ImageFormatGIF
,
&
FrameDimensionTime
},
{
&
ImageFormatIcon
,
&
FrameDimensionResolution
},
{
NULL
}
};
GpStatus
WINGDIPAPI
GdipImageGetFrameCount
(
GpImage
*
image
,
GDIPCONST
GUID
*
dimensionID
,
UINT
*
count
)
{
...
...
@@ -1738,13 +1751,27 @@ GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image,
GpStatus
WINGDIPAPI
GdipImageGetFrameDimensionsList
(
GpImage
*
image
,
GUID
*
dimensionIDs
,
UINT
count
)
{
static
int
calls
;
int
i
;
const
GUID
*
result
=
NULL
;
TRACE
(
"(%p,%p,%u)
\n
"
,
image
,
dimensionIDs
,
count
);
if
(
!
image
||
!
dimensionIDs
)
if
(
!
image
||
!
dimensionIDs
||
count
!=
1
)
return
InvalidParameter
;
if
(
!
(
calls
++
))
FIXME
(
"not implemented
\n
"
);
for
(
i
=
0
;
image_format_dimensions
[
i
].
format
;
i
++
)
{
if
(
IsEqualGUID
(
&
image
->
format
,
image_format_dimensions
[
i
].
format
))
{
result
=
image_format_dimensions
[
i
].
dimension
;
break
;
}
}
if
(
!
result
)
result
=
&
FrameDimensionPage
;
memcpy
(
dimensionIDs
,
result
,
sizeof
(
GUID
));
return
Ok
;
}
...
...
dlls/gdiplus/tests/image.c
View file @
d87b1d49
...
...
@@ -206,7 +206,13 @@ static void test_GdipImageGetFrameDimensionsCount(void)
stat
=
GdipImageGetFrameDimensionsList
((
GpImage
*
)
bm
,
&
dimension
,
1
);
expect
(
Ok
,
stat
);
expect_guid
(
&
FrameDimensionPage
,
&
dimension
,
__LINE__
,
TRUE
);
expect_guid
(
&
FrameDimensionPage
,
&
dimension
,
__LINE__
,
FALSE
);
stat
=
GdipImageGetFrameDimensionsList
((
GpImage
*
)
bm
,
&
dimension
,
2
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipImageGetFrameDimensionsList
((
GpImage
*
)
bm
,
&
dimension
,
0
);
expect
(
InvalidParameter
,
stat
);
count
=
12345
;
stat
=
GdipImageGetFrameCount
((
GpImage
*
)
bm
,
&
dimension
,
&
count
);
...
...
@@ -1246,7 +1252,7 @@ static void test_multiframegif(void)
stat
=
GdipImageGetFrameDimensionsList
((
GpImage
*
)
bmp
,
&
dimension
,
1
);
expect
(
Ok
,
stat
);
expect_guid
(
&
FrameDimensionTime
,
&
dimension
,
__LINE__
,
TRU
E
);
expect_guid
(
&
FrameDimensionTime
,
&
dimension
,
__LINE__
,
FALS
E
);
count
=
12345
;
stat
=
GdipImageGetFrameCount
((
GpImage
*
)
bmp
,
&
dimension
,
&
count
);
...
...
@@ -1320,7 +1326,7 @@ static void test_multiframegif(void)
stat
=
GdipImageGetFrameDimensionsList
((
GpImage
*
)
bmp
,
&
dimension
,
1
);
expect
(
Ok
,
stat
);
expect_guid
(
&
FrameDimensionTime
,
&
dimension
,
__LINE__
,
TRU
E
);
expect_guid
(
&
FrameDimensionTime
,
&
dimension
,
__LINE__
,
FALS
E
);
count
=
12345
;
stat
=
GdipImageGetFrameCount
((
GpImage
*
)
bmp
,
&
dimension
,
&
count
);
...
...
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