|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfObject
com.gnostice.pdfone.PdfStream
com.gnostice.pdfone.PdfImage
This class represents an image that can be used in a document or page.
PdfImage
currently supports Joint Photographic Experts
Group (JPEG), bitmap (BMP), and Portable Network Graphics (PNG)
image formats.
Methods of this class can:
After creating an object of this class, you can use methods such as
drawImage
of PdfPage
or PdfDocument
instances to add images. The object's height and width will be
interpreted in terms of current measurement unit of the page or
document. See
example.
Method Summary | |
int |
bitsPerComponent()
Returns number of bits used to store value of each component of colorspace for this image. |
static PdfImage |
create(FileImageInputStream imageStream)
|
static PdfImage |
create(String path)
Creates a PdfImage object based on image file
specified by path . |
PdfObject |
getColorSpace()
|
float |
getHeight()
Retrieves height currently set for this object. |
float |
getRotation()
Retrieves rotation angle currently set for this object. |
float |
getWidth()
Retrieves width currently set for this object. |
int |
hashCode()
|
float |
height()
Retrieves original height of image. |
void |
setHeight(double height)
Specifies height for this object. |
void |
setRotation(double r)
Specifies rotation angle for this object. |
void |
setWidth(double width)
Specifies width for this object. |
float |
width()
Retrieves original width of image. |
Methods inherited from class com.gnostice.pdfone.PdfStream |
clone, equals, getBuffer, getDecodeParms, getDictionary, getFilters, setBuffer |
Methods inherited from class com.gnostice.pdfone.PdfObject |
getGenerationNumber, getObjectNumber, setGenerationNumber, setObjectNumber, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public static PdfImage create(String path) throws IOException, PdfException
PdfImage
object based on image file
specified by path
.
path
- relative or fully qualified path and filename of
the image
PdfImage
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfImage create(FileImageInputStream imageStream) throws IOException, PdfException
IOException
PdfException
public void setWidth(double width)
width
- width in current measurement unitpublic float getWidth()
public void setHeight(double height)
height
- height in current measurement unitpublic float getHeight()
public void setRotation(double r)
r
- angle of rotation in degrees (Made with reference to
center of image. Applied in anti-clockwise
direction.)public float getRotation()
public int bitsPerComponent()
public PdfObject getColorSpace()
public float width()
public float height()
public int hashCode()
|
Pro. Ed. v1.41 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |