Skip to content

Commit

Permalink
fix XRGB8888 to RGB24 conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Jul 21, 2021
1 parent 969f18d commit c378fa2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c378fa2

Please sign in to comment.