[]
Represents the image data of a picture.
public class ImageData : EmbeddedImageData
Gets or sets a value to change the brightness.
Allowed values are from -1 (darkest) to 1 (lightest), inclusive.
The default is 0.
public float Brightness { get; set; }
Gets the complementary vector data of the image.
public VectorGraphicImageData ComplementaryVectorData { get; }
Gets or sets the image compression value.
public ImageCompression Compression { get; set; }
Gets or sets a value to change the contrast.
Allowed values are from -1 to 1, inclusive.
The default is 0.
public float Contrast { get; set; }
Gets the portion of the image used for the fill.
public EdgeExtent Crop { get; }
Each edge of the source rectangle is defined by a percentage offset from the corresponding edge of the bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. For example, a left offset of 25% specifies that the left edge of the source rectangle is located to the right of the bounding box's left edge by an amount equal to 25% of the bounding box's width.
Gets or sets the DPI (dots per inch) used to calculate the size of the image.
If zero, the DPI in the image is used.
public uint Dpi { get; set; }
Gets the list of the image effects.
public ImageEffectList Effects { get; }
Gets or sets the image fill type.
public ImageFillType FillType { get; set; }
Gets a value indicating whether the picture contains image bytes or links to an image.
public override bool HasImage { get; }
Gets a value indicating whether the image is linked to this picture (when Source is specified).
public bool IsLink { get; }
Gets a value indicating whether the image is linked and not stored in the document.
public bool IsLinkOnly { get; }
Gets or sets whether the data rotates along with the object when the object is rotated.
public bool RotateWithObject { get; set; }
Gets the amount of saturation applied to the picture.
public float Saturation { get; }
Gets the amount to sharpen (if positive) or the amount to blur (if negative).
public float Sharpness { get; }
Gets or sets the path and name of the source file for the linked image.
public Uri Source { get; set; }
Gets a stretch fill rectangle.
When stretching an image, the source rectangle is scaled to fit the specified fill rectangle.
public EdgeExtent Stretch { get; }
Gets the color temperature of the light source in the picture.
public int Temperature { get; }
Gets the image tile format used to fill the available space.
public TileFill Tile { get; }
Gets or sets the degree of transparency of the image as a value between 0 (opaque) and 1 (clear).
Allowed values are from 0 to 1, inclusive.
The default is 0.
public float Transparency { get; set; }
Gets the properties for displaying an online video to the user.
public WebVideoProperties WebVideoProperties { get; }
protected bool Equals(ImageData other)
other
ImageDatapublic override bool Equals(object obj)
obj
objectpublic override int GetHashCode()
Changes the color of the image.
public void Recolor(RecolorType type)
type
RecolorTypeThe color change type.
Changes the color of the image.
For each pixel, combines black color and specified color
using a linear interpolation.
public void RecolorDark(UserColor color)
color
UserColorThe user color to transform and combine with black.
Changes the color of the image.
For each pixel, combines specified color
and white color using a linear interpolation.
public void RecolorLight(UserColor color)
color
UserColorThe user color to transform and combine with white.
Saves the image into the specified stream.
public override void Save(Stream stream)
stream
System.IO.StreamThe stream where to save the image to.
Makes a color in the current image transparent.
public void SetColorTransparent(UserColor color)
color
UserColorThe user color the make transparent.
Sets the image that is displayed by this picture.
public override void SetImage(byte[] bytes, string contentType)
bytes
byte[]The byte array of the image.
contentType
stringThe content type of the image data.
Sets the image that is displayed by this picture.
public override void SetImage(Uri uri, string contentType)
uri
System.UriThe URI to the image file.
contentType
stringThe content type of the image data.
Returns a byte array representing the image, regardless of whether the image is stored or linked.
If the image is linked, this method downloads the image each time it is called.
public override byte[] ToByteArray()
The image bytes.
Creates and returns a stream containing the image bytes.
If the image bytes are stored in the picture, creates and returns a MemoryStream object.
If the image is linked and stored in a file, opens the file and returns a FileStream object.
If the image is linked and stored in an external URL, downloads the file and returns a MemoryStream object.
public override Stream ToStream()
A stream containing the image bytes.