API Reference
Class
ImageBuilder
Builder for images.
Inheritance
- Object
- ImageBuilder
Methods
Add 3 overloads
public ImageBuilder Add(String path) #Returns:
ImageBuilderAdds an image from a file path.
Parameters
- path System.String
- Path to the image file.
public ImageBuilder Add(Stream stream, String fileName) #Returns:
ImageBuilderAdds an image from a stream.
Parameters
- stream System.IO.Stream
- Stream containing image data.
- fileName System.String
- File name of the image.
public ImageBuilder Add(Byte[] bytes, String fileName) #Returns:
ImageBuilderAdds an image from a byte array.
Parameters
- bytes System.Byte[]
- Image bytes.
- fileName System.String
- File name of the image.
public ImageBuilder AddFromUrl(String url, CancellationToken cancellationToken = null) #Returns:
ImageBuilderDownloads and adds an image from a URL.
Parameters
- url System.String
- Image URL.
- cancellationToken System.Threading.CancellationToken = null
- Token used to cancel the download operation.
Returns
The current ImageBuilder.
public async Task<ImageBuilder> AddFromUrlAsync(String url, CancellationToken cancellationToken = null) #Returns:
Task<ImageBuilder>Asynchronously downloads and adds an image from a URL.
Parameters
- url System.String
- Image URL.
- cancellationToken System.Threading.CancellationToken = null
- Token used to cancel the download operation.
Returns
The current ImageBuilder.
public ImageBuilder Align(HorizontalAlignment alignment) #Returns:
ImageBuilderSets horizontal alignment for the image's paragraph.
Parameters
- alignment OfficeIMO.HorizontalAlignment
- Desired horizontal alignment.
public ImageBuilder Alt(String title = null, String description = null) #Returns:
ImageBuilderSets alternative text for the image.
Parameters
- title System.String = null
- Optional title for the image.
- description System.String = null
- Optional description for the image.
public ImageBuilder Crop(Double left, Double top, Double right, Double bottom) #Returns:
ImageBuilderCrops the image by the specified amounts in centimeters.
Parameters
- left System.Double
- Amount to crop from the left.
- top System.Double
- Amount to crop from the top.
- right System.Double
- Amount to crop from the right.
- bottom System.Double
- Amount to crop from the bottom.
public ImageBuilder Link(String url) #Returns:
ImageBuilderMakes the image a hyperlink pointing to the specified URL.
Parameters
- url System.String
- Destination URL.
public ImageBuilder MaxWidth(Double width) #Returns:
ImageBuilderSets the maximum allowed width of the image.
Parameters
- width System.Double
- Maximum width in pixels.
public ImageBuilder Rotate(Double degrees) #Returns:
ImageBuilderRotates the image by the specified number of degrees.
Parameters
- degrees System.Double
- Rotation angle in degrees.
public ImageBuilder Size(Double width, Nullable<Double> height = null) #Returns:
ImageBuilderSets the size of the image in pixels.
Parameters
- width System.Double
- Image width in pixels.
- height System.Nullable{System.Double} = null
- Optional image height in pixels.
public ImageBuilder Wrap(WrapTextImage wrapImage) #Returns:
ImageBuilderApplies a wrapping style to the image.
Parameters
- wrapImage OfficeIMO.Word.WrapTextImage
- Wrapping option.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
Properties
public WordImage Image { get; } #Gets the image created by the most recent operation.