magick.net

How to adjust jpeg quality with Magick.Net

最后都变了- 提交于 2019-12-05 17:51:35
问题 I am trying to set the image quality of two images appended to one another to 10% and resize the images to 40x40. using (var images = new MagickImageCollection {designFile, swatchFile}) { MagickImage sprite = images.AppendHorizontally(); sprite.Format = MagickFormat.Jpeg; sprite.SetOption(MagickFormat.Jpeg, "quality", "10%"); sprite.SetOption(MagickFormat.Jpeg, "size", "40x40"); ; sprite.Write(spriteFile); } Unfortunately the SetOption and Format calls don't seem to be affecting the file that

How to adjust jpeg quality with Magick.Net

こ雲淡風輕ζ 提交于 2019-12-04 01:54:49
I am trying to set the image quality of two images appended to one another to 10% and resize the images to 40x40. using (var images = new MagickImageCollection {designFile, swatchFile}) { MagickImage sprite = images.AppendHorizontally(); sprite.Format = MagickFormat.Jpeg; sprite.SetOption(MagickFormat.Jpeg, "quality", "10%"); sprite.SetOption(MagickFormat.Jpeg, "size", "40x40"); ; sprite.Write(spriteFile); } Unfortunately the SetOption and Format calls don't seem to be affecting the file that is written to sprite.Write() ? dlemstra The method SetOption is the same as -define in ImageMagick.

How to set profile using Magick.net in the same way using Image Magick?

若如初见. 提交于 2019-12-02 03:07:08
I convert image based on CMYK to image based on RGB in the following way using ImageMagick(command Line) : convert.exe -profile icc:JapanColor2001Coated.icc -colorspace cmyk input.jpg -profile icc:sRGB.icc -colorspace sRGB output.jpg And I challenge to convert image based on CMYK to image based on RGB in the following way using Magick.net I show my sorce code below : private MagickImage convertCMYKToRGB(MagickImage image) { image.AddProfile(new ColorProfile(@"C:\sRGB.icc")); image.ColorSpace = ColorSpace.sRGB; return image; } but converted image using Image Magick(command line) is different

How to set profile using Magick.net in the same way using Image Magick?

时光总嘲笑我的痴心妄想 提交于 2019-12-01 06:54:43
问题 I convert image based on CMYK to image based on RGB in the following way using ImageMagick(command Line) : convert.exe -profile icc:JapanColor2001Coated.icc -colorspace cmyk input.jpg -profile icc:sRGB.icc -colorspace sRGB output.jpg And I challenge to convert image based on CMYK to image based on RGB in the following way using Magick.net I show my sorce code below : private MagickImage convertCMYKToRGB(MagickImage image) { image.AddProfile(new ColorProfile(@"C:\sRGB.icc")); image.ColorSpace

Apply watermark on image using imagemagick.net in c#

扶醉桌前 提交于 2019-11-30 10:39:27
I am using the following code to resize the image. Now, i need to apply the watermark on this image using Magick.NET . var response = client.GetObject(request).ResponseStream; MagickImage image = new MagickImage(response); MagickGeometry size = new MagickGeometry(imgWidth, imgHeight); size.IgnoreAspectRatio = maintainAspectRatio; image.Resize(size); Bitmap watermarkObj = (Bitmap)Bitmap.FromFile("G:/Images/watermark.png"); Graphics imageGraphics = Graphics.FromImage(image.ToBitmap()); Point point = new Point(image.Width - 118, image.Height - 29); imageGraphics.DrawImage(watermarkObj, point);

Apply watermark on image using imagemagick.net in c#

主宰稳场 提交于 2019-11-29 15:52:03
问题 I am using the following code to resize the image. Now, i need to apply the watermark on this image using Magick.NET. var response = client.GetObject(request).ResponseStream; MagickImage image = new MagickImage(response); MagickGeometry size = new MagickGeometry(imgWidth, imgHeight); size.IgnoreAspectRatio = maintainAspectRatio; image.Resize(size); Bitmap watermarkObj = (Bitmap)Bitmap.FromFile("G:/Images/watermark.png"); Graphics imageGraphics = Graphics.FromImage(image.ToBitmap()); Point