| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* GATE PROJECT LICENSE: | ||
| 2 | +----------------------------------------------------------------------------+ | ||
| 3 | | Copyright (c) 2018-2026, Stefan Meislinger <sm@opengate.at> | | ||
| 4 | | All rights reserved. | | ||
| 5 | | | | ||
| 6 | | Redistribution and use in source and binary forms, with or without | | ||
| 7 | | modification, are permitted provided that the following conditions are met:| | ||
| 8 | | | | ||
| 9 | | 1. Redistributions of source code must retain the above copyright notice, | | ||
| 10 | | this list of conditions and the following disclaimer. | | ||
| 11 | | 2. Redistributions in binary form must reproduce the above copyright | | ||
| 12 | | notice, this list of conditions and the following disclaimer in the | | ||
| 13 | | documentation and/or other materials provided with the distribution. | | ||
| 14 | | | | ||
| 15 | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"| | ||
| 16 | | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | ||
| 17 | | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | ||
| 18 | | ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | | ||
| 19 | | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | ||
| 20 | | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | ||
| 21 | | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | ||
| 22 | | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | ||
| 23 | | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | ||
| 24 | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | | ||
| 25 | | THE POSSIBILITY OF SUCH DAMAGE. | | ||
| 26 | +----------------------------------------------------------------------------+ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #include "gate/graphics/colors.hpp" | ||
| 30 | #include "gate/exceptions.hpp" | ||
| 31 | #include "gate/results.hpp" | ||
| 32 | |||
| 33 | namespace gate | ||
| 34 | { | ||
| 35 | namespace graph | ||
| 36 | { | ||
| 37 | |||
| 38 | 98326 | Color::Color(uint32_t rgba) | |
| 39 | { | ||
| 40 | 98326 | this->value.bits = rgba; | |
| 41 | |||
| 42 | 98326 | } | |
| 43 | 85 | Color::Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) | |
| 44 | { | ||
| 45 | 85 | this->value.r = r; | |
| 46 | 85 | this->value.g = g; | |
| 47 | 85 | this->value.b = b; | |
| 48 | 85 | this->value.a = a; | |
| 49 | 85 | } | |
| 50 | 1 | Color::Color(gate_color_t const& col) | |
| 51 | 1 | : value(col) | |
| 52 | { | ||
| 53 | 1 | } | |
| 54 | |||
| 55 | 3 | Color::Color(gate_color_rgb_t const& src) | |
| 56 | { | ||
| 57 | 3 | this->value.r = src.r; | |
| 58 | 3 | this->value.g = src.g; | |
| 59 | 3 | this->value.b = src.b; | |
| 60 | 3 | this->value.a = 255; | |
| 61 | 3 | } | |
| 62 | |||
| 63 | 1 | Color& Color::operator=(gate_color_t const& src) | |
| 64 | { | ||
| 65 | 1 | this->value = src; | |
| 66 | 1 | return *this; | |
| 67 | } | ||
| 68 | ✗ | Color& Color::operator=(gate_color_rgb_t const& src) | |
| 69 | { | ||
| 70 | ✗ | this->value.r = src.r; | |
| 71 | ✗ | this->value.g = src.g; | |
| 72 | ✗ | this->value.b = src.b; | |
| 73 | ✗ | this->value.a = 255; | |
| 74 | ✗ | return *this; | |
| 75 | } | ||
| 76 | |||
| 77 | |||
| 78 | 98305 | gate_color_t* Color::c_impl() | |
| 79 | { | ||
| 80 | 98305 | return &this->value; | |
| 81 | } | ||
| 82 | 87 | gate_color_t const* Color::c_impl() const | |
| 83 | { | ||
| 84 | 87 | return &this->value; | |
| 85 | } | ||
| 86 | |||
| 87 | ✗ | gate_color_t* Color::operator->() | |
| 88 | { | ||
| 89 | ✗ | return &this->value; | |
| 90 | } | ||
| 91 | 6 | gate_color_t const* Color::operator->() const | |
| 92 | { | ||
| 93 | 6 | return &this->value; | |
| 94 | } | ||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | 1 | void Color::setOpaque(Color const& color) | |
| 99 | { | ||
| 100 | 1 | gate_color_set_opaque(&this->value, &color.value); | |
| 101 | 1 | } | |
| 102 | 1 | void Color::setOpaque(gate_color_t const& color) | |
| 103 | { | ||
| 104 | 1 | gate_color_set_opaque(&this->value, &color); | |
| 105 | |||
| 106 | 1 | } | |
| 107 | |||
| 108 | 1 | void Color::setTransparent(Color const& color) | |
| 109 | { | ||
| 110 | 1 | gate_color_set_transparent(&this->value, &color.value); | |
| 111 | 1 | } | |
| 112 | 1 | void Color::setTransparent(gate_color_t const& color) | |
| 113 | { | ||
| 114 | 1 | gate_color_set_transparent(&this->value, &color); | |
| 115 | 1 | } | |
| 116 | |||
| 117 | 49157 | bool_t Color::operator==(Color const& src) const | |
| 118 | { | ||
| 119 | 49157 | return this->value.bits == src.value.bits; | |
| 120 | } | ||
| 121 | 1 | bool_t Color::operator!=(Color const& src) const | |
| 122 | { | ||
| 123 | 1 | return this->value.bits != src.value.bits; | |
| 124 | } | ||
| 125 | 3 | bool_t Color::operator< (Color const& src) const | |
| 126 | { | ||
| 127 | 3 | return this->value.bits < src.value.bits; | |
| 128 | } | ||
| 129 | 5 | bool_t Color::operator<=(Color const& src) const | |
| 130 | { | ||
| 131 | 5 | return this->value.bits <= src.value.bits; | |
| 132 | } | ||
| 133 | 2 | bool_t Color::operator> (Color const& src) const | |
| 134 | { | ||
| 135 | 2 | return src < *this; | |
| 136 | } | ||
| 137 | 3 | bool_t Color::operator>=(Color const& src) const | |
| 138 | { | ||
| 139 | 3 | return src <= *this; | |
| 140 | } | ||
| 141 | |||
| 142 | |||
| 143 | 4 | Color Color::parseHex(String const& text) | |
| 144 | { | ||
| 145 | 4 | Color ret; | |
| 146 |
2/4✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
|
4 | if (0 == gate_color_parse_hex(text.c_str(), text.length(), &ret.value)) |
| 147 | { | ||
| 148 | ✗ | GATEXX_RAISE_EXCEPTION(results::InvalidData, "Failed to parse hex color", 0); | |
| 149 | } | ||
| 150 | 4 | return ret; | |
| 151 | } | ||
| 152 | |||
| 153 | Color const Color::Black = Color(0x00, 0x00, 0x00); | ||
| 154 | Color const Color::Blue = Color(0x00, 0x00, 0x99); | ||
| 155 | Color const Color::Green = Color(0x00, 0x99, 0x00); | ||
| 156 | Color const Color::Cyan = Color(0x00, 0x99, 0x99); | ||
| 157 | Color const Color::Red = Color(0x99, 0x00, 0x00); | ||
| 158 | Color const Color::Magenta = Color(0x99, 0x00, 0x99); | ||
| 159 | Color const Color::Brown = Color(0x99, 0x66, 0x33); | ||
| 160 | Color const Color::LightGray = Color(0x99, 0x99, 0x99); | ||
| 161 | Color const Color::DarkGray = Color(0x66, 0x66, 0x66); | ||
| 162 | Color const Color::BrightBlue = Color(0x66, 0x66, 0xff); | ||
| 163 | Color const Color::BrightGreen = Color(0x66, 0xff, 0x66); | ||
| 164 | Color const Color::BrightCyan = Color(0x66, 0xff, 0xff); | ||
| 165 | Color const Color::BrightRed = Color(0xff, 0x66, 0x66); | ||
| 166 | Color const Color::BrightMagenta = Color(0xff, 0x66, 0xff); | ||
| 167 | Color const Color::Yellow = Color(0xff, 0xff, 0x66); | ||
| 168 | Color const Color::White = Color(0xff, 0xff, 0xff); | ||
| 169 | |||
| 170 | |||
| 171 | |||
| 172 | 528 | ColorRGB::ColorRGB(uint8_t r, uint8_t g , uint8_t b) | |
| 173 | { | ||
| 174 | 528 | this->r = r; | |
| 175 | 528 | this->g = g; | |
| 176 | 528 | this->b = b; | |
| 177 | 528 | } | |
| 178 | ✗ | ColorRGB::ColorRGB(gate_color_rgb_t const& src) | |
| 179 | ✗ | : gate_color_rgb_t(src) | |
| 180 | { | ||
| 181 | ✗ | } | |
| 182 | 6 | ColorRGB::ColorRGB(Color const& src) | |
| 183 | { | ||
| 184 | 6 | this->r = src.value.r; | |
| 185 | 6 | this->g = src.value.g; | |
| 186 | 6 | this->b = src.value.b; | |
| 187 | 6 | } | |
| 188 | |||
| 189 | 1 | ColorRGB::ColorRGB(gate_color_t const& src) | |
| 190 | { | ||
| 191 | 1 | this->r = src.r; | |
| 192 | 1 | this->g = src.g; | |
| 193 | 1 | this->b = src.b; | |
| 194 | 1 | } | |
| 195 | ✗ | ColorRGB& ColorRGB::operator=(gate_color_rgb_t const& src) | |
| 196 | { | ||
| 197 | ✗ | static_cast<gate_color_rgb_t&>(*this) = src; | |
| 198 | ✗ | return *this; | |
| 199 | } | ||
| 200 | ✗ | ColorRGB& ColorRGB::operator=(gate_color_t const& src) | |
| 201 | { | ||
| 202 | ✗ | this->r = src.r; | |
| 203 | ✗ | this->g = src.g; | |
| 204 | ✗ | this->b = src.b; | |
| 205 | ✗ | return *this; | |
| 206 | } | ||
| 207 | 4 | bool_t ColorRGB::operator==(ColorRGB const& src) const | |
| 208 | { | ||
| 209 |
4/6✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 3 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 3 times.
✗ Branch 5 not taken.
|
4 | return this->r == src.r && this->g == src.g && this->b == src.b; |
| 210 | } | ||
| 211 | 1 | bool_t ColorRGB::operator!=(ColorRGB const& src) const | |
| 212 | { | ||
| 213 | 1 | return !((*this) == src); | |
| 214 | } | ||
| 215 | 1 | bool_t ColorRGB::operator< (ColorRGB const& src) const | |
| 216 | { | ||
| 217 |
1/2✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
|
1 | if (this->r < src.r) return true; |
| 218 | ✗ | if (this->r > src.r) return false; | |
| 219 | ✗ | if (this->g < src.g) return true; | |
| 220 | ✗ | if (this->g > src.g) return false; | |
| 221 | ✗ | return this->b < src.b; | |
| 222 | } | ||
| 223 | 1 | bool_t ColorRGB::operator<=(ColorRGB const& src) const | |
| 224 | { | ||
| 225 |
1/2✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
|
1 | if (this->r < src.r) return true; |
| 226 | ✗ | if (this->r > src.r) return false; | |
| 227 | ✗ | if (this->g < src.g) return true; | |
| 228 | ✗ | if (this->g > src.g) return false; | |
| 229 | ✗ | return this->b <= src.b; | |
| 230 | } | ||
| 231 | ✗ | bool_t ColorRGB::operator> (ColorRGB const& src) const | |
| 232 | { | ||
| 233 | ✗ | return src < *this; | |
| 234 | } | ||
| 235 | ✗ | bool_t ColorRGB::operator>=(ColorRGB const& src) const | |
| 236 | { | ||
| 237 | ✗ | return src <= *this; | |
| 238 | } | ||
| 239 | |||
| 240 | |||
| 241 | |||
| 242 | 2 | size_t ColorPalette::find(ColorRGB findColor, ColorRGB const* palette, size_t paletteLength) | |
| 243 | { | ||
| 244 | 2 | return gate_color_palette_rgb8_resolve(findColor, palette, paletteLength); | |
| 245 | } | ||
| 246 | |||
| 247 | 1 | void ColorPalette::createRGB4Palette(ColorRGB palette[16]) | |
| 248 | { | ||
| 249 | 1 | gate_color_palette_rgb4_create(palette); | |
| 250 | 1 | } | |
| 251 | |||
| 252 | 1 | void ColorPalette::createRGB8Palette(ColorRGB palette[256]) | |
| 253 | { | ||
| 254 | 1 | gate_color_palette_rgb8_create(palette); | |
| 255 | 1 | } | |
| 256 | |||
| 257 | 256 | void ColorPalette::loadRGB8Index(uint8_t ndx, ColorRGB& colRgb) | |
| 258 | { | ||
| 259 | 256 | gate_color_palette_rgb8_from_index(ndx, &colRgb); | |
| 260 | 256 | } | |
| 261 | |||
| 262 | 1 | uint8_t ColorPalette::resolveRGB8Index(ColorRGB color) | |
| 263 | { | ||
| 264 | 1 | return gate_color_palette_rgb8_index_from_color(color); | |
| 265 | } | ||
| 266 | |||
| 267 | |||
| 268 | |||
| 269 | 1 | size_t ColorCodec::loadRgb24(gate_color_t* pixels, size_t pixelsCount, void const* sourceRgb24) | |
| 270 | { | ||
| 271 | 1 | return gate_color_load_rgb_24(pixels, pixelsCount, sourceRgb24); | |
| 272 | } | ||
| 273 | 1 | size_t ColorCodec::loadRgb32(gate_color_t* pixels, size_t pixelsCount, void const* sourceRgb32) | |
| 274 | { | ||
| 275 | 1 | return gate_color_load_rgb_32(pixels, pixelsCount, sourceRgb32); | |
| 276 | } | ||
| 277 | 65025 | size_t ColorCodec::loadYuv2(gate_color_t* pixels, size_t pixelsCount, void const* sourceYuv2) | |
| 278 | { | ||
| 279 | 65025 | return gate_color_load_yuv2_16(pixels, pixelsCount, sourceYuv2); | |
| 280 | } | ||
| 281 | |||
| 282 | |||
| 283 | 1 | void ColorCodec::convertRGBAfromBGRA32(uint8_t* dstRGBA, uint8_t const* srcBGRA32, size_t pixelCount) | |
| 284 | { | ||
| 285 | 1 | gate_color_convert_rgba_from_bgra_32(dstRGBA, srcBGRA32, pixelCount); | |
| 286 | 1 | } | |
| 287 | 1 | void ColorCodec::convertRGBAfromBGR24(uint8_t* dstRGBA, uint8_t const* srcBGR24, size_t pixelCount) | |
| 288 | { | ||
| 289 | 1 | gate_color_convert_rgba_from_bgr_24(dstRGBA, srcBGR24, pixelCount); | |
| 290 | 1 | } | |
| 291 | 1 | void ColorCodec::convertRGBAfromRGB24(uint8_t* dstRGBA, uint8_t const* srcRGB24, size_t pixelCount) | |
| 292 | { | ||
| 293 | 1 | gate_color_convert_rgba_from_rgb_24(dstRGBA, srcRGB24, pixelCount); | |
| 294 | 1 | } | |
| 295 | 1 | void ColorCodec::convertRGBAfromRGB16(uint8_t* dstRGBA, uint8_t const* srcRGB16, size_t pixelCount) | |
| 296 | { | ||
| 297 | 1 | gate_color_convert_rgba_from_rgb_16(dstRGBA, srcRGB16, pixelCount); | |
| 298 | 1 | } | |
| 299 | 1 | void ColorCodec::convertRGBAfromRGB15(uint8_t* dstRGBA, uint8_t const* srcRGB15, size_t pixelCount) | |
| 300 | { | ||
| 301 | 1 | gate_color_convert_rgba_from_rgb_15(dstRGBA, srcRGB15, pixelCount); | |
| 302 | 1 | } | |
| 303 | 1 | void ColorCodec::convertRGBAfromARGB16(uint8_t* dstRGBA, uint8_t const* srcRGB16, size_t pixelCount) | |
| 304 | { | ||
| 305 | 1 | gate_color_convert_rgba_from_argb_16(dstRGBA, srcRGB16, pixelCount); | |
| 306 | 1 | } | |
| 307 | 1 | void ColorCodec::convertRGBAfromYUV216(uint8_t* dstRGBA, uint8_t const* srcYUV216, size_t pixelCount) | |
| 308 | { | ||
| 309 | 1 | gate_color_convert_rgba_from_yuv2_16(dstRGBA, srcYUV216, pixelCount); | |
| 310 | 1 | } | |
| 311 | 1 | void ColorCodec::convertRGBAfromPAL8(uint8_t* dstRGBA, uint8_t const* srcPAL8, size_t pixelCount) | |
| 312 | { | ||
| 313 | 1 | gate_color_convert_rgba_from_pal_8(dstRGBA, srcPAL8, pixelCount); | |
| 314 | 1 | } | |
| 315 | 1 | void ColorCodec::convertRGBAfromGRAY8(uint8_t* dstRGBA, uint8_t const* srcGRAY8, size_t pixelCount) | |
| 316 | { | ||
| 317 | 1 | gate_color_convert_rgba_from_gray_8(dstRGBA, srcGRAY8, pixelCount); | |
| 318 | 1 | } | |
| 319 | |||
| 320 | |||
| 321 | |||
| 322 | 1 | void ColorCodec::convertRGBfromRGBA32(uint8_t* dstRGB, uint8_t const* srcRGBA32, size_t pixelCount) | |
| 323 | { | ||
| 324 | 1 | gate_color_convert_rgb_from_rgba_32(dstRGB, srcRGBA32, pixelCount); | |
| 325 | 1 | } | |
| 326 | 1 | void ColorCodec::convertRGBfromBGRA32(uint8_t* dstRGB, uint8_t const* srcBGRA32, size_t pixelCount) | |
| 327 | { | ||
| 328 | 1 | gate_color_convert_rgb_from_bgra_32(dstRGB, srcBGRA32, pixelCount); | |
| 329 | 1 | } | |
| 330 | 1 | void ColorCodec::convertRGBfromBGR24(uint8_t* dstRGB, uint8_t const* srcBGR24, size_t pixelCount) | |
| 331 | { | ||
| 332 | 1 | gate_color_convert_rgb_from_bgr_24(dstRGB, srcBGR24, pixelCount); | |
| 333 | 1 | } | |
| 334 | 1 | void ColorCodec::convertRGBfromRGB16(uint8_t* dstRGB, uint8_t const* srcRGB16, size_t pixelCount) | |
| 335 | { | ||
| 336 | 1 | gate_color_convert_rgb_from_rgb_16(dstRGB, srcRGB16, pixelCount); | |
| 337 | 1 | } | |
| 338 | 1 | void ColorCodec::convertRGBfromRGB15(uint8_t* dstRGB, uint8_t const* srcRGB15, size_t pixelCount) | |
| 339 | { | ||
| 340 | 1 | gate_color_convert_rgb_from_rgb_15(dstRGB, srcRGB15, pixelCount); | |
| 341 | 1 | } | |
| 342 | 1 | void ColorCodec::convertRGBfromARGB16(uint8_t* dstRGB, uint8_t const* srcARGB16, size_t pixelCount) | |
| 343 | { | ||
| 344 | 1 | gate_color_convert_rgb_from_argb_16(dstRGB, srcARGB16, pixelCount); | |
| 345 | 1 | } | |
| 346 | 1 | void ColorCodec::convertRGBfromYUV216(uint8_t* dstRGB, uint8_t const* srcYUV216, size_t pixelCount) | |
| 347 | { | ||
| 348 | 1 | gate_color_convert_rgb_from_yuv2_16(dstRGB, srcYUV216, pixelCount); | |
| 349 | 1 | } | |
| 350 | 1 | void ColorCodec::convertRGBfromPAL8(uint8_t* dstRGB, uint8_t const* srcPAL8, size_t pixelCount) | |
| 351 | { | ||
| 352 | 1 | gate_color_convert_rgb_from_pal_8(dstRGB, srcPAL8, pixelCount); | |
| 353 | 1 | } | |
| 354 | 1 | void ColorCodec::convertRGBfromGRAY8(uint8_t* dstRGB, uint8_t const* srcGRAY8, size_t pixelCount) | |
| 355 | { | ||
| 356 | 1 | gate_color_convert_rgb_from_gray_8(dstRGB, srcGRAY8, pixelCount); | |
| 357 | 1 | } | |
| 358 | |||
| 359 | |||
| 360 | 1 | void ColorCodec::convertBGRAfromRGBA32(uint8_t* dstBGRA, uint8_t const* srcRGBA32, size_t pixelCount) | |
| 361 | { | ||
| 362 | 1 | gate_color_convert_bgra_from_rgba_32(dstBGRA, srcRGBA32, pixelCount); | |
| 363 | 1 | } | |
| 364 | 1 | void ColorCodec::convertBGRAfromBGR24(uint8_t* dstBGRA, uint8_t const* srcBGR24, size_t pixelCount) | |
| 365 | { | ||
| 366 | 1 | gate_color_convert_bgra_from_bgr_24(dstBGRA, srcBGR24, pixelCount); | |
| 367 | 1 | } | |
| 368 | 1 | void ColorCodec::convertBGRAfromRGB24(uint8_t* dstBGRA, uint8_t const* srcRGB24, size_t pixelCount) | |
| 369 | { | ||
| 370 | 1 | gate_color_convert_bgra_from_rgb_24(dstBGRA, srcRGB24, pixelCount); | |
| 371 | 1 | } | |
| 372 | 1 | void ColorCodec::convertBGRAfromRGB16(uint8_t* dstBGRA, uint8_t const* srcRGB16, size_t pixelCount) | |
| 373 | { | ||
| 374 | 1 | gate_color_convert_bgra_from_rgb_16(dstBGRA, srcRGB16, pixelCount); | |
| 375 | 1 | } | |
| 376 | 1 | void ColorCodec::convertBGRAfromRGB15(uint8_t* dstBGRA, uint8_t const* srcRGB15, size_t pixelCount) | |
| 377 | { | ||
| 378 | 1 | gate_color_convert_bgra_from_rgb_15(dstBGRA, srcRGB15, pixelCount); | |
| 379 | 1 | } | |
| 380 | 1 | void ColorCodec::convertBGRAfromARGB16(uint8_t* dstBGRA, uint8_t const* srcARGB16, size_t pixelCount) | |
| 381 | { | ||
| 382 | 1 | gate_color_convert_bgra_from_argb_16(dstBGRA, srcARGB16, pixelCount); | |
| 383 | 1 | } | |
| 384 | 1 | void ColorCodec::convertBGRAfromYUV216(uint8_t* dstBGRA, uint8_t const* srcYUV216, size_t pixelCount) | |
| 385 | { | ||
| 386 | 1 | gate_color_convert_bgra_from_yuv2_16(dstBGRA, srcYUV216, pixelCount); | |
| 387 | 1 | } | |
| 388 | 1 | void ColorCodec::convertBGRAfromPAL8(uint8_t* dstBGRA, uint8_t const* srcPAL8, size_t pixelCount) | |
| 389 | { | ||
| 390 | 1 | gate_color_convert_bgra_from_pal_8(dstBGRA, srcPAL8, pixelCount); | |
| 391 | 1 | } | |
| 392 | 1 | void ColorCodec::convertBGRAfromGRAY8(uint8_t* dstBGRA, uint8_t const* srcGRAY8, size_t pixelCount) | |
| 393 | { | ||
| 394 | 1 | gate_color_convert_bgra_from_gray_8(dstBGRA, srcGRAY8, pixelCount); | |
| 395 | 1 | } | |
| 396 | |||
| 397 | } // end of namespace graph | ||
| 398 | } // end of namespace gate | ||
| 399 |