AWS SDK for .NET Documentation
PresetWatermark Class
AmazonAmazon.ElasticTranscoder.ModelPresetWatermark Did this page help you?   Yes   No    Tell us about it...
Settings for the size, location, and opacity of graphics that you want Elastic Transcoder to overlay over videos that are transcoded using this preset. You can specify settings for up to four watermarks. Watermarks appear in the specified size and location, and with the specified opacity for the duration of the transcoded video.

Watermarks can be in .png or .jpg format. If you want to display a watermark that is not rectangular, use the .png format, which supports transparency.

When you create a job that uses this preset, you specify the .png or .jpg graphics that you want Elastic Transcoder to include in the transcoded videos. You can specify fewer graphics in the job than you specify watermark settings in the preset, which allows you to use the same preset for up to four watermarks that have different dimensions.

Declaration Syntax
C#
public class PresetWatermark
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
PresetWatermark()()()()
Initializes a new instance of the PresetWatermark class

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
HorizontalAlign
Gets and sets the property HorizontalAlign.

The horizontal position of the watermark unless you specify a non-zero value for

CopyC#
HorizontalOffset
:
  • Left: The left edge of the watermark is aligned with the left border of the video.
  • Right: The right edge of the watermark is aligned with the right border of the video.
  • Center: The watermark is centered between the left and right borders.


HorizontalOffset
Gets and sets the property HorizontalOffset.

The amount by which you want the horizontal position of the watermark to be offset from the position specified by HorizontalAlign:

  • number of pixels (px): The minimum value is 0 pixels, and the maximum value is the value of MaxWidth.
  • integer percentage (%): The range of valid values is 0 to 100.
For example, if you specify Left for
CopyC#
HorizontalAlign
and 5px for
CopyC#
HorizontalOffset
, the left side of the watermark appears 5 pixels from the left border of the output video.

CopyC#
HorizontalOffset
is only valid when the value of
CopyC#
HorizontalAlign
is
CopyC#
Left
or
CopyC#
Right
. If you specify an offset that causes the watermark to extend beyond the left or right border and Elastic Transcoder has not added black bars, the watermark is cropped. If Elastic Transcoder has added black bars, the watermark extends into the black bars. If the watermark extends beyond the black bars, it is cropped.

Use the value of

CopyC#
Target
to specify whether you want to include the black bars that are added by Elastic Transcoder, if any, in the offset calculation.


Id
Gets and sets the property Id. A unique identifier for the settings for one watermark. The value of
CopyC#
Id
can be up to 40 characters long.

MaxHeight
Gets and sets the property MaxHeight.

The maximum height of the watermark in one of the following formats:

  • number of pixels (px): The minimum value is 16 pixels, and the maximum value is the value of
    CopyC#
    MaxHeight
    .
  • integer percentage (%): The range of valid values is 0 to 100. Use the value of
    CopyC#
    Target
    to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the calculation.
If you specify the value in pixels, it must be less than or equal to the value of
CopyC#
MaxHeight
.


MaxWidth
Gets and sets the property MaxWidth.

The maximum width of the watermark in one of the following formats:

  • number of pixels (px): The minimum value is 16 pixels, and the maximum value is the value of
    CopyC#
    MaxWidth
    .
  • integer percentage (%): The range of valid values is 0 to 100. Use the value of
    CopyC#
    Target
    to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the calculation.
  • If you specify the value in pixels, it must be less than or equal to the value of
    CopyC#
    MaxWidth
    .


Opacity
Gets and sets the property Opacity.

A percentage that indicates how much you want a watermark to obscure the video in the location where it appears. Valid values are 0 (the watermark is invisible) to 100 (the watermark completely obscures the video in the specified location). The datatype of

CopyC#
Opacity
is float.

Elastic Transcoder supports transparent .png graphics. If you use a transparent .png, the transparent portion of the video appears as if you had specified a value of 0 for

CopyC#
Opacity
. The .jpg file format doesn't support transparency.


SizingPolicy
Gets and sets the property SizingPolicy.

