get_image_channel_order

Return the image channel data order.

int get_image_channel_order ( image2d_t image)
int get_image_channel_order ( image3d_t image)

Description

Return the image channel order. Valid values are:


CLK_A
CLK_R
CLK_RG
CLK_RA
CLK_RGB
CLK_RGBA
CLK_ARGB
CLK_BGRA
CLK_INTENSITY
CLK_LUMINANCE

Notes

The following table describes the mapping of the number of channels of an image element to the appropriate components in the float4, int4 or unsigned int4 vector data type for the color values returned by read_image{f|i|ui} or supplied to write_image{f|i|ui}. The unmapped components will be set to 0.0 for red, green and blue channels and will be set to 1.0 for the alpha channel.

Channel Order float4, int4 or unsigned int4 components of channel data
CL_R (r, 0.0, 0.0, 1.0)
CL_A (0.0, 0.0, 0.0, a)
CL_RG (r, g, 0.0, 1.0)
CL_RA (r, 0.0, 0.0, a)
CL_RGB (r, g, b, 1.0)
CL_RGBA, CL_BGRA, CL_ARGB (r, g, b, a)
CL_INTENSITY (I, I, I, I)
CL_LUMINANCE (L, L, L, 1.0)

Specification

OpenCL Specification

Also see

Image Functions

Copyright © 2007-2009 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.