Problems with the Export command

Richard Gaskin ambassador at fourthworld.com
Wed Jun 9 01:47:46 EDT 2004


Howard Bornstein wrote:

> I select an image in my stack and from the message box execute: export  
> JPEG  to file "mytest2.jpg"
> 
> This should export the image as a JPEG to the defaultfolder. In fact, 
> this file does appear in the default folder, but neither Preview nor 
> PhotoShop can parse the image (Preview says "File Error. Could not open 
> file. It may be corrupt or a file format that Preview doesn't recognize").

It's generating a PPM file, or so sez GraphicConverter.

It appears to be a problem with the interpreter, and fortunately not 
with the underlying JPEG mechanism.

The problem seems limited to this form:

   export <format> to file <path>

But I just tried the other form shown in the Transcript Dictionary:

   export <imageDescriptor> to file <path> as <format>

...and it seems to work, apparently routing the command to the 
appropriate compressor, e.g.:

    export img 1 to file "mytest2.jpg" as jpeg
    export img "MyImage" to file "mytest2.png" as png

If you want it to work by selection you could use:

    export the selectedObject to file "mytest1.jpg" as "jpeg"

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________
  Rev tools and more:  http://www.fourthworld.com/rev


More information about the use-livecode mailing list