MacClipboard

leŭksman

Jump to: navigation, search
Acquire-clipboard.png

by Brion Vibber <brion at pobox.com>
Version 0.7, 2004-11-30

Based on WinClipboard by Hans Breuer

Gimp doesn't normally use the system clipboard for cut-and-pasting images, probably due to X11's traditionally cryptic clipboard system. The Windows port though has for some time shipped with a plug-in to add this support.

MacClipboard is a port of the WinClipboard plugin for Gimp 2.0 to Mac OS X; you can copy Gimp layers and paste them into Macintosh programs and paste images into Gimp from Mac programs. Access to system services for screen capture and scanning is also provided.

2006-03-04: I've done some preliminary tests on an Intel box and it seems to work (cut-and-paste to and from Cocoa apps, screen shot, Grab). Will want to double-check with some Carbon apps as well, then will fix the makefile for a universal binary version.

Contents

Download

Source and binary (compiled against Fink unstable's gimp2 package): macclipboard-gimp-0.7.tar.gz.

I haven't tested the binary extensively; it may not work with some binary installs of Gimp, but should work with Gimp.app or gimp2 installed via Fink (unstable packages).

(Gimp.app now comes with MacClipboard, but might not always have the latest version.)

Installation

The macclipboard executable should go in ~/.gimp-2.0/plug-ins, or in the system lib/gimp/2.0/plug-ins dir (eg in /sw or under Gimp.app/Contents/Resources).

Compiling the plugin requires that you have the Developer Tools installed and have either installed Gimp from source or have installed the dev package with the necessary header files.

To compile & install into ~/.gimp-2.0/plug-ins:

  make install

To compile only:

  make


Use

The plugin does not change the function of the regular cut/copy/paste commands; to copy to the system clipboard you have to use added commands:


  • Edit->Copy to clipboard: copies the current layer's contents to the clipboard
  • Edit->Paste from clipboard: pastes as a new floating selection to the image


For convenience you can assign keyboard shortcuts, like Shift+Control+C etc; just hit the desired key while the mouse is floating over the menu item.

Grab-screen.png

Also added to the toolbox:

  • Acquire->From Clipboard: opens the image on the clipboard as a new document.
  • Acquire->Grab: take a full or partial screen shot using the Grab service.
  • Acquire->Image Capture: scan via Image Capture.


Limitations

  • Cut-n-paste
    • Right now you can only paste directly into RGB and grayscale images; you cannot paste into an indexed-color image (but you can copy from one).
    • Indexed images will always be copied as RGB; an indexed image won't be associated with its color palette.
    • Many classic and Carbon apps (such as Photoshop) will ignore transparency copied from Gimp; you'll get ugly black backgrounds. Pasting transparency from eg Photoshop or GraphicConverter into Gimp should work, however.
    • Transparency should work with most Cocoa apps also, but partially transparent areas may accumulate rounding errors due to conversion between premultiplied and non-premultipled alpha.
    • May be slower than necessary and hog memory on large images.
    • Sometimes the marching ants around the pasted selection show weird patterns instead of what you'd expect; it clears up when you move the selection.
  • Grab screen capture
    • No single-window capture mode available via the service.
    • Full-screen captures only one screen at a time; if you need to capture multiple monitors simultaneously, try Shift+Cmd+3. This saves a multi-page PDF which can be loaded in Gimp. (Be sure to set 72 DPI when loading)
  • Scanning
    • Doesn't work with TWAIN SANE because it can't present itself to Image Capture. Try using xscanimage instead. (I'm also working on porting the TWAIN plugin, try it if you're working on Gimp 2.1 from CVS.)

Probably lots of bugs! Please report any you find.

Version history

2004-06-13: v0.1

  • PICT copy and paste only


2004-07-01: v0.2

  • Switched to Cocoa for copying for wider compatibility (TIFF and PICT formats)
  • Convert to/from pre-multiplied alpha on copy & paste


2004-07-03: v0.3

  • Paste from TIFF source if available
  • Aquire grayscale TIFFs as new grayscale images
  • Can now paste into grayscale images from both gray and color sources
  • Detect empty alpha channel in PICT paste source (Photoshop, GraphicConverter)
  • Create alpha-less layer when pasting from alpha-less source
  • Extract TIFFs from RTFD paste source (TextEdit, Stickies)


2004-07-05: v0.4

  • Added Grab and Import Image services to the Acquire menu
  • Copy grayscale as grayscale
  • Paste mimics regular paste more closely (floating selection)
  • Uses tiles internally


2004-07-24: v0.5

  • Fixed interference from X11 clipboard (eg Gimp 2.1)
  • Added ellipses, renamed 'Import Image' to 'Image Capture' for clarity.
  • Fixed transparent paste from Photoshop, Finder


2004-09-18: v0.6

  • Set DPI for images with that info (such as from Image Capture)
  • Support pasting new 1-bit monochrome images, for scanning in line art mode.
  • Fixed progress bars broken in 0.4


2004-11-30: v0.7

  • Added support for loading PICT files
  • Fixed disabled undo on 'acquire from clipboard'
Personal tools