pdfimage-ag凯发旗舰厅
com.spire.pdf.graphics
class pdfimage
java.lang.object
com.spire.pdf.graphics.pdfgraphicswidget
com.spire.pdf.graphics.pdflayoutwidget
com.spire.pdf.graphics.pdfshapewidget
com.spire.pdf.graphics.pdfimage
- all implemented interfaces:
- ipdfwrapper
- direct known subclasses:
- pdfbitmap
public abstract class pdfimage
- extends pdfshapewidget
- implements ipdfwrapper
represents the base class for images.
method summary |
static pdfimage |
fromfile(java.lang.string path)
creates pdfimage from a file. |
static pdfimage |
fromimage(java.awt.image.bufferedimage image)
converts a object into a pdf image. |
static pdfimage |
fromimage(java.awt.image.bufferedimage image,
boolean converttostream)
converts a object into a pdf image. |
static pdfimage |
fromimage(java.lang.string filenamepath)
|
static pdfimage |
fromstream(java.io.inputstream stream)
creates pdfimage from stream. |
int |
getheight()
gets the height of the image in pixels. |
java.awt.geom.dimension2d |
getphysicaldimension()
returns the size of the image in points. |
boolean |
getpngdirecttojpeg()
if true, png direct convert to jpx and no mask. |
int |
getwidth()
gets the width of the image in pixels. |
void |
setpngdirecttojpeg(boolean value)
if true, png direct convert to jpx and no mask. |
pdfimage
public pdfimage()
getheight
public int getheight()
- gets the height of the image in pixels.
getpngdirecttojpeg
public boolean getpngdirecttojpeg()
- if true, png direct convert to jpx and no mask.
setpngdirecttojpeg
public void setpngdirecttojpeg(boolean value)
- if true, png direct convert to jpx and no mask.
getwidth
public int getwidth()
- gets the width of the image in pixels.
getphysicaldimension
public java.awt.geom.dimension2d getphysicaldimension()
- returns the size of the image in points.
- see also:
this property uses horizontalresolution and verticalresolution for calculating the size in points.
fromfile
public static pdfimage fromfile(java.lang.string path)
- creates pdfimage from a file.
- parameters:
path
- path to a file.
- returns:
- returns a created pdfimage object.
fromstream
public static pdfimage fromstream(java.io.inputstream stream)
- creates pdfimage from stream.
- parameters:
stream
- the stream.
- returns:
- returns a created pdfimage object.
fromimage
public static pdfimage fromimage(java.awt.image.bufferedimage image)
- converts a object into a pdf image.
- parameters:
image
- the image.
- returns:
- returns a created pdfimage object.
fromimage
public static pdfimage fromimage(java.awt.image.bufferedimage image,
boolean converttostream)
- converts a object into a pdf image.
- parameters:
converttostream
- convert to stream.image
- the image.
- returns:
- returns a created pdfimage object.
fromimage
public static pdfimage fromimage(java.lang.string filenamepath)