308 #define kImage_Data_(IMAGE) kxImage_Data_(IMAGE)
309 #define kImage_DataSize_(IMAGE) kxImage_DataSize_(IMAGE)
310 #define kImage_At_(IMAGE, X, Y) kxImage_At_(IMAGE, X, Y)
311 #define kImage_RowAt_(IMAGE, Y) kxImage_RowAt_(IMAGE, Y)
312 #define kImage_PixelType_(IMAGE) kxImage_PixelType_(IMAGE)
313 #define kImage_PixelSize_(IMAGE) kxImage_PixelSize_(IMAGE)
314 #define kImage_Width_(IMAGE) kxImage_Width_(IMAGE)
315 #define kImage_Height_(IMAGE) kxImage_Height_(IMAGE)
316 #define kImage_Area_(IMAGE) kxImage_Area_(IMAGE)
317 #define kImage_Stride_(IMAGE) kxImage_Stride_(IMAGE)
318 #define kImage_PixelFormat_(IMAGE) kxImage_PixelFormat_(IMAGE)
319 #define kImage_Cfa_(IMAGE) kxImage_Cfa_(IMAGE)
322 #define kImage_As_(IMAGE, X, Y, TYPE) kxImage_As_(IMAGE, X, Y, TYPE)
328 #include <kApi/Data/kImage.x.h>
kStatus kImage_Assign(kImage image, kImage source)
Copies a given source image into this image.
kStatus kImage_SetPixel(kImage image, kSize x, kSize y, const void *pixel)
Sets the value of a pixel.
kStatus kImage_Pixel(kImage image, kSize x, kSize y, void *pixel)
Gets the value of a pixel.
void * kImage_RowAt(kImage image, kSize y)
Returns a pointer to the specified row in the pixel buffer.
kPixelFormat kImage_PixelFormat(kImage image)
Gets the optional pixel format descriptor associated with this image.
void * kImage_Data(kImage image)
Returns a pointer to the first row in the pixel buffer.
kSize kImage_Area(kImage image)
Returns the area of the image, in pixels.
kSize kImage_PixelSize(kImage image)
Returns the pixel size.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kStatus kImage_Construct(kImage *image, kType pixelType, kSize width, kSize height, kAlloc allocator)
Constructs a kImage object.
kSize kImage_DataSize(kImage image)
Reports the size, in bytes, of the pixel buffer.
void * kImage_At(kImage image, kSize x, kSize y)
Returns a pointer to the specified pixel in the pixel buffer.
kStatus kImage_Attach(kImage image, void *pixels, kType pixelType, kSize width, kSize height, kSize stride)
Attaches the image to an external pixel buffer.
kStatus kImage_SetCfa(kImage image, kCfa cfa)
Sets the color filter array type associated with this image.
Core Zen type declarations.
kType kImage_PixelType(kImage image)
Returns the pixel type.
kStatus kImage_Export(kImage image, const char *fileName)
Saves an image to file.
kStatus kImage_Allocate(kImage image, kType pixelType, kSize width, kSize height)
Reallocates the internal pixel buffer.
kSize kImage_Width(kImage image)
Returns the width of the image, in pixels.
Represents metadata about a type (class, interface, or value).
kStatus kImage_Import(kImage *image, const char *fileName, kAlloc allocator)
Loads an image from file.
Represents a 2D collection of pixels.
kCfa kImage_Cfa(kImage image)
Gets the color filter array type associated with this image.
Represents an error code.
kSize kImage_Height(kImage image)
Returns the height of the image, in pixels.
Image color filter array type.
kStatus kImage_Zero(kImage image)
Sets all pixel bits to zero.
kStatus kImage_SetPixelFormat(kImage image, kPixelFormat format)
Sets the optional pixel format descriptor associated with this image.
kSize kImage_Stride(kImage image)
Returns the size of an image row, including alignment padding bytes, in bytes.