Image

Inheritance: java.lang.Object, com.aspose.note.Node, com.aspose.note.CompositeNodeBase, com.aspose.note.CompositeNode

All Implemented Interfaces: com.aspose.note.IPageChildNode, com.aspose.note.IOutlineElementChildNode, com.aspose.note.ITaggable

public final class Image extends CompositeNode<Loop> implements IPageChildNode, IOutlineElementChildNode, ITaggable

Represents an Image.

Constructors

ConstructorDescription
Image(String path)Initializes a new instance of the Image class.
Image(String fileName, InputStream imageStream)Initializes a new instance of the Image class.
Image()Initializes a new instance of the Image class.

Methods

MethodDescription
accept(DocumentVisitor visitor)Accepts the visitor of the node.
getAlignment()Gets the alignment.
getAlternativeTextDescription()Gets a body an alternative text for the image.
getAlternativeTextTitle()Gets a title of alternative text for the image.
getBytes()Gets the image data store.
getFileName()Gets the file name.
getFilePath()Gets the path to the image file.
getFormat()Gets the image’s format.
getHeight()Gets the height.
getHorizontalOffset()Gets the horizontal offset.
getHyperlinkUrl()Gets the hyperlink associated with the image.
getLastModifiedTime()Gets last modified time.
getOriginalHeight()Gets the original height.
getOriginalWidth()Gets the original width.
getTags()Gets the list of all tags of an image.
getVerticalOffset()Gets the vertical offset.
getWidth()Gets the width.
isBackground()Gets whether the image is a background image.
replace(Image newImage)Replaces the current image data with the data from the provided Image object.
setAlignment(int value)Sets the alignment.
setAlternativeTextDescription(String value)Sets a body an alternative text for the image.
setAlternativeTextTitle(String value)Sets a title of alternative text for the image.
setBackground(boolean value)Gets whether the image is a background image.
setHeight(float value)Sets the height.
setHorizontalOffset(float value)Sets the horizontal offset.
setHyperlinkUrl(String value)Sets the hyperlink associated with the image.
setLastModifiedTime(Date value)Sets last modified time.
setVerticalOffset(float value)Sets the vertical offset.
setWidth(float value)Sets the width.

Image(String path)

public Image(String path)

Initializes a new instance of the Image class.

Parameters:

ParameterTypeDescription
pathjava.lang.StringA string that contains the path to the file from which to create the Image.

Image(String fileName, InputStream imageStream)

public Image(String fileName, InputStream imageStream)

Initializes a new instance of the Image class.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringA name of the image.
imageStreamjava.io.InputStreamA stream which contains the image.

Image()

public Image()

Initializes a new instance of the Image class.

accept(DocumentVisitor visitor)

public void accept(DocumentVisitor visitor)

Accepts the visitor of the node.

Parameters:

ParameterTypeDescription
visitorDocumentVisitorThe object of a class derived from the DocumentVisitor.

getAlignment()

public int getAlignment()

Gets the alignment.

Returns: int

getAlternativeTextDescription()

public final String getAlternativeTextDescription()

Gets a body an alternative text for the image.

Returns: java.lang.String

getAlternativeTextTitle()

public final String getAlternativeTextTitle()

Gets a title of alternative text for the image.

Returns: java.lang.String

getBytes()

public byte[] getBytes()

Gets the image data store.

Returns: byte[]

getFileName()

public String getFileName()

Gets the file name.

Returns: java.lang.String

getFilePath()

public String getFilePath()

Gets the path to the image file.

Returns: java.lang.String

getFormat()

public final System.Drawing.Imaging.ImageFormat getFormat()

Gets the image’s format.

Returns: com.aspose.ms.System.Drawing.Imaging.ImageFormat

getHeight()

public final float getHeight()

Gets the height. This is the real height of the image in the MS OneNote document.

Returns: float

getHorizontalOffset()

public float getHorizontalOffset()

Gets the horizontal offset.

Returns: float

getHyperlinkUrl()

public String getHyperlinkUrl()

Gets the hyperlink associated with the image.

Returns: java.lang.String

getLastModifiedTime()

public Date getLastModifiedTime()

Gets last modified time.

Returns: java.util.Date

getOriginalHeight()

public float getOriginalHeight()

Gets the original height. This is the original width of the image, before resizing.

Returns: float

getOriginalWidth()

public float getOriginalWidth()

Gets the original width. This is the original width of the image, before resizing.

Returns: float

getTags()

public final System.Collections.Generic.List<ITag> getTags()

Gets the list of all tags of an image.

Returns: com.aspose.ms.System.Collections.Generic.List<com.aspose.note.ITag>

getVerticalOffset()

public float getVerticalOffset()

Gets the vertical offset.

Returns: float

getWidth()

public final float getWidth()

Gets the width. This is the real width of the image in the MS OneNote document.

Returns: float

isBackground()

public final boolean isBackground()

Gets whether the image is a background image.

Returns: boolean

replace(Image newImage)

public void replace(Image newImage)

Replaces the current image data with the data from the provided Image object.

Parameters:

ParameterTypeDescription
newImageImage

setAlignment(int value)

public void setAlignment(int value)

Sets the alignment.

Parameters:

ParameterTypeDescription
valueint

setAlternativeTextDescription(String value)

public final void setAlternativeTextDescription(String value)

Sets a body an alternative text for the image.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setAlternativeTextTitle(String value)

public final void setAlternativeTextTitle(String value)

Sets a title of alternative text for the image.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setBackground(boolean value)

public final void setBackground(boolean value)

Gets whether the image is a background image.

Parameters:

ParameterTypeDescription
valueboolean

setHeight(float value)

public final void setHeight(float value)

Sets the height. This is the real height of the image in the MS OneNote document.

Parameters:

ParameterTypeDescription
valuefloat

setHorizontalOffset(float value)

public void setHorizontalOffset(float value)

Sets the horizontal offset.

Parameters:

ParameterTypeDescription
valuefloat

setHyperlinkUrl(String value)

public void setHyperlinkUrl(String value)

Sets the hyperlink associated with the image.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setLastModifiedTime(Date value)

public void setLastModifiedTime(Date value)

Sets last modified time.

Parameters:

ParameterTypeDescription
valuejava.util.Date

setVerticalOffset(float value)

public void setVerticalOffset(float value)

Sets the vertical offset.

Parameters:

ParameterTypeDescription
valuefloat

setWidth(float value)

public final void setWidth(float value)

Sets the width. This is the real width of the image in the MS OneNote document.

Parameters:

ParameterTypeDescription
valuefloat