Click here to Skip to main content
15,894,825 members
Articles / Multimedia / GDI

Image Per Pixel Enumeration, Pixel Format Conversion and More

Rate me:
Please Sign up or sign in to vote.
4.93/5 (26 votes)
20 Jun 2013CPOL7 min read 85.1K   3.5K   53  
A set of handy extension methods to help you with quick Image modifications
using System;
using System.Runtime.InteropServices;

namespace ImagePixelEnumerator.Helpers.Pixels.Indexed
{
    [StructLayout(LayoutKind.Sequential, Size = 1)]
    public struct PixelData8Indexed : IIndexedPixel
    {
        // raw component values
        private Byte index;

        // index methods 
        public Byte GetIndex(Int32 offset) { return index; }
        public void SetIndex(Int32 offset, Byte value) { index = value; }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Czech Republic Czech Republic
Contacts: EMAIL - smartk8@gmail.com

Comments and Discussions