NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #1134 (closed defect: fixed)

Opened 2012-04-23T15:26:52-05:00

Last modified 2012-05-18T12:21:49-05:00

Copy To System broken

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b2-bugfixes
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:


Open clows, Edit Colors - set to grayscale, Move channel slider to blue component. Run Copy To System. Exception thrown.

java.lang.IllegalArgumentException: DirectColorModel required

at ij.process.ColorProcessor.setColorModel(
at imagej.legacy.translate.ColorTableHarmonizer.setImagePlusLutToFirstInView(
at imagej.legacy.translate.ColorTableHarmonizer.updateLegacyImage(
at imagej.legacy.translate.Harmonizer.updateLegacyImage(
at imagej.legacy.plugin.LegacyPlugin.updateImagePlusesFromDisplays(
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Change History

comment:1 Changed 2012-04-23T15:28:31-05:00 by bdezonia

I found this when testing whether afraser's comment in IJ-Commands-All google document still held. His comments were:

Open [IJ2] an RGB image. and copy the green channel via copy to system. Paste into photoshop and it turns out that the red channel was copied. -- I have a gripe with this feature anyway since what you see isn't necessarily what you get, and since it should probably be automatically done when "copy" is done.

comment:2 Changed 2012-04-23T15:34:37-05:00 by bdezonia

This exception also happens if you run the Clear or Clear outside legacy plugins on clown

comment:3 Changed 2012-04-24T11:17:52-05:00 by bdezonia

Exception fixed, Clear, Clear Outside, and Copy to System now all run.

Cannot determine if copy to system works. I have yet to be able to find an app on Linux that will paste anything any data (or else its pasting an all white image).

comment:4 Changed 2012-04-26T10:38:13-05:00 by bdezonia

open clown and then copy to system. Exception thrown (listed below). Note that the exception line is the same as the show lut exception. Both of them do stuff like this:

Image img = IJ.getInstance().createImage(w, h);
Graphics g = img.getGraphics();

And the returned img is null thus causing the exception on the getGraphics() call.

See also ticket #966.


at ij.plugin.Clipboard.getTransferData(
at sun.awt.datatransfer.DataTransferer.translateTransferable(
at sun.awt.datatransfer.DataTransferer$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$000(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

Last edited 2012-04-26T10:39:17-05:00 by bdezonia

comment:5 Changed 2012-04-26T10:53:33-05:00 by bdezonia

I've verified that code that gives rise to #966 and #1134 are the only two places in IJ1 where this is the case.

comment:6 Changed 2012-04-26T16:14:20-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta2 to imagej-2.0.0-beta3

comment:7 Changed 2012-04-27T11:11:59-05:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

With 3db7276d884c87dba281274097094fecc3f79951 Copy To System functionality replaced by pure IJ2 plugin.

comment:8 Changed 2012-05-18T12:21:49-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta2