DocumentationDynamic Media Image Serving and Rendering API

fmt

Last update: July 31, 2024
  • Topics:
  • Dynamic Media Classic,SDK/API

CREATED FOR:

  • Developer
  • User

Response Image Format.

fmt=format[, [pixelType],[compression]]

format – avif-alpha | avif | eps | f4m | gif-alpha | gif | heic | jpeg | jpeg2000-alpha | jpeg2000 | jpegxr-alpha | jpegxr | jpg | m3u8 | pdf | pjpeg | png-alpha | png | png8-alpha | png8 | swf-alpha | swf | swf3-alpha | swf3 | tif-alpha | tif | web-alpha | webp

formatDescription
avif-alphaLossy and lossless AVIF with alpha channel.
avifLossy and lossless AVIF.
epsUncompressed binary Encapsulated PostScript.
f4mFlash Streaming Server manifest format.
gif-alphaGIF with 2 to 255 colors plus key-color transparency.
gifGIF with 2 to 256 colors.
heicLossless HEIC. This format is downloaded by default from the browser if it is not supported.
jpegLossy JPEG.
jpeg2000-alphaLossy and lossless JPEG 2000 with alpha channel.
jpeg2000Lossy and lossless JPEG 2000.
jpegxr-alphaLossy and lossless JPEG XR with alpha channel.
jpegxrLossy and lossless JPEG XR.
jpgLossy JPG.
m3u8Apple Streaming Server manifest format.
pdfImage embedded in PDF.
pjpegProgressive JPEG.
png-alpha24-bit lossless PNG with alpha channel.
png24-bit lossless PNG.
png8-alpha8-bit lossless PNG with alpha channel.
png88-bit lossless PNG.
swf-alphaLossy JPEG and a deflate-compressed mask embedded into an Adobe AS2 swf file.
swfLossy JPEG embedded into an Adobe AS2 swf file.
swf3-alphaLossy JPEG and a deflate-compressed mask embedded into an Adobe AS3 swf file. Note: swf and swf-alpha formats are best used for ActionScript 2 applications (Flash Player 8 and earlier). The formats swf3 and swf3-alpha are recommended for use for ActionScript3 applications (Flash Player 9 and later).
swf3Lossy JPEG embedded into an Adobe AS3 swf file.
tif-alphaTIFF with alpha channel.
tifTIFF.
webp-alphaLossy and lossless WebP with alpha channel.
webpLossy and lossless WebP.

pixelType – rgb | gray | cmyk

pixelTypeDescription
cmykReturn CMYK image data.
grayReturn gray-scale image data.
rgbReturn RGB image data.

compression – jpeg | lossy | lossless | lzw | none | zip

compressionDescription
jpegJPEG compression (lossy).
lossyJPEG 2000, and JPEG XR compression (lossy), and WebP.
losslessHEIC, JPEG 2000, and JPEG XR compression (lossless), and WebP.
lzwLZW (Lempel-Ziv-Welch) compression (lossless).
noneUncompressed.
zip“Deflate” compression (lossless).
  • format specifies the image encoding format for image data sent to the client and the corresponding response MIME type for the HTTP response header.

  • pixelType can be used to effect output color space conversion when icc= is not specified.

    The default color profile corresponding to pixelType is applied. If color management is disabled, naïve conversion is applied. pixelType is ignored when icc= is specified, which determines the output pixel type.

  • compression is permitted only if tif, tif-alpha, pdf, webp, webp-alpha, jpeg2000, jpeg2000-alpha, jpegxr, or jpegxr-alpha is specified as the format. Refer to the table below for the compression options supported for these image formats.

You can use qlt= to set the JPEG encoding options for these formats: JPEG, TIFF with JPEG compression, PDF with JPEG compression, and SWF. WebP, JPEG 2000, and JPEG XR also use qlt= but the values result in different qualities for the different formats. Use quantize= if fmt=gif or fmt=gif-alpha. Refer to the command descriptions for details. The other formats do not have settable options.

8 bits per pixel component are returned for all formats and pixelTypes (8 bits per pixel for GIF).

The following table lists the valid combinations of *format*and pixelType, the corresponding HTTP response MIME types, whether ICC profiles can be embedded (see iccEmbed=), and what format-specific options you can apply.

format
pixelType
Response MIME type
Embed ICC profile
Options
avif, avif-alpha
rgb
<image/avif>
No

compression ( lossy , lossless )

qlt= is ignored for lossless .

Because there is no concept of chrominance downsampling with the WebP format, if you use a second value with qlt (for example, qlt=80,1 ) the second value ( 1 ) is ignored.

eps
rgb, gray, cmyk
<image/eps>
Yes
pathEmbed=
gif, gif-alpha

rgb, gray

