Skip to content

Commit df65753

Browse files
hjmjohnsondzenanz
authored andcommitted
BUG: Unsigned char SetAlpha must be on scale of 0-255
1 parent a82f59e commit df65753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Core/Common/Transparency/Code.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
7171
pixel.SetRed(255);
7272
pixel.SetGreen(0);
7373
pixel.SetBlue(0);
74-
pixel.SetAlpha(0.5);
74+
pixel.SetAlpha( static_cast<unsigned char>( 0.5 * 255 ) );
7575
}
7676
imageIterator.Set(pixel);
7777

0 commit comments

Comments
 (0)