Skip to main content
Version: 20 R7 BETA

GET PICTURE FORMATS

GET PICTURE FORMATS ( picture ; codecIDs )

ParameterTypeDescription
picturePicturePicture field or variable to analyze
codecIDsText arrayPicture codec IDs

Description

The GET PICTURE FORMATS command returns an array of all the codec IDs (picture formats) contained in the picture passed as parameter. A 4D picture (field or variable) can contain the same picture encoded in different formats, such as PNG, BMP, GIF, etc.

In the picture parameter, you pass a picture field or a picture variable whose included formats you want to be returned in the codecIDs array.

The codec IDs returned are established by 4D in exactly the same way as for the PICTURE CODEC LIST command. They can be returned in the following forms:

  • As extensions (for example, “.gif”)
  • As Mime types (for example, “image/jpeg”)
  • As 4-character QuickTime codes

Notes:

  • The following codecs, handled internally by 4D, are always returned as extensions: JPEG, PNG, TIFF, GIF, BMP, SVG, PDF, EMF.
  • 4-character QuickTime codes may be returned in databases where the QuickTime support compatibility option has been set (using the SET DATABASE PARAMETER command). However, QuickTime is no longer supported in 4D and we do not recommend using QuickTime codecs.

For more information about picture codec IDs, refer to the Pictures section.

Example

You want to know the picture formats stored in a field for the current record:

 ARRAY TEXT($aTPictureFormats;0)
  //Get all the formats saved
 GET PICTURE FORMATS([Employees]Photo;$aTPictureFormats)

See also