* BPrivate::ConvertBits() did not take the source or destination bits length
into account when copying to the same color space (new code isn't that fast, but it works). * BBitmap::ImportBits() did not take the specified offset into account at all. This fixes bug #313. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16812 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -513,8 +513,8 @@ BBitmap::ImportBits(const void *data, int32 length, int32 bpr, int32 offset,
|
||||
if (bpr < 0)
|
||||
bpr = get_bytes_per_row(colorSpace, width);
|
||||
|
||||
return BPrivate::ConvertBits(data, fBasePtr, length, fSize, bpr,
|
||||
fBytesPerRow, colorSpace, fColorSpace, width,
|
||||
return BPrivate::ConvertBits(data, (uint8*)fBasePtr + offset, length,
|
||||
fSize - offset, bpr, fBytesPerRow, colorSpace, fColorSpace, width,
|
||||
fBounds.IntegerHeight() + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user