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
b528e01d
Commit
b528e01d
authored
Oct 18, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Reimplement GdipCloneImage using GdipCloneBitmapArea for a bitmap.
parent
df367c33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
40 deletions
+3
-40
image.c
dlls/gdiplus/image.c
+3
-40
No files found.
dlls/gdiplus/image.c
View file @
b528e01d
...
...
@@ -1312,47 +1312,10 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
}
else
if
(
image
->
type
==
ImageTypeBitmap
)
{
GpBitmap
*
bitmap
=
(
GpBitmap
*
)
image
;
BitmapData
lockeddata_src
,
lockeddata_dst
;
int
i
;
UINT
row_size
;
GpBitmap
*
bitmap
=
(
GpBitmap
*
)
image
;
stat
=
GdipBitmapLockBits
(
bitmap
,
NULL
,
ImageLockModeRead
,
bitmap
->
format
,
&
lockeddata_src
);
if
(
stat
!=
Ok
)
return
stat
;
stat
=
GdipCreateBitmapFromScan0
(
lockeddata_src
.
Width
,
lockeddata_src
.
Height
,
0
,
lockeddata_src
.
PixelFormat
,
NULL
,
(
GpBitmap
**
)
cloneImage
);
if
(
stat
==
Ok
)
{
stat
=
GdipBitmapLockBits
((
GpBitmap
*
)
*
cloneImage
,
NULL
,
ImageLockModeWrite
,
lockeddata_src
.
PixelFormat
,
&
lockeddata_dst
);
if
(
stat
==
Ok
)
{
/* copy the image data */
row_size
=
(
lockeddata_src
.
Width
*
PIXELFORMATBPP
(
lockeddata_src
.
PixelFormat
)
+
7
)
/
8
;
for
(
i
=
0
;
i
<
lockeddata_src
.
Height
;
i
++
)
memcpy
((
BYTE
*
)
lockeddata_dst
.
Scan0
+
lockeddata_dst
.
Stride
*
i
,
(
BYTE
*
)
lockeddata_src
.
Scan0
+
lockeddata_src
.
Stride
*
i
,
row_size
);
GdipBitmapUnlockBits
((
GpBitmap
*
)
*
cloneImage
,
&
lockeddata_dst
);
}
if
(
stat
!=
Ok
)
GdipDisposeImage
(
*
cloneImage
);
}
GdipBitmapUnlockBits
(
bitmap
,
&
lockeddata_src
);
if
(
stat
!=
Ok
)
{
*
cloneImage
=
NULL
;
}
else
memcpy
(
&
(
*
cloneImage
)
->
format
,
&
image
->
format
,
sizeof
(
GUID
));
return
stat
;
return
GdipCloneBitmapAreaI
(
0
,
0
,
bitmap
->
width
,
bitmap
->
height
,
bitmap
->
format
,
bitmap
,
(
GpBitmap
**
)
cloneImage
);
}
else
if
(
image
->
type
==
ImageTypeMetafile
&&
((
GpMetafile
*
)
image
)
->
hemf
)
{
...
...
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