size
- Topics:
- Dynamic Media Classic,SDK/API
CREATED FOR:
- Developer
- User
Layer size. Specifies the size or maximum layer size for a layer, before rotate=, perspective=, and extend= are applied to the layer.
size= *
width*, *
height*
sizeN= *
widthN*, *
heightN*
width , height | Layer size constraint in pixels (int, int, 0 or greater). |
widthN , heightN | Layer size constraint normalized relative to the layer 0 size (real, real, 0.0…1.0). |
When specified for an image layer, size= constrains the layer image’s width, or height, or both. The image is scaled to be no larger than size=
. If a normalized size is specified, it is relative to the size of layer 0. If both width
and height
are specified, the source image is scaled (after crop=
is applied) so that neither dimension exceeds the specified size. The aspect ratio of the source rectangle is maintained in all cases. Either width
or height
may be set to 0; in this case the value is calculated by the server based on the aspect ratio of the image.
When specified for a text layer, size=
specifies the text box size. width
is required; height
may be set to 0, in which case the height of the laid out text is used as the layer height. By default, the text layout engines insert line breaks to ensure that text always fits horizontally into the available space. If height
is specified, lines which do not fit into the available space are clipped ( text=
) or omitted ( textPs=
). text=
supports additional fit modes; refer to textAttr=
for details.
When specified for a solid color layer, size=
defines the exact layer size; both values must be specified (unless a mask is provided). If mask=
is also specified, the mask image is sized to fit size=
the same way images are scaled in image layers.
Properties
Layer attribute. Applies to layer 0 if layer=comp
. sizeN=
is not permitted for layer=0
or layer=comp
. sizeN=
is permitted for layer=0
and layer=comp
only in catalog records which define watermark images. In this case, sizeN
defines the scaling of the watermark image relative to the composite image to which the watermark is being applied. If size=
is specified, res=
and scale=
are ignored for this layer. Ignored by effect layers.
Default
size=0,0
, the layer size is unconstrained. For image layers, the layer size is then determined based on the layer image size after any crop=
, scale=
, or res=
operations have been applied. For text layers, if size=
is not specified, the layer is sized automatically to fit the rendered text.
Solid color layers require either a fully specified size=
, a mask=
, or clipPath=
.
Example
See also
Experience Manager
- Dynamic Media Image Serving and Image Rendering API Home
- About this release
- System requirements and prerequisites
- Disk space requirements and recommendations
- Restrictions and known issues
- Technical support
- Document conventions
- Installation
- Image Serving API
- Image Serving API
- Intended audience
- Image Serving components
- Configuration and administration
- Serving static (non-image) contents
- Troubleshooting
- HTTP protocol reference
- HTTP protocol reference overview
- HTTP protocol introduction
- Syntax and features
- Syntax and features
- Image Serving HTTP protocol basic syntax
- Image Serving HTTP protocol command
- Layering
- Layer effects
- Request nesting and embedding
- Substitution variables
- Command macros
- Image catalogs
- Object ID translation
- Text string localization
- SVG support
- Request preprocessing
- Image maps
- Image Serving color management
- Image Serving HTTP encoding
- Request locking
- Request obfuscation
- Watermarks
- Serving static (non-image) content
- Media set requests
- Text formatting
- Data types
- Command reference
- Command reference overview
- align
- anchor
- bfc
- bgc
- bgColor
- blendMode
- cache
- clipPath
- clipXPath
- color
- crop
- cropPathE
- defaultImage
- dpr
- effect
- effectMask
- extend
- fit
- flip
- fmt
- hei
- hide
- icc
- iccEmbed
- id
- imageSet
- jpegSize
- layer
- locale
- map
- mask
- maskUse
- network
- op_blur
- op_brightness
- op_colorbalance
- op_colorize
- op_contrast
- op_grow
- op_growMask
- op_growMaskR
- op_hue
- op_invert
- op_noise
- op_saturation
- op_sharpen
- op_usm
- op_usmR
- opac
- origin
- pathAttr
- pathEmbed
- perspective
- pos
- printRes
- pscan
- qlt
- quantize
- rect
- req
- res
- resMode
- rgn
- rotate
- scale
- scl
- size
- src
- template
- text
- textAngle
- textAttr
- textFlowPath
- textFlowXPath
- textPath
- textPs
- type
- wid
- xmpEmbed
- Response data
- Server behavior
- Templates
- FXG server protocol reference
- Image catalog reference
- Attributes
- Attributes reference
- AllowDirectAccess
- AllowDirectUrls
- ApplyEffectMask
- AudioBitRate
- Bfc
- BkgColor
- CacheValidationPolicy
- ClientAddressFilter
- CatalogFile
- DefaultExpiration
- DefaultExt
- DefaultFont
- DefaultImage
- DefaultImageMode
- DefaultLocale
- DefaultPix
- DefaultThumbPix
- DigimarcId
- DigimarcInfo
- ErrorImage
- ErrorDetail
- Expiration
- FontMapFile
- FullMatch
- HttpAppleStreamingContext
- HttpFlashStreamingContext
- IccBlackPointCompensation
- IccDither
- IccProfileCmyk
- IccProfileGray
- IccProfileMapFile
- IccProfileRgb
- IccProfileSrcCmyk
- IccProfileSrcGray
- IccProfileSrcRgb
- IccRenderIntent
- JpegQuality
- LocaleMap
- LocaleStrMap
- MacroFile
- MaxPix
- NonImgExpiration
- PublishInfo
- PrintResolution
- RequestLock
- RequestObfuscation
- ResMode
- Resolution
- RootId
- RootPath
- RootUrl
- RuleSetFile
- SavePath
- StaticContentCatalogFile
- StaticContentRootPath
- SvgCatalogFile
- SynthesizeFontStyles
- ThumbBkgColor
- ThumbHorizAlign
- ThumbRes
- ThumbType
- ThumbVertAlign
- TimeStamp
- TotalStreamBitRate
- TrustedDomains
- UseLastModified
- VideoBitRate
- VideoSize
- Watermark
- Image/SVG data reference
- Macro definition
- Font map
- ICC profile map reference
- Rule set reference
- Image server proxy
- Responsive Static Image Library
- Image Rendering API
- Image Rendering API
- Configuration
- Server administration
- Server administration
- Server administration preface
- Server administration overview
- Configuring and managing the server
- Configuration settings reference
- HTTP protocol reference
- HTTP protocol reference
- Introduction
- HTTP protocol syntax and features
- HTTP protocol syntax and features
- Image Rendering HTTP protocol basic syntax
- Image Rendering HTTP protocol command overview
- Vignettes
- Materials
- Advanced Render effects
- Request nesting and embedding
- Material catalogs
- Request pre-processing *
- Custom variables
- Command macros *
- Image Rendering color management *
- Color values
- Image Rendering HTTP encoding
- HTTP protocol command reference
- HTTP protocol response data
- Material catalog
- Material catalog
- Introduction
- Material catalog overview
- Attributes reference
- Attributes reference
- AllowDirectURLs
- CacheValidationPolicy
- CatalogFile
- ClientAddressFilter
- DefaultPix
- ErrorDetail
- ErrorImage
- Expiration
- Format
- IccBlackPointCompensation
- IccDither
- IccProfileCmyk
- IccProfileGray
- IccProfileMapFile
- IccProfileRgb
- IccProfileSrcCmyk
- IccProfileSrcGray
- IccProfileSrcRgb
- IccRenderIntent
- JpegQuality
- MacroFile
- MaxPix
- OnFailObj
- OnFailSel
- RenderSettings
- ResMode
- Resolution
- RootId
- RootPath *
- RootUrl *
- RuleSetFile
- Sharp
- Sharpen
- ShowOverlapObjs
- TiffEncoding
- TimeStamp
- TrustedDomains *
- UseLastModified
- VignetteMapFile
- Material data reference
- Vignette map reference
- Macro definition reference
- ICC profile map reference
- Rule set reference
- Utilities