Image and Player Image Problems

Klaus Major klaus at major-k.de
Thu Aug 4 11:16:55 EDT 2005


Hi David,

> Hi,
>
> I have a Player object which I use to display a TIFF file, I use  
> the following code to do this and all works fine:
> set the fileName of player 1 to "A-TIFF-File.tif"
> Which works fine.
> However I want to be able to get the imageData of the image that is  
> being displayed.
> On an image object the following works:
> put the imageData of image 1 into myImageData
> However the same does not work for a player object.
> How do I get the Image Data for a Player Object?

well, technically this is a video for Rev and no image ;-)

You could:

1. Import a snapshot into your image, if possible...

2. Create a temporary** JPG or PNG image with "AppleScript" and  
"Image Events",
if you are on Mac OS X, and import that one into your image.

**Use a something with "the tempname" for this purpose

Little example script, just change the paths:

############
tell application "Image events"
launch
set myimage to open "/Users/klaus/Pictures/PHTO0011.tif"
save myimage as JPEG in "/Users/klaus/Desktop/testbild.jpg"
close myimage
end tell
###########

You can save as:
BMP
JPEG
JPEG2
PICT
PNG
PSD
QuickTime Image
TIFF

I am not sure if this will work with OS X < 10.4!

3. Like Nr. 2 but with Trevor's wonderful Enhanced Quicktime External.

Hope that helps.

> Thanks in Advance
> Dave

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list