Pictures

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.7 (Modified)


Supported Formats

The following charts summarize the support for various picture formats on the Macintosh and Windows platforms.

Cut and Paste: Supported formats

PICTEMFWMFBITMAP
MacintoshYes---
WindowsYesYesYesYes
embedded in embedded inconverted to
PicCommentPicComment Macintosh PICT

Display: Supported formats

PICTQuickTimeembedded WMFembedded EMF
MacintoshYesYesNoNo
WindowsYesYesYesYes
+ QuickTime

About WMF files (Windows Metafile)

These files must be "positionable" files, and include a header describing the picture size and its resolution. If no header is available, 4D will not be able to read the picture file. WMF files are to the Windows platform what PICT files are to the Mac OS platform; they can contain both vectorial and bitmap data (drawing and painting) that correspond to each system. The two main advantages of WMF files on Windows are the faster display speed (no conversion is required) and their universal use. All Windows applications can export in this format.

However, keep in mind that using this format prevents you from displaying the pictures on the Macintosh platform.

About EMF files (Windows Enhanced Metafile)

This format is an improvement on WMF. Future Windows applications are likely to support it. The main advantages of this format are enhanced basic elements, such as Beziers and transformations. This format prevents you from displaying the pictures on the Macintosh platform.

Using Apple QuickTime with 4D


4D uses Apple QuickTime routines to implement picture conversion and compression in databases.

Compression

Apple has added opcodes to the original PICT specifications, so applications can handle QuickTime pictures without modification. When the application asks the system to draw a picture containing embedded QuickTime data, the bitmap is expanded and displayed if QuickTime is present; the QuickTime opcode is ignored if QuickTime is not installed.

This technology is transparent to the user and takes a minimal amount of memory, because a 1 megabyte picture can be stored in a 40 kilobyte PICT, and needs not be expanded before it is displayed.

Under Windows, 4D requires QuickTime for Windows version 4 (or above) installation, otherwise picture compression will not work. The compression codecs that can be used with the picture compression commands are provided as constants in the Picture compression constant theme.

Note: Both 4D commands requiring QuickTime but using desktop files (LOAD COMPRESS PICTURE FROM FILE and COMPRESS PICTURE FILE) will not work on Windows.

Conversion

4D commands such as WRITE PICTURE FILE allow you to convert and to save pictures to different formats. Usually, these commands require QuickTime to work. Under Windows, 4D requires QuickTime for Windows version 4 (or above) installation, otherwise picture conversion will not work.

The internal picture format is stored by QuickTime. Consequently, it is necessary to get QuickTime to read compressed or converted pictures within 4D.

QuickTime 4 Conversion Codes

Below is the standard conversion code list provided by QuickTime 4. Each code is composed of 4 characters. Please note that all machines do not offer the same codes, QuickTime 4 allows adding customized conversion routines. Use the command PICTURE TYPE LIST to know QuickTime codes available on the machine where it is executed.

QuickTime 4 CodesNames
PICTQuickDraw PICT
PICSPICS
GIFfGIF
PNGfPNG
TIFFTIFF
8BPSPhotoshop (2.5 & 3.0)
SGISilicon Graphics
BMPfBMP
JPEGJPEG
JPEGJFIF
PNTGMacPaint
TPICTGA (Targa)
qdgxQuickDraw GX Picture (if QuickDraw GX is installed)
qtifQuickTime picture
FPixFlashPix

Picture Conversion and Compression Errors

When you try to use a picture conversion or compression command and QuickTime is not installed in your system, 4th Dimension returns the error code -9955. Other errors generated by QuickTime can also be returned. You can catch these errors using an error-handling method installed with ON ERR CALL.

See Also

BLOB TO PICTURE, COMPRESS PICTURE, COMPRESS PICTURE FILE, LOAD COMPRESS PICTURE FROM FILE, Picture Operators, PICTURE PROPERTIES, Picture size, PICTURE TO BLOB, PICTURE TYPE LIST, READ PICTURE FILE, SAVE PICTURE TO FILE, WRITE PICTURE FILE.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next