* Fixed a swapping bug for 16 bit colorspaces

* Added some comments
* Added some checking to avoid noop shifts
* Added buffer length checks
* Implemented (as Stephan suggested) a version of ConvertBits() that takes offsets.
This new version allows to move a region of the source into a region (possibly not at the same point) on the dest while converting colorspaces on the fly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16592 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2006-03-05 23:53:33 +00:00
parent 8413da2383
commit bdc6f9e7ef
4 changed files with 258 additions and 136 deletions
+8 -3
View File
@@ -5,9 +5,14 @@
namespace BPrivate {
status_t ConvertBits(const void *srcBuffer, void *dstBuffer,
uint32 srcBytesPerRow, uint32 dstBytesPerRow, color_space srcColorSpace,
color_space dstColorSpace, int32 width, int32 height);
status_t ConvertBits(const void *srcBits, void *dstBits, int32 srcBitsLength,
int32 dstBitsLength, int32 srcBytesPerRow, int32 dstBytesPerRow,
color_space srcColorSpace, color_space dstColorSpace, int32 width,
int32 height);
status_t ConvertBits(const void *srcBits, void *dstBits, int32 srcBitsLength,
int32 dstBitsLength, int32 srcBytesPerRow, int32 dstBytesPerRow,
color_space srcColorSpace, color_space dstColorSpace, BPoint srcOffset,
BPoint dstOffset, int32 width, int32 height);
/*! \brief Helper class for conversion between RGB and palette colors.