summaryrefslogtreecommitdiff
path: root/include/vcl/BitmapTools.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-15 13:27:30 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-02-15 18:34:09 +0100
commit380da094b0ad765b80c353a6b6d2a1aa6a003f6a (patch)
treef6920ffb3955b66cbbf502aa2faf12be8374f43f /include/vcl/BitmapTools.hxx
parentcf385d9cbbd7e64dd981595e07cac7f3e05519f8 (diff)
ofz#6372 fix bitmap decoding of pattern in LwpBackgroundStuff
after commit b90e098a354323b635bab3ee8f9c79deb1e734fe use BitmapEx in LwpBackgroundStuff <caolan> maybe the lotuswordpro original stride is really 4 after all (as a common stride), with the first byte on each line containing the 8bits for each row The original code in GetPattern() looked pretty dodgy since it was copying 32-bytes into an 8 byte buffer. Assume that the reversing part is right, and that the format is really a 1bit packed 8x8 image. Also fix the decoding of such a image in CreateFromData to assume packed format, which is more predictable. Also fix the bug in createDefaultCross_3x3 which changing the assert revealed. Change-Id: I7196ae601429bbe0f842399df61c8b858e022d3e Reviewed-on: https://gerrit.libreoffice.org/49808 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl/BitmapTools.hxx')
-rw-r--r--include/vcl/BitmapTools.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 4caafb3545e4..cf790e85be14 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -64,7 +64,7 @@ void loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx& rBitmapEx,
@param pData
The block of data to copy
@param nStride
- The number of bytes in a scanline, must >= width
+ The number of bytes in a scanline, must be >= (width * nBitCount / 8)
*/
BitmapEx VCL_DLLPUBLIC CreateFromData( sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int32 nStride, sal_uInt16 nBitCount );