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
500a96d0
Commit
500a96d0
authored
Mar 24, 2014
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Copy palettes with bitmaps.
parent
392d3b65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
image.c
dlls/gdiplus/image.c
+22
-0
No files found.
dlls/gdiplus/image.c
View file @
500a96d0
...
...
@@ -1252,6 +1252,28 @@ GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height,
srcBitmap
->
stride
,
srcBitmap
->
bits
+
srcBitmap
->
stride
*
area
.
Y
+
PIXELFORMATBPP
(
srcBitmap
->
format
)
*
area
.
X
/
8
,
srcBitmap
->
format
,
srcBitmap
->
image
.
palette
);
if
(
stat
==
Ok
&&
srcBitmap
->
image
.
palette
)
{
ColorPalette
*
src_palette
,
*
dst_palette
;
src_palette
=
srcBitmap
->
image
.
palette
;
dst_palette
=
GdipAlloc
(
sizeof
(
UINT
)
*
2
+
sizeof
(
ARGB
)
*
src_palette
->
Count
);
if
(
dst_palette
)
{
dst_palette
->
Flags
=
src_palette
->
Flags
;
dst_palette
->
Count
=
src_palette
->
Count
;
memcpy
(
dst_palette
->
Entries
,
src_palette
->
Entries
,
sizeof
(
ARGB
)
*
src_palette
->
Count
);
GdipFree
((
*
dstBitmap
)
->
image
.
palette
);
(
*
dstBitmap
)
->
image
.
palette
=
dst_palette
;
}
else
stat
=
OutOfMemory
;
}
if
(
stat
!=
Ok
)
GdipDisposeImage
((
GpImage
*
)
*
dstBitmap
);
}
...
...
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