This is an old tool written to play with OpenCL on x86_64 and aarch64 machines.

https://github.com/nakane1chome/opencl-learn/tree/master

ImageXform is a command-line tool for learning and experimenting with OpenCL by applying GPU-accelerated kernels to images. It provides a visual, interactive way to understand OpenCL programming by transforming PNG or JPG images through custom or example kernels.

The tool handles all the OpenCL and image conversion boilerplate (device selection, context creation, buffer management) so the kernel can be launched and results inspected.

Designed for learning OpenCL concepts like parallel processing, memory management, and kernel optimization through immediate visual feedback.

Code and build system has been slight modernized after fixing a few bugs.

Example Usage

Transform an image to grayscale:

# Build the project (one-time setup)
make build-amd64

# Run grayscale conversion
cd build.amd64/imgxform
./imagexform -p grayscale.cl -i test_in.png -o output_gray.png

# The tool will:
# 1. Load test_in.png
# 2. Compile grayscale.cl kernel
# 3. Execute it on your OpenCL device (GPU/CPU)
# 4. Save the result to output_gray.png

You can substitute any .cl kernel file to experiment with different transformations like edge detection (edge_3x3.cl) or create your own custom kernels.