public final class Image extends Node implements IPageChildNode, IOutlineElementChildNode, ITaggable
Represents an Image.
| Constructor and Description |
|---|
Image(Document document,
String path)
Initializes a new instance of the
Image class. |
Image(Document document,
String fileName,
InputStream imageStream)
Initializes a new instance of the
Image class. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(DocumentVisitor visitor)
Accepts the visitor of the node.
|
int |
getAlignment()
Gets the alignment.
|
String |
getAlternativeTextDescription()
Gets a body an alternative text for the image.
|
String |
getAlternativeTextTitle()
Gets a title of alternative text for the image.
|
byte[] |
getBytes()
Gets the image data store.
|
String |
getFileName()
Gets the file name.
|
String |
getFilePath()
Gets the path to the image file.
|
com.aspose.ms.System.Drawing.Imaging.ImageFormat |
getFormat()
Gets the image's format.
|
float |
getHeight()
Gets the height.
|
float |
getHorizontalOffset()
Gets the horizontal offset.
|
String |
getHyperlinkUrl()
Gets the hyperlink associated with the image.
|
Date |
getLastModifiedTime()
Gets last modified time.
|
float |
getOriginalHeight()
Gets the original height.
|
float |
getOriginalWidth()
Gets the original width.
|
com.aspose.ms.System.Collections.Generic.List<ITag> |
getTags()
Gets the list of all tags of an image.
|
float |
getVerticalOffset()
Gets the vertical offset.
|
float |
getWidth()
Gets the width.
|
boolean |
isBackground()
Gets whether the image is a background image.
|
void |
setAlignment(int value)
Sets the alignment.
|
void |
setAlternativeTextDescription(String value)
Sets a body an alternative text for the image.
|
void |
setAlternativeTextTitle(String value)
Sets a title of alternative text for the image.
|
void |
setBackground(boolean value)
Gets whether the image is a background image.
|
void |
setHeight(float value)
Sets the height.
|
void |
setHorizontalOffset(float value)
Sets the horizontal offset.
|
void |
setHyperlinkUrl(String value)
Sets the hyperlink associated with the image.
|
void |
setLastModifiedTime(Date value)
Sets last modified time.
|
void |
setVerticalOffset(float value)
Sets the vertical offset.
|
void |
setWidth(float value)
Sets the width.
|
getDocument, getNextSibling, getNodeType, getParentNode, getPreviousSibling, isCompositeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNextSibling, getPreviousSiblingpublic Image(Document document, String path)
Initializes a new instance of the Image class.
document - A parent document of the image.path - A string that contains the path to the file from which to create the Image.public Image(Document document, String fileName, InputStream imageStream)
Initializes a new instance of the Image class.
document - A parent document of the image.fileName - A name of the image.imageStream - A stream which contains the image.public Date getLastModifiedTime()
Gets last modified time.
public void setLastModifiedTime(Date value)
Sets last modified time.
public float getWidth()
Gets the width. This is the real width of the image in the MS OneNote document.
public void setWidth(float value)
Sets the width. This is the real width of the image in the MS OneNote document.
public float getHeight()
Gets the height. This is the real height of the image in the MS OneNote document.
public void setHeight(float value)
Sets the height. This is the real height of the image in the MS OneNote document.
public final boolean isBackground()
Gets whether the image is a background image.
public final void setBackground(boolean value)
Gets whether the image is a background image.
public float getOriginalWidth()
Gets the original width. This is the original width of the image, before resizing.
public float getOriginalHeight()
Gets the original height. This is the original width of the image, before resizing.
public float getHorizontalOffset()
Gets the horizontal offset.
getHorizontalOffset in interface IPageChildNodepublic void setHorizontalOffset(float value)
Sets the horizontal offset.
setHorizontalOffset in interface IPageChildNodepublic float getVerticalOffset()
Gets the vertical offset.
getVerticalOffset in interface IPageChildNodepublic void setVerticalOffset(float value)
Sets the vertical offset.
setVerticalOffset in interface IPageChildNodepublic String getFilePath()
Gets the path to the image file.
public String getFileName()
Gets the file name.
public final com.aspose.ms.System.Drawing.Imaging.ImageFormat getFormat()
Gets the image's format.
public byte[] getBytes()
Gets the image data store.
public final com.aspose.ms.System.Collections.Generic.List<ITag> getTags()
Gets the list of all tags of an image.
public int getAlignment()
Gets the alignment.
HorizontalAlignment.public void setAlignment(int value)
Sets the alignment.
public final String getAlternativeTextTitle()
Gets a title of alternative text for the image.
public final void setAlternativeTextTitle(String value)
Sets a title of alternative text for the image.
public final String getAlternativeTextDescription()
Gets a body an alternative text for the image.
public final void setAlternativeTextDescription(String value)
Sets a body an alternative text for the image.
public String getHyperlinkUrl()
Gets the hyperlink associated with the image.
public void setHyperlinkUrl(String value)
Sets the hyperlink associated with the image.
public void accept(DocumentVisitor visitor)
Accepts the visitor of the node.
Copyright (c) 2002-2021 Aspose. All Rights Reserved.