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
007d642e
Commit
007d642e
authored
May 16, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Save total and current frame in the image structure.
parent
c5697ff4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
image.c
dlls/gdiplus/image.c
+11
-1
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
007d642e
...
...
@@ -266,6 +266,7 @@ struct GpImage{
ImageType
type
;
GUID
format
;
UINT
flags
;
UINT
frame_count
,
current_frame
;
UINT
palette_flags
;
UINT
palette_count
;
UINT
palette_size
;
...
...
dlls/gdiplus/image.c
View file @
007d642e
...
...
@@ -1767,6 +1767,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
(
*
bitmap
)
->
image
.
type
=
ImageTypeBitmap
;
memcpy
(
&
(
*
bitmap
)
->
image
.
format
,
&
ImageFormatMemoryBMP
,
sizeof
(
GUID
));
(
*
bitmap
)
->
image
.
flags
=
ImageFlagsNone
;
(
*
bitmap
)
->
image
.
frame_count
=
1
;
(
*
bitmap
)
->
image
.
current_frame
=
0
;
(
*
bitmap
)
->
image
.
palette_flags
=
0
;
(
*
bitmap
)
->
image
.
palette_count
=
0
;
(
*
bitmap
)
->
image
.
palette_size
=
0
;
...
...
@@ -2591,7 +2593,7 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, GpImage **imag
WICPixelFormatGUID
wic_format
;
PixelFormat
gdip_format
=
0
;
int
i
;
UINT
width
,
height
;
UINT
width
,
height
,
frame_count
;
BitmapData
lockeddata
;
WICRect
wrc
;
HRESULT
initresult
;
...
...
@@ -2604,7 +2606,11 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, GpImage **imag
hr
=
IWICBitmapDecoder_Initialize
(
decoder
,
(
IStream
*
)
stream
,
WICDecodeMetadataCacheOnLoad
);
if
(
SUCCEEDED
(
hr
))
{
IWICBitmapDecoder_GetFrameCount
(
decoder
,
&
frame_count
);
/* FIXME: set current frame */
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
0
,
&
frame
);
}
if
(
SUCCEEDED
(
hr
))
/* got frame */
{
...
...
@@ -2696,6 +2702,8 @@ end:
{
/* Native GDI+ used to be smarter, but since Win7 it just sets these flags. */
bitmap
->
image
.
flags
|=
ImageFlagsReadOnly
|
ImageFlagsHasRealPixelSize
|
ImageFlagsHasRealDPI
|
ImageFlagsColorSpaceRGB
;
bitmap
->
image
.
frame_count
=
frame_count
;
bitmap
->
image
.
current_frame
=
0
;
}
return
status
;
...
...
@@ -2765,6 +2773,8 @@ static GpStatus decode_image_olepicture_metafile(IStream* stream, REFCLSID clsid
(
*
image
)
->
type
=
ImageTypeMetafile
;
(
*
image
)
->
picture
=
pic
;
(
*
image
)
->
flags
=
ImageFlagsNone
;
(
*
image
)
->
frame_count
=
1
;
(
*
image
)
->
current_frame
=
0
;
(
*
image
)
->
palette_flags
=
0
;
(
*
image
)
->
palette_count
=
0
;
(
*
image
)
->
palette_size
=
0
;
...
...
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