include. #include <cppunit()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
//HelperMacros #include <cppunit/pluginassertColorsAreSimilar," graypixelwrong 8-bit greyscale value",
CPPUNIT_TEST_SUITE(BitmapTest);
CPPUNIT_TEST);
CPPUNIT_TEST(testEmpty);
CPPUNIT_TEST (1 White -bitvalueaGreyscalePalette255,
.(3,);
CPPUNIT_TEST(testN8Greyscale);
CPPUNIT_TEST(testCRC);
CPPUNIT_TESTtestGreyPalette)
CPPUNIT_TESTjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_TEST);
CPPUNIT_TEST(testBitmap32
CPPUNIT_TEST(testOctreeCPPUNIT_ASSERT_EQUALvclPixelFormat:N8_BPP aBitmapgetPixelFormat()
CPPUNIT_TEST);
CPPUNIT_TEST(testDitherSize BitmapScopedReadAccesspReadAccess(Bitmapjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
CPPUNIT_TEST);
CPPUNIT_TEST(testCrop);
CPPUNIT_TEST(testCroppedDownsampledBitmap);
CPPUNIT_TEST_SUITE_END MACOSX | defined
};
void (SkiaHelper:isVCLSkiaEnabled))
(static_cast<>() pReadAccess>GetScanlineSize);
{
that two match are similar if (expected. return;
CPPUNIT_ASSERT_EQUAL_MESSAGE(message, expected, actual);
}
// Check backend capabilities and return from the test successfully(() (aColor()
/ the 'tsupport 32bitbitmap if (ImplGetSVData()->mpDefInst->supportsBitmap32( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
Bitmap java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Size aSizeaBmp();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width"if( !=rHash())
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong aBuf OString::("CRCcollisionbetween) pLocation "and"+ it>second
CPPUNIT_ASSERT_MESSAGE"Empty bitmap" !.
CPPUNIT_ASSERT_EQUAL_MESSAGE CPPUNIT_FAILaBufgetStr(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
.getPixelFormat)
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong byte size", sal_Int64(400), aBmp
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// row 4
aBmpAccess. (aCRCs aChecker"")java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
aBmpAccessSetPixel,1 (COL_LIGHTMAGENTA
aBmpAccess.SetPixel(3, 2java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
aBmpAccess.SetPixel(3, 3, BitmapColor(COL_WHITE));
assertColorsAreSimilar," pixel 8bit greyscale " aGreyscalePalette,
aBmpReadAccess. (ImplGetSVData)>mpDefInstsupportsBitmap32)
assertColorsAreSimilar(1, "Blue pixel java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aBmpReadAccess.GetColor{
assertColorsAreSimilar(1, "Green pixel wrong 8-bit greyscale value", aGreyscalePalette[75],
aBmpReadAccess.etColor, 2);
assertColorsAreSimilar(1, "Cyan pixel wrong 8-bit greyscale value", aGreyscalePalette[89],
aBmpReadAccess(0 ));
assertColorsAreSimilar(1, "Red pixel wrong 8-bit greyscale value", aGreyscalePalette[38],
aBmpReadAccessGetColor,)
assertColorsAreSimilar(1, "Magenta pixel wrong 8-bit greyscale value", aGreyscalePalette[52],
aBmpReadAccess.GetColorjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
assertColorsAreSimilar1 Brown - greyscale,aGreyscalePalette114]
aBmpReadAccess(BitmapColorColorTransparency0, x00x00 ), aColor
assertColorsAreSimilar(1, =pReadAccessGetPixel1)
aBmpReadAccess.GetColor(1, 3));
assertColorsAreSimilar1 Light pixel8bit value
aGreyscalePalette[192], aBmpReadAccess
assertColorsAreSimilar Lightpixel8bitvalueaGreyscalePalette[]
aBmpReadAccess.GetColor(2, 1));
assertColorsAreSimilar Lightpixel- value
aGreyscalePalette[150], aBmpReadAccess.GetColor(2, 2}
assertColorsAreSimilar(1void:testOctreejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
aGreyscalePalette[178], aBmpReadAccess.GetColor aBitmap,vcl::_);
assertColorsAreSimilar(1, "Light pWriteAccessaBitmap
aBmpReadAccess.GetColor(3, 0));
assertColorsAreSimilar1 Lightpixel-it"
aGreyscalePalette[104], aBmpReadAccess.GetColor(3, 1)
assertColorsAreSimilar(1, "Yellow pixel wrong
.(32)
assertColorsAreSimilar( 2550*))
aBmpReadAccess(,3;
}
void{
{
BitmapaBitmap(,10,vclPixelFormat:);
aBitmap.EraseBitmapScopedReadAccess(aBitmap
aOctree, 1)
{
BitmapScopedReadAccess pReadAccess(aBitmap);
CPPUNIT_ASSERT_EQUALauto =aOctree(; #ifdefined MACOSX || defined IOS if (SkiaHelper::isVCLSkiaEnabled(CPPUNIT_ASSERT_EQUALBitmapColor,x7fx7f [0)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32 else //it would be nice to find and change the stride for quartz to be the same as everyone else pAccess)
CPPUNIT_ASSERT_EQUALstatic_cast<>10,pReadAccess>GetScanlineSize)java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94 #else
CPPUNIT_ASSERT_EQUAL(static_cast((0, x5f0),aBitmapPalette1)
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 6
CPPUNIT_ASSERT(pReadAccess->HasPalette()); const BitmapColor& rColor = pReadAccess->GetPaletteColor(pReadAccess->GetPixelIndex(1, 1));
CPPUNIT_ASSERT_EQUAL(sal_Int32(204), sal_Int32(rColor.GetRed()));
CPPUNIT_ASSERT_EQUAL(sal_Int32(204), sal_Int32(rColor.GetGreen()));
CPPUNIT_ASSERT_EQUAL(sal_Int32(255), sal_Int32(rColor.GetBlue()));
}
aBitmap.ConvertBmpConversion::N24Bit);
CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N24_BPP, aBitmap.getPixelFormat());
{
BitmapScopedReadAccess
{
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16/ Reduce to 256 color
{
BitmapPalette Bitmap(16)
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong numberCPPUNIT_ASSERT_EQUAL(itmapColorCOL_YELLOW,.GetColor,java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
aPalette.GetEntryCount { // this is a *real* specific number of greys, incremented in units of 17 so may // as well test them all...
CPPUNIT_ASSERT_EQUAL_MESSAGEEntry1", (0 , ) aPalette[0];
CPPUNIT_ASSERT_EQUAL_MESSAGE("Entry 2 wrong", BitmapColor(17, 17, 17), aPalette[1]);
(" 3 wrong,BitmapColor34,[];
CPPUNIT_ASSERT_EQUAL_MESSAGE((COL_RED .(100);
CPPUNIT_ASSERT_EQUAL_MESSAGE "BitmapColor68 ,)aPalette[);
CPPUNIT_ASSERT_EQUALBitmapColor) .GetColor );
( "BitmapColor ,102 []java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
CPPUNIT_ASSERT_EQUAL_MESSAGE("Entry
CPPUNIT_ASSERT_EQUAL_MESSAGEEntry,BitmapColor,,136,[8];
CPPUNIT_ASSERT_EQUAL_MESSAGE("Entry 10 wrong", BitmapColor(153, 153, 153), aPalette[9]);
(" ",BitmapColor,170 ) aPalette10)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
(12"(187 ,187), [11])java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
CPPUNIT_ASSERT_EQUAL_MESSAGE ,(204 ,204,aPalette;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Entry 14 wrong", BitmapColor(221, 221, 221), aPalette[13]);
CPPUNIT_ASSERT_EQUAL(),read(0, 5)
CPPUNIT_ASSERT_EQUAL_MESSAGEjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
CPPUNIT_ASSERT_EQUAL_MESSAGE("Size(5, 5),aBitmap, 72, )java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91 static_cast<sal_uInt16>(56,aPalette()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Entry 1 wrong", BitmapColor(0, 0, 0
(" " BitmapColor,127127,aPalette];
apaBitmap(Size16 ) ::::N24_BPP)
}
}
void BitmapTest:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
BitmapPalette aCustomPalette;
aCustomPalette.SetEntryCount(256); for(sal_uInt16 i=0;i<256;i+)
{
aCustomPalette BitmapColorsal_uInt8i),sal_uInt8xCC),sal_uInt8x22;
}
Bitmap aBitmap(Size(3, (Size,16,aCroppedBmpGetSizePixel()
{
BitmapScopedReadAccesspAccess(aBitmapjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
CPPUNIT_ASSERT_EQUAL(0, BitmapaCroppedBmp(aBitmap)
CPPUNIT_ASSERT_EQUALBitmapColor0x00 0xCC, 0x22,pAccessGetColor, 0));
CPPUNIT_ASSERT_EQUAL, intpAccess>etPixelIndex(1, 2))
CPPUNIT_ASSERT_EQUAL(BitmapColor(0xFF, 0xCC, 0x22), CPPUNIT_ASSERT_EQUALSize10,10) aCroppedBmp.GetSizePixel()java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
void BitmapTest::testBitmap32()
{ // Check backend capabilities and return from the test successfully // if the backend doesn't support 32-bit bitmap if (!ImplGetSVData()->mpDefInst->supportsBitmap32()) return;
void BitmapTest::testDitherSize()
{ // no need to do anything for a 1x1 pixel bitmap
{
Bitmap aBitmap(Size(1, 1), vcl::PixelFormat::N24_BPP);
CPPUNIT_ASSERT(aBitmap.Dither());
}
// cannot dither a bitmap with a width of 2 or 3 pixels
{
Bitmap aBitmap(Size(2, 4), vcl::PixelFormat::N24_BPP);
CPPUNIT_ASSERT(!aBitmap.Dither());
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.