Skip to content

How can we detect the image properties #658

Answered by tonyfkchu
tonyfkchu asked this question in Help
Discussion options

You must be logged in to vote

Dear Expert,

After more study, I find a way to convert the code of Remove Background Color For Item A as follow:

Public Function RemoveBG(Fuzz As Integer) As Stream
    Dim result As Stream = New MemoryStream()
    Dim bgColor = IMImage.BackgroundColor

    IMImage.ColorFuzz = New Percentage(Fuzz)
    IMImage.Settings.FillColor = bgColor
    IMImage.Opaque(bgColor, MagickColors.White)

    IMImage.Write(result)
    Return result
End Function

Replies: 3 comments 5 replies

Comment options

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

@tonyfkchu
Comment options

@dlemstra
Comment options

Answer selected by tonyfkchu
Comment options

You must be logged in to vote
1 reply
@dlemstra
Comment options

Comment options

You must be logged in to vote
1 reply
@dlemstra
Comment options

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