Skip to content

Black foreground, white background #1630

Answered by dlemstra
onurdumangoz asked this question in Help
Discussion options

You must be logged in to vote

It looks like you found a bug in the code. While writing an answer I figured out there was a bug in the code of the .Clut method. This has been fixed an will become available in the next release. After that release you can do this:

using var image = new MagickImage("im-logo-1.png");
using var clutImage = new MagickImage("xc:black", 1, 1);
image.Clut(clutImage, Channels.RGB); // This overload will also be added and in the current release the channels are used incorrectly.
image.Alpha(AlphaOption.Remove);
image.Write("im-logo-2.png");

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@onurdumangoz
Comment options

@alexlezam
Comment options

@dlemstra
Comment options

Answer selected by onurdumangoz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants