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

New Post: Simple Composite producing image that looks "inverted"

$
0
0
This should be simple enough, I thought. I really didn't change much from the code I was working with yesterday.

The two images are writing out. The background image looks fine. But the image on top looks like a negative

Image
using (MagickImageCollection images = new MagickImageCollection())
                    {
                        string appPath = Path.GetDirectoryName(Application.ExecutablePath);
                            
                        //add the bg image
                        MagickImage background = new MagickImage(Path.Combine(appPath, "background-V.jpg"));
                        images.Add(background);

                        //add the customer's image
                        MagickImage image = new MagickImage(newFile);
                        image.Border(10);
                        image.BorderColor = Color.White;
                        images.Add(image);


                        //do the composite and write over the image
                        background.Composite(image, Gravity.Center, CompositeOperator.Over);
                        string outputDir = @"c:\workspace\HFPoutput";
                            if (!Directory.Exists(outputDir))
                            {
                                Directory.CreateDirectory(outputDir);
                            }
                        background.Write(Path.Combine(outputDir, Path.GetFileName(newFile)));

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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