Adobe Dynamic Media / Scene7
Unpic can transform images with Adobe Dynamic Media / Scene7 using the scene7
provider. It can be
used with Unpic framework components, or you can use the base unpic
libary to generate
image URLs directly.
You can import the scene7
provider from the unpic
package using a subpath import:
import { transform } from 'unpic/providers/scene7';
If using an Unpic component, you can optionally pass custom operations and options to the
component using an object with a scene7
key. This is lets you use extra features supported
by Adobe Dynamic Media / Scene7, or set custom configuration options.
This example uses @unpic/astro
, but the same applies to any Unpic component:
---
import { Image } from '@unpic/astro';
---
<Image
src="image.jpg"
width={800}
height={600}
options={{
"scene7": {
// scene7 options here
}
}}
operations={{
"scene7": {
// scene7 operations here
}
}}
/>
In supported frameworks you can also import the base component and pass the transformer to it directly. This lets you create a custom component that doesn’t need to include and other transformer code.
---
import { Image } from '@unpic/astro/base';
import { transform } from 'unpic/providers/scene7';
---
<Image
src="image.jpg"
width={800}
height={600}
transformer={transformer}
/>
Types
The scene7
provider supports the following arguments:
Options
The scene7
provider does not support any extra configuration options.
Operations
req
Type: "saveToFile" | "xmp" | "targets" | "mbrset"
Request type to perform on the image.
fit
Type: Scene7Fit | "crop,0" | "crop,1" | "fit,0" | "fit,1" | "stretch,0" | "stretch,1" | "constrain,0" | "constrain,1" | "wrap,0" | "wrap,1" | "hfit,0" | "hfit,1" | "vfit,0" | "vfit,1"
Specifies how the scale factor is calculated
wid
Type: string | number
Width of the output image in pixels.
hei
Type: string | number
Height of the output image in pixels.
dpr
Type: string | number
Device Pixel Ratio, used to scale the image according to device resolution.
fmt
Type: Scene7Formats
Output format of the image.
qlt
Type: string | number
Quality of the image (used for JPEG/WebP).
bgColor
Type: string
Background color of the image in hexadecimal format (e.g., ‘FFFFFF’).
cache
Type: "on" | "off"
Whether the image should be cached or not.
scale
Type: string | number
Scaling factor for the image.
rotate
Type: string | number
Rotation angle of the image in degrees.
flip
Type: "h" | "v"
Flip the image horizontally (‘h’) or vertically (‘v’).
crop
Type: string
Cropping dimensions for the image in the format ‘x,y,width,height’.
mask
Type: string
Image mask to be applied.
blendMode
Type: "multiply" | "screen" | "overlay"
Blending mode to be applied to the image.
layer
Type: string
Add an image layer.
opac
Type: string | number
Opacity of a layer.
pos
Type: ${number},${number}
Position of a layer in the format ‘x,y’.
text
Type: string
Text to add to the image.
textAngle
Type: string | number
Angle at which to rotate the text.
textAttr
Type: string
Attributes of the text (e.g., ‘Arial,20,bold’).
icc
Type: string
ICC color profile to use for color correction.
iccEmbed
Type: boolean
Whether to embed the ICC profile in the image.
op_usm
Type: string
Apply unsharp mask to the image. Format: ‘amount,radius,threshold’.
op_blur
Type: string | number
Apply blur to the image.
res
Type: string | number
Resolution of the output image in DPI.
width
Type: string | number
height
Type: string | number
format
Type: "jpeg" | "jpg" | "png" | "webp" | "avif" | "gif" | "pdf" | "heic" | "png8" | "avif-alpha" | "eps" | "f4m" | "gif-alpha" | "jpeg2000-alpha" | "jpeg2000" | "jpegxr-alpha" | "jpegxr" | ... 10 more ... | "web-alpha"
quality
Type: string | number
This page is auto-generated from the scene7
provider types.
See anything wrong or missing? Suggest a change on GitHub.