RunMat
GitHub

image — Display indexed or truecolor images as graphics objects with MATLAB image semantics and GPU-backed rendering paths.

image displays indexed or truecolor image data as a plotting object rather than as a detached bitmap. In RunMat it returns an image handle, uses the shared flattened surface/image-mode rendering path, and supports both host and GPU-backed truecolor or indexed-image workflows while preserving MATLAB image semantics around graphics-object behavior and axes placement.

How image works in RunMat

  • image(C) displays image data using implicit axes; image(X, Y, C) places the image explicitly on the target axes.
  • Indexed images and truecolor images both use the shared surface/image rendering architecture.
  • The returned value is an image-handle object that works with get and set.
  • image is object-oriented and placement-oriented; use imagesc when you specifically want scaled matrix visualization with color mapping semantics.
  • Dedicated GPU-backed paths cover both indexed and truecolor image inputs when plotting-compatible buffers are available.

How image runs on the GPU

Indexed images and truecolor images both have dedicated GPU-aware rendering paths in the image stack.

Image handle behavior, axes placement, and replay/export semantics remain aligned across GPU and fallback paths.

GPU memory and residency

image preserves GPU residency when the image pipeline can consume exported indexed or truecolor image buffers directly. If the active combination cannot stay on the direct path, RunMat gathers once and renders the same image-object semantics on the fallback path.

Examples

Display a simple indexed image

C = [1 2 3; 3 2 1; 2 3 1];
image(C);
colormap('jet');

Display a truecolor RGB image

img = zeros(100, 100, 3);
img(:,:,1) = 1;
img(25:75,25:75,2) = 1;
image(img);

Expected output:

% Displays a truecolor image object

Position an image explicitly on axes and inspect the handle

C = reshape(1:16, 4, 4);
h = image([0 3], [10 40], C);
get(h, 'Type')

Expected output:

ans =
    'image'

These functions work well alongside image. Each page has runnable examples you can try in the browser.

imagesc, colormap, colorbar, get, set

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how image works, line by line, in Rust.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code — faster, on any GPU, with no license required.

  • Simulations that took hours now take minutes. RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed.
  • Start running code in seconds. Open the browser sandbox or download a single binary. No license server, no IT ticket, no setup.
  • A full development environment. GPU-accelerated 2D and 3D plotting, automatic versioning on every save, and a browser IDE you can share with a link.

Getting started · Benchmarks · Pricing

Try RunMat — free, no sign-up

Start running MATLAB code immediately in your browser.