Data is converted to palette after conversion to gray or rgb.

<image/gif>
No
quantize=
heic
rgb
<image/heic>
No
jpeg2000, jpeg2000-alpha
rgb, gray
<image/jp2>
No

compression ( lossy , lossless )

qlt= is ignored for lossless .

Because there is no concept of chrominance downsampling with the WebP format, if you use a second value with qlt (for example, qlt=80,1 ) the second value ( 1 ) is ignored.

jpeg, jpg, pjpeg
rgb, gray, cmyk
<image/jpeg>
Yes

pathEmbed= , pscan= , qlt= , xmpEmbed=

The pscan= parameter applies only to pjpeg format.

jpegxr, jpegxr-alpha
rgb
<image/vnd.ms-photo>
No

compression ( lossy , lossless )

qlt= is ignored for lossless .

Because there is no concept of chrominance downsampling with the WebP format, if you use a second value with qlt (for example, qlt=80,1 ) the second value ( 1 ) is ignored.

pdf
rgb, gray, cmyk
<application/pdf>
Yes

compression

( none|zip|jpeg ), qlt=

qlt= is ignored unless compression is set to jpeg .

png8, png8-alpha
rgb
<image/png>
Yes
png, png-alpha
rgb, gray
<image/png>
Yes
swf,swf3, swf-alpha, swf-alpha3
rgb, gray
<application/x-shockwave-flash>

No

Note: The Adobe Flash Player ignores embedded ICC profiles.

qlt= , attribute::TrustedDomains
tif, tif-alpha
rgb, gray, cmyk
<image/tiff>
Yes

compression

( none|lzw|zip|jpeg )

'tiff' only; 'tiff-alpha' does not support jpeg compression.

qlt=

qlt= is ignored unless compression is set to jpeg .

, pathEmbed=, xmpEmbed=

webp, webp-alpha
rgb
<image/webp>
No

compression ( lossy , lossless )

qlt= is ignored for lossless .

Because there is no concept of chrominance downsampling with the WebP format, if you use a second value with qlt (for example, qlt=80,1 ) the second value ( 1 ) is ignored.

Properties

Request attribute. Applies regardless of current layer setting if req=img (default) or req=mask; ignored otherwise.

type is ignored if iccProfile= is specified.

Default

fmt=jpeg, *defaultType*,none, where the defaultType is handled as follows: If icc= is specified, defaultType corresponds to the pixel type of the specified ICC profile. If icc= is not specified, defaultType is gray if req=mask, otherwise it is rgb.

Examples

Request a small, low-quality preview image in JPEG format (default):

http:// *server*/myRootId/myImageId?qlt=60&wid=200

Request the same image converted to gray-scale:

http:// *server*/myRootId/myImageId?fmt=jpeg,gray&qlt=60&wid=200

Request the same image in a loss-less format with alpha channel and at high resolution:

http:// *server*/myRootId/myImageId?fmt=png-alpha&wid=300

Request the alpha channel for the same image as a gray-scale TIFF image:

http:// *server*/myRootId/myImageId?req=mask&fmt=tif,gray&wid=300

Convert the same image to cmyk using the default ICC profiles:

http:// *server*/myRootId/myImageId?fmt=tif,cmyk&wid=300

Convert the same image to cmyk using a different ICC profile and embed the profile in the TIFF image:

http:// *server*/myRootId/myImageId?fmt=tif&wid=300&icc=myPrinterProfile&iccEmbed=1

Deliver this image as a TIF file with JPEG compression without pixel type conversion:

http:// *server*/myRootId/myImageId?fmt=tif,,jpeg&qlt=95&wid=300

Convert image to a bi-tonal GIF with key-color transparency and force colors to black and white:

http:// *server*/myRootId/myImageId?fmt=gif-alpha&wid=100&quantize=adaptive,off,2,000000,ffffff

Lossy with a quality setting of 80:

http:// *server*/myRootId/myImageId?wid=300&fmt=webp&qlt=80

Lossless with alpha:

http:// *server*/myRootId/myImageId?wid=300&fmt=webp-alpha,,lossless

Lossy with a quality setting of 80:

http://server/myRootId/myImageId?wid=300&fmt=jpeg2000&qlt=80

Lossless with alpha:

http://server/myRootId/myImageId?wid=300&fmt=jpeg2000-alpha,,lossless

Lossy with a quality setting of 80:

http://server/myRootId/myImageId?wid=300&fmt=jpegxr&qlt=80

Lossless with alpha:

http://server/myRootId/myImageId?wid=300&fmt=jpegxr-alpha,,lossless

See also

qlt= , quantize=, req=, icc=, iccEmbed=, pathEmbed=, pscan.

recommendation-more-help
a26166cd-f2f4-45ce-996d-96a0f0d6cf49