A value that controls scaling of the watermark:

  • Fit: Elastic Transcoder scales the watermark so it matches the value that you specified in either
    CopyC#
    MaxWidth
    or
    CopyC#
    MaxHeight
    without exceeding the other value.
  • Stretch: Elastic Transcoder stretches the watermark to match the values that you specified for
    CopyC#
    MaxWidth
    and
    CopyC#
    MaxHeight
    . If the relative proportions of the watermark and the values of
    CopyC#
    MaxWidth
    and
    CopyC#
    MaxHeight
    are different, the watermark will be distorted.
  • ShrinkToFit: Elastic Transcoder scales the watermark down so that its dimensions match the values that you specified for at least one of
    CopyC#
    MaxWidth
    and
    CopyC#
    MaxHeight
    without exceeding either value. If you specify this option, Elastic Transcoder does not scale the watermark up.


Target
Gets and sets the property Target.

A value that determines how Elastic Transcoder interprets values that you specified for

CopyC#
HorizontalOffset
,
CopyC#
VerticalOffset
,
CopyC#
MaxWidth
, and
CopyC#
MaxHeight
:
  • Content:
    CopyC#
    HorizontalOffset
    and
    CopyC#
    VerticalOffset
    values are calculated based on the borders of the video excluding black bars added by Elastic Transcoder, if any. In addition,
    CopyC#
    MaxWidth
    and
    CopyC#
    MaxHeight
    , if specified as a percentage, are calculated based on the borders of the video excluding black bars added by Elastic Transcoder, if any.
  • Frame:
    CopyC#
    HorizontalOffset
    and
    CopyC#
    VerticalOffset
    values are calculated based on the borders of the video including black bars added by Elastic Transcoder, if any.
  • In addition,
    CopyC#
    MaxWidth
    and
    CopyC#
    MaxHeight
    , if specified as a percentage, are calculated based on the borders of the video including black bars added by Elastic Transcoder, if any.


ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
VerticalAlign
Gets and sets the property VerticalAlign.

The vertical position of the watermark unless you specify a non-zero value for

CopyC#
VerticalOffset
:
  • Top: The top edge of the watermark is aligned with the top border of the video.
  • Bottom: The bottom edge of the watermark is aligned with the bottom border of the video.
  • Center: The watermark is centered between the top and bottom borders.


VerticalOffset
Gets and sets the property VerticalOffset.
CopyC#
VerticalOffset

The amount by which you want the vertical position of the watermark to be offset from the position specified by VerticalAlign:

  • number of pixels (px): The minimum value is 0 pixels, and the maximum value is the value of
    CopyC#
    MaxHeight
    .
  • integer percentage (%): The range of valid values is 0 to 100.
For example, if you specify
CopyC#
Top
for
CopyC#
VerticalAlign
and
CopyC#
5px
for
CopyC#
VerticalOffset
, the top of the watermark appears 5 pixels from the top border of the output video.

CopyC#
VerticalOffset
is only valid when the value of VerticalAlign is Top or Bottom.

If you specify an offset that causes the watermark to extend beyond the top or bottom border and Elastic Transcoder has not added black bars, the watermark is cropped. If Elastic Transcoder has added black bars, the watermark extends into the black bars. If the watermark extends beyond the black bars, it is cropped.

Use the value of

CopyC#
Target
to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the offset calculation.


WithHorizontalAlign(String) Obsolete.
Sets the HorizontalAlign property

WithHorizontalOffset(String) Obsolete.
Sets the HorizontalOffset property

WithId(String) Obsolete.
Sets the Id property

WithMaxHeight(String) Obsolete.
Sets the MaxHeight property

WithMaxWidth(String) Obsolete.
Sets the MaxWidth property

WithOpacity(String) Obsolete.
Sets the Opacity property

WithSizingPolicy(String) Obsolete.
Sets the SizingPolicy property

WithTarget(String) Obsolete.
Sets the Target property

WithVerticalAlign(String) Obsolete.
Sets the VerticalAlign property

WithVerticalOffset(String) Obsolete.
Sets the VerticalOffset property

Inheritance Hierarchy
Object
PresetWatermark

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)