Code: Select all
using (PixelCollection pc = img.GetPixels())
{
int channelsCount = pc.Channels;
for (int y = 0; y < img.Height; y++)
{
var pcv = pc.GetArea(0, y, img.Width, 1);
for (int x = 0; x < pcv.Length; x += channelsCount)
{
Code: Select all
using (PixelCollection pc = img.GetPixels())
{
int channelsCount = pc.Channels;
for (int y = 0; y < img.Height; y++)
{
var pcv = pc.GetArea(0, y, img.Width, 1);
for (int x = 0; x < pcv.Length; x += channelsCount)
{