I have written a small code to create an image object in opencl as below:
img_fmt.image_channel_order = CL_R;
img_fmt.image_channel_data_type = CL_UNSIGNED_INT8;
memobj_in_luma = clCreateImage2D(p->context, CL_MEM_READ_ONLY, &img_fmt, p->width, p->height, 0, NULL, &ret);
After creating this object I want to change the image format to CL_RGBA. Is there any way to do this?