This project has moved. For the latest updates, please go here.

MagickImage Extent adds black line at top of image

Oct 15, 2014 at 12:48 AM
I am doing the following to resize an image. When doing this, it adds a black like at the top of the image, even though the fill color is white.
        MagickImage from = new MagickImage(strTempFile);
        from.Extent(MaxWidth, MaxHeight, Gravity.Center, new MagickColor(Color.White));
        if (strNewExt.ToLower() == ".tiff"
        || strNewExt.ToLower() == ".tif")
Oct 15, 2014 at 4:33 PM
Edited Oct 16, 2014 at 4:43 AM
This seems to be a CMYK bug in ImageMagick7. If you change the ColorSpace of your image to ColorSpace.RGB before you extent the image it will set the correct color. If you need to keep CMYK you will have to wait for the next release that will include a fix for this.
Oct 15, 2014 at 6:11 PM
Your idea worked perfectly! It does look like a bug in ImageMagick. Thanks! I no longer have the black lines!