diff --git a/src/Util.cpp b/src/Util.cpp index 1b16137..84a487c 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -932,10 +932,11 @@ void* util::fromRgb(Logger* logger, const void* data, unsigned width, unsigned h for (unsigned x = 0; x < width; x++) { - *target_rgba8880++ = *source_rgb888++; - *target_rgba8880++ = *source_rgb888++; - *target_rgba8880++ = *source_rgb888++; + *target_rgba8880++ = source_rgb888[2]; + *target_rgba8880++ = source_rgb888[1]; + *target_rgba8880++ = source_rgb888[0]; *target_rgba8880++ = 255; + source_rgb888 += 3; } source_rgb888 = row + *pitch;