Copy & Paste images with Julia


pkg> add ImageClipboard

Basic usage

Just like clipboard in InteractiveUtils deals with string contents, this package provides clipboard_img to work with image contents:

using Images, ImageClipboard

# Create a random image
img = rand(RGB{N0f8}, 100, 200)

# Copy the image to the clipboard

# Paste the image from the clipboard
img2 = clipboard_img()

# These are the same images
img == img2  # true

Sample screenshots

Copy an image

Paste an image

Julia Compatibility

For Julia versions older than v"1.3", you need to manually install the image IO backend ImageMagick.jl first.

  • ClipData.jl enables users to copy/paste to/from Excel, Google Sheets, and other tabular data sources into interactive Julia sessions.