public class ImageInfo extends Object
Encapsulates info for an Image
paragraph.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Aspose.Pdf.Generator.Image image1 = new Aspose.Pdf.Generator.Image(sec1); sec1.Paragraphs.Add(image1); image1.ImageInfo.File = "C:/Images/Apple.jpg"; image1.ImageInfo.ImageFileType = ImageFileType.Jpeg; image1.ImageInfo.Title = "JPEG image"; Aspose.Pdf.Generator.Image image2 = new Aspose.Pdf.Generator.Image(sec1); sec1.Paragraphs.Add(image2); image2.ImageInfo.File = "C:/Images/Flower.fax"; image2.ImageInfo.ImageFileType = ImageFileType.Ccitt; image2.ImageInfo.CcittSubFormat = CcittSubFormat.Group31D; image2.ImageInfo.Title = "CCITT fax image"; image2.ImageWidth = 350; image2.ImageHeight = 400; Aspose.Pdf.Generator.Image image3 = new Aspose.Pdf.Generator.Image(sec1); sec1.Paragraphs.Add(image3); image3.ImageInfo.File = "http://localhost/Images/SeaFood.jpg"; image3.ImageInfo.ImageFileType = ImageFileType.Jpeg; image3.ImageInfo.OpenType = ImageOpenType.Url; image3.ImageInfo.Title = "jpeg image with url"; image3.ImageWidth = 154; image3.ImageHeight = 112; image3.ImageInfo.BitsPerComponent = 8; image3.ImageInfo.ComponentNumber = 3; pdf1.Save("d:\\temp\\test.pdf"); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim image1 As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image(sec1) sec1.Paragraphs.Add(image1) image1.ImageInfo.File = "C:/Images/Apple.jpg" image1.ImageInfo.ImageFileType = ImageFileType.Jpeg image1.ImageInfo.Title = "JPEG image" Dim image2 As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image(sec1) sec1.Paragraphs.Add(image2) image2.ImageInfo.File = "C:/Images/Flower.fax" image2.ImageInfo.ImageFileType = ImageFileType.Ccitt image2.ImageInfo.CcittSubFormat = CcittSubFormat.Group31D image2.ImageInfo.Title = "CCITT fax image" image2.ImageWidth = 350 image2.ImageHeight = 400 Dim image3 As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image(sec1) sec1.Paragraphs.Add(image3) image3.ImageInfo.File = "http://localhost/Images/SeaFood.jpg" image3.ImageInfo.ImageFileType = ImageFileType.Jpeg image3.ImageInfo.OpenType = ImageOpenType.Url image3.ImageInfo.Title = "jpeg image with url" image3.ImageWidth = 154 image3.ImageHeight = 112 image3.ImageInfo.BitsPerComponent = 8 image3.ImageInfo.ComponentNumber = 3 pdf1.Save("d:\\temp\\test.pdf") [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Image File="C:/Images/Apple.jpg" Type="jpeg"> <Title>JPEG image</Title> </Image> <Image File="C:/Images/Flower.fax" Type="ccitt" CcittSubFormat="Group31D" Width="350" Height="400"> <Title>CCITT fax image</Title> </Image> <Image File="http://localhost/Images/SeaFood.jpg" OpenType="url" Type="jpeg" Width="154" Height="112" BitsPerComponent="8" ComponentNumber="3"> </Image> </Section> </Pdf>
Constructor and Description |
---|
ImageInfo()
Initializes a new instance of the
ImageInfo class. |
Modifier and Type | Method and Description |
---|---|
int |
getAlignment()
Gets or sets a
AlignmentType object that indicates the image
alignment type. |
Color |
getBackgroundColor()
Color that is used as background for stencil mask image.
|
int |
getBitsPerComponent()
Gets or sets an int value that indicates the color bits per component
of the image.
|
float |
getCcittImageHeight()
Gets or sets a float value that indicates the CCITT image height.
|
float |
getCcittImageWidth()
Gets or sets a float value that indicates the CCITT image width.
|
int |
getCcittSubFormat()
Gets or sets the
CcittSubFormat . |
int |
getComponentNumber()
Gets or sets an int value that indicates the color component number
of the image.
|
String |
getDefaultFile()
Gets or sets a string that indicates the default image file name.
|
String |
getFile()
Gets or sets a string that indicates the image file name and its path
or url of a web image.
|
float |
getFixHeight()
Gets or sets a float value that indicates the fixed height of the
image.
|
float |
getFixWidth()
Gets or sets a float value that indicates the fixed width of the
image.
|
BorderInfo |
getImageBorder()
Gets or sets a borderinfo value that indicates the border information
of the image.
|
int |
getImageFileType()
Gets or sets a
ImageFileType object that indicates the image
type. |
InputStream |
getImageStream() |
com.aspose.ms.System.IO.Stream |
getImageStreamInternal() |
byte[] |
getMemoryData()
Gets or sets a byte array that indicates the image data in memory.
|
int |
getOpenType()
Gets or sets a
ImageOpenType that indicates the image open
type. |
Color |
getPatternColor() |
com.aspose.ms.System.Drawing.Color |
getPatternColorInternal() |
com.aspose.ms.System.Drawing.Image |
getSystemImage()
Gets or sets a system
System.Drawing.Image object which is
used to create a Aspose Aspose.Pdf.Image object. |
TextInfo |
getTextInfo()
Gets or sets a
TextInfo object that indicates the text info
of the image Title . |
int |
getTiffFrame()
Gets or sets an int value that indicates the valid frame of the TIFF
image.
|
String |
getTitle()
Gets or sets a string value that indicates the title of the image.
|
boolean |
isAllFramesInNewPage()
Gets or sets a bool value that indicates if all frames in TIFF images
be rendered in new page.
|
void |
isAllFramesInNewPage(boolean value) |
boolean |
isBlack1()
Gets or sets a bool value that indicates whether black is considered
as 1 in an image.
|
void |
isBlack1(boolean value) |
boolean |
isBlackWhite()
Gets or sets a bool value that indicates whether the image is forced
to be black-and-white.
|
void |
isBlackWhite(boolean value) |
boolean |
isFixImgHeightSettedInXML()
Gets or sets a bool value that indicates the fixed height of the
image is Setted in xml file.
|
void |
isFixImgHeightSettedInXML(boolean value) |
boolean |
isFixImgWidthSettedInXML()
Gets or sets a bool value that indicates the fixed width of the image
is setted in xml file
|
void |
isFixImgWidthSettedInXML(boolean value) |
boolean |
isImageNotFoundErrorIgnored()
Gets or sets a bool value that indicates whether the "image not
found" error be ignored or not.
|
void |
isImageNotFoundErrorIgnored(boolean value) |
boolean |
isStencilMask()
Indicates whether this image is stencil mask.
|
void |
isStencilMask(boolean value) |
void |
setAlignment(int value) |
void |
setBackgroundColor(Color value) |
void |
setBitsPerComponent(int value) |
void |
setCcittImageHeight(float value) |
void |
setCcittImageWidth(float value) |
void |
setCcittSubFormat(int value) |
void |
setComponentNumber(int value) |
void |
setDefaultFile(String value) |
void |
setFile(String value) |
void |
setFixHeight(float value) |
void |
setFixWidth(float value) |
void |
setImageBorder(BorderInfo value) |
void |
setImageFileType(int value) |
void |
setImageStream(InputStream value) |
void |
setImageStreamInternal(com.aspose.ms.System.IO.Stream value) |
void |
setMemoryData(byte[] value) |
void |
setOpenType(int value) |
void |
setPatternColor(Color value) |
void |
setPatternColorInternal(com.aspose.ms.System.Drawing.Color value) |
void |
setSystemImage(BufferedImage sysImageInput)
Sets a
BufferedImage object which is used to
create a Aspose Aspose.Pdf.Image object. |
void |
setSystemImage(Component component) |
void |
setSystemImage(com.aspose.ms.System.Drawing.Image value) |
void |
setTextInfo(TextInfo value) |
void |
setTiffFrame(int value) |
void |
setTitle(String value) |
public int getAlignment()
Gets or sets a AlignmentType
object that indicates the image
alignment type.
public void setAlignment(int value)
public String getTitle()
Gets or sets a string value that indicates the title of the image.
public void setTitle(String value)
public TextInfo getTextInfo()
Gets or sets a TextInfo
object that indicates the text info
of the image Title
.
public void setTextInfo(TextInfo value)
public int getOpenType()
Gets or sets a ImageOpenType
that indicates the image open
type. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
URL is supported in Image.ImageInfo.File. Momory image can is supported by Image.ImageInfo.ImageStream.
You need not set OpenType any more.
It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for
any inconvenience you may have experienced.</BLOCKQUOTE>
public void setOpenType(int value)
public int getImageFileType()
Gets or sets a ImageFileType
object that indicates the image
type. If this property is not set, the image type will be get from the
file name.
public void setImageFileType(int value)
public BorderInfo getImageBorder()
Gets or sets a borderinfo value that indicates the border information of the image.
public void setImageBorder(BorderInfo value)
public String getFile()
Gets or sets a string that indicates the image file name and its path or url of a web image.
public void setFile(String value)
public com.aspose.ms.System.IO.Stream getImageStreamInternal()
public InputStream getImageStream()
public void setImageStreamInternal(com.aspose.ms.System.IO.Stream value)
public void setImageStream(InputStream value)
public com.aspose.ms.System.Drawing.Image getSystemImage()
Gets or sets a system System.Drawing.Image
object which is
used to create a Aspose Aspose.Pdf.Image
object.
[C#] System.Drawing.Image sysimg = System.Drawing.Image.FromFile("test.jpg"); Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Aspose.Pdf.Generator.Image img1 = new Aspose.Pdf.Generator.Image(); img1.ImageInfo.SystemImage = sysimg; sec1.Paragraphs.Add(img1); pdf1.Save("test.pdf"); sysimg.Dispose(); [VB.NET] Dim sysimg As System.Drawing.Image = System.Drawing.Image.FromFile("test.jpg") Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim img1 As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image() img1.ImageInfo.SystemImage = sysimg sec1.Paragraphs.Add(img1) pdf1.Save("test.pdf") sysimg.Dispose()
public void setSystemImage(com.aspose.ms.System.Drawing.Image value)
public void setSystemImage(BufferedImage sysImageInput)
BufferedImage
object which is used to
create a Aspose Aspose.Pdf.Image object.sysImage
- A BufferedImage
object.public void setSystemImage(Component component)
public String getDefaultFile()
Gets or sets a string that indicates the default image file name. If
this name is not null, Aspose.Pdf.Generator will use this image file when
the image specified in File
is not found.
public void setDefaultFile(String value)
public boolean isImageNotFoundErrorIgnored()
Gets or sets a bool value that indicates whether the "image not found" error be ignored or not.
public void isImageNotFoundErrorIgnored(boolean value)
public byte[] getMemoryData()
Gets or sets a byte array that indicates the image data in memory.
null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
Please use {@code ImageStream} instead.
It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for
any inconvenience you may have experienced.</BLOCKQUOTE>
public void setMemoryData(byte[] value)
public boolean isBlack1()
Gets or sets a bool value that indicates whether black is considered as 1 in an image.
public void isBlack1(boolean value)
public int getComponentNumber()
Gets or sets an int value that indicates the color component number
of the image. This property is need only when using web image. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
Web image can be supported by setting the URL in Image.ImageInfo.File.You need not set
this property any more.
It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for
any inconvenience you may have experienced.</BLOCKQUOTE>
public void setComponentNumber(int value)
public int getBitsPerComponent()
Gets or sets an int value that indicates the color bits per component
of the image. This property is need only when using web image. null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
Web image can be supported by setting the URL in Image.ImageInfo.File.You need not set
this property any more.
It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for
any inconvenience you may have experienced.</BLOCKQUOTE>
public void setBitsPerComponent(int value)
public int getCcittSubFormat()
Gets or sets the CcittSubFormat
. Used for CCITT image type
only.
public void setCcittSubFormat(int value)
public int getTiffFrame()
Gets or sets an int value that indicates the valid frame of the TIFF image. The default value is 0. Used for TIFF image only. If this property is set to -1, all frames of the tiff images will be added into the PDF document.
public void setTiffFrame(int value)
public float getFixWidth()
Gets or sets a float value that indicates the fixed width of the image. If this property is set, the image will be scaled to the fixed width.
public void setFixWidth(float value)
public boolean isFixImgWidthSettedInXML()
Gets or sets a bool value that indicates the fixed width of the image is setted in xml file
public void isFixImgWidthSettedInXML(boolean value)
public float getFixHeight()
Gets or sets a float value that indicates the fixed height of the image. If this property is set, the image will be scaled to the fixed height.
public void setFixHeight(float value)
public boolean isFixImgHeightSettedInXML()
Gets or sets a bool value that indicates the fixed height of the image is Setted in xml file.
public void isFixImgHeightSettedInXML(boolean value)
public boolean isBlackWhite()
Gets or sets a bool value that indicates whether the image is forced to be black-and-white. If TIFF image of CCITT subformat is used, this property must be set to true.
public void isBlackWhite(boolean value)
public float getCcittImageWidth()
Gets or sets a float value that indicates the CCITT image width. CCITT image does not contain size information so the width and height must be set by user.
public void setCcittImageWidth(float value)
public float getCcittImageHeight()
Gets or sets a float value that indicates the CCITT image height. CCITT image does not contain size information so the width and height must be set by user.
public void setCcittImageHeight(float value)
public boolean isAllFramesInNewPage()
Gets or sets a bool value that indicates if all frames in TIFF images be rendered in new page.
public void isAllFramesInNewPage(boolean value)
public boolean isStencilMask()
Indicates whether this image is stencil mask.
public void isStencilMask(boolean value)
public Color getBackgroundColor()
Color that is used as background for stencil mask image.
public void setBackgroundColor(Color value)
public com.aspose.ms.System.Drawing.Color getPatternColorInternal()
public Color getPatternColor()
public void setPatternColorInternal(com.aspose.ms.System.Drawing.Color value)
public void setPatternColor(Color value)
Copyright © 2016 Aspose. All Rights Reserved.