It is currently Wed May 22, 2013 10:57 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Format of SetClipboardImage()?
PostPosted: Fri Mar 16, 2012 3:58 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue May 20, 2008 2:12 am
Posts: 640
Location: Cologne, Germany
Hi there,

I tried to copy a new image to the clipboard. Then, I'd like to paste it into Preview.app using "New from clipboard", but the image won't appear.
Hope somebody knows what I am talking about. Which format does the setclipboardimage()-function copy? Why doesn't that work in Preview.app?

I used this:
Code:
If CreateImage(0, 26, 20)
    StartDrawing(ImageOutput(0))
      Box(0, 0, 26, 20, RGB(255, 255, 255))
      Circle(13, 10, 5, RGB(255, 0, 0))
    StopDrawing()
    SetClipboardImage(0)
  EndIf


Thanks in advance :-)

Edit: The format of the clipboard-image is TIFF, says Finder. Can I change this? Would be great to have .png as format for Clipboard-images :-)

_________________
Regards,
JamiroKwai

---
5.10-x64/x86 - MacBook Pro, Mountain Lion
My Blog (German): http://www.quadworks.de


Top
 Profile  
 
 Post subject: Re: Format of SetClipboardImage()?
PostPosted: Fri Mar 16, 2012 4:36 pm 
Offline
Addict
Addict

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2856
Location: Wales, UK
I think you would need to save the created image as png in order for it to be png when sent to the clipboard. On Windows, the PB functionality can be replaced with API calls - perhaps that is a possibility on Mac OS too?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
 
 Post subject: Re: Format of SetClipboardImage()?
PostPosted: Fri Mar 16, 2012 5:07 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue May 20, 2008 2:12 am
Posts: 640
Location: Cologne, Germany
IdeasVacuum wrote:
I think you would need to save the created image as png in order for it to be png when sent to the clipboard. On Windows, the PB functionality can be replaced with API calls - perhaps that is a possibility on Mac OS too?


Hi IdeasVacuum,

thanks for your answer. I doubt, that would work.
In my the App I am developing, the image is a JPG. It gets converted to TIFF while copying to clipboard.

_________________
Regards,
JamiroKwai

---
5.10-x64/x86 - MacBook Pro, Mountain Lion
My Blog (German): http://www.quadworks.de


Top
 Profile  
 
 Post subject: Re: Format of SetClipboardImage()?
PostPosted: Fri Mar 16, 2012 5:17 pm 
Offline
Addict
Addict

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2856
Location: Wales, UK
...it isn't jpg format in the (PB Help) code you posted? That said, Tiff is a good format but you don't want to convert jpg if it can be avoided. So, starting with Tiff is comparatively a good thing, unless the receiving app cannot accept Tiff of course. I'm surprised the default is Tiff, on Windows the default is bmp.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
 
 Post subject: Re: Format of SetClipboardImage()?
PostPosted: Fri Mar 16, 2012 5:23 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 814
Location: Germany
jamirokwai wrote:
I tried to copy a new image to the clipboard. Then, I'd like to paste it into Preview.app using "New from clipboard", but the image won't appear.

Perhaps it's a Lion issue. On my Snow Leopard 10.6.8 it's just
working fine. Perhaps some other MacOS X users should test
this too...


Top
 Profile  
 
 Post subject: Re: Format of SetClipboardImage()?
PostPosted: Fri Mar 16, 2012 5:46 pm 
Offline
Addict
Addict

Joined: Tue May 06, 2003 5:07 pm
Posts: 2257
Location: UK
Doesn't work here on Lion.


Top
 Profile  
 
 Post subject: Re: Format of SetClipboardImage()?
PostPosted: Fri Mar 16, 2012 10:52 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue May 20, 2008 2:12 am
Posts: 640
Location: Cologne, Germany
Ah, Lion could be the problem. Damn!
Maybe, you are right, Shardik.

_________________
Regards,
JamiroKwai

---
5.10-x64/x86 - MacBook Pro, Mountain Lion
My Blog (German): http://www.quadworks.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye