How to load/use an 2D image?

I have struggled to find a simple example which shows how to load an image using Image2D and use it in the kernel.
E.g. say i have an image which is made of an unsigned char*, how would i use Image2D to load this?
Than how would i use this image in the kernel?
I have seen something like this:

__kernel void(image2d_t image){


But how would i get each image pixel and modify it?

You can read everything about Images here:

Sorry, basic image usage is here:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.