Added PixelFormat and basic functions

to allocate and deallocate the PixelFormat.
Added types and changed needed places.
Fixed so that types got public stuff.
Added pixel operation and all functions.