vignette effect

May 27, 2013 at 12:41 PM

Sorry for the complete newbie question and most of all many thanks for this absolute great project!

I am trying to do something along the lines below and currently use convert.exe via a shell process called from the C# code:

( -size 960x960 radial-gradient:none-black -gravity center -crop 640x640+0+0 +repage ) -compose multiply -flatten

Is there any way to mirror such with Magick.NET?

Many thanks for the advice & all the best!
May 27, 2013 at 6:33 PM
At this moment it is not possible. With changeset 26420 I resolved this issue but you have to wait for the next release (prob. next week) before you can use it.

I am not sure if this gives you the same result but it should be something like this:
using (MagickImageCollection images = new MagickImageCollection())
  MagickReadSettings settings = new MagickReadSettings();
  settings.Width = 960;
  settings.Height = 960;
  MagickImage radialGradient = new MagickImage("radial-gradient:none-black", settings);
  radialGradient.Crop(640, 640, Gravity.Center);
  MagickImage input = new MagickImage("input.jpg");
  input.Compose = CompositeOperator.Multiply;
  using (MagickImage output = images.Merge(LayerMethod.Flatten))
May 27, 2013 at 8:10 PM
Hi dlemstra,

Many thanks for the reply and looking forward to the next release!

This is really great!