@@ -48,8 +48,8 @@ @implementation RgbRgbaConverter: NSObject
4848 .height = static_cast <vImagePixelCount>(height),
4949 .rowBytes = static_cast <vImagePixelCount>(width * 3 )
5050 };
51- uint8_t fillColor = 0x0000000 ;
52- vImage_Error vEerror = vImageFlatten_RGBA8888ToRGB888 (&src, &dest, & fillColor, false , kvImageNoFlags);
51+ Pixel_8888 fillColor = { 0x00 , 0x00 , 0x00 , 0xFF } ;
52+ vImage_Error vEerror = vImageFlatten_RGBA8888ToRGB888 (&src, &dest, fillColor, true , kvImageNoFlags);
5353 if (vEerror != kvImageNoError) {
5454 dstVector.resize (1 );
5555 return dstVector;
@@ -58,7 +58,7 @@ @implementation RgbRgbaConverter: NSObject
5858}
5959
6060+(bool )convertRGBU16ToRGBAU16 : (uint16_t *)src dst : (uint16_t *)dst width : (int )width height : (int )height depth : (int )depth {
61- uint16_t whiteColor = (uint16_t )(powf (2 .0f , (float )depth) - 1 );
61+ Pixel_16U whiteColor = (uint16_t )(powf (2 .0f , (float )depth) - 1 );
6262 vImage_Buffer srcBuffer = {
6363 .data = (void *)src,
6464 .width = static_cast <vImagePixelCount>(width),
@@ -80,7 +80,7 @@ +(bool)convertRGBU16ToRGBAU16:(uint16_t*)src dst:(uint16_t*)dst width:(int)width
8080}
8181
8282+(bool )convertRGBU8ToRGBAU8 : (uint8_t *)src dst : (uint8_t *)dst width : (int )width height : (int )height ; {
83- uint16_t whiteColor = (uint16_t )(powf (2 .0f , (float )8 ) - 1 );
83+ Pixel_16U whiteColor = (uint16_t )(powf (2 .0f , (float )8 ) - 1 );
8484 vImage_Buffer srcBuffer = {
8585 .data = (void *)src,
8686 .width = static_cast <vImagePixelCount>(width),
0 commit comments