Re: Copy image to clipboard
Re: Copy image to clipboard
- Subject: Re: Copy image to clipboard
- From: Walter Ian Kaye <email@hidden>
- Date: Thu, 1 Apr 2004 00:59:02 -0800
At 10:32a +0200 04/01/2004, Brennan didst inscribe upon an electronic papyrus:
On 31/3/04 at 13:32, Walter Ian Kaye
<email@hidden> wrote:
> Converting the file to PICT will work, if you remember to read
> the PICT file starting at byte 513. Also be sure you do not
> have the field selected if you do a 'set' command. This was my
> test:
>
> set fpath to "path:to:PICT" set fdata to read file fpath as
> picture from 513
What a juicy tidbit! How did you find this out? Why 513?
I think it was on the MacScrpt (dartmouth) list, several years ago.
Every PICT file has a 512-byte header for graphics apps to store
stuff in, so we skip the file header to get to the actual picture
data.
Are there other 'special offsets' or tricks for reading given file types-
For example, can you read a file as a QuickTime movie thus forcing the
Quicktime importer to handle a MIDI or PDF file or whatever?
Not that I know of, but then PICT is the native picture type.
Presumably you can also use chevron-syntax for the 'as' parameter, thus
allowing a script to coerce a file to any known and compatible datatype.
True; I just don't know where else to make use of that (aside from
defining your own of course, but I know you mean standard types).
(So my next question: Where do we get a list of those?)
Well, there's 'TIFF picture' as well, which I discovered by browsing
various AppleScript system resources. I don't know of any others
offhand.
-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.