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
9497e938
Commit
9497e938
authored
Feb 24, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Don't copy bits into the buffer when a bitmap is locked write-only.
parent
58eb96c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
image.c
dlls/gdiplus/image.c
+17
-11
No files found.
dlls/gdiplus/image.c
View file @
9497e938
...
...
@@ -968,11 +968,14 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
}
/* Make sure we can convert to the requested format. */
stat
=
convert_pixels
(
0
,
0
,
0
,
NULL
,
format
,
0
,
NULL
,
bitmap
->
format
,
NULL
);
if
(
stat
==
NotImplemented
)
if
(
flags
&
ImageLockModeRead
)
{
FIXME
(
"cannot read bitmap from %x to %x
\n
"
,
bitmap
->
format
,
format
);
return
NotImplemented
;
stat
=
convert_pixels
(
0
,
0
,
0
,
NULL
,
format
,
0
,
NULL
,
bitmap
->
format
,
NULL
);
if
(
stat
==
NotImplemented
)
{
FIXME
(
"cannot read bitmap from %x to %x
\n
"
,
bitmap
->
format
,
format
);
return
NotImplemented
;
}
}
/* If we're opening for writing, make sure we'll be able to write back in
...
...
@@ -995,14 +998,17 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
if
(
!
buff
)
return
OutOfMemory
;
stat
=
convert_pixels
(
bitmap
->
width
,
bitmap
->
height
,
stride
,
buff
,
format
,
bitmap
->
stride
,
bitmap
->
bits
,
bitmap
->
format
,
bitmap
->
image
.
palette_entries
);
if
(
stat
!=
Ok
)
if
(
flags
&
ImageLockModeRead
)
{
GdipFree
(
buff
);
return
stat
;
stat
=
convert_pixels
(
bitmap
->
width
,
bitmap
->
height
,
stride
,
buff
,
format
,
bitmap
->
stride
,
bitmap
->
bits
,
bitmap
->
format
,
bitmap
->
image
.
palette_entries
);
if
(
stat
!=
Ok
)
{
GdipFree
(
buff
);
return
stat
;
}
}
lockeddata
->
Width
=
act_rect
.
Width
;
...
...
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