public class RasterMaster extends Object
Constructor and Description |
---|
RasterMaster()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkInterruptedError(int error) |
void |
checkInterruptedError(int[] error) |
byte[] |
convertJsonToPdf(String ocrJsonBlob,
String fontName) |
boolean |
equals(Object obj) |
int |
getBitsPerPixel()
Returns the bit depth of the image.
|
double |
getCropboxX()
Returns the xpos of the cropbox for vector pdf images.
|
double |
getCropboxY()
Returns the ypos of the cropbox for vector pdf images.
|
int |
getDefaultDepth() |
int |
getDefaultResolution() |
int |
getHeight()
Returns the height of the image in pixels.
|
int |
getOffice_BitsPerPix() |
int |
getOffice_resolution() |
double |
getOfficePagesizeX() |
double |
getOfficePagesizeY() |
int |
getSize() |
Snow.Snowbnd |
getSnowbndObject()
Retrieve the internal Snowbnd object wrapped by this RasterMaster class.
|
int |
getUtf8Mode() |
int |
getWidth()
Returns the width of the image in pixels.
|
int |
getXdpi()
Returns the X resolution, in DPI (dots per inch), of the image.
|
int |
getYdpi()
Returns the Y resolution, in DPI (dots per inch), of the image.
|
int |
hashCode() |
byte[] |
IMG_add_watermark(byte[] inBuffer,
int page,
int filetype,
String text,
String fontName,
int fontSize,
int verticalPos,
int textDirection,
int color,
boolean transparent)
This method adds a watermark string at the designated placement.
|
int |
IMG_color_gray()
This method converts 24-bit color image to 8-bit gray scale.
|
int |
IMG_create_thumbnail(int xsize,
int ysize)
This method intelligently resizes down images.
|
int |
IMG_decompress_bitmap(DataInputStream di,
int page)
This method decompresses data from a DataInputStream and automatically
detects the file format.
|
int |
IMG_decompress_bitmap(String bitmapName,
int page)
This method decompresses an image from the local disk.
|
int |
IMG_despeckle_bitmap(int quality)
This method removes noise (random pixel data) from 1-bit images.
|
byte[] |
IMG_dwg_to_svg_mem(byte[] buffer,
int[] length,
int[] error,
int[] layer,
int view)
This method returns a byte array containing SVG representation of requested
layer of the DWG buffer passed in.
|
int |
IMG_flip_bitmapx()
This method inverts the current image, changing pixels by a simple XOR
operation applied to each byte of the image in memory.
|
int |
IMG_flip_bitmapy()
This method flips the image vertically to produce a mirror image.
|
int |
IMG_invert_bitmap()
This method inverts the current image, changing pixels by a simple XOR
operation applied to each byte of the image in memory.
|
int |
IMG_promote_24()
This method permanently converts the current 1, 4, or 8-bit image to a 24-bit
image.
|
int |
IMG_promote_8()
This method permanently converts the current 1, 4, 16 or 24-bit image to 8
bit.
|
int |
IMG_resize_bitmap(int xsize,
int ysize)
This method changes the internal size of the image according to the input
parameters.
|
int |
IMG_rotate_bitmap(int angle)
This method rotates the current image clockwise by display angle.
|
byte[] |
IMG_save_bitmap(int outputFormat)
This method saves the current Snowbnd image object to a returned byte array.
|
int |
IMG_save_bitmap(String bitmapName,
int compType)
This method saves the current Snowbnd image object to the format specified by
comp_type.
|
byte[] |
IMG_save_document(byte[] vbuff,
int filetype)
This method will save to a searchable Pdf file.
|
int |
IMG_sharpen_bitmap(int svalue)
This method sharpens or blurs the image.
|
byte[] |
IMG_vector_to_pdf(DataInputStream inPtr,
int page,
int[] error)
Convert document to (vector) PDF.
|
byte[] |
IMG_vector_to_svg(DataInputStream inPtr,
int[] length,
int[] error,
int page)
This method will any vector format to .SVG returned in a bytearray.
|
int |
IMG_window_level(int min,
int max,
int onOff)
This method changes the range of displayed pixels.
|
int |
IMGLOW_append_page(String bitmapName,
byte[] buff,
int format)
This method appends a specified page to an existing multipage pdf or Tiff
document.
|
byte[] |
IMGLOW_appendRedactionAnnots(DataInputStream singlePageStream,
Snow.SnowAnn sann,
int pageNum) |
void |
IMGLOW_close_pdf_writer() |
byte[] |
IMGLOW_create_pdf(byte[] imageData,
boolean shrinkToFit)
Creates a PDF page containing a raster image without processing the raster image at all.
|
byte[] |
IMGLOW_extract_page(DataInputStream di,
int page,
int[] error)
This method extracts the specified page from a multipage pdf or Tiff
document.
|
byte[] |
IMGLOW_extract_page(DataInputStream di,
String pageRange,
int[] error)
This method extracts the specified page from a multipage pdf or Tiff
document.
|
byte[] |
IMGLOW_extract_page(String bitmapName,
int page,
int[] error)
This method extracts the specified page from a multipage pdf or Tiff
document.
|
byte[] |
IMGLOW_extract_text(DataInputStream di,
int page)
This method extracts text from PTOCA files.
|
String[] |
IMGLOW_get_dwg_layers(byte[] buffer,
int[] error)
This method returns an array of Strings containing layer and color names.
|
int |
IMGLOW_get_fileinfo(DataInputStream di,
int page)
This method fills in the height, width, and bits-per-pixel without
decompressing the entire file.
|
int |
IMGLOW_get_fileinfo(String bitmapName,
int page)
This method fills in the height, width, and bits-per-pixel without
decompressing the entire file.
|
int |
IMGLOW_get_filetype(DataInputStream di)
This method returns the filetype of an image.
|
int |
IMGLOW_get_filetype(String bitmapName)
This method returns the file type of an image.
|
int |
IMGLOW_get_image_orientation()
This method returns the orientation of the last image decompressed, if the
information is available.
|
int |
IMGLOW_get_page_rotation(byte[] pageBuff,
int pageNum) |
int |
IMGLOW_get_pages(DataInputStream di)
This method returns the number of pages in a multipage document.
|
int |
IMGLOW_get_pages(String bitmapName)
This method returns the number of pages in a multipage document.
|
int |
IMGLOW_get_tiff_tag(int tag,
int maxBytes,
int[] value,
DataInputStream di,
byte[] buff,
int page)
This method reads a TIFF tag from the file specified.
|
int |
IMGLOW_get_tiff_tag(int tag,
int maxBytes,
int[] value,
String bitmapName,
byte[] buff,
int page)
This method reads a TIFF tag from the file specified.
|
byte[] |
IMGLOW_ocr_bitmap(byte[] inBuffer)
Convert raster buffer to vector pdf buffer.
|
boolean |
IMGLOW_ocr_is_available() |
void |
IMGLOW_ocr_set_dll_path(String path) |
void |
IMGLOW_ocr_set_engine_path(String pathName)
Set path to parent of tessdata folder
|
void |
IMGLOW_ocr_set_lan(String language)
Set language for Tesseract machine
|
boolean |
IMGLOW_page_has_text(DataInputStream documentStream,
int pageNum) |
boolean |
IMGLOW_page_is_image(byte[] pageBuf,
int pageNum) |
int |
IMGLOW_pdf_append_file(DataInputStream dis) |
boolean |
IMGLOW_rects_intersect_with_image_on_page(byte[] pageBuf,
Rectangle2D.Double[] rects) |
byte[] |
IMGLOW_redact_ann(byte[] buff,
Snow.SnowAnn ann,
int color,
int[] error)
This method returns a byte array in Snowbound intermediate format, for saving
via IMG_save_document(), with any text or image data inside the annotation
rectangles redacted.
|
byte[] |
IMGLOW_redact_page(DataInputStream inputStream,
Rectangle2D.Double[] rarray,
int page,
int color,
int[] error)
This method supports PDF redaction by removing text that intersects any of the rectangles
in the rarray argument.
|
byte[] |
IMGLOW_rotate_page(byte[] pageBuff,
int rotateAngle,
int pageNum) |
Snow.SNBD_SEARCH_RESULT[] |
IMGLOW_search_pattern(byte[] buff,
String pattern,
int[] error)
This method returns an array of structures of classes of the type,
SNBD_SEARCH_RESULT.
|
Snow.SNBD_SEARCH_RESULT[] |
IMGLOW_search_text(byte[] buff,
String text,
int caseSense,
int[] error)
This method returns an array of structures of classes of the type,
SNBD_SEARCH_RESULT.
|
int |
IMGLOW_set_ascii_attributes(int xdpi,
int ydpi,
int lmargin,
int rmargin,
int tmargin,
int bmargin,
int tabs,
int pwidth,
int pheight,
int psize,
int charpline,
int lineppage,
boolean weight,
boolean ital,
String fontName,
int lnspacing,
double charspacing)
This method sets attributes for importing an Ascii file into the Java
RasterMaster library.
|
int |
IMGLOW_set_brightness(int value)
This method sets the brightness of the current image.
|
int |
IMGLOW_set_contrast(int value)
This method sets the relative difference between the image's black and white
values.
|
int |
IMGLOW_set_decompsize(int xsize,
int ysize)
This method allows setting the destination size for an image being
decompressed.
|
int |
IMGLOW_set_document_input(int dpi,
int bitsPix,
int format)
This method sets the rendering parameters for decompression of Office files.
|
int |
IMGLOW_set_document_input(int dpi,
int bitsPix,
int format,
double width,
double height)
This method sets the rendering parameters for decompression of Office files.
|
int |
IMGLOW_set_dwg_path(String xRefPath)
This method sets the path for dwg files with xrefs
|
int |
IMGLOW_set_fontmap_path(String st)
This method sets the path for finding the Afp font mapping file.
|
int |
IMGLOW_set_gamma(int value)
This method sets a gamma correction factor which corrects for the gamma or
response curve of the monitor.
|
int |
IMGLOW_set_license_path(InputStream jarStream) |
int |
IMGLOW_set_ooxml_intermediate_format(int formatToConvert,
int intermediateFormat)
Set the OOXML's intermediate conversion file format for a certain OOXML file
formats
|
int |
IMGLOW_set_ooxml_license_input_stream(InputStream inputStream)
Sets/loads the ooxml license from an InputStream.
|
int |
IMGLOW_set_overlay_parameters(String st) |
int |
IMGLOW_set_overlay_path(String st)
This method sets the path for finding overlay files.
|
int |
IMGLOW_set_pdf_input(int dpi,
int bitsPix)
This method allows the conversion of PDF files into bitmaps when decompressed
by RasterMaster products.
|
int |
IMGLOW_set_pdf_output(int xsize,
int ysize)
This method sets the destination size for saving pdf files.
|
int |
IMGLOW_set_pdf_writer(String outputPath) |
int |
IMGLOW_set_UTF_8(int mode)
This method sets the decompression to force Ascii UTF8.
|
void |
set_croprect(int xs,
int ys,
int xe,
int ye)
This method sets the cropping rectangle for the display engine.
|
void |
setAlias(int alias) |
void |
setDecompVect(boolean decompVect) |
void |
setDefaultDepth(int bitsPerPix) |
void |
setDefaultResolution(int resolution) |
void |
setFrame(Container cs) |
void |
setLocale(String locale) |
void |
setOffice_BitsPerPix(int officeBitsPerPix) |
void |
setOffice_resolution(short officeResolution) |
void |
setOfficePagesizeX(double officePagesizeX) |
void |
setOfficePagesizeY(double officePagesizeY) |
void |
setPrintStack(boolean printStack) |
void |
setShowExchangeInfo(boolean showExchange) |
int |
setYdpi(int dpi)
This method sets the resolution, in dpi (dots per inch, 1/72nd of an inch),
along the Y-axis of an image.
|
String |
toString() |
public Snow.Snowbnd getSnowbndObject()
public void checkInterruptedError(int[] error) throws InterruptedException
InterruptedException
public void checkInterruptedError(int error) throws InterruptedException
InterruptedException
public void setLocale(String locale)
public int getSize()
public void setAlias(int alias)
alias
- aliaspublic void setDecompVect(boolean decompVect)
decompVect
- decompress vectors flagpublic void setPrintStack(boolean printStack)
printStack
- print stack flagpublic byte[] IMG_save_bitmap(int outputFormat) throws InterruptedException
outputFormat
- format code to export as. TIFF and PDF are supported.InterruptedException
public void setFrame(Container cs)
public int IMG_decompress_bitmap(String bitmapName, int page) throws InterruptedException
bitmapName
- Path and filename of the image to decompresspage
- Page number for the multipage image fileInterruptedException
public int IMG_save_bitmap(String bitmapName, int compType) throws InterruptedException
bitmapName
- Output file name in which to save.compType
- Output file format code to write. TIFF and PDF are supported.InterruptedException
public int IMG_decompress_bitmap(DataInputStream di, int page) throws InterruptedException
di
- input streampage
- page index to decompress of multi-page formatInterruptedException
public int getWidth()
public double getCropboxX()
public double getCropboxY()
public int getHeight()
public int getXdpi()
public int getYdpi()
public int setYdpi(int dpi)
dpi
- Y DPIpublic int getBitsPerPixel()
public void set_croprect(int xs, int ys, int xe, int ye)
xs
- Starting X position for cropping the imageys
- Starting Y position for cropping the imagexe
- Horizontal size of cropped rectangle in pixelsye
- Vertical size, of cropped rectangle in pixelspublic String[] IMGLOW_get_dwg_layers(byte[] buffer, int[] error)
buffer
- byte array containing DWG file to converterror
- Integer array for returning Snowbound Error code.public byte[] IMG_dwg_to_svg_mem(byte[] buffer, int[] length, int[] error, int[] layer, int view) throws InterruptedException
buffer
- byte array containing DWG file to convertlength
- integer array containing the length of the buffer passed backerror
- Integer array for returning Snowbound Error code.layer
- integer array specifying which layer(s) to convertview
- integer specifying which view to use (currently not used)InterruptedException
public int IMGLOW_set_dwg_path(String xRefPath)
xRefPath
- String containing DWG XREF pathpublic int getUtf8Mode()
public int IMG_window_level(int min, int max, int onOff)
This method changes the range of displayed pixels. Performs window leveling in 8 and 16-bit gray scale images.
Example:
if (Simage.getBitsPerPixel() == 16) Simage.IMG_window_level(0, 0, 1);
min
- Minimum value of window levelmax
- Maximum value of window levelonOff
- 1 = On; 0 = Offpublic int IMG_invert_bitmap() throws InterruptedException
InterruptedException
public int IMG_flip_bitmapx() throws InterruptedException
InterruptedException
public int IMG_flip_bitmapy() throws InterruptedException
InterruptedException
public int IMG_resize_bitmap(int xsize, int ysize) throws InterruptedException
xsize
- Target width of image in pixelsysize
- Target height of image in pixelsInterruptedException
public int IMG_create_thumbnail(int xsize, int ysize) throws InterruptedException
xsize
- Destination width of image after resizingysize
- Destination height of image after resizingInterruptedException
public byte[] IMGLOW_create_pdf(byte[] imageData, boolean shrinkToFit)
imageData
- the raster image datashrinkToFit
- if false, our default behavior of sizing the PDF page to fit the image. If true, will 'shrink'
the image to fit within a standard-sized page (with margins). Note: the parameter in RM is called
"fitToPage", but for clarity has been renamed here.public int IMG_rotate_bitmap(int angle) throws InterruptedException
angle
- Angle to rotate image by, in hundredths of a degree. For example,
to rotate an image by 90 degrees, enter 9000.InterruptedException
public int IMG_despeckle_bitmap(int quality) throws InterruptedException
quality
- Noise reduction setting.
InterruptedException
public int IMGLOW_get_image_orientation()
This method returns the orientation of the last image decompressed, if the information is available. Orientation is used to determine the display angle.
public int IMG_promote_24() throws InterruptedException
InterruptedException
public int IMG_promote_8() throws InterruptedException
InterruptedException
public int IMGLOW_get_filetype(String bitmapName)
bitmapName
- File name and path to an imagepublic int IMGLOW_get_filetype(DataInputStream di)
di
- Image in memorypublic int IMGLOW_get_pages(String bitmapName) throws InterruptedException
bitmapName
- Filename and path to an imageInterruptedException
public int IMGLOW_get_pages(DataInputStream di) throws InterruptedException
di
- An object containing compressed image data. This usually contains
a file loaded into memory, and is commonly, but not necessarily,
multipaged.InterruptedException
public int IMGLOW_set_gamma(int value)
This method sets a gamma correction factor which corrects for the gamma or response curve of the monitor. This can drastically improve the quality of some gray scale or 24-bit images.
value
- public int IMGLOW_set_contrast(int value)
This method sets the relative difference between the image's black and white values.
value
- public int IMGLOW_set_brightness(int value)
This method sets the brightness of the current image.
value
- public int IMGLOW_set_UTF_8(int mode)
mode
- Integer 1 = on 0 = off.public int IMGLOW_get_tiff_tag(int tag, int maxBytes, int[] value, String bitmapName, byte[] buff, int page)
tag
- TIFF tag number to return.maxBytes
- Maximum bytes to read for string tags.value
- Tag value returned: 1 = String, 0 = Non StringbitmapName
- File to read tags from. The file must be locally accessible.buff
- String buffer for returning string tags.page
- Page number for multipage file.public boolean IMGLOW_page_is_image(byte[] pageBuf, int pageNum)
public boolean IMGLOW_rects_intersect_with_image_on_page(byte[] pageBuf, Rectangle2D.Double[] rects)
public byte[] IMGLOW_extract_page(String bitmapName, int page, int[] error) throws InterruptedException
bitmapName
- file path to multipage document to extract page from.page
- The page number to extract starting at 0error
- 1 one integer array to return an error code >= 0 is no error.InterruptedException
public byte[] IMGLOW_extract_page(DataInputStream di, int page, int[] error) throws InterruptedException
di
- DataInputStream containing multipage document to extract page
from.page
- The page number to extract starting at 0error
- 1 one integer array to return an error code >= 0 is no error.InterruptedException
public byte[] IMGLOW_extract_page(DataInputStream di, String pageRange, int[] error) throws InterruptedException
di
- DataInputStream containing multipage document to extract page
from.pageRange
- string containing pages to extract. (i.e, "1-10", "1, 2, 3")
(one-based)error
- 1 one integer array to return an error code >= 0 is no error.InterruptedException
public int IMGLOW_append_page(String bitmapName, byte[] buff, int format) throws InterruptedException
bitmapName
- of multipage document to append page to.buff
- Byte array containing page to append.format
- Rastermaster defined file format Tiff or Pdf.InterruptedException
public int IMGLOW_get_tiff_tag(int tag, int maxBytes, int[] value, DataInputStream di, byte[] buff, int page)
tag
- TIFF tag number to return.maxBytes
- Maximum bytes to read for string tags.value
- Tag value returned: 1 = String, 0 = Non Stringdi
- Object to read tags from.buff
- String buffer for returning string tags.page
- Page number for multipage file.public byte[] IMGLOW_ocr_bitmap(byte[] inBuffer) throws VirtualViewerAPIException
inBuffer
- byte array containing raster file to convertVirtualViewerAPIException
- among other issues, if format not supportedpublic void IMGLOW_ocr_set_engine_path(String pathName)
pathName
- - String ocr parent of tessdata folderpublic void IMGLOW_ocr_set_lan(String language)
language
- - 3 letter string representing a language / regionpublic void IMGLOW_ocr_set_dll_path(String path)
path
- path to tesseract DLLpublic int IMGLOW_set_decompsize(int xsize, int ysize)
This method allows setting the destination size for an image being decompressed. At decompress time, the image is scaled to the destination x and y size. This destination size also represents the image size in pixels, as it is necessary to decompress using IMG_decompress_bitmap. When the IMGLOW_set_alias parameter is set to 4, the above function uses the Bicubic interpolation algorithm for scaling the image smoothly. If the alias parameter is set to 0, the scaling is done by skipping pixels. There is no other processing of neighboring pixels.
xsize
- Destination width of image after resizingysize
- Destination height of image after resizingpublic int IMGLOW_set_overlay_path(String st)
st
- Specifies the path of the overlay filepublic int IMGLOW_set_fontmap_path(String st)
st
- Specifies the path of the snbd_map.fnt filepublic int IMGLOW_set_overlay_parameters(String st)
public int IMGLOW_get_fileinfo(String bitmapName, int page) throws InterruptedException
bitmapName
- file name and path to an Imagepage
- page index of a multipage fileInterruptedException
public int IMGLOW_get_fileinfo(DataInputStream di, int page) throws InterruptedException
di
- java.io.DataInputStream containing Image data in memory.page
- Page number of multipage file.InterruptedException
public int IMGLOW_set_pdf_input(int dpi, int bitsPix)
This method allows the conversion of PDF files into bitmaps when decompressed by RasterMaster products. It allows the programmer to set the bitmap size and pixel depth of the resulting bitmap.
dpi
- Dots per inch in which to render the pdf file.
bitsPix
- Bitmap pixel depth. Set to 1 or 24.public int IMGLOW_set_document_input(int dpi, int bitsPix, int format, double width, double height)
dpi
- Dots per inch in which to render the pcl file.bitsPix
- Bitmap pixel depth. Set to 1 or 24.format
- Snowbound image format as desribed in snow.Defines classwidth
- Page width in inches (i.e. 8.5)height
- Page height in inches (i.e. 11.0)public int IMGLOW_set_document_input(int dpi, int bitsPix, int format)
dpi
- Dots per inch in which to render the pcl file.bitsPix
- Bitmap pixel depth. Set to 1 or 24.format
- Snowbound image format as desribed in snow.Defines classpublic int IMGLOW_set_ooxml_intermediate_format(int formatToConvert, int intermediateFormat)
formatToConvert
- Snowbound file format enumeration for the expected file format
to convertintermediateFormat
- Snowbound file format enumeration for the intermediate format to
use during conversionpublic int IMGLOW_set_ooxml_license_input_stream(InputStream inputStream)
inputStream
- InputStream containing the licensepublic int IMGLOW_set_pdf_output(int xsize, int ysize)
xsize
- Destination width of image after resizingysize
- Destination height of image after resizingpublic int IMGLOW_set_ascii_attributes(int xdpi, int ydpi, int lmargin, int rmargin, int tmargin, int bmargin, int tabs, int pwidth, int pheight, int psize, int charpline, int lineppage, boolean weight, boolean ital, String fontName, int lnspacing, double charspacing)
xdpi
- Horizontal dots per inch for rendering file. 200 or 300 usually.ydpi
- Vertical dots per inch for rendering file. 200 or 300 usually.lmargin
- Left margin size in 1/1000 of an inch.rmargin
- Right margin size in 1/1000 of an inch.tmargin
- Top margin size in 1/1000 of an inch.bmargin
- Bottom margin size in 1/1000 of an inch.tabs
- Number of spaces for a tab.pwidth
- Page width in 1/1000 of an inch.pheight
- Page height in 1/1000 of an inch.psize
- Font height in pixels.charpline
- Characters per line.lineppage
- Lines per page.weight
- Set to True for bold and False for normal.ital
- Set to True for Italic or False for normal.fontName
- Font type name.lnspacing
- Line spacing.charspacing
- Character spacing.public Snow.SNBD_SEARCH_RESULT[] IMGLOW_search_text(byte[] buff, String text, int caseSense, int[] error) throws InterruptedException
buff
- buffer Character buffer to search. Returned from a call to
IMGLOW_extract_text(String, int, int, int).text
- search_String String for which to search.caseSense
- Is search case sensitive. 0 = Not case sensitive 1 = case
sensitiveerror
- Error code.InterruptedException
public Snow.SNBD_SEARCH_RESULT[] IMGLOW_search_pattern(byte[] buff, String pattern, int[] error) throws InterruptedException
buff
- buffer Character buffer to search. Returned from a call to
IMGLOW_extract_text(String, int, int, int).pattern
- search_String Pattern to search.error
- Error code.InterruptedException
public boolean IMGLOW_page_has_text(DataInputStream documentStream, int pageNum)
public byte[] IMGLOW_redact_ann(byte[] buff, Snow.SnowAnn ann, int color, int[] error) throws InterruptedException
buff
- Character buffer to search. Returned from a call to
IMGLOW_extract_text(String, int, int, int).ann
- SnowAnn object with filled rectangle annotations to redact.color
- Redacted rectangle color as packed int (0xrrggbb)error
- Error code.InterruptedException
public byte[] IMGLOW_extract_text(DataInputStream di, int page) throws InterruptedException
di
- DataInputStream containing compressed file datapage
- Page number of file from which to extract textInterruptedException
public byte[] IMG_add_watermark(byte[] inBuffer, int page, int filetype, String text, String fontName, int fontSize, int verticalPos, int textDirection, int color, boolean transparent)
inBuffer
- Buffer containing image datapage
- Page on which to add watermarkfiletype
- type of file in which to add watermarktext
- Text String to be added as watermarkfontName
- Font used to render text stringfontSize
- Font size (in points)verticalPos
- (0:top, 1:center, 2:bottom)textDirection
- (0:left-to-right,1:right-to-left,2:diagonal)color
- (color value 0x00rrggbb)transparent
- true:transparent, false:opaque)public int IMG_color_gray()
public byte[] IMG_save_document(byte[] vbuff, int filetype)
vbuff
- Byte array of extracted text and graphics.filetype
- file type to save to currently only Pdf.public byte[] IMG_vector_to_svg(DataInputStream inPtr, int[] length, int[] error, int page) throws InterruptedException
inPtr
- Input source document contained in a DataInputStream.length
- Length of output buffer returned.error
- int array to return any error code.page
- Input file page number.InterruptedException
public byte[] IMG_vector_to_pdf(DataInputStream inPtr, int page, int[] error) throws InterruptedException
inPtr
- source document contained in DataInputStreampage
- desired page to convert. -1 will convert entire document.error
- positive value (as well as 0) indicates success.
Negative value indicates an error.InterruptedException
public int IMG_sharpen_bitmap(int svalue) throws InterruptedException
This method sharpens or blurs the image. Positive values sharpen the image using a Laplacian method while negative values blur the image using an image-averaging filter.
IMG_sharpen_bitmap Sample Snowbnd snow = new Snowbnd(); snow.IMG_decompress_bitmap("c:/test.tif", 0); snow.IMG_sharpen_bitmap(127); // sharpens snow.IMG_save_bitmap("c:/test.sharpened.tif", 0); Snowbnd snow = new Snowbnd(); snow.IMG_decompress_bitmap("c:/test.tif", 0); snow.IMG_sharpen_bitmap(-127); // blurs snow.IMG_save_bitmap("c:/test.blurred.tif", 0);
svalue
- Integer value from 127 to 127InterruptedException
public byte[] IMGLOW_redact_page(DataInputStream inputStream, Rectangle2D.Double[] rarray, int page, int color, int[] error) throws InterruptedException
inputStream
- DataInputStream containing file data.rarray
- A rectangle or rectangles passed in as arguments.page
- Page number to read.color
- specifies the redaction rectangle colorerror
- contains 0 on successInterruptedException
public int IMGLOW_get_page_rotation(byte[] pageBuff, int pageNum)
public byte[] IMGLOW_rotate_page(byte[] pageBuff, int rotateAngle, int pageNum)
public byte[] IMGLOW_appendRedactionAnnots(DataInputStream singlePageStream, Snow.SnowAnn sann, int pageNum)
public int getDefaultDepth()
public int getDefaultResolution()
public void setDefaultDepth(int bitsPerPix)
public void setDefaultResolution(int resolution)
public int getOffice_BitsPerPix()
public int getOffice_resolution()
public void setOffice_resolution(short officeResolution)
public void setOffice_BitsPerPix(int officeBitsPerPix)
public double getOfficePagesizeX()
public void setOfficePagesizeX(double officePagesizeX)
public double getOfficePagesizeY()
public void setOfficePagesizeY(double officePagesizeY)
public boolean IMGLOW_ocr_is_available()
public void setShowExchangeInfo(boolean showExchange)
public int IMGLOW_set_license_path(InputStream jarStream)
jarStream
- input stream containing Snowbound License JAR contents.public int IMGLOW_set_pdf_writer(String outputPath)
public void IMGLOW_close_pdf_writer()
public int IMGLOW_pdf_append_file(DataInputStream dis)
Copyright © 2020 Snowbound Software Corporation. All rights reserved.