Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Sep 16, 2023
2 parents 126590b + 1f08f28 commit 63b3480
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -50721,9 +50721,12 @@ namespace cimg_library {
const int posx = x + left_paddings[i] + padding_x;

for (unsigned int c = 0; c<_spectrum; c+=letter._spectrum) {
if (c) letter = font[ch];
const unsigned int cmin = std::min(_spectrum - c,letter._spectrum);
if (foreground_color[c]!=255)
for (unsigned int d = 0; d<cmin; ++d) letter.get_shared_channel(d)*=foreground_color[c + d]/255.0f;
for (unsigned int d = 0; d<cmin; ++d)
if (foreground_color[c + d]!=255)
letter.get_shared_channel(d)*=foreground_color[c + d]/255.0f;

if (mask) { // Letter with alpha
if (background_color)
for (unsigned int d = 0; d<cmin; ++d)
Expand Down

0 comments on commit 63b3480

Please sign in to comment.