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

New Post: How to Change the color of each pixel in a image

$
0
0
Hi everyone, I'm new to the Magick.Net. I tried to change the color of each pixel in the image but there's no change in the new image. Here's my code. Could anyone tell me what's going on? Thanks a lot.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ImageMagick;
namespace MagickTutor
{
    class Program
    {
        static void Main(string[] args)
        {
            MagickImage image = new MagickImage();
            image.Read("C:\\.....\\test1.png");
            foreach (Pixel p in image.GetWritablePixels()) {
                p.SetChannel(0, 65535);
            }
            image.Write("C:\\.....\\test2.png");
        }
    }
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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