Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Resize(int width, int height) and Grayscale effect

$
0
0
Good day,

I've been trying to convert my software from using imagemagick with command lines to magick.net dll.

So far most of them are fine but I do have issue with 2 functions:
  • Resize(int width, int height)
using (MagickImage image = new MagickImage(pathToPhotoInString))
{
    image.Resize(2100, 1400);
    return image.ToBitmap();
}
This resize method would cause my generated image to be all black when I call bitmap.Save(filePath) method, dimension is correct though.
  • Grayscale effect
I do have a grayscale function in my software which I used to call in command line with below
convert source.jpg -grayscale Rec709Luminance destination.jpg
I've looked into functions provided but I couldn't fine any similar function which I can generate the same effect, could you please guide me on this?

Thank you very much.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>