- NAME
- still image formats supported by the photo interface added by
QuickTimeTcl
- SYNOPSIS
- package require QuickTimeTcl ?version?
- image create photo ?imageName? -file fileName
?-format formatName?
- imageName write fileName ?-format formatName?
- DESCRIPTION
- KEYWORDS
image create photo formats option.
- package require QuickTimeTcl ?version?
- image create photo ?imageName? -file fileName
?-format formatName?
- imageName write fileName ?-format formatName?
The QuickTimeTcl package supports a number of still image formats via the
standard photo command. Only file import/export is supported. No string
based import/export is supported. This excludes commands as imageName
data, and image create photo imageName -data
string.
The import format supported is quicktime. Use
image create photo imageName -file fileName
-format quicktime to specify a QuickTime graphics importer.
Since both Tk and QuickTimeTcl supports GIF images, it is necessary to
specify -format gif in order to use the Tk's image importer, and
-format quicktime to use QuickTime.
When exporting via the write command, there are several ways to do it.
If no format is specified, then Tk's standard method is used which means
that a GIF image is written.
With QuickTimeTcl you may specify the
precise image format wanted. The following values for the -format option
are supported:
- quicktimebmp : BMP format
- quicktimejfif : JFIF format
- quicktimejpeg : JPEG format
- quicktimemacpaint : MacPaint format
- quicktimephotoshop : PhotoShop format
- quicktimepng : PNG format
- quicktimepict : QuickDraw PICT format
- quicktimequicktimeimage : QuickTime image format
- quicktimesgiimage : Silicon Graphics format
- quicktimetargaimage : Targa format
- quicktimetiff : TIFF format
For each of these formats you may display a compression dialog for setting
various format specific parameters by appending a list element -dialog
to the format name. For instance, to export an image into a JPEG file
using a dialog, use -format {quicktimejpeg -dialog}. Not all formats
support dialogs.
Sorry for the syntax being a bit nonstandard, but that's because the
image command has limited customization possibilities.
The other alternative is to use -format {quicktime -dialog}.
Then a "Save As..." dialog is shown, where the initial file name is the one
given in the command, possibly with an extension appended. In the dialog
the user can select from a number of image formats, and for some of them,
additional characteristics may be given in separate dialogs. It is also
possible to change the file name and directory. If the user cancels,
the imageName write fileName command returns an error,
with the result string {0 {User canceled}}
. If the user saves
it, the selected file path is returned.
image, photo,QuickTime
Copyright © 2001-2003 Mats Bengtsson