Thread Subject: copy image data to clipboard

Subject: copy image data to clipboard

From: jay vaughan

Date: 12 May, 2008 16:56:04

Message: 1 of 3

Hi,

I have an image in an axes in a GUI that has various buttons
and text boxes, etc. I would like to copy the image data to
the clipboard, but without the buttons and text boxes.

At present, the only way I found to do this was to get the
CData from the axes in the GUI, create a new figure with
only the CData in it, print the image to the clipboard, and
finally close the figure. Isn't there a more direct way to
do this? Having a temporary figure flash on the screen seems
a little dodgy... [code at bottom]

Thanks,
J


I also found another person's (unanswered) post on basically
the same question.

http://www.mathworks.com/matlabcentral/newsreader/view_thread/159605#402259


CData = get(get(handles.axes1,'children'),'CData');
sz = size(CData);
h = figure;
imshow(CData)
set(gcf,'position',[100 100 sz(2) sz(1)])
set(gca,'position',[0 0 1 1])
print -dbitmap -r300
close(h)

Subject: copy image data to clipboard

From: Alessandro Mura

Date: 12 May, 2008 17:26:03

Message: 2 of 3

Hi,
maybe this could be of some help...

Ale

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14584&objectType=FILE

Subject: copy image data to clipboard

From: jay vaughan

Date: 12 May, 2008 18:25:06

Message: 3 of 3

"Alessandro Mura" <nospam@alessandro.mura.ifsi-roma.inaf.it>
wrote in message <g09ujb$ebc$1@fred.mathworks.com>...
> Hi,
> maybe this could be of some help...
>
> Ale
>
>
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14584&objectType=FILE

Hi Alessandro,

Thanks for the link...it could be useful for a different
application of mine, but I don't think it solves the problem
of copying CData to the clipboard.

J

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
clipboard jay vaughan 12 May, 2008 13:00:53
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com