Copy link to clipboard
Copied
Good day to all of You!
Does any one know if/how one can get information on the clipboard content’s measurements and most importantly icc-profile via JavaScript?
Thanks
pfaffenbichler
Copy link to clipboard
Copied
There is no way of finding out directly but you may be able to do so by:
1) Chage your Color Settings so that 'Ask When Pasting' is turned off
2) Create a new temporary document larger than you expect the clipboard to be
3) Paste in the clipboard contents.
4) Check the layer.bounds to get the size
5) Check the doc profile name to get the profile
If it can be done at all, the technique should be similar to what I've described.
Copy link to clipboard
Copied
You shouldn't have to worry about creating a new doc bigger than the one in the clipboard. A layer bounds can be larger than the document's so you can create any size doc and the pasted layer's bounds will be the size of the clipboard image.
I don't think you will have any luck with the profile. The doc profile is set when the doc is created. When pasting a mis-matched profile all you can do is convert to the doc's profile or cancel.
Copy link to clipboard
Copied
Thanks.
The bounds-issue sounds clear to me, there’s even a Clipboard-setting
for the dimensions of a new document, so actually pasting might be
unnecessary.
But regarding the profile: creating a new document will to the best of
my knowledge not automatically assume the copied content’s profile,
but the standard one – or am I overlooking something here?