Package Snow
Class Snowbnd
- java.lang.Object
-
- Snow.Snowbnd
-
- All Implemented Interfaces:
java.io.Serializable
public class Snowbnd extends java.lang.Object implements java.io.Serializable
Main class in the RasterMaster SDK. The default constructor for Snowbnd objects is a nullary constructor. It represents one image and all of the operations that you can perform on that image. It is the main API class through which all operations such as decompress, rotate, scroll, zoom, and others are performed.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
alias
int
alias_quality
boolean
decomp_vect
int
dis_crop_xe
int
dis_crop_xs
int
dis_crop_ye
int
dis_crop_ys
Snow.Dib
dis_dib
int
dis_height
int
dis_rotate
int[][]
dis_runs_ptrs
int
dis_width
int
dis_xs
int
dis_xsize
int
dis_ys
int
dis_ysize
static java.lang.String
GIT_HASH
Snow.SnowScrollbar
hsb
boolean
old_scroll
int
orig_height
int
orig_width
int
pdf_bits_per_pixel
int
pdf_dpi
boolean
PrintStack
int
threshold
static int
VERSION_BUILD
static java.lang.String
VERSION_COPYRIGHT
static int
VERSION_MAJOR
static int
VERSION_MINOR
static java.lang.String
VERSION_QUALIFIER
static int
VERSION_REVISION
Snow.SnowScrollbar
vsb
-
Constructor Summary
Constructors Constructor Description Snowbnd()
Snowbnd(int xsize, int ysize, int bitsPerPix)
Alternate constructor for Snowbnd object.Snowbnd(java.util.Date inDate)
Alternate constructor for Snowbnd object.Snowbnd(Snowbnd snow)
Alternate constructor that creates a new Snowbnd object by copying the contents of an existing Snowbnd object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description byte[]
addInfoDictInternal(Snow.SnbdFileio fh, java.util.HashMap<java.lang.String,byte[]> inputInfo, int[] error)
byte[]
addMetaDataInternal(Snow.SnbdFileio fh, byte[] metadata, int flags, int[] error)
java.awt.Rectangle
autoCropBitmap(int margin)
Automatically crop current Snowbnd image object by finding a cropping rectangle that encloses any valid data.byte[]
convertJsonToIntermediate(java.lang.String blob, java.lang.String fontName, int pageNumber)
Converts a JSON blob containing OCR data into RasterMaster Intermediate File Formatbyte[]
convertJsonToPdf(java.lang.String blob, java.lang.String fontName)
Converts a JSON blob containing OCR data into PDF filestatic Snow.DataBuffer
createDataBuffer()
int
decompress_bitmap(Snow.SnbdFileio fh, int offset, int page, Snowbnd snow)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.int
decompressWithFilter(java.lang.String pExt, int pOffset, Snowbnd pSnow, Snow.SnbdFileio pFh)
static int
detectFormat(byte[] buff)
Gets the type of OOXML data.int
detectFormat(Snow.SnbdFileio aFh)
Gets the type of OOXML data.void
display_angle(int angle)
Rotates current Snowbound image object at display time.void
finalize()
Optional finalize for Snowbnd object If scrollbars are used, failure to call this method may result in a resource leak.int
fit_to_height(int value)
Sets an internal flag that forces IMG_display_bitmap_aspect to display by fitting the width of the image to the height of the Container, minus the height of the scroll bars, if any.int
fit_to_width(int value)
Sets an internal flag that forces IMG_display_bitmap_aspect to display by fitting the width of the image to the width of the container, minus the width of the scroll bars, if any.void
get_dib_raster(byte[] sbuff, byte[] dbuff, int ypos, int rasterSize)
Copy specified raster buffer from source image to destination buffervoid
get_dib_raster(byte[] sbuff, byte[] dbuff, int dOffset, int ypos, int rasterSize)
Copy specified raster buffer from source image offset to destination bufferint
get_fit_to_height()
Returns the value set by fit_to_height(int).int
get_fit_to_width()
Returns the value set by fit_to_width(int).int
get_save_raster(byte[] dbuff, int ypos, int rasterSize)
Retrieves one line of raster data from current Snowbound image objectint
get_save_raster(int[] dbuff, int ypos, int rasterSize)
Retrieves one line of raster data from current Snowbound image objectcom.snowbound.rastermaster.AsciiAttributes
getAsciiAttributes()
int
getBitsPerPixel()
int
getBrightnes()
int
getContrast()
double
getCropboxX()
For PDF documents onlydouble
getCropboxY()
For PDF documents onlystatic java.util.Date
getDate()
int
getDefaultDepth()
int
getDefaultResolution()
int
getDis_DecompXsize()
int
getDis_DecompYsize()
int
getDis_display_transp()
int
getDis_dpos()
int
getDis_hPal()
int
getDis_oldhPal()
int
getDis_orientation()
com.snowbound.rastermaster.PAGE_INFO
getDis_pPage()
int
getDis_rast_size()
int
getDis_tcolor()
int
getDis_transparency()
com.snowbound.rastermaster.Display
getDisplay()
int
getGamma()
int
getGet_info()
int
getHeight()
int
getHtmlBitsPerPix()
double
getHtmlPageHeight()
double
getHtmlPageWidth()
int
getHtmlResolution()
int
getInitialZoom(int xsize, int ysize)
Calculates the first zoom increment given the image height and width.int
getJpeg_rows_per_strip()
int
getJpeg_tables_offset()
Snow.SnbdFileio
getJpeg_tables_offset_fh()
int
getLicenseStatus()
java.lang.String
getLocale()
java.awt.color.ICC_ColorSpace
getmJpeg_ICC_ColorSpace()
int
getOffice_BitsPerPix()
int
getOffice_resolution()
double
getOfficePagesizeX()
double
getOfficePagesizeY()
int
getOrig_bits_pix()
int
getOverlay()
java.lang.Object
getOverlayUserData()
Gets private afp/modca user overlay callback informationint
getPagesWithFilter(int fileType, Snowbnd pSnow, Snow.SnbdFileio pFh)
int
getPagesWithFilter(java.lang.String pExt, Snowbnd pSnow, Snow.SnbdFileio pFh)
int
getPdf_xsize()
int
getPdf_ysize()
java.util.HashMap<java.lang.String,byte[]>
getPDFInfoDictInternal(Snow.SnbdFileio fh, int[] error)
byte[]
getPdfPassword()
Get cached PDF user or owner password (in the clear) to use when loading PDF data with some RasterMaster methods.static Snow.PdfRenderingMode
getPdfRenderingMode()
Get which PDF rendering mode is currently in use.int
getScroll_repaint()
java.awt.Container
getSff()
boolean
getShowExchange()
Returns the value of showExchange member variable which determines whether or not to display MS Exchange information when converting MSG files.int
getUtf8Mode()
int
getWidth()
short[]
getWl_lut16()
byte[]
getWl_lut8()
int
getXdpi()
byte[]
getXMPMetaDataInternal(Snow.SnbdFileio fh, int[] error)
int
getYdpi()
byte[]
IMG_add_watermark(byte[] inBuffer, int page, int filetype, java.lang.String text, java.lang.String fontName, int fontSize, int verticalPos, int textDirection, int color, boolean transparent)
Adds a watermark string at the designated placement.byte[]
IMG_add_watermark(java.lang.String filename, int page, int filetype, java.lang.String text, java.lang.String fontName, int fontSize, int verticalPos, int textDirection, int color, boolean transparent)
Adds a watermark string at the designated placement.int
IMG_antique_effect()
Converts color images to look as though they are antique photos.int
IMG_auto_crop_bitmap(int margin)
Automatically crop current Snowbnd image object by finding a cropping rectangle that encloses any valid data.int
IMG_auto_orient(int[] pAngle)
Detect orientation of current Snowbound image object.int
IMG_color_gray()
Converts 24-bit color image to 8-bit gray scale.int
IMG_convert_document(java.io.InputStream inputData, java.io.OutputStream outputData, int outputFormat)
Converts the input data, assumed to be of a certain document format, to output data, assumed to be of a different document format.int
IMG_convert_document(java.lang.String inputName, java.lang.String outputName, int outputFormat)
Converts the input data, assumed to be of a certain document format, to output data, assumed to be of a different document format.int
IMG_create_thumbnail(int xsize, int ysize)
Intelligently subsamples current Snowbound image object.int
IMG_decompress_bitmap(java.awt.Image img, int bitsPix)
Convert a java Image object to Snowbound internal raster format for subsequent manipulation or saving.int
IMG_decompress_bitmap(java.io.DataInputStream dis, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.int
IMG_decompress_bitmap(java.lang.String name, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.int
IMG_decompress_bitmap_fd(java.lang.String name, int offset, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.int
IMG_decompress_bitmap_stream(java.lang.String name, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.int
IMG_decompress_bitmap_stream_onthefly(java.lang.String name, int page, java.awt.Container sf)
Decompress and display partially downloaded image data from a URL.int
IMG_decompress_fax(java.io.DataInputStream dis, int xsize, int ysize, int type, int fillOrder, int offset)
Convert compressed fax proprietary image file formats which use CCITT G3 or G4 compression algorithms to Snowbound internal raster format for subsequent manipulation or saving.int
IMG_decompress_fax(java.lang.String name, int xsize, int ysize, int type, int fillOrder, int offset)
Convert compressed fax proprietary image file formats which use CCITT G3 or G4 compression algorithms to Snowbound internal raster format for subsequent manipulation or saving.int
IMG_decompress_multipage_bitmap_stream_onthefly(java.lang.String name, int page, java.awt.Container sf)
Decompress and display partially downloaded image data from a URL.int
IMG_deskew_bitmap(int angle)
Fast rotate for 1-bit skewed images.int
IMG_despeckel_bitmap(int quality)
Removes noise (random pixel data) from 1-bit images.int
IMG_despeckle_bitmap(int quality)
Removes noise (random pixel data) from 1-bit images.int
IMG_diffusion_mono()
Converts 4, 8 or 24 bit current Snowbound image object to 1-bit per pixel bi-level imageint
IMG_display_bitmap(java.awt.Graphics hdc, int xs, int ys, int xsize, int ysize)
Displays the current Snowbund image object at the current X and Y coordinates, and is not corrected for aspect ratio.int
IMG_display_bitmap_aspect(java.awt.Graphics hdc, java.awt.Container sf, int xs, int ys, int xsize, int ysize, int zoom)
Displays the current Snowbound image object, corrected for aspect ratio, at the current X and Y coordinates.int
IMG_display_bitmap_smooth(java.awt.Graphics hdc, java.awt.Container sf, int xs, int ys, int xsize, int ysize, int zoom)
Displays the current Snowbound image object, corrected for aspect ratio, at the current X and Y coordinates.byte[]
IMG_dwg_to_svg_mem(byte[] buffer, int[] length, int[] error, int[] layer, int view)
Returns a byte array containing SVG representation of requested layer of the DWG buffer passed in.int
IMG_erase_rect(int xs, int ys, int xsize, int ysize, int color, int in_outflag, int operation)
Fills the inside or outside of the specified rectangle (xs, ys, xsize, and ysize parameters) with the color passed in.int
IMG_fill_bitmap_pattern(int xs, int ys, int xsize, int ysize, int width, int height, int xoffset, int yoffset, byte[] pattern)
Allows filling an area of the current Snowbound image object with specified patterns found in the pattern argument.int
IMG_flip_bitmapx()
Flips the current Snowbound image object horizontally to produce a mirror image.int
IMG_flip_bitmapy()
Flips the current Snowbound image object vertically to produce a mirror image.Snowbnd
IMG_get_bitmap_block(int xs, int ys, int xsize, int ysize)
Returns a block of data from the current Snowbound image object and creates a Snowbnd object, where the data is specified by the rectangle constructed from the image's coordinates.int
IMG_get_deskew_angle(int[] angle, int startAngle, int endAngle)
Returns the skew angle for 1-bit images.java.lang.String
IMG_get_version()
Returns the RasterMaster version as a Stringvoid
IMG_get_version(int[] major, int[] minor)
Returns the RasterMaster version id in the two integers that you provide.void
IMG_get_version(int[] major, int[] minor, int[] revision, int[] build)
Returns the RasterMaster version id in the four integers that you provide.int
IMG_histogram_equalize()
Performs a histogram equalization on 8 bit images only.int
IMG_invert_bitmap()
Inverts the current Snowbound image object, changing pixels by a simple XOR operation applied to each byte of the image in memory.int
IMG_merge_block(Snowbnd srcimage, int xpos, int ypos, int operation)
Draws a source image on top of the current Snowbound image object at the x and y coordinates (xpos and ypos) passed in.int
IMG_print_applet(java.awt.Container sf, int res)
Prints images loaded into an applet.int
IMG_print_applet_pages(java.awt.Container sf, int res)
Prints high-resolution multi-page documents from applets.int
IMG_print_bitmap(java.awt.Graphics hdc, int xs, int ys, int xsize, int ysize, int res)
Prints the current Snowbound image object at the specified coordinates.int
IMG_promote_24()
Permanently converts the current 1, 4, or 8-bit Snowbound image object to a 24-bit image.int
IMG_promote_32()
Permanently converts the current 1, 4, or 8-bit Snowbound image object to a 32-bit image.int
IMG_promote_8()
Permanently converts the current 1, 4, 16 or 24-bit Snowbound image object to 8 bit.int
IMG_remove_red_eye(int xs, int ys, int xsize, int ysize)
Detects and converts very red eyes in photos with people to more natural colors.int
IMG_resize_bitmap(int xsize, int ysize)
Changes the internal size of current Snowbound image object according to the input parameters.int
IMG_resize_bitmap_bicubic(int xsize, int ysize)
Scales down current Snowbound image object using a bicubic interpolation algorithm.int
IMG_resize_to_gray(int xsize, int ysize)
Resizes a 1-bit image to a (smaller) 8-bit grayscale image.int
IMG_rgb_to_cmyk()
Converts the current Snowbound image object from 24-bit RGB data to 32-bit CMYK data.int
IMG_rotate_bitmap(int angle)
Rotates the current Snowbound image object clockwise by display angle.int
IMG_save_bitmap(byte[] dos, int type)
Saves the current Snowbnd image object to a byte array in the format specified by type.byte[]
IMG_save_bitmap(byte[] dos, int incrementSize, int type, int[] error)
Saves the current Snowbnd image object in the format specified by type to a byte array.byte[]
IMG_save_bitmap(int initialSize, int incrementSize, int type, int[] error)
Saves the current Snowbnd image object in the format specified by type to a byte array.int
IMG_save_bitmap(java.lang.String name, int type)
Saves the current Snowbnd image object to the format specified by type.int
IMG_save_document(byte[] dos, byte[] vbuff, int filetype)
This method will convert Snowbound Intermediate File Format to SVG or PDFbyte[]
IMG_save_document(byte[] vbuff, int filetype)
This method will convert Snowbound Intermediate File Format to SVG or PDFint
IMG_save_document(java.lang.String name, byte[] vbuff, int filetype)
This method will convert Snowbound Intermediate File Format to SVG or PDFint
IMG_scroll_bitmap(java.awt.Container sf, java.awt.Event evt)
Scrolls current Snowbound image object.int
IMG_scroll_bitmap(java.awt.Container sf, Snow.SnowScrollbar ssb)
Scrolls the current Snowbound image object.void
IMG_set_croprect(int xs, int ys, int xsize, int ysize)
Sets cropping rectangle of current Snowbound image object.int
IMG_sharpen_bitmap(int svalue)
Sharpens or blurs the image.int
IMG_shift_bitmap(int xoffset, int yoffset)
Shifts the current Snowbound image object along the x and y axes, positively or negatively according to the parameters passed in.int
IMG_thresh_mono()
Converts 4, 8 or 24 bit current Snowbound image object to 1-bit per pixel bi-level image threshold value.byte[]
IMG_vector_to_pdf(java.io.DataInputStream iStream, int page, int[] error)
Convert desired document page to (vector) PDF.byte[]
IMG_vector_to_svg(java.io.DataInputStream dis, int[] length, int[] error, int page)
Returns a byte array containing file in SVG format.byte[]
IMG_vector_to_svg(java.io.DataInputStream dis, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.int
IMG_vector_to_svg(java.lang.String inName, java.lang.String outfile, int page)
Converts file format to SVGint
IMG_window_level(int min, int max, int mode)
Changes the range of displayed pixels.void
IMGLOW_add_warning(int code)
Add a warning to warningCode listbyte[]
IMGLOW_addInfoDict(java.io.DataInputStream dis, java.util.HashMap<java.lang.String,byte[]> inputInfo, int[] error)
byte[]
IMGLOW_addInfoDict(java.lang.String fName, java.util.HashMap<java.lang.String,byte[]> inputInfo, int[] error)
byte[]
IMGLOW_addMetaData(java.io.DataInputStream dis, byte[] metadata, int flags, int[] error)
byte[]
IMGLOW_addMetaData(java.lang.String fName, byte[] metadata, int flags, int[] error)
byte[]
IMGLOW_append_page(java.io.DataInputStream dis, byte[] buff, int format, int[] error)
Appends a specified page to an existing multipage PDF or TIFF document contained in an existing DataInputStream.int
IMGLOW_append_page(java.lang.String name, byte[] buff, int format)
Appends a specified page to an existing multipage PDF or TIFF document.byte[]
IMGLOW_appendAnnots(java.io.DataInputStream singlePageStream, SnowAnn sann, int pageNum)
byte[]
IMGLOW_appendRedactionAnnots(java.io.DataInputStream singlePageStream, SnowAnn sann, int pageNum)
int
IMGLOW_auto_invert(int red, int green, int blue, int colorTolerance, double mismatchTolerance)
Invert current Snowbound image object.void
IMGLOW_close_pdf_reader()
This is a PDF specific method that closes a previously opened PDF reader associated with private member variable mPdfReader.void
IMGLOW_close_pdf_writer()
This PDF specific method closes private member variable mPdfWriter that was opened by previous call to IMGLOW_set_pdf_writer()int
IMGLOW_coldplay(java.io.DataInputStream dis)
Decompress and merge image Services cold templates.byte[]
IMGLOW_convert_xfa_to_pdf(java.io.DataInputStream dis, int[] error)
Converts a PDF/XFA document to a 'flattened' PDF documentbyte[]
IMGLOW_convert_xfa_to_pdf(java.lang.String name, int[] error)
Converts a PDF/XFA document to a 'flattened' PDF documentbyte[]
IMGLOW_copyBookmarks(java.io.DataInputStream srcPDF, java.io.DataInputStream dstPDF, int[] params)
IMGLOW_copyBookmarks takes 2 parameters, representing the source PDF file from which to copy bookmarks and the destination PDF file, which shall have the same page count as the source, but no bookmarks.byte[]
IMGLOW_copyBookmarks(java.lang.String srcPDF, java.lang.String dstPDF, int[] params)
IMGLOW_copyBookmarks takes 2 parameters, representing the source PDF file from which to copy bookmarks and the destination PDF file, which shall have the same page count as the source, but no bookmarks.byte[]
IMGLOW_create_pdf(byte[] imageData)
Converts image to a pdf file that contains imageDatabyte[]
IMGLOW_create_pdf(byte[] imageData, boolean fitToPage)
Converts image to a pdf file that contains imageDatabyte[]
IMGLOW_delete_page(java.io.DataInputStream dis, int page, int[] error)
Deletes the specified page from a PDF document.byte[]
IMGLOW_delete_page(java.lang.String name, int pageIndex, int[] error)
Deletes the specified page from a multipage PDF document.double
IMGLOW_detect_blank_page(boolean autodetect, int red, int green, int blue, int tolerance, boolean isLowQuality, boolean isLowMemory)
This method can be used to detect blank pages.int
IMGLOW_detect_color()
Returns bit depth of current Snowbound image objectbyte[]
IMGLOW_docinfo_details(java.lang.String name)
Returns meta data from a PDF documentbyte[]
IMGLOW_encryptPDFFile(byte[] in, byte[] userPW, byte[] ownerPW, int allowFlags, int encryptFlags, int[] error)
Encrypt an existing PDF file, pass the byte stream of the PDF file with the in parameter.byte[]
IMGLOW_extract_page(java.io.DataInputStream dis, int page, int[] error)
Extracts the specified page from a PDF or TIFF document.byte[]
IMGLOW_extract_page(java.io.DataInputStream dis, java.lang.String pageRange, int[] error)
Extracts the specified page from a PDF document.byte[]
IMGLOW_extract_page(java.lang.String name, int page, int[] error)
Extracts the specified page from a PDF or TIFF document.byte[]
IMGLOW_extract_page(java.lang.String name, java.lang.String pageRange, int[] error)
Extracts the specified page from a PDF or TIFF document.byte[]
IMGLOW_extract_page_format(java.io.DataInputStream dis, int page, int[] error, int format)
byte[]
IMGLOW_extract_rotated_page(java.io.DataInputStream dis, int page, int angle, int[] error)
Extracts the specified page from a PDF document and rotates the page.byte[]
IMGLOW_extract_rotated_page(java.lang.String name, int page, int angle, int[] error)
Extracts the specified page from a PDF document and rotates the page.byte[]
IMGLOW_extract_text(java.io.DataInputStream dis, int[] length, int[] error, int page)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.byte[]
IMGLOW_extract_text(java.io.DataInputStream dis, int[] length, int[] error, int page, int format)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.byte[]
IMGLOW_extract_text(java.lang.String name, int[] length, int[] error, int page)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.byte[]
IMGLOW_extract_text(java.lang.String name, int[] length, int[] error, int page, int format)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.byte[]
IMGLOW_extract_text_svg(java.io.DataInputStream dis, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.byte[]
IMGLOW_extract_text_svg(java.lang.String name, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.java.lang.String
IMGLOW_get_bitmap_date()
Gets the Date tag of current Snowbound image object (provided it is a TIFF).java.lang.String
IMGLOW_get_bitmap_name()
Gets the Name or Author and Date tag before saving images TIFF.int
IMGLOW_get_brightness()
Returns the current brightness set by IMGLOW_set_brightness(int).int
IMGLOW_get_contrast()
Returns the current contrast set by IMGLOW_set_contrast(int).java.lang.String[]
IMGLOW_get_dwg_layers(byte[] buffer, int[] error)
Returns an array of Strings containing layer and color names of DWG filejava.lang.String
IMGLOW_get_dwg_xrefs(byte[] buffer, int[] error)
Returns the String and path name of any external xref dwg file.int
IMGLOW_get_fileinfo(java.io.DataInputStream dis, int page)
Sets height, width, and bits-per-pixel without decompressing the entire file.int
IMGLOW_get_fileinfo(java.lang.String name, int page)
Sets height, width, and bits-per-pixel without decompressing the entire file.int
IMGLOW_get_filetype(java.io.DataInputStream dis)
Returns the file type of an documentint
IMGLOW_get_filetype(java.lang.String name)
Returns the file type of documentint
IMGLOW_get_gamma()
Returns the current gamma set by IMGLOW_set_gamma(int).int
IMGLOW_get_image_orientation()
Returns the orientation of current Snowbound image object, if the information is available.java.lang.String
IMGLOW_get_license_path()
Get Snowbound license manager file full path namecom.snowbound.rastermaster.LinkInfo[]
IMGLOW_get_links_for_page(java.io.DataInputStream dis, int pageNumTarget)
com.snowbound.rastermaster.LinkInfo[]
IMGLOW_get_links_for_page(java.lang.String fileName, int pageNumTarget)
int
IMGLOW_get_page_rotation(byte[] pageBuff, int pageNum)
Returns page rotation angle for a particular page in a PDF fileint
IMGLOW_get_pages(java.io.DataInputStream dis)
Returns the number of pages in a multipage document.int
IMGLOW_get_pages(java.io.DataInputStream dis, int fileType)
Returns the number of pages in a multi-page document.int
IMGLOW_get_pages(java.lang.String name)
Returns the number of pages in a multi-page document.byte[]
IMGLOW_get_pdf_text(int pageNum, int[] error)
This is a PDF specific method used to get all text from a specified page of a PDF document previously opened by calling IMGLOW_set_pdf_reader().int
IMGLOW_get_raster(int ypos, byte[] buff)
Returns the raster line specified by the position on the Y-axis into the array buffer.static java.lang.String
IMGLOW_get_server_license()
int
IMGLOW_get_tiff_tag(int tag, int maxBytes, int[] value, java.io.DataInputStream dis, byte[] buff, int page)
Reads a TIFF tag from the file specified.int
IMGLOW_get_tiff_tag(int tag, int maxBytes, int[] value, java.lang.String name, byte[] buff, int page)
Reads a TIFF tag from the file specified.Snow.SnbdWarningCode
IMGLOW_get_warnings()
Returns SnbdWarningCode object.byte[]
IMGLOW_getAttachment(byte[] data, int index)
Gets the indicated attachment from a filebyte[]
IMGLOW_getAttachmentInfo(byte[] data)
Gets a list of attachment meta dataint
IMGLOW_getExifTagInteger(byte[] buffer, int tag)
Gets EXIF meta data integer tag from JPEG filebyte[]
IMGLOW_getExifTagString(byte[] buffer, int tag)
Gets EXIF meta data string tag from JPEG fileint[]
IMGLOW_getPagesWithPattern(java.io.DataInputStream dis, java.lang.String pattern, int[] error)
PDF-specific, allows the caller to determine quickly which pages contain string pattern.int[]
IMGLOW_getPagesWithText(java.io.DataInputStream dis, java.lang.String target, int[] error)
PDF-specific, allows the caller to determine quickly which pages have the target string.java.util.HashMap<java.lang.String,byte[]>
IMGLOW_getPDFInfoDict(java.io.DataInputStream dis, int[] error)
java.util.HashMap<java.lang.String,byte[]>
IMGLOW_getPDFInfoDict(java.lang.String fName, int[] error)
byte[]
IMGLOW_getXMPMetaData(java.io.DataInputStream dis, int[] error)
byte[]
IMGLOW_getXMPMetaData(java.lang.String fName, int[] error)
boolean
IMGLOW_hasBookmarks(java.io.DataInputStream inPDFStream)
boolean
IMGLOW_hasBookmarks(java.lang.String inPDFFileName)
byte[]
IMGLOW_ocr_bitmap(byte[] inBuffer)
byte[]
IMGLOW_ocr_bitmap(java.lang.String fileName)
Convert raster file to vector PDF buffer.java.lang.String
IMGLOW_ocr_get_dll_path(java.lang.String path)
java.lang.String
IMGLOW_ocr_get_engine_path()
Get OCR bin folderjava.lang.String
IMGLOW_ocr_get_lan()
Get language for Tesseract machineboolean
IMGLOW_ocr_is_available()
void
IMGLOW_ocr_set_dll_path(java.lang.String path)
void
IMGLOW_ocr_set_engine_path(java.lang.String pathName)
Set path to parent of tessdata foldervoid
IMGLOW_ocr_set_lan(java.lang.String language)
Set language for Tesseract machineboolean
IMGLOW_page_has_text(java.io.DataInputStream documentStream, int pageNum)
boolean
IMGLOW_page_has_text(java.io.DataInputStream documentStream, int pageNum, int format)
int
IMGLOW_page_image_count(byte[] fileStm, boolean countAll)
Returns the count of images on a specified page of a PDF document.int
IMGLOW_page_image_count(java.lang.String name, int page, boolean countAll)
Returns the count of images on a specified page of a PDF document.boolean
IMGLOW_page_is_image(byte[] pageBuf, int pageNum)
Returns true if pageBuf consists of only image databoolean
IMGLOW_page_is_image(java.lang.String name, int pageNum)
boolean
IMGLOW_page_is_jpeg_image(byte[] pageBuf, int pageNum)
Returns true if pageBuf is JPEG documentboolean
IMGLOW_page_is_jpeg_image(java.lang.String name, int pageNum)
Returns true if file is JPEG documentint
IMGLOW_page_link_annot_count(java.io.DataInputStream dis, int pageNum)
int
IMGLOW_page_link_annot_count(java.lang.String fileName, int pageNum)
int
IMGLOW_pdf_append_file(java.io.DataInputStream dis)
This PDF specific method appends dis to private member variable mPdfWriter which was opened by a previous call to IMGLOW_set_pdf_writer().int
IMGLOW_pdf_append_file(java.io.DataInputStream dis, boolean bMargin)
This PDF specific method appends dis to private member variable mPdfWriter which was opened by a previous call to IMGLOW_set_pdf_writer().int
IMGLOW_pdf_append_file(java.lang.String inputPath)
This PDF specific method appends inputPath to private member variable mPdfWriter which was opened by a previous call to IMGLOW_set_pdf_writer().boolean
IMGLOW_pdf_is_xfa(java.io.DataInputStream dis, int[] error)
Returns true if document is PDF/XFAboolean
IMGLOW_pdf_is_xfa(java.lang.String name, int[] error)
Returns true if document is PDF/XFAboolean
IMGLOW_pdf_isAcroForm(java.io.DataInputStream dis, int[] error)
boolean
IMGLOW_pdf_isAcroForm(java.lang.String name, int[] error)
Returns true if PDF file contains an AcroForm dictionary at the catalog levelint
IMGLOW_process_bitmap(int method, int[] value)
Applies a matrix of values to current Snowbound image object.int
IMGLOW_put_raster(int ypos, byte[] array)
Replaces the raster line specified on the Y-axis with the new image data in the array buffer.boolean
IMGLOW_rect_intersects_with_image_on_page(byte[] pageBuf, java.awt.geom.Rectangle2D.Double[] rect)
boolean
IMGLOW_rects_intersect_with_image_on_page(byte[] pageBuf, java.awt.geom.Rectangle2D.Double[] rects)
boolean
IMGLOW_rects_intersect_with_image_on_page(java.lang.String name, int pageNum, java.awt.geom.Rectangle2D.Double[] rects)
byte[]
IMGLOW_redact_ann(byte[] buff, SnowAnn ann, int color, int[] error)
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(java.io.DataInputStream inputStream, java.awt.geom.Rectangle2D.Double[] rarray, int page, int color, int[] error)
Removes font-based text from PDF file that intercepts the list of rectanglesbyte[]
IMGLOW_redact_page(java.io.DataInputStream inputStream, java.awt.geom.Rectangle2D.Double[] rarray, int page, int color, int[] error, boolean emitAppearances)
This method supports PDF redaction by removing text that intersects any of the rectangles in the rarray argument.int
IMGLOW_redact_page(java.lang.String inputFile, java.lang.String outputFile, java.awt.geom.Rectangle2D.Double[] rarray, int page, int color)
Removes font-based text from PDF file that intercepts the list of rectanglesbyte[]
IMGLOW_redact_rects(byte[] buff, Snow.SNBD_SEARCH_RESULT[] rects, int color, int[] error)
Returns a byte array in Snowbound intermediate format, for saving via IMG_save_document(), with any text or image data inside the rects redacted.byte[]
IMGLOW_redact_text(byte[] buff, java.lang.String text, int flags, int color, int[] error)
Returns a byte array in Snowbound intermediate format, for saving via IMG_save_document(), with the 'text' string redacted.int
IMGLOW_remove_holepunch(int topAndBottom)
Removes large blobs or holed punches from a 1 bit documentint
IMGLOW_remove_lines(int horizontal, int vertical, int minimum)
Removes lines from the current Snowbound image object.byte[]
IMGLOW_rotate_page(byte[] pageBuff, int rotateAngle, int pageNum)
Rotates a particular page in a PDF file.Snow.SNBD_SEARCH_RESULT[]
IMGLOW_search_pattern(byte[] buff, java.lang.String pattern, int[] error)
Returns an array of structures of classes of the type, SNBD_SEARCH_RESULT.Snow.SNBD_SEARCH_RESULT[]
IMGLOW_search_text(byte[] buff, java.lang.String text, int case_sense, int[] error)
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, java.lang.String fontName, int lnspacing, double charspacing)
Sets attributes for importing an Ascii fileint
IMGLOW_set_bitmap_name(java.lang.String img_author, java.lang.String img_date)
Sets the Name or Author and Date tag before saving images to TIFF.int
IMGLOW_set_brightness(int value)
Sets the brightness of the current Snowbound image object.int
IMGLOW_set_comp_quality(int quality)
Sets the compression quality factor when saving JPEG images.int
IMGLOW_set_contrast(int value)
Sets the relative difference between the image's black and white values.int
IMGLOW_set_decomp_rect(int xs, int ys, int xe, int ye)
Allows specifying a rectangle in the image to decompress.int
IMGLOW_set_decompsize(int xsize, int ysize)
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)
Sets the rendering parameters for decompression of MSOffice files.int
IMGLOW_set_document_input(int dpi, int bitsPix, Snow.Defines.SnowExt format)
int
IMGLOW_set_dwg_path(java.lang.String xRefPath)
Sets the path for DWG files that contain xrefsint
IMGLOW_set_fast_convert(int mode, int format)
Sets faster decompression for Modca or AFP.int
IMGLOW_set_fontmap(byte[] buff, int len)
Sets the AFP font mapping data directlyint
IMGLOW_set_fontmap_path(java.lang.String name)
Sets the path for finding the Afp font mapping file.int
IMGLOW_set_gamma(int value)
Sets a gamma correction factor which corrects for the gamma or response curve of the monitor.int
IMGLOW_set_image_orientation(int value)
Sets the orientation flag before saving images to TIFF.int
IMGLOW_set_imnet_page_size(int xsize, int ysize, int dpi)
Sets page properties for IMNET filesint
IMGLOW_set_j2k_decode_parameter(java.lang.String name, java.lang.String value)
Sets the j2k (JPEG2000) decode parameterint
IMGLOW_set_j2k_encode_parameter(java.lang.String name, java.lang.String value)
Sets the j2k (JPEG2000) encode parameter.int
IMGLOW_set_jpg_interleave(int h_int, int v_int)
Sets the JPEG interleave factor for saving JPEG images.int
IMGLOW_set_license_jar(java.io.InputStream iStream)
int
IMGLOW_set_license_json(java.lang.String json)
int
IMGLOW_set_license_path(java.io.InputStream iStream)
Set Snowbound license path from input streamint
IMGLOW_set_license_path(java.lang.String path)
Set full path name to Snowbound License JAR or JSON fileint
IMGLOW_set_msg_render_preference(int preference)
Sets the rendering preferences for MSG files.int
IMGLOW_set_overlay_callback(java.lang.reflect.Method callbackMethod, java.lang.Object userData)
Sets AFP overlay callback function.int
IMGLOW_set_overlay_parameters(java.lang.String st)
int
IMGLOW_set_overlay_path(java.lang.String name)
Sets the path for finding overlay files.int
IMGLOW_set_pcl_input(int dpi, int bitsPerPixel)
Set desired resolution and bit depth for PCL conversions.int
IMGLOW_set_pdf_flags(int flags)
Sets PDF rendering options The flags parameter is used to set bits to change Pdf renderingint
IMGLOW_set_pdf_fontpath(java.lang.String name)
Sets the path for finding the Pdf fonts.int
IMGLOW_set_pdf_input(int dpi, int bitsPerPixel)
Sets desired resolution and bit depth for PDF conversionsint
IMGLOW_set_pdf_output(int xsize, int ysize)
Sets the destination size for saving pdf files.void
IMGLOW_set_pdf_reader(java.io.DataInputStream dis, int[] error)
This is a PDF specific method that associates private member variable mPdfReader with the contents of dis (DataInputStream).int
IMGLOW_set_pdf_writer(java.io.ByteArrayOutputStream oStream)
This PDF-specific method associates private member variable mPdfWriter with contents of oStream.int
IMGLOW_set_pdf_writer(java.lang.String outputPath)
This PDF-specific method associates private member variable mPdfWriter with contents of outputPath.int
IMGLOW_set_pdfa_font_map(byte[] buff, int len)
Specifies the mapping of font aliases to font names and pathsint
IMGLOW_set_pdfa_font_path(java.lang.String pdfaFontPath)
Sets the path for PDF/A saving to use when looking for fontsint
IMGLOW_set_print_header(java.lang.String st, java.lang.String fontName, int fontHeight)
Sets the print header.int
IMGLOW_set_tiff_tag(int tag, int maxBytes, int value, byte[] buff)
Write new and current tags.int
IMGLOW_set_UTF_8(int mode)
Forces ASCII documents to use UTF8 encoding.void
IMGLOW_setHtmlEncoding(java.lang.String charSet)
Set the font encoding (character set) used when rendering HTML files Common Encodings"ISO-8859-1" Western Europe
"ISO-8859-2" Western and Central Europe
"ISO-8859-3" Western, Southern Europe
"ISO-8859-4" Western Europe and Baltic
"ISO-8859-5" Cyrillic alphabet
"ISO-8859-6" Arabic
"ISO-8859-7" Greek
"ISO-8859-8" Hebrew
"ISO-8859-9" Western Europe with amended Turkish
"ISO-8859-10" Western Europe and Nordic
"ISO-8859-11" Thai
"ISO-8859-13" Baltic and Polish
"ISO-8859-14" Celtic
static boolean
IMGLOW_setHtmlExtractionPath(java.lang.String path)
Sets the path for extracting/running the HTML conversion program.int
IMGLOW_setHtmlFontPath(java.lang.String path)
Deprecated.This method has been deprecated as of version 20.13.0.int
IMGLOW_splitPDF(int pagesPerFile, java.lang.String folderName, java.lang.String rootFileName)
PDF-specific method to split an N-page PDF file into N or more smaller PDF files.int
IMGLOW_write_tiff_stream(Snow.Dib_Head lpbi, byte[] dataStream, int dataSize, int fileType, byte[] dos)
Create a TIFF file with existing compressed data.int
IMGLOW_write_tiff_stream(Snow.Dib_Head lpbi, byte[] dataStream, int dataSize, int fileType, java.lang.String name)
Create a tiff file with existing compressed data.byte[]
internal_extract_text(Snow.SnbdFileio fh, int[] length, int[] error, int page)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.byte[]
internal_extract_text_format(Snow.SnbdFileio fh, int[] length, int[] error, int page, int format)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.byte[]
internal_extract_text_svg(Snow.SnbdFileio fh, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.boolean
internal_has_text(Snow.SnbdFileio fh, int pageNum)
boolean
internal_has_text(Snow.SnbdFileio fh, int pageNum, int format)
static boolean
is_bmp(byte[] buff)
Returns true if buff is Bitmap (BMP) documentstatic boolean
is_office(byte[] buff)
Returns true if buff is MSOffice 97-2003 formatstatic boolean
is_pcl(Snow.SnbdFileio fh)
Returns true if buff if PCL (Printer Control Language) documentboolean
isDis_runs_buff()
static boolean
isHeicEnabled()
Determine whether HEIC files will be decoded.static boolean
isOOXML(byte[] buff)
Returns true if buff is PKZip document (MSOffice 2007+)static boolean
isPdfBoxRedactionEnabled()
Determine whether PdfBox will be enabled for PDF redaction.static boolean
isPdfParserBetaEnabled()
Determine whether the new PDF parser will be enabled.boolean
isProductValid(com.snowbound.licensing.v4.common.Enums.Format format)
Checks if specified Snowbound product is licensed.boolean
isWindow_level()
static boolean
isXML(byte[] buff)
Returns true if buff is XML document (MSOffice 2003)void
map_image_to_wnd(java.awt.Container sf, java.awt.Point pt)
Converts image coordinates to screen coordinates for the current Snowbound image object.void
map_image_to_wnd(java.awt.Container sf, Snow.IMG_POINT pt)
Converts image coordinates to screen coordinates for the current Snowbound image object.void
map_wnd_to_image(java.awt.Container sf, java.awt.Point pt)
Converts screen coordinates to image coordinates.void
map_wnd_to_image(java.awt.Container sf, Snow.IMG_POINT pt)
Converts screen coordinates to image coordinates.com.snowbound.licensing.v4.common.Enums.LicenseType
OS_license_type()
Returns type of Snowbound licenseint
ParseColdplayTemplates(java.lang.String name)
Parse Image Services cold templates.int
put_dib_raster_mes(byte[] sbuff, byte[] dbuff, int ypos, int rasterSize, int height)
int
put_dib_raster_mes(byte[] sbuff, int sbuffOffset, byte[] dbuff, int ypos, int rasterSize, int height)
int
put_raster(byte[] sPtr, int ypos, int bytes)
Callback function used to put raster data into current Snowbound image objectint
put_raster(byte[] sPtr, int typos, int tileNum, int tileWidth, int tileHeight)
Callback function used to put tiled raster data into current Snowbound image objectint
put_raster(int[] sPtr, int ypos, int bytes)
Callback function used to put raster data into current Snowbound image objectstatic int
remove00(byte[] fromBuff, byte[] toBuff, int size)
remove the 0x00 from double-byte encodings of charactersvoid
reset_warnings()
Clear warningCode listvoid
set_croprect(int xs, int ys, int xe, int ye)
Sets the cropping rectangle for the display engine.int
set_croprect_scroll(java.awt.Container sf, int xs, int ys, int xe, int ye, int aspect)
Sets the rectangular area of an image to display and also sets up scrollbars.int
set_header(int xsize, int ysize, int bitsPerPix)
Sets current Snowbound image object header information.int
set_header(Snow.Dib lpbi)
Set current Snowbound image object header informationint
set_header(Snow.Dib lpbi, byte[] pData)
Callback function used to set current Snowbound image object using information from a byte arrayint
set_header(Snow.Dib lpbi, com.snowbound.rastermaster.PAGE_INFO pPage)
Callback function used by PDF plug-in to set current Snowbound image object header informationvoid
set_mjics(java.awt.color.ICC_ColorSpace colorSpace)
Sets ICC color space used when converting JPEG CMYK imagesvoid
setBrightnes(int brightness)
void
setContrast(int contrast)
void
setDefaultDepth(int bitsPerPix)
void
setDefaultResolution(int resolution)
void
setDis_DecompXsize(int dis_DecompXsize)
void
setDis_DecompYsize(int dis_DecompYsize)
void
setDis_display_transp(int dis_display_transp)
void
setDis_dpos(int dis_dpos)
void
setDis_hPal(int dis_hPal)
void
setDis_oldhPal(int dis_oldhPal)
void
setDis_orientation(int dis_orientation)
void
setDis_pPage(com.snowbound.rastermaster.PAGE_INFO dis_pPage)
void
setDis_rast_size(int dis_rast_size)
void
setDis_runs_buff(boolean dis_runs_buff)
void
setDis_tcolor(int dis_tcolor)
void
setDis_transparency(int dis_transparency)
void
setDisplay(com.snowbound.rastermaster.Display display)
void
setFormat(com.snowbound.licensing.v4.common.Enums.Format format)
void
setFrame(java.awt.Container cs)
Sets the destination container for image display.void
setGamma(int gamma)
void
setGet_info(int get_info)
static void
setHeicEnabled(boolean enabled)
Set whether HEIC files will be decoded.static int
setHeicLibPath(java.lang.String libraryPath)
Sets the path to the directory to and from which HEIC libraries are written and read.void
setHtmlBitsPerPix(int htmlBitsPerPix)
void
setHtmlPageHeight(double htmlPageHeight)
void
setHtmlPageWidth(double htmlPageWidth)
void
setHtmlResolution(int htmlResolution)
void
setJpeg_rows_per_strip(int jpeg_rows_per_strip)
void
setJpeg_tables_offset(int jpeg_tables_offset)
void
setJpeg_tables_offset_fh(Snow.SnbdFileio jpeg_tables_offset_fh)
void
setLocale(java.lang.String languageTag)
void
setLocale(java.util.Locale le)
void
setmJpeg_ICC_ColorSpace(java.awt.color.ICC_ColorSpace mJpeg_ICC_ColorSpace)
void
setOffice_BitsPerPix(int office_BitsPerPix)
void
setOffice_resolution(short office_resolution)
void
setOfficePagesizeX(double officePagesizeX)
void
setOfficePagesizeY(double officePagesizeY)
void
setOrig_bits_pix(int orig_bits_pix)
void
setOverlay(int overlay)
void
setOverlayUserData(java.lang.Object userData)
Sets private afp/modca user overlay callback informationvoid
setPdf_xsize(int pdf_xsize)
void
setPdf_ysize(int pdf_ysize)
static void
setPdfBoxRedactionEnabled(boolean enabled)
Set whether PdfBox will be enabled for PDF redaction.static void
setPdfParserBetaEnabled(boolean enabled)
Set whether the newer pdf parsing will be enabled.void
setPdfPassword(byte[] pdfPasswordUtf8)
Caches the PDF user or owner password (in the clear) to use when loading PDF data with some RasterMaster methods.static void
setPdfRenderingMode(Snow.PdfRenderingMode desiredMode)
Specifies which PDF rendering mode to use.void
setScroll_repaint(int scroll_repaint)
void
setSff(java.awt.Container sff)
void
setShowExchange(boolean value)
Sets the value of showExchange member variable which determines whether or not to display MS Exchange information when converting MSG files.void
setWindow_level(boolean window_level)
void
setWl_lut16(short[] wl_lut16)
void
setWl_lut8(byte[] wl_lut8)
int
setXdpi(int dpi)
Sets the horizontal resolution (in dots per inch) for subsequent conversionsint
setYdpi(int dpi)
Sets the vertical resolution (in dots per inch) for subsequent conversions.void
SnowExceptions(java.lang.Throwable t)
-
-
-
Field Detail
-
VERSION_MAJOR
public static final int VERSION_MAJOR
- See Also:
- Constant Field Values
-
VERSION_MINOR
public static final int VERSION_MINOR
- See Also:
- Constant Field Values
-
VERSION_REVISION
public static final int VERSION_REVISION
- See Also:
- Constant Field Values
-
VERSION_BUILD
public static final int VERSION_BUILD
- See Also:
- Constant Field Values
-
VERSION_QUALIFIER
public static final java.lang.String VERSION_QUALIFIER
- See Also:
- Constant Field Values
-
GIT_HASH
public static final java.lang.String GIT_HASH
- See Also:
- Constant Field Values
-
VERSION_COPYRIGHT
public static final java.lang.String VERSION_COPYRIGHT
- See Also:
- Constant Field Values
-
alias_quality
public int alias_quality
-
alias
public int alias
-
dis_xs
public int dis_xs
-
dis_ys
public int dis_ys
-
dis_xsize
public int dis_xsize
-
dis_ysize
public int dis_ysize
-
dis_crop_xs
public int dis_crop_xs
-
dis_crop_ys
public int dis_crop_ys
-
dis_crop_xe
public int dis_crop_xe
-
dis_crop_ye
public int dis_crop_ye
-
dis_rotate
public int dis_rotate
-
PrintStack
public boolean PrintStack
-
old_scroll
public boolean old_scroll
-
threshold
public int threshold
-
dis_width
public int dis_width
-
dis_height
public int dis_height
-
orig_width
public int orig_width
-
orig_height
public int orig_height
-
decomp_vect
public boolean decomp_vect
-
dis_runs_ptrs
public int[][] dis_runs_ptrs
-
pdf_dpi
public int pdf_dpi
-
pdf_bits_per_pixel
public int pdf_bits_per_pixel
-
dis_dib
public Snow.Dib dis_dib
-
vsb
public Snow.SnowScrollbar vsb
-
hsb
public Snow.SnowScrollbar hsb
-
-
Constructor Detail
-
Snowbnd
public Snowbnd(java.util.Date inDate)
Alternate constructor for Snowbnd object. This sets the Snowbnd object's Date. This date is used for documents that have a 'current date' field.- Parameters:
inDate
- Date to be used for document conversion.- See Also:
Date
-
Snowbnd
public Snowbnd(int xsize, int ysize, int bitsPerPix)
Alternate constructor for Snowbnd object. This allows the creation of a blank image with allocated memory.- Parameters:
xsize
- Width of blank bitmap to create.ysize
- Height of bitmap to create.bitsPerPix
- Pixel depth of bitmap to create. Can be set to 1, 8, or 24.
-
Snowbnd
public Snowbnd()
-
Snowbnd
public Snowbnd(Snowbnd snow)
Alternate constructor that creates a new Snowbnd object by copying the contents of an existing Snowbnd object.- Parameters:
snow
- existing Snowbnd object.
-
-
Method Detail
-
setPdfRenderingMode
public static void setPdfRenderingMode(Snow.PdfRenderingMode desiredMode)
Specifies which PDF rendering mode to use.- Parameters:
desiredMode
- Which mode to use. In most cases,PdfRenderingMode.Default
is the best choice.
-
getPdfRenderingMode
public static Snow.PdfRenderingMode getPdfRenderingMode()
Get which PDF rendering mode is currently in use.- Returns:
- The selected PDF rendering mode.
-
getDate
public static java.util.Date getDate()
-
setFormat
public void setFormat(com.snowbound.licensing.v4.common.Enums.Format format)
-
isPdfParserBetaEnabled
public static boolean isPdfParserBetaEnabled()
Determine whether the new PDF parser will be enabled.- Returns:
- whether the new PDF parser is enabled.
-
isPdfBoxRedactionEnabled
public static boolean isPdfBoxRedactionEnabled()
Determine whether PdfBox will be enabled for PDF redaction.- Returns:
- whether PdfBox is enabled.
-
isHeicEnabled
public static boolean isHeicEnabled()
Determine whether HEIC files will be decoded.- Returns:
- whether HEIC files will be decoded.
-
setHeicEnabled
public static void setHeicEnabled(boolean enabled)
Set whether HEIC files will be decoded.- Parameters:
enabled
- true to enable HEIC decoding, false otherwise.
-
setPdfParserBetaEnabled
public static void setPdfParserBetaEnabled(boolean enabled)
Set whether the newer pdf parsing will be enabled.- Parameters:
enabled
- true to enable the new pdf parser, false otherwise.
-
setPdfBoxRedactionEnabled
public static void setPdfBoxRedactionEnabled(boolean enabled)
Set whether PdfBox will be enabled for PDF redaction.- Parameters:
enabled
- true to enable PdfBox, false otherwise.
-
getOverlayUserData
public java.lang.Object getOverlayUserData()
Gets private afp/modca user overlay callback information- Returns:
- afp/modca overlay user data set with IMGLOW_set_overlay_callback()
- See Also:
IMGLOW_set_overlay_callback(java.lang.reflect.Method, Object)
-
setOverlayUserData
public void setOverlayUserData(java.lang.Object userData)
Sets private afp/modca user overlay callback information- Parameters:
userData
- private user data used in conjunction with IMGLOW_set_overlay_callback()- See Also:
IMGLOW_set_overlay_callback(java.lang.reflect.Method, Object)
-
set_mjics
public void set_mjics(java.awt.color.ICC_ColorSpace colorSpace)
Sets ICC color space used when converting JPEG CMYK images- Parameters:
colorSpace
- ICC ColorSpace to use- See Also:
ICC_ColorSpace
-
getShowExchange
public boolean getShowExchange()
Returns the value of showExchange member variable which determines whether or not to display MS Exchange information when converting MSG files. Default value is true.- Returns:
- boolean value of MS Exchange information toggle
-
setShowExchange
public void setShowExchange(boolean value)
Sets the value of showExchange member variable which determines whether or not to display MS Exchange information when converting MSG files. Default value is true.- Parameters:
value
- booleantrue
display MS Exchange information.false
don't display MS Exchange information.
-
setFrame
public void setFrame(java.awt.Container cs)
Sets the destination container for image display.- Parameters:
cs
- Container of displayed image (usually "this")- See Also:
Container
-
isProductValid
public boolean isProductValid(com.snowbound.licensing.v4.common.Enums.Format format)
Checks if specified Snowbound product is licensed.- Parameters:
format
- LicenseManager format- Returns:
true
if specified product is licensed;
false
if specified product is not licensed.- See Also:
LicenseManager.isValid(Enums.Format)
,LicenseManager
-
getLicenseStatus
public int getLicenseStatus()
-
IMG_decompress_bitmap_fd
public int IMG_decompress_bitmap_fd(java.lang.String name, int offset, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
name
- full path name of file to decompress.offset
- offset (in bytes) to start of data.page
- zero based page number for multi-page formats- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_decompress_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_decompress_bitmap
public int IMG_decompress_bitmap(java.lang.String name, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
name
- full path name of file to decompresspage
- zero based page number for the multipage image file- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_decompress_fax
public int IMG_decompress_fax(java.lang.String name, int xsize, int ysize, int type, int fillOrder, int offset)
Convert compressed fax proprietary image file formats which use CCITT G3 or G4 compression algorithms to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
name
- absolute path and file name to the filexsize
- width, in pixels, of the image after decompressionysize
- height, in pixels, of the image after decompressiontype
- fax data type2
for Group 3 2D data3
for Group 3 data4
for Group 4 fax data
fillOrder
- byte order0
for CALS - Intel byte order (MSB ->;; LSB)2
for G3 and G4 - Motorola byte order (LSB ->;; MSB)
offset
- absolute position of the first byte of compressed data.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_decompress_fax
public int IMG_decompress_fax(java.io.DataInputStream dis, int xsize, int ysize, int type, int fillOrder, int offset)
Convert compressed fax proprietary image file formats which use CCITT G3 or G4 compression algorithms to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
dis
- DataInputStream containing compressed file dataxsize
- Width, in pixels, of the image after decompressionysize
- Height, in pixels, of the image after decompressiontype
- fax data type2
for Group 3 2D data3
for Group 3 data4
for Group 4 fax data
fillOrder
- byte order0
for CALS - Intel byte order (MSB ->; LSB)2
for G3 and G4 - Motorola byte order (LSB ->; MSB)
offset
- Absolute position (in bytes) of the first byte of compressed data- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_decompress_bitmap
public int IMG_decompress_bitmap(java.awt.Image img, int bitsPix)
Convert a java Image object to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
img
- java Image object to decompress.bitsPix
- destination bits per pixel desired. Data from java Image objects is returned as 24 bits, but you can convert to 1-bit or 8-bit if desired. For color, use 24-bits.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_decompress_bitmap(DataInputStream, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
,Image
-
IMGLOW_create_pdf
public byte[] IMGLOW_create_pdf(byte[] imageData)
Converts image to a pdf file that contains imageData- Parameters:
imageData
- raw image data to embed in pdf file- Returns:
- byte array containing resulting pdf document
-
IMGLOW_create_pdf
public byte[] IMGLOW_create_pdf(byte[] imageData, boolean fitToPage)
Converts image to a pdf file that contains imageData- Parameters:
imageData
- raw image data to embed in pdf filefitToPage
- force image to fit on pre-defined pdf page size specified by IMGLOW_set_pdf_output()- Returns:
- byte array containing resulting pdf document
- See Also:
IMGLOW_set_pdf_output(int, int)
-
IMG_save_bitmap
public int IMG_save_bitmap(java.lang.String name, int type)
Saves the current Snowbnd image object to the format specified by type. If the file does not exist it will be created. If the file already exists, a new page or image is appended for mult-page file types. For single page image formats the file will be overwritten.- Parameters:
name
- full pathname in which to save image datatype
- output file format.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
,Defines
-
IMG_save_bitmap
public int IMG_save_bitmap(byte[] dos, int type)
Saves the current Snowbnd image object to a byte array in the format specified by type. Multi-page saving is supported for MO:DCA, TIFF, PDF.- Parameters:
dos
- byte array in which to save.type
- output file format to write.- Returns:
- positive value is number of bytes of image data stored in dos byte array. A negative value indicates an error.
- See Also:
IMG_save_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
,Defines
-
IMG_save_bitmap
public byte[] IMG_save_bitmap(int initialSize, int incrementSize, int type, int[] error)
Saves the current Snowbnd image object in the format specified by type to a byte array.- Parameters:
initialSize
- initial size of buffer to allocate.incrementSize
- amount to grow the buffer if needed.type
- output file format.error
- positive value indicates size of data buffer returned. negative value indicates an error.- Returns:
- byte array containing image data in format specified by type
- See Also:
IMG_save_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
,Defines
-
IMG_save_bitmap
public byte[] IMG_save_bitmap(byte[] dos, int incrementSize, int type, int[] error)
Saves the current Snowbnd image object in the format specified by type to a byte array.- Parameters:
dos
- buffer to use.incrementSize
- amount to grow the buffer if needed.type
- output formaterror
- a positive value indicates the size of the returned byte array. a negative value indicates an error.- Returns:
- byte array containing image data in format specified by type
- See Also:
IMG_save_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
,Defines
-
get_save_raster
public int get_save_raster(byte[] dbuff, int ypos, int rasterSize)
Retrieves one line of raster data from current Snowbound image object- Parameters:
dbuff
- byte array in which to return raster dataypos
- raster vertical position (desired raster)rasterSize
- number of bytes in one raster- Returns:
- size in bytes of returned raster data
- See Also:
ErrorCodes
-
get_save_raster
public int get_save_raster(int[] dbuff, int ypos, int rasterSize)
Retrieves one line of raster data from current Snowbound image object- Parameters:
dbuff
- integer array in which to return raster dataypos
- raster vertical position (desired raster)rasterSize
- number of pixels in one raster- Returns:
- size of returned raster data
- See Also:
ErrorCodes
-
IMG_decompress_bitmap
public int IMG_decompress_bitmap(java.io.DataInputStream dis, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
dis
- input stream containing image datapage
- zero based page number- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_decompress_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_decompress_bitmap_stream_onthefly
public int IMG_decompress_bitmap_stream_onthefly(java.lang.String name, int page, java.awt.Container sf)
Decompress and display partially downloaded image data from a URL. The image begins to display even before all image data is downloaded. This special method is used by applets. It works the same way as other decompress methods; by automatically detecting the image format.- A display container is required for this method.
- This method should not be used when there are no Graphical User Interface classes.
- Parameters:
name
- full URL file name of image to convert/displaypage
- zero based page numbersf
- container which can get the panel or frame where the application or applet resides- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_decompress_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_decompress_multipage_bitmap_stream_onthefly
public int IMG_decompress_multipage_bitmap_stream_onthefly(java.lang.String name, int page, java.awt.Container sf)
Decompress and display partially downloaded image data from a URL. The image begins to display even before all image data is downloaded. After the first page is decompressed and downloaded, the other pages of a multipage file are downloaded in the background. This allows subsequent pages to be available faster. This special method is used by applets.- A display container is required for this method.
- This method should not be used when there are no Graphical User Interface classes.
- Parameters:
name
- URL and file name of image to decompress, for example, http://www.snowbound.com/image.tifpage
- zero based page numbersf
- container which can get the panel or frame where the application or applet resides- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_decompress_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_decompress_bitmap_stream
public int IMG_decompress_bitmap_stream(java.lang.String name, int page)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
name
- URL and filename of the image to decompress, for example, http://www.snowbound.com/image.tifpage
- zero based page number- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_decompress_bitmap(String, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
getWidth
public int getWidth()
- Returns:
- image width in pixels.
-
getCropboxX
public double getCropboxX()
- For PDF documents only
- Returns:
- top left horizontal position of current image cropbox
-
getCropboxY
public double getCropboxY()
- For PDF documents only
- Returns:
- top left vertical position of current image cropbox
-
getInitialZoom
public int getInitialZoom(int xsize, int ysize)
Calculates the first zoom increment given the image height and width. Sometimes images are smaller than the containers in which they display. In that case, the image fits into the container either by height or width. The zoom increment is simply the ratio of screen pixels to image pixels. For example, if this method returns 35, two zoom operations with a normal zoom increment of 25 are required before the image is noticeably zoomed.- For the first zoom operation on an image, assuming the scrollbars are off, always zoom the image by at least the amount returned from this method.
- getInitialZoom(int, int) is based on the width and height of the panel. Scrolling will not work unless the image fills the entire panel.
- Parameters:
xsize
- panel width in pixelsysize
- panel height in pixels- Returns:
- zoom factor.
-
getHeight
public int getHeight()
- Returns:
- image height in pixels
-
getXdpi
public int getXdpi()
- Returns:
- horizontal resolution in dots per inch or 0 if not set
-
getYdpi
public int getYdpi()
- Returns:
- vertical resolution in dots per inch or 0 if not set
-
setXdpi
public int setXdpi(int dpi)
Sets the horizontal resolution (in dots per inch) for subsequent conversions- Parameters:
dpi
- desired DPI setting- Returns:
- 0
-
setYdpi
public int setYdpi(int dpi)
Sets the vertical resolution (in dots per inch) for subsequent conversions.- Parameters:
dpi
- desired DPI setting- Returns:
- 0
-
getBitsPerPixel
public int getBitsPerPixel()
- Returns:
- bit depth of current image or 0 if not set
-
set_croprect
public void set_croprect(int xs, int ys, int xe, int ye)
Sets the cropping rectangle for the display engine. Only the area of the image inside the current crop rectangle displays. Compare this to IMG_display_bitmap_aspect in which the zoom parameter simply sets the current crop rectangle.- Parameters:
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 pixels- See Also:
IMG_display_bitmap_aspect(java.awt.Graphics, java.awt.Container, int, int, int, int, int)
-
map_wnd_to_image
public void map_wnd_to_image(java.awt.Container sf, java.awt.Point pt)
Converts screen coordinates to image coordinates. Valid only for the current Snowbound image object. This is useful for converting mouse coordinates on the screen to image coordinates, as in creating a selection rectangle (rubber-band zoom).- Parameters:
sf
- container for displayed imagept
- point to be mapped
-
map_wnd_to_image
public void map_wnd_to_image(java.awt.Container sf, Snow.IMG_POINT pt)
Converts screen coordinates to image coordinates. Valid only for the current Snowbound image object. This is useful for converting mouse coordinates on the screen to image coordinates, as in creating a selection rectangle (rubber-band zoom).- Parameters:
sf
- container for displayed imagept
- point to be mapped
-
set_croprect_scroll
public int set_croprect_scroll(java.awt.Container sf, int xs, int ys, int xe, int ye, int aspect)
Sets the rectangular area of an image to display and also sets up scrollbars. Scrollbars are turned on if the size of the cropping rectangle is smaller than the height and/or width of the image.- Parameters:
sf
- container for the displayed image.xs
- starting X position for cropping the image.ys
- starting Y position for cropping the image.xe
- horizontal size in pixels of the cropping rectangle.ye
- vertical size in pixels of the cropping rectangle.aspect
- 1 = preserve the aspect ratio of cropped rectangle. Any other value stretches the image.- Returns:
- new zoom value.
-
map_image_to_wnd
public void map_image_to_wnd(java.awt.Container sf, java.awt.Point pt)
Converts image coordinates to screen coordinates for the current Snowbound image object. This is useful for converting mouse coordinates on the image to screen coordinates, as in creating a selection angle (rubber-band zoom).- Parameters:
sf
- container for displayed imagept
- point to be mapped
-
map_image_to_wnd
public void map_image_to_wnd(java.awt.Container sf, Snow.IMG_POINT pt)
Converts image coordinates to screen coordinates for the current Snowbound image object. This is useful for converting mouse coordinates on the image to screen coordinates, as in creating a selection rectangle (rubber-band zoom).- Parameters:
sf
- container for displayed imagept
- point to be mapped
-
IMG_display_bitmap
public int IMG_display_bitmap(java.awt.Graphics hdc, int xs, int ys, int xsize, int ysize)
Displays the current Snowbund image object at the current X and Y coordinates, and is not corrected for aspect ratio. To use RasterMaster automatic aspect ratio correction during display, use IMG_display_bitmap_aspect.- Parameters:
hdc
- graphics contextxs
- starting X position for drawing the imageys
- starting Y position for drawing the imagexsize
- horizontal size of displayed imageysize
- vertical size of displayed image- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_display_bitmap_aspect(java.awt.Graphics, java.awt.Container, int, int, int, int, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_print_bitmap
public int IMG_print_bitmap(java.awt.Graphics hdc, int xs, int ys, int xsize, int ysize, int res)
Prints the current Snowbound image object at the specified coordinates.- Parameters:
hdc
- graphics portxs
- starting X positionys
- starting Y positionxsize
- horizontal sizeysize
- vertical sizeres
- print resolution in dpi (dots per inch).- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_print_applet
public int IMG_print_applet(java.awt.Container sf, int res)
Prints images loaded into an applet. This method automatically determines in which browser the applet is being displayed, and performs high-resolution corrections for that browser. It also formats the document for high-resolution printing.- Results are browser dependent.
- Parameters:
sf
- java.awt.Container into which image is displayedres
- dots per inch for printed document (must be the same as the printer resolution)- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMGLOW_set_print_header
public int IMGLOW_set_print_header(java.lang.String st, java.lang.String fontName, int fontHeight)
Sets the print header.- Parameters:
st
- path of the print header.fontName
- font name.fontHeight
- font height- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_print_applet_pages
public int IMG_print_applet_pages(java.awt.Container sf, int res)
Prints high-resolution multi-page documents from applets.- Results are browser dependent.
- The resolution passed into this method must match the printer resolution. For example, if the printer is set to print at 300 DPI, make res = 300. Call this method for each page, pass c as null after the last page. A print dialog displays (in Windows), and the print job begins.
- Parameters:
sf
- java.awt.Container of displayed imageres
- resolution in dots per inch of the destination image- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_display_bitmap_aspect
public int IMG_display_bitmap_aspect(java.awt.Graphics hdc, java.awt.Container sf, int xs, int ys, int xsize, int ysize, int zoom)
Displays the current Snowbound image object, corrected for aspect ratio, at the current X and Y coordinates. It also displays scroll bars if the image is zoomed (zoom != 0 and zoom >; Snowbnd.getInitialZoom()). RasterMaster automatically detects whether or not Swing is present, and uses the correct scroll bar for AWT or Swing.- Parameters:
hdc
- graphics contextsf
- current java.awt.Container for imagexs
- starting X position for drawing the imageys
- starting Y position for drawing the imagexsize
- horizontal size of displayed imageysize
- vertical size of displayed imagezoom
- zoom factor:- 0 Display entire image
- 100 One-to-one pixel display
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
getInitialZoom(int, int)
,ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_display_bitmap_smooth
public int IMG_display_bitmap_smooth(java.awt.Graphics hdc, java.awt.Container sf, int xs, int ys, int xsize, int ysize, int zoom)
Displays the current Snowbound image object, corrected for aspect ratio, at the current X and Y coordinates. It also displays scroll bars if the image is zoomed . RasterMaster automatically detects whether or not Swing is present, and uses the correct scroll bar for AWT or Swing.- Parameters:
hdc
- graphics contextsf
- current java.awt.Container for imagexs
- starting X position for drawing the imageys
- starting Y position for drawing the imagexsize
- horizontal size of displayed imageysize
- vertical size of displayed imagezoom
- zoom factor:- 0 Display entire image
- 100 One-to-one pixel display
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_scroll_bitmap
public int IMG_scroll_bitmap(java.awt.Container sf, java.awt.Event evt)
Scrolls current Snowbound image object. It essentially moves the current cropping rectangle in the direction indicated by the ScrollBar thumb. For users who do not want the scrollbars visible, a similar effect can be achieved by moving the cropping rectangle around using IMG_set_croprect.- A HandleEvent method for scrolling is not needed because it is handled internally.
- Parameters:
sf
- current frame or windowevt
- event object passed to the event handler- Returns:
- 0.
- See Also:
IMG_set_croprect(int, int, int, int)
,ErrorCodes
-
IMG_scroll_bitmap
public int IMG_scroll_bitmap(java.awt.Container sf, Snow.SnowScrollbar ssb)
Scrolls the current Snowbound image object.- Parameters:
sf
- current frame or windowssb
- scrollbar- Returns:
- 0.
- See Also:
ErrorCodes
-
display_angle
public void display_angle(int angle)
Rotates current Snowbound image object at display time. The data itself is not changed, but the image is painted at the requested angle. This method is extremely fast, and is the recommended method for rotating when it is unnecessary to permanently change the image data. See IMG_rotate_bitmap(int) for more information.- Parameters:
angle
- The display angle. Valid values are 0, 90, 180 and 270 degrees.- See Also:
IMG_rotate_bitmap(int)
-
autoCropBitmap
public java.awt.Rectangle autoCropBitmap(int margin)
Automatically crop current Snowbnd image object by finding a cropping rectangle that encloses any valid data. i.e. remove whitespace around valid data.- Parameters:
margin
- margin (in pixels) to apply after finding crop rectangle- Returns:
- cropRect Rectangle crop rectangle dimensions or null
-
IMG_auto_crop_bitmap
public int IMG_auto_crop_bitmap(int margin)
Automatically crop current Snowbnd image object by finding a cropping rectangle that encloses any valid data. i.e. remove whitespace around valid data.- Parameters:
margin
- margin (in pixels) to apply after finding crop rectangle- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_auto_orient
public int IMG_auto_orient(int[] pAngle)
Detect orientation of current Snowbound image object.- Parameters:
pAngle
- array in which to return the angle of the image. 0 or 90.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_auto_invert
public int IMGLOW_auto_invert(int red, int green, int blue, int colorTolerance, double mismatchTolerance)
Invert current Snowbound image object.- Parameters:
red
- component of background color (use if 1, 4 or 8 bit images)green
- component of background color (24 bit image only)blue
- component of background color (24 bit image only)colorTolerance
- color-channel pixel-value match tolerance linear distance value.mismatchTolerance
- tolerance percentage. If negative, it will default to 75. If the percentage of background pixels on the page is less than the mismatch tolerance, the image will not be inverted.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_set_croprect
public void IMG_set_croprect(int xs, int ys, int xsize, int ysize)
Sets cropping rectangle of current Snowbound image object. The cropping rectangle is essentially the size of the display container (which is usually a subclass of java.awt.Container), mapped onto the image (corrected for image scaling).- This method is interchangeable with set_croprect(int, int, int, int).
- Crop values are static and should not be used in a multi-threaded environment.
- Parameters:
xs
- coordinate on the X axis for the upper edge of the cropping rectangleys
- coordinate on the Y axis for the left edge of the cropping rectanglexsize
- width of the cropping rectangle in image pixelsysize
- height of the cropping rectangle in image pixels- See Also:
map_wnd_to_image(java.awt.Container, java.awt.Point)
,map_image_to_wnd(java.awt.Container, java.awt.Point)
-
set_header
public int set_header(Snow.Dib lpbi)
Set current Snowbound image object header information- Parameters:
lpbi
- pointer to header- Returns:
- Snowbound Error code
- See Also:
ErrorCodes
-
set_header
public int set_header(Snow.Dib lpbi, byte[] pData)
Callback function used to set current Snowbound image object using information from a byte array- Parameters:
lpbi
- Pointer to current Snowbound image object headerpData
- byte array containing header information- Returns:
- See Also:
ErrorCodes
-
set_header
public int set_header(Snow.Dib lpbi, com.snowbound.rastermaster.PAGE_INFO pPage)
Callback function used by PDF plug-in to set current Snowbound image object header information- Parameters:
lpbi
- current Snowbound image object headerpPage
- PDF specific page information- Returns:
- See Also:
ErrorCodes
-
get_dib_raster
public void get_dib_raster(byte[] sbuff, byte[] dbuff, int ypos, int rasterSize)
Copy specified raster buffer from source image to destination buffer- Parameters:
sbuff
- image buffer from which to copy raster datadbuff
- destination buffer to receive raster dataypos
- image raster positionrasterSize
- byte count to copy- See Also:
ErrorCodes
-
get_dib_raster
public void get_dib_raster(byte[] sbuff, byte[] dbuff, int dOffset, int ypos, int rasterSize)
Copy specified raster buffer from source image offset to destination buffer- Parameters:
sbuff
- image buffer from which to copy raster datadbuff
- destination buffer to receive raster datadOffset
- raster offset position from which to start copyingypos
- image raster positionrasterSize
- byte count to copy- See Also:
ErrorCodes
-
put_dib_raster_mes
public int put_dib_raster_mes(byte[] sbuff, byte[] dbuff, int ypos, int rasterSize, int height)
- Parameters:
sbuff
-dbuff
-ypos
-rasterSize
-height
-- Returns:
- See Also:
ErrorCodes
-
put_dib_raster_mes
public int put_dib_raster_mes(byte[] sbuff, int sbuffOffset, byte[] dbuff, int ypos, int rasterSize, int height)
- Parameters:
sbuff
-sbuffOffset
-dbuff
-ypos
-rasterSize
-height
-- Returns:
- See Also:
ErrorCodes
-
put_raster
public int put_raster(byte[] sPtr, int ypos, int bytes)
Callback function used to put raster data into current Snowbound image object- Parameters:
sPtr
- source data to copy into current Snowbound raster objectypos
- y position in Snowbound raster objectbytes
- number of bytes to copy- Returns:
- See Also:
ErrorCodes
-
put_raster
public int put_raster(int[] sPtr, int ypos, int bytes)
Callback function used to put raster data into current Snowbound image object- Parameters:
sPtr
- source data to copy into current Snowbound raster objectypos
- y position in Snowbound raster objectbytes
- number of bytes to copy- Returns:
- See Also:
ErrorCodes
-
put_raster
public int put_raster(byte[] sPtr, int typos, int tileNum, int tileWidth, int tileHeight)
Callback function used to put tiled raster data into current Snowbound image object- Parameters:
sPtr
- source data to copy into current Snowbound raster objecttypos
- y position in Snowbound raster objecttileNum
- number of tiles to copytileWidth
- tile widthtileHeight
- tile height- Returns:
- See Also:
ErrorCodes
-
IMGLOW_get_dwg_xrefs
public java.lang.String IMGLOW_get_dwg_xrefs(byte[] buffer, int[] error)
Returns the String and path name of any external xref dwg file.- Parameters:
buffer
- buffer containing the full dwg image.error
- Integer array if one length to return the error or status.- Returns:
- a string containing the xref or external file name and path or null.
- See Also:
ErrorCodes
-
IMGLOW_get_dwg_layers
public java.lang.String[] IMGLOW_get_dwg_layers(byte[] buffer, int[] error)
Returns an array of Strings containing layer and color names of DWG file- Parameters:
buffer
- byte array containing DWG file to converterror
- Integer array for returning Snowbound Error code- Returns:
- string string array containing layers and color names or null.
- See Also:
ErrorCodes
-
IMG_dwg_to_svg_mem
public byte[] IMG_dwg_to_svg_mem(byte[] buffer, int[] length, int[] error, int[] layer, int view)
Returns a byte array containing SVG representation of requested layer of the DWG buffer passed in.- Parameters:
buffer
- byte array containing DWG file to convertlength
- integer array containing the length of the buffer passed backerror
- Integer array for returning Snowbound Error codelayer
- integer array specifying which layer(s) to convertview
- integer specifying which view to use (currently not used)- Returns:
- byte array containing SVG representation of requested layer of DWG buffer
- See Also:
ErrorCodes
-
IMGLOW_set_dwg_path
public int IMGLOW_set_dwg_path(java.lang.String xRefPath)
Sets the path for DWG files that contain xrefs- Parameters:
xRefPath
- String containing DWG XREF path- Returns:
- Snowbound Error Code
- See Also:
ErrorCodes
-
setHeicLibPath
public static int setHeicLibPath(java.lang.String libraryPath)
Sets the path to the directory to and from which HEIC libraries are written and read.- Parameters:
libraryPath
- String containing the library load path- Returns:
- See Also:
ErrorCodes
-
decompress_bitmap
public int decompress_bitmap(Snow.SnbdFileio fh, int offset, int page, Snowbnd snow)
Convert a particular page of a document to Snowbound internal raster format for subsequent manipulation or saving.- Parameters:
fh
- file handle from which to readoffset
- offset in bytes to document datapage
- zero based page numbersnow
- Snowbound image object- Returns:
- See Also:
ErrorCodes
-
remove00
public static int remove00(byte[] fromBuff, byte[] toBuff, int size)
remove the 0x00 from double-byte encodings of characters- Parameters:
fromBuff
-toBuff
-size
-- Returns:
- current buffer position
-
isOOXML
public static boolean isOOXML(byte[] buff)
Returns true if buff is PKZip document (MSOffice 2007+)- Parameters:
buff
- buffer containing document data- Returns:
-
isXML
public static boolean isXML(byte[] buff)
Returns true if buff is XML document (MSOffice 2003)- Parameters:
buff
- buffer containing document data- Returns:
-
is_office
public static boolean is_office(byte[] buff)
Returns true if buff is MSOffice 97-2003 format- Parameters:
buff
- buffer containing document data- Returns:
-
is_pcl
public static boolean is_pcl(Snow.SnbdFileio fh)
Returns true if buff if PCL (Printer Control Language) document- Parameters:
fh
- buffer containing document data- Returns:
-
is_bmp
public static boolean is_bmp(byte[] buff)
Returns true if buff is Bitmap (BMP) document- Parameters:
buff
- buffer containing document data- Returns:
-
set_header
public int set_header(int xsize, int ysize, int bitsPerPix)
Sets current Snowbound image object header information.- Parameters:
xsize
- Width of blank bitmap to create.ysize
- Height of bitmap to create.bitsPerPix
- Pixel depth of bitmap to create. Can be set to 1, 8, or 24.- Returns:
- Snowbound Error code
- See Also:
Snowbnd(int, int, int)
,ErrorCodes
-
IMGLOW_set_fast_convert
public int IMGLOW_set_fast_convert(int mode, int format)
Sets faster decompression for Modca or AFP. Pages must be decompressed sequentially. The default is off.- Parameters:
mode
- 1 = set fast on, 0 = set fast off (default).format
- RasterMaster defined file format. currently AFP only.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
Defines
,ErrorCodes
-
IMGLOW_set_UTF_8
public int IMGLOW_set_UTF_8(int mode)
Forces ASCII documents to use UTF8 encoding. The default is 0 (off).- Parameters:
mode
- 0 = off, 1 = on- Returns:
- 0
- See Also:
ErrorCodes
-
getUtf8Mode
public int getUtf8Mode()
- Returns:
- current utf8Mode setting
-
IMGLOW_get_brightness
public int IMGLOW_get_brightness()
Returns the current brightness set by IMGLOW_set_brightness(int). The default is 0.- Returns:
- value between -127 and 127.
- See Also:
IMGLOW_set_brightness(int)
-
IMGLOW_get_contrast
public int IMGLOW_get_contrast()
Returns the current contrast set by IMGLOW_set_contrast(int). The default is 0.- Returns:
- value between -127 and 127.
- See Also:
IMGLOW_set_contrast(int)
-
IMGLOW_get_gamma
public int IMGLOW_get_gamma()
Returns the current gamma set by IMGLOW_set_gamma(int). The default is 100.- Returns:
- value between 0 and 400.
- See Also:
IMGLOW_set_gamma(int)
-
finalize
public void finalize()
Optional finalize for Snowbnd object- If scrollbars are used, failure to call this method may result in a resource leak.
- Calling this method before it has completed all requested operations may result in NullPointerExceptions or ArrayIndexOutOfBoundsExceptions. It is important to be particularly vigilant when calling this method in multithreaded environments.
- Overrides:
finalize
in classjava.lang.Object
- See Also:
Object.finalize()
-
OS_license_type
public com.snowbound.licensing.v4.common.Enums.LicenseType OS_license_type()
Returns type of Snowbound license- Returns:
- See Also:
LicenseManager
-
IMG_window_level
public int IMG_window_level(int min, int max, int mode)
Changes the range of displayed pixels. Performs window leveling in 8 and 16-bit gray scale images.- If the min and max are set to zero, the method automatically calculates the min and max values by analyzing the image.
- A negative value indicates an error. See Appendix G for more information.
- Parameters:
min
- Minimum value of window levelmax
- Maximum value of window levelmode
- 1 = On; 0 = Off- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_remove_lines
public int IMGLOW_remove_lines(int horizontal, int vertical, int minimum)
Removes lines from the current Snowbound image object.- Parameters:
horizontal
- Set to remove horizontal lines.vertical
- Set to remove vertical lines.minimum
- line length to remove.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_process_bitmap
public int IMGLOW_process_bitmap(int method, int[] value)
Applies a matrix of values to current Snowbound image object.- Parameters:
method
- A number to specify predefined matrix values .value
- An array to define your own matrix values.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_invert_bitmap
public int IMG_invert_bitmap()
Inverts the current Snowbound image object, changing pixels by a simple XOR operation applied to each byte of the image in memory. For bi-level images, this method changes black to white and white to black.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_flip_bitmapx
public int IMG_flip_bitmapx()
Flips the current Snowbound image object horizontally to produce a mirror image. PositiveX coordinates along the X-axis are swapped with negative X coordinates, and vice versa.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_flip_bitmapy
public int IMG_flip_bitmapy()
Flips the current Snowbound image object vertically to produce a mirror image. Positive Y coordinates along the Y-axis are swapped with negative Y coordinates, and vice versa.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_resize_bitmap
public int IMG_resize_bitmap(int xsize, int ysize)
Changes the internal size of current Snowbound image object according to the input parameters. The size of the source image is not relevant.- Do not use this method for zooming; you will permanently alter the image data.
- Parameters:
xsize
- Target width of image in pixelsysize
- Target height of image in pixels- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_resize_bitmap_bicubic(int, int)
,ErrorCodes
-
IMG_resize_bitmap_bicubic
public int IMG_resize_bitmap_bicubic(int xsize, int ysize)
Scales down current Snowbound image object using a bicubic interpolation algorithm. It is good for creating high-resolution color image thumbnails. Because this operation is floating-point intensive, it is not as fast as IMG_resize_bitmap, which uses a linear interpolation. Bicubic interpolation takes a four pixel by four pixel block and produces an average of those pixels by weighting the value of the pixel in the average based on its distance from the origin pixel. Pixels farther away have less effect on the resulting pixel's value than do its nearest neighbors. Linear interpolation takes two pixels, separated by x pixels, and averages the two pixels to create an in-between value. These three pixels (the two original pixels and the newly created in-between pixel), are used to represent the original x + 2 pixels (the two original pixels as end points plus all of the pixels in between).- Parameters:
xsize
- Target width of image in pixelsysize
- Target height of image in pixels- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_resize_bitmap(int, int)
,ErrorCodes
-
IMG_create_thumbnail
public int IMG_create_thumbnail(int xsize, int ysize)
Intelligently subsamples current Snowbound image object. It supports any pixel depth and chooses IMG_resize_bitmap_bicubic for color images or IMG_resize_to_gray for 1-bit images. This method is excellent for creating thumbnails.- Parameters:
xsize
- Destination width of image after resizingysize
- Destination height of image after resizing- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_resize_bitmap_bicubic(int, int)
,IMG_resize_to_gray(int, int)
,ErrorCodes
-
IMG_convert_document
public int IMG_convert_document(java.lang.String inputName, java.lang.String outputName, int outputFormat)
Converts the input data, assumed to be of a certain document format, to output data, assumed to be of a different document format.- Parameters:
inputName
- input file pathoutputName
- output file path (if this file exists, then it will be overwritten)outputFormat
- desired output format via a Snowbound file format number (depending on the input format, not all formats will be available for output)- Returns:
- Snowbound error code or the number of bytes written
- See Also:
Defines
,ErrorCodes
-
IMG_convert_document
public int IMG_convert_document(java.io.InputStream inputData, java.io.OutputStream outputData, int outputFormat)
Converts the input data, assumed to be of a certain document format, to output data, assumed to be of a different document format.- Parameters:
inputData
- input streamoutputData
- output streamoutputFormat
- desired output format via a Snowbound file format number (depending on the input format, not all formats will be available for output)- Returns:
- Snowbound error code or the number of bytes written
- See Also:
Defines
,ErrorCodes
-
IMG_resize_to_gray
public int IMG_resize_to_gray(int xsize, int ysize)
Resizes a 1-bit image to a (smaller) 8-bit grayscale image. Use it for making thumbnail versions of documents or engineering drawings. It uses the anti-aliasing method of the display engine to create a high-quality thumbnail.- Parameters:
xsize
- target width of image in pixelsysize
- target height of image in pixels- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_remove_holepunch
public int IMGLOW_remove_holepunch(int topAndBottom)
Removes large blobs or holed punches from a 1 bit document- Parameters:
topAndBottom
- If set attempts to remove top and bottom marks as well as sides.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_rotate_bitmap
public int IMG_rotate_bitmap(int angle)
Rotates the current Snowbound image object clockwise by display angle. This permanently rotates the image in memory. For fast rotation at display time (image is not altered in memory), call display_angle.- Parameters:
angle
- Angle to rotate image by, in hundredths of a degree. For example, to rotate an image by 90 degrees, enter 9000.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
display_angle(int)
,ErrorCodes
-
IMG_deskew_bitmap
public int IMG_deskew_bitmap(int angle)
Fast rotate for 1-bit skewed images. Use this method after IMG_get_deskew_angle returns a skew angle. This method rotates only from -45 to 45 degrees, but is much faster than IMG_rotate_bitmap for 1-bit images. For best results, use values of -20 to 20. See IMG_get_bitmap_block(int, int, int, int) and IMG_rotate_bitmap(int) for more information.- Parameters:
angle
- Angle to rotate image- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_get_deskew_angle(int[], int, int)
,IMG_get_bitmap_block(int, int, int, int)
,IMG_rotate_bitmap(int)
,ErrorCodes
-
IMG_get_deskew_angle
public int IMG_get_deskew_angle(int[] angle, int startAngle, int endAngle)
Returns the skew angle for 1-bit images. In the scanning of multiple pages, images are often slightly skewed or rotated. The values returned in the p_angle[] array should be passed to IMG_deskew_bitmap.- Parameters:
angle
- Integer array to return the rotation or skew angle; this array can have a single elementstartAngle
- Minimum angle to start (no less than -45 degrees; -20 is optimum)endAngle
- Maximum angle to test for (no more than 45 degrees; 20 is optimum)- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_deskew_bitmap(int)
,ErrorCodes
-
IMG_despeckel_bitmap
public int IMG_despeckel_bitmap(int quality)
Removes noise (random pixel data) from 1-bit images. This method works only with 1-bit images. The quality variable can accept a range of 100 values.- Parameters:
quality
- Noise reduction setting.- 1 Minimum noise reduction.
- 30 Normal noise reduction.
- 100 Maximum noise reduction.
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_despeckle_bitmap
public int IMG_despeckle_bitmap(int quality)
Removes noise (random pixel data) from 1-bit images. This method works only with 1-bit images. The quality variable can accept a range of 100 values. A similar method is also available called IMG_despeckel_bitmap.- Parameters:
quality
- Noise reduction setting.- 1 Minimum noise reduction.
- 30 Normal noise reduction.
- 100 Maximum noise reduction.
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_erase_rect
public int IMG_erase_rect(int xs, int ys, int xsize, int ysize, int color, int in_outflag, int operation)
Fills the inside or outside of the specified rectangle (xs, ys, xsize, and ysize parameters) with the color passed in. It can be used to remove borders, for instance. For 24-bit images, the color value must be an RGB-packed pixel; 1 byte red, 1 byte green, and 1 byte blue. For 1-bit images, only the least significant bit is used.- Parameters:
xs
- Start X coordinate of rectangleys
- Start Y coordinate of rectanglexsize
- Width of rectangleysize
- Height of rectanglecolor
- Color to fillin_outflag
-- 1 = fill inside rectangle
- 0 = fill outside rectangle to the borders of the image
operation
-- 1 = xor image rectangle
- 0 = fill image
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_merge_block
public int IMG_merge_block(Snowbnd srcimage, int xpos, int ypos, int operation)
Draws a source image on top of the current Snowbound image object at the x and y coordinates (xpos and ypos) passed in.- The images must have compatible bit depths.
- Parameters:
srcimage
- Source Snowbound image object to mergexpos
- Starting x merge positionypos
- Starting y merge positionoperation
-- 0 = draw entire image
- 1 = draw only the black part of 1-bit images
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_image_orientation
public int IMGLOW_get_image_orientation()
Returns the orientation of current Snowbound image object, if the information is available. Orientation is used to determine the display angle.- Currently, TIFF and CALS can return orientation information.
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_image_orientation
public int IMGLOW_set_image_orientation(int value)
Sets the orientation flag before saving images to TIFF. Orientation changes the default display angle for the image. See the TIFF 6.0 specification (http://www.adobe.com) for the meaning of the orientation flag.- Parameters:
value
-
TIFF- 1 = Rotated 0 degrees
- 2 = Flipped in the x direction
- 3 = Rotated 180 degrees
- 4 = Rotated 180 degrees and flipped in the x direction
- 5 = Rotated 90 degrees and flipped in the x direction
- 6 = Rotated 90 degrees
- 7 = Rotated 270 degrees and flipped in the x direction
- 8 = Rotated 270 degrees
- 0 = Rotated 0 degrees
- 90 = Rotated 90 degrees
- 180 = Rotated 180 degrees
- 270 = Rotated 270 degrees
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_bitmap_name
public int IMGLOW_set_bitmap_name(java.lang.String img_author, java.lang.String img_date)
Sets the Name or Author and Date tag before saving images to TIFF. See the TIFF 6.0 specification (http://www.adobe.com) for the meaning of tags Author 315, and Date 306.- Parameters:
img_author
- Sets the author tag at 315.img_date
- Sets the date tag at 306.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_bitmap_name
public java.lang.String IMGLOW_get_bitmap_name()
Gets the Name or Author and Date tag before saving images TIFF. See the TIFF 6.0 specification (http://www.adobe.com) for the meaning of tags Author 315.- Returns:
- Name or Author and Date tag.
-
IMGLOW_get_bitmap_date
public java.lang.String IMGLOW_get_bitmap_date()
Gets the Date tag of current Snowbound image object (provided it is a TIFF). See the TIFF 6.0 specification (http://www.adobe.com) for the meaning of tags Author 315.- Returns:
- Date tag
-
fit_to_width
public int fit_to_width(int value)
Sets an internal flag that forces IMG_display_bitmap_aspect to display by fitting the width of the image to the width of the container, minus the width of the scroll bars, if any.- Parameters:
value
- positive number to force fit to width- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_display_bitmap_aspect(java.awt.Graphics, java.awt.Container, int, int, int, int, int)
,ErrorCodes
-
get_fit_to_height
public int get_fit_to_height()
Returns the value set by fit_to_height(int).- Returns:
- Integer. It returns a 0 if off or 1 if on.
-
get_fit_to_width
public int get_fit_to_width()
Returns the value set by fit_to_width(int).- Returns:
- Integer. It returns a 0 if off or 1 if on.
-
fit_to_height
public int fit_to_height(int value)
Sets an internal flag that forces IMG_display_bitmap_aspect to display by fitting the width of the image to the height of the Container, minus the height of the scroll bars, if any.- Parameters:
value
- positive value to fit to height- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMG_display_bitmap_aspect(java.awt.Graphics, java.awt.Container, int, int, int, int, int)
,ErrorCodes
-
IMG_get_bitmap_block
public Snowbnd IMG_get_bitmap_block(int xs, int ys, int xsize, int ysize)
Returns a block of data from the current Snowbound image object and creates a Snowbnd object, where the data is specified by the rectangle constructed from the image's coordinates.- Parameters:
xs
- Starting X position for the image blockys
- Starting Y position for the image blockxsize
- Horizontal size of the image block in pixelsysize
- Vertical size of the image block in pixels- Returns:
- A new Snowbnd object
-
IMG_shift_bitmap
public int IMG_shift_bitmap(int xoffset, int yoffset)
Shifts the current Snowbound image object along the x and y axes, positively or negatively according to the parameters passed in. Values are relative.- The height and width of the image do not change, so any data shifted beyond the border of the image is permanently lost.
- Parameters:
xoffset
- Positive or negative horizontal distance to move image datayoffset
- Positive or negative vertical distance to move image data- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_raster
public int IMGLOW_get_raster(int ypos, byte[] buff)
Returns the raster line specified by the position on the Y-axis into the array buffer. Data placed in the array is in the DIB format. This is one line of raw, uncompressed data.- Parameters:
ypos
- Line to retrievebuff
- Buffer to hold data- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_put_raster
public int IMGLOW_put_raster(int ypos, byte[] array)
Replaces the raster line specified on the Y-axis with the new image data in the array buffer. The data to replace is in the DIB format. This is one line of raw uncompressed data.- Parameters:
ypos
- Line to replacearray
- Data with which to replace- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_fill_bitmap_pattern
public int IMG_fill_bitmap_pattern(int xs, int ys, int xsize, int ysize, int width, int height, int xoffset, int yoffset, byte[] pattern)
Allows filling an area of the current Snowbound image object with specified patterns found in the pattern argument.- Parameters:
xs
- Start X position of image to fillys
- Start Y position of image to fillxsize
- Width of pattern area to fillysize
- Height of pattern area to fillwidth
- Width of data in pattern arrayheight
- Height of data in pattern arrayxoffset
- X offset of data in pattern arrayyoffset
- Y offset of data in pattern arraypattern
- Array of pattern data bytes- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_rgb_to_cmyk
public int IMG_rgb_to_cmyk()
Converts the current Snowbound image object from 24-bit RGB data to 32-bit CMYK data. RasterMaster products support full 32-bit CMYK data as an internal 32-bit DIB format. The black plane is created.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_promote_32
public int IMG_promote_32()
Permanently converts the current 1, 4, or 8-bit Snowbound image object to a 32-bit image. This automatically disables anti-aliasing for 1-bit images.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_promote_24
public int IMG_promote_24()
Permanently converts the current 1, 4, or 8-bit Snowbound image object to a 24-bit image. This automatically disables anti-aliasing for 1-bit images.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_promote_8
public int IMG_promote_8()
Permanently converts the current 1, 4, 16 or 24-bit Snowbound image object to 8 bit.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_diffusion_mono
public int IMG_diffusion_mono()
Converts 4, 8 or 24 bit current Snowbound image object to 1-bit per pixel bi-level image- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_thresh_mono
public int IMG_thresh_mono()
Converts 4, 8 or 24 bit current Snowbound image object to 1-bit per pixel bi-level image threshold value. Median value to convert a byte to 1 0r 0.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_detect_color
public int IMGLOW_detect_color()
Returns bit depth of current Snowbound image object- Returns:
- the bits per pixel (1, 8, 24)
-
IMGLOW_set_comp_quality
public int IMGLOW_set_comp_quality(int quality)
Sets the compression quality factor when saving JPEG images.- Parameters:
quality
-- 0 = Smallest file size and lowest quality image
- 100 = Largest file size and highest quality image
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_jpg_interleave
public int IMGLOW_set_jpg_interleave(int h_int, int v_int)
Sets the JPEG interleave factor for saving JPEG images. This is the factor for decimating the blue and red chroma planes when writing out JPEG images.- To obtain the highest quality image, set both variables to a value of 1 (does not skip any lines).
- The default, JPEG uses a 2:1 interleaving factor. It skips every other pixel in the X direction.
- Parameters:
h_int
- Integer 1, 2, or 4. Specifies the number of horizontal pixels to skip. You can specify up to the height of the file, but this is not recommended.v_int
- Integer 1, 2, or 4. Specifies the number of vertical pixels to skip. You can specify up to the width of the file, but this is not recommended.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_filetype
public int IMGLOW_get_filetype(java.lang.String name)
Returns the file type of document- Parameters:
name
- full path and file name of image- Returns:
- Any positive value is the image type. A negative value indicates an error.
- See Also:
Defines
,ErrorCodes
-
IMGLOW_get_filetype
public int IMGLOW_get_filetype(java.io.DataInputStream dis)
Returns the file type of an document- Parameters:
dis
- Image in memory- Returns:
- Any positive value is the image type. A negative value indicates an error.
- See Also:
Defines
,ErrorCodes
-
IMGLOW_get_pages
public int IMGLOW_get_pages(java.lang.String name)
Returns the number of pages in a multi-page document.- Parameters:
name
- full path name of image- Returns:
- Any positive value is the number of pages in the image. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_pages
public int IMGLOW_get_pages(java.io.DataInputStream dis)
Returns the number of pages in a multipage document.- Parameters:
dis
- An object containing compressed image data. This usually contains a file loaded into memory, and is commonly, but not necessarily, multipaged.- Returns:
- Any positive value is the number of pages in the image. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_pages
public int IMGLOW_get_pages(java.io.DataInputStream dis, int fileType)
Returns the number of pages in a multi-page document.- Parameters:
dis
- An object containing compressed image data. This usually contains a file loaded into memory, and is commonly, but not necessarily, multipaged.fileType
- Snowbound file format type- Returns:
- Any positive value is the number of pages in the image. A negative value indicates an error.
- See Also:
Defines
,ErrorCodes
-
SnowExceptions
public void SnowExceptions(java.lang.Throwable t)
-
IMGLOW_set_gamma
public int IMGLOW_set_gamma(int value)
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.- Setting and saving the gamma factor permanently affects color and grayscale image data.
- This method has no effect on 1-bit images, except at display time if anti-alias is on, and alias = 2.
- Parameters:
value
-- 0 No gamma correction
- 100 Default gamma correction (1.00)
- 400 Maximum gamma correction (4.00)
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_contrast
public int IMGLOW_set_contrast(int value)
Sets the relative difference between the image's black and white values.- Setting and saving the contrast permanently affects color and grayscale image data.
- This method has no effect on 1-bit images, except at display time if anti-alias is on and alias = 2.
- Parameters:
value
-- -127 (minimum) Displays the image with minimum contrast between the image's black and white colors.
- 0 (Default) Retains the image's native contrast.
- +127 (maximum) Displays maximum contrast, causing the whites to be whiter and the blacks to be blacker.
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_brightness
public int IMGLOW_set_brightness(int value)
Sets the brightness of the current Snowbound image object.- Setting and saving the brightness permanently affects color and grayscale image data.
- This method has no effect on 1-bit images, except at display time (if anti-alias is on, and alias = 2).
- Parameters:
value
-- -127 Sets the image's brightness to the lowest (darkest) setting
- 0 (Default) Retains the image's native brightness
- +127 Sets the image's brightness to the highest (lightest) setting
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_tiff_tag
public int IMGLOW_get_tiff_tag(int tag, int maxBytes, int[] value, java.lang.String name, byte[] buff, int page)
Reads a TIFF tag from the file specified. The tag may be either a string returned in buff or an int, short, or byte returned in value.- Parameters:
tag
- TIFF tag number to return.maxBytes
- Maximum bytes to read for string tags.value
- Tag value returned: 1 = String, 0 = Non Stringname
- File to read tags from. The file must be locally accessible.buff
- String buffer for returning string tags.page
- Zero based page number for multipage file.- Returns:
- dependent on how value variable is set.
- See Also:
ErrorCodes
-
IMGLOW_delete_page
public byte[] IMGLOW_delete_page(java.lang.String name, int pageIndex, int[] error)
Deletes the specified page from a multipage PDF document. The content of the resulting document is returned in the form of a byte array. Attempts to delete from a single page file will result in an empty buffer returned with an error of PDF_OPERATION_NOT_SUPPORTED.- Parameters:
name
- of multipage document to extract page from.pageIndex
- 0-based page index to deleteerror
- 1 one element integer array to return an error code; < 0 is error, >;= 0 is no error.- Returns:
- a byte array the resulting document with the specified page deleted.
- See Also:
ErrorCodes
-
IMGLOW_delete_page
public byte[] IMGLOW_delete_page(java.io.DataInputStream dis, int page, int[] error)
Deletes the specified page from a PDF document. The content of the resulting document is returned in the form of a byte array.- Parameters:
dis
- DataInputStream containing multipage document from which to delete pagepage
- 0-based page index to deleteerror
- 1 one integer array to return an error code >;= 0 is no error.- Returns:
- a byte array the resulting document with the specified page deleted.
- See Also:
ErrorCodes
-
IMGLOW_page_image_count
public int IMGLOW_page_image_count(byte[] fileStm, boolean countAll)
Returns the count of images on a specified page of a PDF document.- Parameters:
fileStm
- byte array containing multipage PDF document from which to get image count.countAll
- if true, will return count of all the images, otherwise, returns 1 after first image is seen- Returns:
- Number of images detected on desired page. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_page_image_count
public int IMGLOW_page_image_count(java.lang.String name, int page, boolean countAll)
Returns the count of images on a specified page of a PDF document.- Parameters:
name
- Name of multipage PDF document from which to get imaage count.page
- Page number of interest - zero based.countAll
- if true, will return count of all the images, otherwise, returns 1 after first image is seen- Returns:
- Number of images detected on desired page. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_docinfo_details
public byte[] IMGLOW_docinfo_details(java.lang.String name)
Returns meta data from a PDF document- Parameters:
name
- full path name of document- Returns:
- byte array containing PDF document information
-
IMGLOW_page_is_image
public boolean IMGLOW_page_is_image(java.lang.String name, int pageNum)
- Parameters:
name
-pageNum
-- Returns:
-
IMGLOW_page_is_image
public boolean IMGLOW_page_is_image(byte[] pageBuf, int pageNum)
Returns true if pageBuf consists of only image data- Parameters:
pageBuf
-pageNum
-- Returns:
-
IMGLOW_page_is_jpeg_image
public boolean IMGLOW_page_is_jpeg_image(java.lang.String name, int pageNum)
Returns true if file is JPEG document- Parameters:
name
- full path namepageNum
- zero based page number- Returns:
-
IMGLOW_page_is_jpeg_image
public boolean IMGLOW_page_is_jpeg_image(byte[] pageBuf, int pageNum)
Returns true if pageBuf is JPEG document- Parameters:
pageBuf
- buffer containing document datapageNum
- zero based page number- Returns:
-
IMGLOW_rects_intersect_with_image_on_page
public boolean IMGLOW_rects_intersect_with_image_on_page(java.lang.String name, int pageNum, java.awt.geom.Rectangle2D.Double[] rects)
- Parameters:
name
-pageNum
-rects
-- Returns:
-
IMGLOW_rect_intersects_with_image_on_page
public boolean IMGLOW_rect_intersects_with_image_on_page(byte[] pageBuf, java.awt.geom.Rectangle2D.Double[] rect)
- Parameters:
pageBuf
-rect
-- Returns:
-
IMGLOW_rects_intersect_with_image_on_page
public boolean IMGLOW_rects_intersect_with_image_on_page(byte[] pageBuf, java.awt.geom.Rectangle2D.Double[] rects)
- Parameters:
pageBuf
-rects
-- Returns:
-
IMGLOW_page_link_annot_count
public int IMGLOW_page_link_annot_count(java.lang.String fileName, int pageNum)
- Parameters:
fileName
-pageNum
- 0-based target page number within the file- Returns:
- integer representing the number of link annotations on the PDF page indicated by pageNum (0-based) for files with no links the function will return 0. if pageNum is not a valid page within the file, -1 will be returned otherwise the count of link annotations on the page will be returned
-
IMGLOW_page_link_annot_count
public int IMGLOW_page_link_annot_count(java.io.DataInputStream dis, int pageNum)
- Parameters:
dis
- DataInputStream representing a PDF filepageNum
- 0-based target page number within the file- Returns:
- integer representing the number of link annotations on the PDF page indicated by pageNum (0-based) for files with no links the function will return 0. if pageNum is not a valid page within the file, -1 will be returned otherwise the count of link annotations on the page will be returned
-
IMGLOW_get_links_for_page
public com.snowbound.rastermaster.LinkInfo[] IMGLOW_get_links_for_page(java.io.DataInputStream dis, int pageNumTarget)
- Parameters:
dis
- stream representing the bytes from the PDF filepageNumTarget
- 0-based target page number- Returns:
- an array of LinkInfo The linkRect units are in PDF coordinate space, 72 points/inch, with origin at lower left corner of page uri type links are strings representing uniform resource identifiers, typically files which are the destination of a hypertext link pagenum represents the 0-based number of the page targeted by this link within the file
- See Also:
}
-
IMGLOW_get_links_for_page
public com.snowbound.rastermaster.LinkInfo[] IMGLOW_get_links_for_page(java.lang.String fileName, int pageNumTarget)
- Parameters:
fileName
- String representing the PDF file name containing the linkspageNumTarget
- target page- See Also:
}
-
IMGLOW_extract_page
public byte[] IMGLOW_extract_page(java.lang.String name, int page, int[] error)
Extracts the specified page from a PDF or TIFF document.- Parameters:
name
- of document to extract page from.page
- zero based page indexerror
- 1 one integer array to return an error code >;= 0 is no error.- Returns:
- byte array of the extracted page.
- See Also:
ErrorCodes
-
IMGLOW_extract_page
public byte[] IMGLOW_extract_page(java.lang.String name, java.lang.String pageRange, int[] error)
Extracts the specified page from a PDF or TIFF document.- Parameters:
name
- of 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.- Returns:
- byte array of the extracted page.
- See Also:
ErrorCodes
-
IMGLOW_extract_rotated_page
public byte[] IMGLOW_extract_rotated_page(java.lang.String name, int page, int angle, int[] error)
Extracts the specified page from a PDF document and rotates the page.- Parameters:
name
- of document to extract page from.page
- zero based page indexangle
- Angle to rotate image by, in hundredths of a degree. Valid values are 9000, 18000, and 27000.error
- 1 one integer array to return an error code >;= 0 is no error.- Returns:
- byte array of the extracted page.
- See Also:
ErrorCodes
-
IMGLOW_extract_page_format
public byte[] IMGLOW_extract_page_format(java.io.DataInputStream dis, int page, int[] error, int format)
- Parameters:
dis
-page
-error
-format
-- Returns:
- See Also:
ErrorCodes
-
IMGLOW_extract_page
public byte[] IMGLOW_extract_page(java.io.DataInputStream dis, int page, int[] error)
Extracts the specified page from a PDF or TIFF document.- Parameters:
dis
- DataInputStream containing multipage document to extract page from.page
- zero based page indexerror
- 1 one integer array to return an error code >;= 0 is no error.- Returns:
- byte array of the extracted page.
- See Also:
ErrorCodes
-
IMGLOW_extract_page
public byte[] IMGLOW_extract_page(java.io.DataInputStream dis, java.lang.String pageRange, int[] error)
Extracts the specified page from a PDF document.- Parameters:
dis
- 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.- Returns:
- byte array of the extracted page.
- See Also:
ErrorCodes
-
IMGLOW_pdf_is_xfa
public boolean IMGLOW_pdf_is_xfa(java.io.DataInputStream dis, int[] error)
Returns true if document is PDF/XFA- Parameters:
dis
- DataIputStream containing document dataerror
-- Returns:
- See Also:
ErrorCodes
-
IMGLOW_pdf_isAcroForm
public boolean IMGLOW_pdf_isAcroForm(java.lang.String name, int[] error)
Returns true if PDF file contains an AcroForm dictionary at the catalog level- Parameters:
name
- full path and file nameerror
-- Returns:
- See Also:
ErrorCodes
-
IMGLOW_pdf_isAcroForm
public boolean IMGLOW_pdf_isAcroForm(java.io.DataInputStream dis, int[] error)
-
IMGLOW_pdf_is_xfa
public boolean IMGLOW_pdf_is_xfa(java.lang.String name, int[] error)
Returns true if document is PDF/XFA- Parameters:
name
- full path and file nameerror
-- Returns:
- See Also:
ErrorCodes
-
IMGLOW_convert_xfa_to_pdf
public byte[] IMGLOW_convert_xfa_to_pdf(java.io.DataInputStream dis, int[] error)
Converts a PDF/XFA document to a 'flattened' PDF document- Parameters:
dis
- DataInputStream containing file data to converterror
- one integer array to return an error code >;= 0 is no error.- Returns:
- byte array containing 'flattened' PDF document
- See Also:
ErrorCodes
-
IMGLOW_convert_xfa_to_pdf
public byte[] IMGLOW_convert_xfa_to_pdf(java.lang.String name, int[] error)
Converts a PDF/XFA document to a 'flattened' PDF document- Parameters:
name
- full path name of document to converterror
- one integer array to return an error code >;= 0 is no error.- Returns:
- byte array containing 'flattened' PDF document
- See Also:
ErrorCodes
-
IMGLOW_extract_rotated_page
public byte[] IMGLOW_extract_rotated_page(java.io.DataInputStream dis, int page, int angle, int[] error)
Extracts the specified page from a PDF document and rotates the page.- Parameters:
dis
- DataInputStream containing document from which to extract page.page
- zero based page indexangle
- Angle to rotate image by, in hundredths of a degree. Valid values are 9000, 18000, and 27000.error
- 1 one integer array to return an error code >;= 0 is no error.- Returns:
- byte array of the extracted page.
- See Also:
ErrorCodes
-
IMGLOW_encryptPDFFile
public byte[] IMGLOW_encryptPDFFile(byte[] in, byte[] userPW, byte[] ownerPW, int allowFlags, int encryptFlags, int[] error)
Encrypt an existing PDF file, pass the byte stream of the PDF file with the in parameter. If no password is desired, pass null for user and owner password params To force users to input a password in order to open the file, pass a non-null user password- Parameters:
in
- byte stream of PDF file to encryptuserPW
- pass non-null string to force user to enter this password when opening the PDFownerPW
- password for encryption key, not requiredallowFlags
- Specify features using these constants: ENCRYPT_ALLOW_LOWRES_PRINTING = 0x4; ENCRYPT_ALLOW_MODIFY_CONTENTS = 0x8; ENCRYPT_ALLOW_COPY = 0x10; ENCRYPT_ALLOW_MODIFY_ANNOTS = 0x20; ENCRYPT_ALLOW_FILLIN = 0x100; ENCRYPT_ALLOW_SCREENREADER = 0x200; ENCRYPT_ALLOW_ASSEMBLY = 0x400; ENCRYPT_ALLOW_PRINTING = 0x804; These constants mirror the features from the Acrobat security panel in the document info dialog: Content Copying : Not Allowed Content Copying for Accessibility : Not Allowed Commenting : Not Allowed Filling of form fields : Not Allowed Signing : Not Allowed Creation of Template Pages : Not Allowed These may be or'ed together to control the securing of multiple features.encryptFlags
- Controls the level of encryption, one of: int ENCRYPT_STANDARD_40 = 0; int ENCRYPT_STANDARD_128 = 0x1; int ENCRYPT_AES_128 = 0x2; int ENCRYPT_AES_256 = 0x3;error
- any error condition is put in this array, 0 means success- Returns:
- byte array representing encrypted file
- See Also:
ErrorCodes
-
IMGLOW_hasBookmarks
public boolean IMGLOW_hasBookmarks(java.lang.String inPDFFileName)
- Parameters:
inPDFFileName
-- Returns:
- boolean indicating presence or absence of bookmarks
-
IMGLOW_hasBookmarks
public boolean IMGLOW_hasBookmarks(java.io.DataInputStream inPDFStream)
- Parameters:
inPDFStream
-- Returns:
- boolean indicating presence or absence of bookmarks
-
IMGLOW_copyBookmarks
public byte[] IMGLOW_copyBookmarks(java.lang.String srcPDF, java.lang.String dstPDF, int[] params)
IMGLOW_copyBookmarks takes 2 parameters, representing the source PDF file from which to copy bookmarks and the destination PDF file, which shall have the same page count as the source, but no bookmarks. If the destination PDF has a bookmark tree, we return null. If the page counts between the two files are unequal we return null.- Parameters:
params
- input: placeholder for future use, output: returns error status as described above We traverse the bookmark tree of the source file, strip out the entries in the bookmark dictionary, and copy the relevant fields into a new bookmark which is added to the tree for the destination file. The current code preserves the hierarchy of the bookmark tree.srcPDF
-dstPDF
-- Returns:
- Bytes from the modified destination PDF are returned to the caller. copyBookmarks exists for a specific purpose: to enable the copying of bookmarks to a multi-page PDF file which was redacted via our single page extract, then append process. This page-at-a-time process requires a post-processing approach to preserve document-level structures like the bookmark tree. Three possible error conditions exist: 1: destination contains bookmarks 2: source and destination files have different page counts 3: any internal error arising from creation of new bookmarks
-
IMGLOW_copyBookmarks
public byte[] IMGLOW_copyBookmarks(java.io.DataInputStream srcPDF, java.io.DataInputStream dstPDF, int[] params)
IMGLOW_copyBookmarks takes 2 parameters, representing the source PDF file from which to copy bookmarks and the destination PDF file, which shall have the same page count as the source, but no bookmarks. If the destination PDF has a bookmark tree, we return null. If the page counts between the two files are unequal we return null.- Parameters:
params
- input: placeholder for future use, output: returns error status as described above We traverse the bookmark tree of the source file, strip out the entries in the bookmark dictionary, and copy the relevant fields into a new bookmark which is added to the tree for the destination file. The current code preserves the hierarchy of the bookmark tree.srcPDF
-dstPDF
-- Returns:
- Bytes from the modified destination PDF are returned to the caller. copyBookmarks exists for a specific purpose: to enable the copying of bookmarks to a multi-page PDF file which was redacted via our single page extract, then append process. This page-at-a-time process requires a post-processing approach to preserve document-level structures like the bookmark tree. Three possible error conditions exist: 1: destination contains bookmarks 2: source and destination files have different page counts 3: any internal error arising from creation of new bookmarks
-
IMGLOW_append_page
public int IMGLOW_append_page(java.lang.String name, byte[] buff, int format)
Appends a specified page to an existing multipage PDF or TIFF document.- Parameters:
name
- of multipage document to append page to.buff
- Byte array containing page to append.format
- Rastermaster defined file format TIFF or PDF.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
,Defines
-
IMGLOW_append_page
public byte[] IMGLOW_append_page(java.io.DataInputStream dis, byte[] buff, int format, int[] error)
Appends a specified page to an existing multipage PDF or TIFF document contained in an existing DataInputStream. The content of the resulting document is returned in the form of a byte array.- Parameters:
dis
- DataInputStream containing current multipage documentbuff
- Byte array containing page to append.format
- Rastermaster defined file format TIFF or PDF.error
- 1 one integer array to return an error code >;= 0 is no error.- Returns:
- the content of the resulting document.
- See Also:
ErrorCodes
,Defines
-
IMGLOW_getPagesWithText
public int[] IMGLOW_getPagesWithText(java.io.DataInputStream dis, java.lang.String target, int[] error)
PDF-specific, allows the caller to determine quickly which pages have the target string.- Parameters:
dis
- DataInputStream containing PDF documenttarget
- Search stringerror
- one-integer array to return an error code. 0 or greater means no error.- Returns:
- array of 0-based page numbers containing target string
- See Also:
ErrorCodes
-
IMGLOW_getPagesWithPattern
public int[] IMGLOW_getPagesWithPattern(java.io.DataInputStream dis, java.lang.String pattern, int[] error)
PDF-specific, allows the caller to determine quickly which pages contain string pattern.- Parameters:
dis
- DataInputStream containing PDF documentpattern
- Search pattern (regular expression) stringerror
- one-integer array to return an error code. 0 or greater means no error- Returns:
- array of 0-based page numbers containing target string
- See Also:
ErrorCodes
-
IMGLOW_set_pdf_writer
public int IMGLOW_set_pdf_writer(java.lang.String outputPath)
This PDF-specific method associates private member variable mPdfWriter with contents of outputPath. mPdfWriter is used in subsequent calls to IMGLOW_pdf_append_file(). Call IMGLOW_close_pdf_writer() when done appending.- Parameters:
outputPath
- filename of current multipage pdf document- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMGLOW_pdf_append_file(String)
,IMGLOW_close_pdf_writer()
,ErrorCodes
-
IMGLOW_set_pdf_writer
public int IMGLOW_set_pdf_writer(java.io.ByteArrayOutputStream oStream)
This PDF-specific method associates private member variable mPdfWriter with contents of oStream. mPdfWriter is used in subsequent calls to IMGLOW_pdf_append_file(). Call IMGLOW_close_pdf_writer() when done appending.- Parameters:
oStream
- ByteArrayOutputStream in which to write PDF content.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMGLOW_pdf_append_file(String)
,IMGLOW_close_pdf_writer()
,ErrorCodes
-
IMGLOW_pdf_append_file
public int IMGLOW_pdf_append_file(java.io.DataInputStream dis)
This PDF specific method appends dis to private member variable mPdfWriter which was opened by a previous call to IMGLOW_set_pdf_writer().- Parameters:
dis
- DataInputStream containing file to append to mPdfWriter- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMGLOW_set_pdf_writer(ByteArrayOutputStream)
,ErrorCodes
-
IMGLOW_pdf_append_file
public int IMGLOW_pdf_append_file(java.io.DataInputStream dis, boolean bMargin)
This PDF specific method appends dis to private member variable mPdfWriter which was opened by a previous call to IMGLOW_set_pdf_writer().- Parameters:
dis
- DataInputStream containing file to append to mPdfWriterbMargin
- boolean indicating if 1/4" margin should be added- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMGLOW_set_pdf_writer(ByteArrayOutputStream)
,ErrorCodes
-
IMGLOW_pdf_append_file
public int IMGLOW_pdf_append_file(java.lang.String inputPath)
This PDF specific method appends inputPath to private member variable mPdfWriter which was opened by a previous call to IMGLOW_set_pdf_writer().- Parameters:
inputPath
- file to append to mPdfWriter- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMGLOW_set_pdf_writer(String)
,ErrorCodes
-
IMGLOW_close_pdf_writer
public void IMGLOW_close_pdf_writer()
This PDF specific method closes private member variable mPdfWriter that was opened by previous call to IMGLOW_set_pdf_writer()
-
IMGLOW_set_pdf_reader
public void IMGLOW_set_pdf_reader(java.io.DataInputStream dis, int[] error)
This is a PDF specific method that associates private member variable mPdfReader with the contents of dis (DataInputStream). mPdfReader is used in subsequent calls to IMGLOW_get_pdf_text(). Call IMGLOW_close_pdf_reader() when done processing.- Parameters:
dis
- DataInputStream containing current multipage documenterror
- Array for returning Snowbound error code- See Also:
ErrorCodes
-
IMGLOW_splitPDF
public int IMGLOW_splitPDF(int pagesPerFile, java.lang.String folderName, java.lang.String rootFileName)
PDF-specific method to split an N-page PDF file into N or more smaller PDF files. First set the input file to be processed with IMGLOW_set_pdf_reader(). If you don't do this first, you'll get an error: ErrorCodes.NO_TEXT_READER- Parameters:
pagesPerFile
- maximum number of pages in each new file, set to 1 to get N new filesfolderName
- folder where new files should be put, must exist with write accessrootFileName
- base name for destination files, an index number will be appended to this in order to set the name of the new file- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMGLOW_set_pdf_reader(DataInputStream, int[])
,ErrorCodes
-
IMGLOW_get_pdf_text
public byte[] IMGLOW_get_pdf_text(int pageNum, int[] error)
This is a PDF specific method used to get all text from a specified page of a PDF document previously opened by calling IMGLOW_set_pdf_reader(). It uses private member variable mPdfReader- Parameters:
pageNum
- Page number from which to get texterror
- Array for returning Snowbound error code- Returns:
- Byte array containing all text on the specified page
- See Also:
IMGLOW_set_pdf_reader(DataInputStream, int[])
,ErrorCodes
-
IMGLOW_close_pdf_reader
public void IMGLOW_close_pdf_reader()
This is a PDF specific method that closes a previously opened PDF reader associated with private member variable mPdfReader.
-
IMGLOW_set_tiff_tag
public int IMGLOW_set_tiff_tag(int tag, int maxBytes, int value, byte[] buff)
Write new and current tags. Can be called multiple times for adding multiple tags to write.- Setting the tag ID to -1 clears out all extra tags from being written to the file.
- Parameters:
tag
- ID of tag to writemaxBytes
- Total size of tag value or data in bytesvalue
- Integer value for a tag size of 4 bytesbuff
- Data binary or ASCII to write if tag size is greater than 4 bytes- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_tiff_tag
public int IMGLOW_get_tiff_tag(int tag, int maxBytes, int[] value, java.io.DataInputStream dis, byte[] buff, int page)
Reads a TIFF tag from the file specified. The tag may be either a string returned in buff or an int, short, or byte returned in value.- Parameters:
tag
- TIFF tag number to return.maxBytes
- Maximum bytes to read for string tags.value
- Tag value returned: 1 = String, 0 = Non Stringdis
- Object to read tags from.buff
- String buffer for returning string tags.page
- zero based page number for multipage file.- Returns:
- dependent on how value variable is set.
- See Also:
ErrorCodes
-
IMGLOW_set_decompsize
public int IMGLOW_set_decompsize(int xsize, int ysize)
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.- The destination size must be set before calling any decompress method.
- Parameters:
xsize
- Destination width of image after resizingysize
- Destination height of image after resizing- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_decomp_rect
public int IMGLOW_set_decomp_rect(int xs, int ys, int xe, int ye)
Allows specifying a rectangle in the image to decompress. Only this portion of the image is stored in RasterMaster's internal memory. To turn off, call the method with all parameters set to 0.- This must be set prior to decompressing an image.
- Parameters:
xs
- Starting X positionys
- Starting Y positionxe
- Horizontal size of cropping rectangleye
- Vertical size of cropping rectangle- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_overlay_callback
public int IMGLOW_set_overlay_callback(java.lang.reflect.Method callbackMethod, java.lang.Object userData)
Sets AFP overlay callback function. Used instead of setting IMGLOW_set_overlay_path().- Parameters:
callbackMethod
- Method of the form DataInputStream myCallback(String overlayName, Object userData) where overlayName is the name of the overlay file. callbackMethod should return DataInputStreamuserData
- private user data needed by callbackMethod (can be null)- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
Method
,ErrorCodes
,IMGLOW_set_overlay_path(String)
-
IMGLOW_set_overlay_path
public int IMGLOW_set_overlay_path(java.lang.String name)
Sets the path for finding overlay files. Some formats, such as MOD:CA, can contain references to overlay files. If set to null, overlays will be ignored and only the bitmap will be decompressed.- Parameters:
name
- Specifies the path of the overlay file- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_fontmap_path
public int IMGLOW_set_fontmap_path(java.lang.String name)
Sets the path for finding the Afp font mapping file.- Parameters:
name
- Specifies the path of the snbd_map.fnt file- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_setHtmlFontPath
public int IMGLOW_setHtmlFontPath(java.lang.String path)
Deprecated.This method has been deprecated as of version 20.13.0. RasterMaster will now use the system font path.Sets the path for finding fonts when rendering HTML files.- Parameters:
path
- Specifies the path of the directory to find fonts- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_setHtmlExtractionPath
public static boolean IMGLOW_setHtmlExtractionPath(java.lang.String path)
Sets the path for extracting/running the HTML conversion program. It must be a valid path.- Parameters:
path
- Specifies the path of the directory to which the HTML conversion program will be written, (Windows) or the path to the directory already containing the HTML conversion program (Linux).- Returns:
true
if the path was set,false
otherwise.- See Also:
ErrorCodes
-
IMGLOW_setHtmlEncoding
public void IMGLOW_setHtmlEncoding(java.lang.String charSet)
Set the font encoding (character set) used when rendering HTML files- Common Encodings
"ISO-8859-1" Western Europe
"ISO-8859-2" Western and Central Europe
"ISO-8859-3" Western, Southern Europe
"ISO-8859-4" Western Europe and Baltic
"ISO-8859-5" Cyrillic alphabet
"ISO-8859-6" Arabic
"ISO-8859-7" Greek
"ISO-8859-8" Hebrew
"ISO-8859-9" Western Europe with amended Turkish
"ISO-8859-10" Western Europe and Nordic
"ISO-8859-11" Thai
"ISO-8859-13" Baltic and Polish
"ISO-8859-14" Celtic
- Parameters:
charSet
- encoding name
-
IMGLOW_set_pdf_fontpath
public int IMGLOW_set_pdf_fontpath(java.lang.String name)
Sets the path for finding the Pdf fonts.- Parameters:
name
- Specifies the path of the directory to find fonts- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_fontmap
public int IMGLOW_set_fontmap(byte[] buff, int len)
Sets the AFP font mapping data directly- Parameters:
buff
- Specifies the path of the overlay filelen
-- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_pdfa_font_path
public int IMGLOW_set_pdfa_font_path(java.lang.String pdfaFontPath)
Sets the path for PDF/A saving to use when looking for fonts- Parameters:
pdfaFontPath
- String indicating font path, e.g., c:/fonts- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_pdfa_font_map
public int IMGLOW_set_pdfa_font_map(byte[] buff, int len)
Specifies the mapping of font aliases to font names and paths- Parameters:
buff
- byte array specifying font mappinglen
- Length of buff Each entry contains the font alias, the PostScript font name, the font file name, bold, italic The buff stream typically will have 4 entries for each alias, to specify the Regular, Bold, Italic, and BoldItalic fonts to use for each of the four variants of a given font family. If this call isn't made, Snowbound defaults to one of 13 base fonts, a Symbol substitute, and 4 flavors of Times, Helvetica, and Courier The following examples map Arial to the font named NimbusSans-Regular contained in n120055.ttf Arial, NimbusSans-Regular, n120055.ttf, 0, 0- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_overlay_parameters
public int IMGLOW_set_overlay_parameters(java.lang.String st)
- Parameters:
st
-- Returns:
- See Also:
ErrorCodes
-
IMGLOW_getExifTagInteger
public int IMGLOW_getExifTagInteger(byte[] buffer, int tag)
Gets EXIF meta data integer tag from JPEG file- Parameters:
buffer
- containing JPEG filetag
- EXIF tag of interest (ex. ORIENTATION is 274)- Returns:
- value of tag or -1 if not found
- See Also:
tiff
-
IMGLOW_getExifTagString
public byte[] IMGLOW_getExifTagString(byte[] buffer, int tag)
Gets EXIF meta data string tag from JPEG file- Parameters:
buffer
- containing JPEG filetag
- EXIF tag of interest (ex. DATE_TIME is 306)- Returns:
- byte array containing tag value or null if not found
- See Also:
tiff
-
IMGLOW_get_fileinfo
public int IMGLOW_get_fileinfo(java.lang.String name, int page)
Sets height, width, and bits-per-pixel without decompressing the entire file. After calling this method, you can call getHeight(), getWidth(),getXdpi(), Ydpi(), and getBitsPerPixel().- Parameters:
name
- file name and path to an Imagepage
- zero based page index- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_getAttachmentInfo
public byte[] IMGLOW_getAttachmentInfo(byte[] data)
Gets a list of attachment meta data- Parameters:
data
- byte array containing entire file- Returns:
- byte array containing list of attachments in JSON or null
Sample JSON output
{
  "attachment":[
    {"index":"1","fileName":"MySpreadsheet.xls","filenameInvalid":"true"},
    {"index":"2","fileName":"MyPdf.pdf","filenameInvalid":"false"}
  ]
}
- See Also:
IMGLOW_getAttachment(byte[], int)
-
IMGLOW_getAttachment
public byte[] IMGLOW_getAttachment(byte[] data, int index)
Gets the indicated attachment from a file- Parameters:
data
- byte array containing entire fileindex
- of attachment returned fromIMGLOW_getAttachmentInfo(byte[])
- Returns:
- byte array containing attachment file or null
- See Also:
IMGLOW_getAttachmentInfo(byte[])
-
IMGLOW_get_fileinfo
public int IMGLOW_get_fileinfo(java.io.DataInputStream dis, int page)
Sets height, width, and bits-per-pixel without decompressing the entire file. After calling this method, you can call getHeight(), getWidth(), getXdpi(), getYdpi(), and getBitsPerPixel().- Parameters:
dis
- java.io.DataInputStream containing Image data in memory.page
- zero based page number- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_pdf_input
public int IMGLOW_set_pdf_input(int dpi, int bitsPerPixel)
Sets desired resolution and bit depth for PDF conversions- Parameters:
dpi
- Dots per inch in which to render the pdf file.bitsPerPixel
- Bitmap pixel depth. Set to 1 or 24.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_pdf_flags
public int IMGLOW_set_pdf_flags(int flags)
Sets PDF rendering options- The flags parameter is used to set bits to change Pdf rendering
- Parameters:
flags
-- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_pcl_input
public int IMGLOW_set_pcl_input(int dpi, int bitsPerPixel)
Set desired resolution and bit depth for PCL conversions.- Parameters:
dpi
- Dots per inch in which to render the pcl file.bitsPerPixel
- pixel depth. Set to 1 or 24.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_document_input
public int IMGLOW_set_document_input(int dpi, int bitsPix, int format, double width, double height)
Sets the rendering parameters for decompression of MSOffice files.- Parameters:
dpi
- Dots per inch in which to renderbitsPix
- 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)- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
,Defines
-
IMGLOW_set_document_input
public int IMGLOW_set_document_input(int dpi, int bitsPix, int format)
This method sets the rendering parameters for decompression of Office files.- Parameters:
dpi
- Dots per inch in which to render the pcl file.bitsPix
- pixel depth. Set to 1 or 24.format
- Snowbound image format as desribed in snow.Defines class- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
,Defines
-
IMGLOW_set_document_input
public int IMGLOW_set_document_input(int dpi, int bitsPix, Snow.Defines.SnowExt format)
- Parameters:
dpi
-bitsPix
-format
-- Returns:
-
IMGLOW_set_msg_render_preference
public int IMGLOW_set_msg_render_preference(int preference)
Sets the rendering preferences for MSG files. This preference is loose and may not actually take effect due to technical complications such as there is no data of that type within the .MSG file.- Parameters:
preference
- Rendering data source preference for email body data. ASCII, RTF, and HTML are recognized but may not be all supported: ASCII (38), RTF (87), HTML (82), AUTO-DETECT (-1), AUTO-DETECT (anything else)- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
Defines
,ErrorCodes
-
IMGLOW_get_license_path
public java.lang.String IMGLOW_get_license_path()
Get Snowbound license manager file full path name- Returns:
- String containing full path name of Snowbound License file.
- See Also:
LicenseManager
-
IMGLOW_set_license_path
public int IMGLOW_set_license_path(java.lang.String path)
Set full path name to Snowbound License JAR or JSON file- Parameters:
path
- file full path name of Snowbound License JAR or JSON file to load.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
LicenseManager
,ErrorCodes
-
IMGLOW_set_license_path
public int IMGLOW_set_license_path(java.io.InputStream iStream)
Set Snowbound license path from input stream- Parameters:
iStream
- input stream containing Snowbound License JSON contents.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
LicenseManager
,ErrorCodes
-
IMGLOW_set_license_jar
public int IMGLOW_set_license_jar(java.io.InputStream iStream)
- Parameters:
iStream
- input stream containing Snowbound License JAR contents.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
LicenseManager
,ErrorCodes
-
IMGLOW_set_license_json
public int IMGLOW_set_license_json(java.lang.String json)
-
IMGLOW_set_pdf_output
public int IMGLOW_set_pdf_output(int xsize, int ysize)
Sets the destination size for saving pdf files. The xsize and ysize are the output sizes in points. A point is 1/72 of an inch.- Parameters:
xsize
- Destination width of image after resizingysize
- Destination height of image after resizing- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_ascii_attributes
public 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, java.lang.String fontName, int lnspacing, double charspacing)
Sets attributes for importing an Ascii file- Parameters:
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.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
getAsciiAttributes
public com.snowbound.rastermaster.AsciiAttributes getAsciiAttributes()
- Returns:
-
IMGLOW_search_text
public Snow.SNBD_SEARCH_RESULT[] IMGLOW_search_text(byte[] buff, java.lang.String text, int case_sense, int[] error)
Returns an array of structures of classes of the type, SNBD_SEARCH_RESULT. For each class or structure there is an array of rectangles. This is to allow a search term to wrap to a new line requiring more than two rectangles to highlight. The nCount parameter will be set to the number of rectangles required for each instance of a search term. The rectangles will be sorted from the top of the page to the bottom from the left side to the right.- Parameters:
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.case_sense
- Is search case sensitive. 0 = Not case sensitive 1 = case sensitiveerror
- Error code.- Returns:
- See Also:
ErrorCodes
-
IMGLOW_search_pattern
public Snow.SNBD_SEARCH_RESULT[] IMGLOW_search_pattern(byte[] buff, java.lang.String pattern, int[] error)
Returns an array of structures of classes of the type, SNBD_SEARCH_RESULT. For each class or structure there is an array of rectangles. This is to allow a search term to wrap to a new line requiring more than two rectangles to highlight. The nCount parameter will be set to the number of rectangles required for each instance of a search term. The rectangles will be sorted from the top of the page to the bottom from the left side to the right.- Parameters:
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.- Returns:
- See Also:
ErrorCodes
-
IMGLOW_page_has_text
public boolean IMGLOW_page_has_text(java.io.DataInputStream documentStream, int pageNum)
- Parameters:
documentStream
-pageNum
-- Returns:
-
IMGLOW_page_has_text
public boolean IMGLOW_page_has_text(java.io.DataInputStream documentStream, int pageNum, int format)
- Parameters:
documentStream
-pageNum
-format
-- Returns:
-
IMGLOW_redact_text
public byte[] IMGLOW_redact_text(byte[] buff, java.lang.String text, int flags, int color, int[] error)
Returns a byte array in Snowbound intermediate format, for saving via IMG_save_document(), with the 'text' string redacted.- Parameters:
buff
- Character buffer to search. Returned from a call to IMGLOW_extract_text(String, int, int, int).text
- String to redact.flags
- 0 = Not case sensitive, 1 = case sensitivecolor
- Redacted rectangle color as packed int (one byte each for red, green, blue values ex. 0xrrggbb)error
- Error code.- Returns:
- byte array in Snowbound intermediate format for saving via IMG_save_document();
- See Also:
IMG_save_document(byte[], int)
,ErrorCodes
-
IMGLOW_redact_rects
public byte[] IMGLOW_redact_rects(byte[] buff, Snow.SNBD_SEARCH_RESULT[] rects, int color, int[] error)
Returns a byte array in Snowbound intermediate format, for saving via IMG_save_document(), with any text or image data inside the rects redacted.- Parameters:
buff
- Character buffer to search. Returned from a call to IMGLOW_extract_text(String, int, int, int).rects
- SNBD_SEARCH_RESULT objects to redact. Returned from call to IMGLOW_search_text(byte[], String, int, int[]).color
- Redacted rectangle color as packed int (0xrrggbb)error
- Error code.- Returns:
- byte array in Snowbound intermediate format for saving via IMG_save_document();
- See Also:
IMGLOW_search_text(byte[], String, int, int[])
,IMG_save_document(byte[], int)
,ErrorCodes
-
IMGLOW_redact_ann
public byte[] IMGLOW_redact_ann(byte[] buff, SnowAnn ann, int color, int[] error)
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.- Parameters:
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.- Returns:
- byte array in Snowbound intermediate format for saving via IMG_save_document();
- See Also:
IMG_save_document(byte[], int)
,ErrorCodes
-
internal_has_text
public boolean internal_has_text(Snow.SnbdFileio fh, int pageNum, int format)
- Parameters:
fh
-pageNum
-format
-- Returns:
-
internal_has_text
public boolean internal_has_text(Snow.SnbdFileio fh, int pageNum)
- Parameters:
fh
-pageNum
-- Returns:
-
convertJsonToIntermediate
public byte[] convertJsonToIntermediate(java.lang.String blob, java.lang.String fontName, int pageNumber) throws java.lang.Exception
Converts a JSON blob containing OCR data into RasterMaster Intermediate File Format- Parameters:
blob
- String containing OCR specific data in JSONfontName
- font name for textpageNumber
- zero based page index in blob to extract- Returns:
- byte array containing text information in RasterMaster Intermediate File Format
- Throws:
java.lang.Exception
-
convertJsonToPdf
public byte[] convertJsonToPdf(java.lang.String blob, java.lang.String fontName) throws java.lang.Exception
Converts a JSON blob containing OCR data into PDF file- Parameters:
blob
- String containing OCR specific data in JSONfontName
- font name for text- Returns:
- byte array containing PDF file
- Throws:
java.lang.Exception
-
internal_extract_text
public byte[] internal_extract_text(Snow.SnbdFileio fh, int[] length, int[] error, int page)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.- Parameters:
fh
- File handle from which to extract textlength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based Page number of file from which to extract text- Returns:
- ASCII format.
- See Also:
ErrorCodes
-
internal_extract_text_format
public byte[] internal_extract_text_format(Snow.SnbdFileio fh, int[] length, int[] error, int page, int format)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.- Parameters:
fh
- File handle from which to extract textlength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based Page number of file from which to extract textformat
-- Returns:
- ASCII format.
- See Also:
ErrorCodes
-
internal_extract_text_svg
public byte[] internal_extract_text_svg(Snow.SnbdFileio fh, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.- Parameters:
fh
- File handle from which to extract textlength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based page number of file from which to extract textformat
-- Returns:
- ASCII format.
- See Also:
ErrorCodes
-
IMGLOW_extract_text
public byte[] IMGLOW_extract_text(java.lang.String name, int[] length, int[] error, int page)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.- Parameters:
name
- name of file from which to extractlength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based Page number of file from which to extract text- Returns:
- ASCII format.
- See Also:
IMG_save_document(byte[], int)
,ErrorCodes
-
IMGLOW_extract_text
public byte[] IMGLOW_extract_text(java.lang.String name, int[] length, int[] error, int page, int format)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.- Parameters:
name
- name of file from which to extractlength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based Page number of file from which to extract textformat
-- Returns:
- ASCII format.
- See Also:
IMG_save_document(byte[], int)
,ErrorCodes
-
IMGLOW_extract_text_svg
public byte[] IMGLOW_extract_text_svg(java.lang.String name, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.- Parameters:
name
- name of file to convertlength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based page number of file from which to extract textformat
-- Returns:
- ASCII format.
- See Also:
ErrorCodes
-
IMGLOW_extract_text
public byte[] IMGLOW_extract_text(java.io.DataInputStream dis, int[] length, int[] error, int page)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.- Parameters:
dis
- DataInputStream containing compressed file datalength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based Page number of file from which to extract text- Returns:
- ASCII format.
- See Also:
IMG_save_document(byte[], int)
,ErrorCodes
-
IMGLOW_extract_text
public byte[] IMGLOW_extract_text(java.io.DataInputStream dis, int[] length, int[] error, int page, int format)
Returns a byte array containing text and graphics objects stored in Snowbound Intermediate File Format.- Parameters:
dis
- DataInputStream containing compressed file datalength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based Page number of file from which to extract textformat
-- Returns:
- ASCII format.
- See Also:
IMG_save_document(byte[], int)
,ErrorCodes
-
IMGLOW_extract_text_svg
public byte[] IMGLOW_extract_text_svg(java.io.DataInputStream dis, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.- Parameters:
dis
- DataInputStream containing compressed file datalength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based page number of file from which to extract textformat
-- Returns:
- byte array containing converted file in SVG format
- See Also:
ErrorCodes
-
IMG_add_watermark
public byte[] IMG_add_watermark(byte[] inBuffer, int page, int filetype, java.lang.String text, java.lang.String fontName, int fontSize, int verticalPos, int textDirection, int color, boolean transparent)
Adds a watermark string at the designated placement.- Parameters:
inBuffer
- Buffer containing image datapage
- zero based 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)- Returns:
- buffer containing output image with watermark.
-
IMG_add_watermark
public byte[] IMG_add_watermark(java.lang.String filename, int page, int filetype, java.lang.String text, java.lang.String fontName, int fontSize, int verticalPos, int textDirection, int color, boolean transparent)
Adds a watermark string at the designated placement.- Parameters:
filename
- full path name of filepage
- zero based 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)- Returns:
- buffer containing output image with watermark.
-
IMG_antique_effect
public int IMG_antique_effect()
Converts color images to look as though they are antique photos. It replaces colors with sepia tones, which are reddish brown monochrome tints. When applied to a photo, they give the picture a warm, antique feeling. This method only works with 24-bit color images.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_color_gray
public int IMG_color_gray()
Converts 24-bit color image to 8-bit gray scale. This method only works with 24-bit images.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_remove_red_eye
public int IMG_remove_red_eye(int xs, int ys, int xsize, int ysize)
Detects and converts very red eyes in photos with people to more natural colors.- If xpos, ypos, xsize or ysize is set to -1, the entire photo is searched.
- For best results, refine the search area.
- Works only with 24-bit color images.
- Parameters:
xs
- Starting top left area for x coordinateys
- Starting top left are for y coordinatexsize
- Width of area to searchysize
- Height of area to search- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_histogram_equalize
public int IMG_histogram_equalize()
Performs a histogram equalization on 8 bit images only.- Works only with 8-bit images.
- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_get_server_license
public static java.lang.String IMGLOW_get_server_license()
- Returns:
- Returns full file and path name of Snowbound License file
-
IMGLOW_set_imnet_page_size
public int IMGLOW_set_imnet_page_size(int xsize, int ysize, int dpi)
Sets page properties for IMNET files- Parameters:
xsize
- Width of area to searchysize
- Height of area to searchdpi
- Sets the dots per inch- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_j2k_encode_parameter
public int IMGLOW_set_j2k_encode_parameter(java.lang.String name, java.lang.String value)
Sets the j2k (JPEG2000) encode parameter.- Parameters:
name
- encoder name.value
- value.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_set_j2k_decode_parameter
public int IMGLOW_set_j2k_decode_parameter(java.lang.String name, java.lang.String value)
Sets the j2k (JPEG2000) decode parameter- Parameters:
name
- encoder name.value
- value.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_write_tiff_stream
public int IMGLOW_write_tiff_stream(Snow.Dib_Head lpbi, byte[] dataStream, int dataSize, int fileType, java.lang.String name)
Create a tiff file with existing compressed data. The header information is passed as the Dib_Head class containing the width, height, and bits per pixel of the image to create.- Parameters:
lpbi
- The header information structuredataStream
- Byte array of compressed datadataSize
- Size of the data_stream compressed stream of bytesfileType
- file type- TIFF_COMP_NONE = 1, no compression
- TIFF_COMP_GIII = 2, modified huffman group 3
- TIFF_COMP_GIIIP = 3, modified huffman group 3 padding
- TIFF_COMP_G4 = 4, modified huffman group 4
- TIFF_COMP_LZW = 5, lzw compression
- TIFF_COMP_PACK = 32773, pack bits compression
- TIFF_COMP_JPEG = 6, JPEG compression
- TIFF_COMP_JPEG_GRAY = 7, JPEG compression 8 bit gray scale
- TIFF_COMP_G4_FO = 4000, modified huffman group 4
- TIFF_COMP_JBIG = 34661, JBIG format
name
- Name of output tiff file to create- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_write_tiff_stream
public int IMGLOW_write_tiff_stream(Snow.Dib_Head lpbi, byte[] dataStream, int dataSize, int fileType, byte[] dos)
Create a TIFF file with existing compressed data. The header information is passed as the Dib_Head class containing the width, height, and bits per pixel of the image to create.- Parameters:
lpbi
- The header information structuredataStream
- Byte array of compressed datadataSize
- Size of the data_stream compressed stream of bytesfileType
- file typedos
- Destination byte array buffer to save to.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
IMGLOW_write_tiff_stream(Dib_Head,byte[],int,int,String)
,ErrorCodes
-
IMG_save_document
public int IMG_save_document(java.lang.String name, byte[] vbuff, int filetype)
This method will convert Snowbound Intermediate File Format to SVG or PDF- Parameters:
name
- name of file to save to.vbuff
- Byte array of extracted text and graphics.filetype
- file type to save to currently only SVG or PDF.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_save_document
public byte[] IMG_save_document(byte[] vbuff, int filetype)
This method will convert Snowbound Intermediate File Format to SVG or PDF- Parameters:
vbuff
- Byte array of extracted text and graphics.filetype
- file type to save to currently only SVG or PDF.- Returns:
- byte array containing output file in desired format
-
IMG_save_document
public int IMG_save_document(byte[] dos, byte[] vbuff, int filetype)
This method will convert Snowbound Intermediate File Format to SVG or PDF- Parameters:
dos
- byte array in which to put output file in desired formatvbuff
- Byte array of extracted text and graphics.filetype
- file type to save to currently only SVG or PDF.- Returns:
- positive value is length of dos byte array. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_vector_to_svg
public int IMG_vector_to_svg(java.lang.String inName, java.lang.String outfile, int page)
Converts file format to SVG- Parameters:
inName
- Input file to save from.outfile
- Output file to save to.page
- zero base page number- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMG_vector_to_svg
public byte[] IMG_vector_to_svg(java.io.DataInputStream dis, int[] length, int[] error, int page, int format)
Returns a byte array containing file in SVG format.- Parameters:
dis
- DataInputStream containing compressed file datalength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based page number of file from which to extract textformat
-- Returns:
- byte array containing converted file in SVG format
- See Also:
ErrorCodes
-
IMG_vector_to_pdf
public byte[] IMG_vector_to_pdf(java.io.DataInputStream iStream, int page, int[] error)
Convert desired document page to (vector) PDF. Currently only supports HTML- Parameters:
iStream
- source document contained in DataInputStreampage
- desired page to converterror
- positive value (as well as 0) indicates success. Negative value indicates an error.- Returns:
- byte array containing converted PDF
- See Also:
ErrorCodes.getErrorMessage(int)
,ErrorCodes
-
IMG_vector_to_svg
public byte[] IMG_vector_to_svg(java.io.DataInputStream dis, int[] length, int[] error, int page)
Returns a byte array containing file in SVG format.- Parameters:
dis
- DataInputStream containing compressed file datalength
- Array for returning a single integer to specify the length of the buffer to receive extracted texterror
- Array for returning an integer error codepage
- zero based page number of file from which to extract text- Returns:
- byte array containing converted file in SVG format
- See Also:
ErrorCodes
-
IMGLOW_get_warnings
public Snow.SnbdWarningCode IMGLOW_get_warnings()
Returns SnbdWarningCode object. It is used to get a list of warnings that occurred while decompressing a document. Currently, warnings are only reported for MS Word 1997-2003 documents.- Returns:
- See Also:
SnbdWarningCode
-
IMGLOW_add_warning
public void IMGLOW_add_warning(int code)
Add a warning to warningCode list- Parameters:
code
- code to add- See Also:
SnbdWarningCode
-
reset_warnings
public void reset_warnings()
Clear warningCode list- See Also:
SnbdWarningCode
-
IMGLOW_detect_blank_page
public double IMGLOW_detect_blank_page(boolean autodetect, int red, int green, int blue, int tolerance, boolean isLowQuality, boolean isLowMemory)
This method can be used to detect blank pages. It can also be used to detect pages that are essentially blank though there are some scan artifacts or other noise. This method returns the percentage of pixels present that are not equal to the passed detection or background color. If autodetect is set to 1, then the detection or background color will be determined automatically and will correspond to the dominant color in the image. The tolerance value can be set to allow for a more lenient color matching the algorithm.- Parameters:
autodetect
- Auto-detect the background color (0: no; 1: yes). 1 will force the system to ignore the passed color.red
- 24-bpp: Red component of the detection color. May have the value of [0-255]. 1-bpp/4-bpp/8-bpp: Index value of the detection color. May have the value of [0-1], [0-127], and [0-255], respectively.green
- Green component of the detection color. Ignored for non-24-bpp images. May have the value of [0-255].blue
- Blue component of the detection color. Ignored for non-24-bpp images.May have the value of [0-255].tolerance
- Per color-channel pixel-value match tolerance linear distance value. Use this value in comparing background pixels. This number is in the range [0-255].isLowQuality
- Execute the low-quality version of the autodetect algorithm (0: no; 1: yes). The low-quality version will not guarantee the global maximum, but it will execute much faster. The tolerance level is not taken into consideration.isLowMemory
- Execute the low-memory version of the autodetect algorithm (0: no; 1: yes). The low-memory version will not guarantee the global maximum. The tolerance level is not taken into consideration. This setting is only for 24-bpp images.- Returns:
- Double. The percentage of pixels on the page that are not equal to the background color. If the percentage is zero or near zero the page is blank. Note the percentage is a floating point number. For example, a return value of 50.26 means 50.26% of the page is non-blank. Any value less than zero is a Snowbound error code. message for 1-bit (black and white) images and for 4-bit or 8-bit color images. Any value less than zero is a Snowbound error code.
-
IMG_sharpen_bitmap
public int IMG_sharpen_bitmap(int svalue)
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.- Parameters:
svalue
- Integer value from -127 to 127- Returns:
- the sharpen bitmap operation. A value of 0 indicates success. Returns a FORMAT_NOT_ALLOWED error message for 1-bit (black and white) images and for 4-bit or 8-bit color images. Any value less than zero is a Snowbound error code.
- See Also:
ErrorCodes
-
IMG_get_version
public void IMG_get_version(int[] major, int[] minor)
Returns the RasterMaster version id in the two integers that you provide. The first parameter is the major version number and the second is the minor version number. Together, these form the current version number for the RasterMaster base library. For example, 13 and 0 are version 13.0.- Parameters:
major
- Major version numberminor
- Minor version number
-
IMG_get_version
public void IMG_get_version(int[] major, int[] minor, int[] revision, int[] build)
Returns the RasterMaster version id in the four integers that you provide. The first parameter is the major version number, the second is the minor version number, the third is the revision version number, and the fourth is the build version number. Together, these form the current version number for the RasterMaster base library. For example, 13, 0, 4, 21 are version 13.0.4.21.- Parameters:
major
- Major version numberminor
- Minor version numberrevision
- Revision version numberbuild
- Build version number
-
IMG_get_version
public java.lang.String IMG_get_version()
Returns the RasterMaster version as a String- Returns:
- RasterMaster version as a String
-
decompressWithFilter
public int decompressWithFilter(java.lang.String pExt, int pOffset, Snowbnd pSnow, Snow.SnbdFileio pFh)
- Parameters:
pExt
-pOffset
-pSnow
-pFh
-- Returns:
-
getPagesWithFilter
public int getPagesWithFilter(java.lang.String pExt, Snowbnd pSnow, Snow.SnbdFileio pFh)
- Parameters:
pExt
-pSnow
-pFh
-- Returns:
-
getPagesWithFilter
public int getPagesWithFilter(int fileType, Snowbnd pSnow, Snow.SnbdFileio pFh)
- Parameters:
fileType
-pSnow
-pFh
-- Returns:
-
IMGLOW_redact_page
public int IMGLOW_redact_page(java.lang.String inputFile, java.lang.String outputFile, java.awt.geom.Rectangle2D.Double[] rarray, int page, int color)
Removes font-based text from PDF file that intercepts the list of rectangles- Parameters:
inputFile
- The input file.outputFile
- The output file.rarray
- A rectangle or rectangles passed in as arguments. x, y are in default PDF user coordinate space, (origin at bottom left)page
- zero-based page number to read.color
- Color to fill.- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_redact_page
public byte[] IMGLOW_redact_page(java.io.DataInputStream inputStream, java.awt.geom.Rectangle2D.Double[] rarray, int page, int color, int[] error)
Removes font-based text from PDF file that intercepts the list of rectangles- Parameters:
inputStream
- DataInputStream containing document data.rarray
- A rectangle or rectangles passed in as arguments. x, y are in default PDF user coordinate space, (origin at bottom left)page
- zero-based page number to read.color
- Color to fill.error
- Array for returning an integer error code- Returns:
- byte array containing redacted PDF
- See Also:
ErrorCodes
-
IMGLOW_redact_page
public byte[] IMGLOW_redact_page(java.io.DataInputStream inputStream, java.awt.geom.Rectangle2D.Double[] rarray, int page, int color, int[] error, boolean emitAppearances)
This method supports PDF redaction by removing text that intersects any of the rectangles in the rarray argument. It does not change images containing apparent text, or graphics which are the outlines of text.- Parameters:
inputStream
- DataInputStream containing document data.rarray
- A rectangle or rectangles passed in as arguments.page
- zero based page number to read.color
- specifies the redaction rectangle colorerror
- contains 0 on successemitAppearances
- false means do not emit rectangles to denote redaction areas- Returns:
- Returns the bytes for the file with the redacted page
- See Also:
ErrorCodes
-
IMGLOW_get_page_rotation
public int IMGLOW_get_page_rotation(byte[] pageBuff, int pageNum)
Returns page rotation angle for a particular page in a PDF file- Parameters:
pageBuff
- byte array containing PDF file datapageNum
- zero based page number- Returns:
-
IMGLOW_rotate_page
public byte[] IMGLOW_rotate_page(byte[] pageBuff, int rotateAngle, int pageNum)
Rotates a particular page in a PDF file.- Parameters:
pageBuff
- byte array representing the PDF filerotateAngle
- the angle by which to rotate the page (0, 90, 180 or 270)pageNum
- the zero-based page number of the page to be rotated- Returns:
- returns a byte array representing the PDF file with the rotated page
-
IMGLOW_appendAnnots
public byte[] IMGLOW_appendAnnots(java.io.DataInputStream singlePageStream, SnowAnn sann, int pageNum)
- Parameters:
singlePageStream
-sann
-pageNum
-- Returns:
-
IMGLOW_appendRedactionAnnots
public byte[] IMGLOW_appendRedactionAnnots(java.io.DataInputStream singlePageStream, SnowAnn sann, int pageNum)
- Parameters:
singlePageStream
-sann
-pageNum
-- Returns:
-
detectFormat
public int detectFormat(Snow.SnbdFileio aFh)
Gets the type of OOXML data.- Parameters:
aFh
- Snowbound file handle- Returns:
- Snowbound format type or a Snowbound error code.
- See Also:
ErrorCodes
-
detectFormat
public static int detectFormat(byte[] buff)
Gets the type of OOXML data.- Parameters:
buff
- byte array containing ooxml file data- Returns:
- Snowbound format type or a Snowbound error code.
- See Also:
ErrorCodes
-
getDefaultDepth
public int getDefaultDepth()
-
getDefaultResolution
public int getDefaultResolution()
-
setDefaultDepth
public void setDefaultDepth(int bitsPerPix)
-
setDefaultResolution
public void setDefaultResolution(int resolution)
-
getOffice_BitsPerPix
public int getOffice_BitsPerPix()
-
getOffice_resolution
public int getOffice_resolution()
-
setOffice_resolution
public void setOffice_resolution(short office_resolution)
-
setOffice_BitsPerPix
public void setOffice_BitsPerPix(int office_BitsPerPix)
-
createDataBuffer
public static Snow.DataBuffer createDataBuffer()
-
getOfficePagesizeX
public double getOfficePagesizeX()
-
setOfficePagesizeX
public void setOfficePagesizeX(double officePagesizeX)
-
getOfficePagesizeY
public double getOfficePagesizeY()
-
setOfficePagesizeY
public void setOfficePagesizeY(double officePagesizeY)
-
ParseColdplayTemplates
public int ParseColdplayTemplates(java.lang.String name)
Parse Image Services cold templates.- Parameters:
name
- String file name of template to parse- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_coldplay
public int IMGLOW_coldplay(java.io.DataInputStream dis)
Decompress and merge image Services cold templates.- Parameters:
dis
- DataInputStream of file name to decompress and merge with template- Returns:
- Any non-negative value indicates success. A negative value indicates an error.
- See Also:
ErrorCodes
-
IMGLOW_ocr_is_available
public boolean IMGLOW_ocr_is_available()
- Returns:
-
IMGLOW_ocr_get_engine_path
public java.lang.String IMGLOW_ocr_get_engine_path()
Get OCR bin folder- Returns:
- current OCR bin path
-
IMGLOW_ocr_set_engine_path
public void IMGLOW_ocr_set_engine_path(java.lang.String pathName)
Set path to parent of tessdata folder- Parameters:
pathName
- String ocr parent of tessdata folder
-
IMGLOW_ocr_set_lan
public void IMGLOW_ocr_set_lan(java.lang.String language)
Set language for Tesseract machine- Parameters:
language
- - 3 letter string representing a language / region
-
IMGLOW_ocr_get_lan
public java.lang.String IMGLOW_ocr_get_lan()
Get language for Tesseract machine- Returns:
- 3 letter string representing a language / region
-
IMGLOW_ocr_set_dll_path
public void IMGLOW_ocr_set_dll_path(java.lang.String path)
-
IMGLOW_ocr_get_dll_path
public java.lang.String IMGLOW_ocr_get_dll_path(java.lang.String path)
-
IMGLOW_ocr_bitmap
public byte[] IMGLOW_ocr_bitmap(byte[] inBuffer) throws java.lang.Exception
- Throws:
java.lang.Exception
-
IMGLOW_ocr_bitmap
public byte[] IMGLOW_ocr_bitmap(java.lang.String fileName) throws java.lang.Exception
Convert raster file to vector PDF buffer.- Parameters:
fileName
- file to convert- Returns:
- byte array containing converted PDF
- Throws:
java.lang.Exception
-
IMGLOW_addMetaData
public byte[] IMGLOW_addMetaData(java.io.DataInputStream dis, byte[] metadata, int flags, int[] error)
- Parameters:
dis
-metadata
-flags
-error
-- Returns:
- See Also:
ErrorCodes
-
IMGLOW_addMetaData
public byte[] IMGLOW_addMetaData(java.lang.String fName, byte[] metadata, int flags, int[] error)
- Parameters:
fName
-metadata
-flags
-error
-- Returns:
- See Also:
ErrorCodes
-
addMetaDataInternal
public byte[] addMetaDataInternal(Snow.SnbdFileio fh, byte[] metadata, int flags, int[] error)
- Parameters:
fh
-metadata
-flags
-error
-- Returns:
-
IMGLOW_addInfoDict
public byte[] IMGLOW_addInfoDict(java.io.DataInputStream dis, java.util.HashMap<java.lang.String,byte[]> inputInfo, int[] error)
- Parameters:
dis
-inputInfo
- , HashMap of the form "Title", "Title of PDF Content", "Author", "Who Wroteit" Keys can include "Title", "Author", "Subject", "Keywords", "Producer"error
-- Returns:
- byte [] of modified PDF bytes
- See Also:
ErrorCodes
-
IMGLOW_addInfoDict
public byte[] IMGLOW_addInfoDict(java.lang.String fName, java.util.HashMap<java.lang.String,byte[]> inputInfo, int[] error)
- Parameters:
fName
-inputInfo
- , HashMap of the form "Title", "Title of PDF Content", "Author", "Who Wroteit" Keys can include "Title", "Author", "Subject", "Keywords", "Producer"error
-- Returns:
- byte [] of modified PDF bytes
- See Also:
ErrorCodes
-
addInfoDictInternal
public byte[] addInfoDictInternal(Snow.SnbdFileio fh, java.util.HashMap<java.lang.String,byte[]> inputInfo, int[] error)
- Parameters:
fh
-inputInfo
- , HashMap of the form "Title", "Title of PDF Content", "Author", "Who Wroteit" Keys can include "Title", "Author", "Subject", "Keywords", "Producer"error
-- Returns:
- byte [] of modified PDF bytes
- See Also:
ErrorCodes
-
IMGLOW_getPDFInfoDict
public java.util.HashMap<java.lang.String,byte[]> IMGLOW_getPDFInfoDict(java.io.DataInputStream dis, int[] error)
- Parameters:
dis
-error
-- Returns:
- HashMap of key value pairs from Info dictionary, typically "Title"-> "The Name of the Book" "Author" --> "Who Wroteit" "Subject" --> "What it's about", etc.
- See Also:
ErrorCodes
-
IMGLOW_getPDFInfoDict
public java.util.HashMap<java.lang.String,byte[]> IMGLOW_getPDFInfoDict(java.lang.String fName, int[] error)
- Parameters:
fName
-error
-- Returns:
- HashMap of key value pairs from Info dictionary, typically "Title"-> "The Name of the Book" "Author" --> "Who Wroteit" "Subject" --> "What it's about", etc.
- See Also:
ErrorCodes
-
getPDFInfoDictInternal
public java.util.HashMap<java.lang.String,byte[]> getPDFInfoDictInternal(Snow.SnbdFileio fh, int[] error)
- Parameters:
fh
-error
-- Returns:
- HashMap of key value pairs from Info dictionary, typically "Title"-> "The Name of the Book" "Author" --> "Who Wroteit" "Subject" --> "What it's about", etc.
- See Also:
ErrorCodes
-
IMGLOW_getXMPMetaData
public byte[] IMGLOW_getXMPMetaData(java.io.DataInputStream dis, int[] error)
- Parameters:
dis
-error
-- Returns:
- See Also:
ErrorCodes
-
IMGLOW_getXMPMetaData
public byte[] IMGLOW_getXMPMetaData(java.lang.String fName, int[] error)
- Parameters:
fName
-error
-- Returns:
- See Also:
ErrorCodes
-
getXMPMetaDataInternal
public byte[] getXMPMetaDataInternal(Snow.SnbdFileio fh, int[] error)
- Parameters:
fh
-error
-- Returns:
- See Also:
ErrorCodes
-
getLocale
public java.lang.String getLocale()
-
setLocale
public void setLocale(java.util.Locale le)
-
setLocale
public void setLocale(java.lang.String languageTag)
- Parameters:
languageTag
- Format examples: en-Us, en-IE, fr-FR, es-MX
-
getDis_rast_size
public int getDis_rast_size()
-
setDis_rast_size
public void setDis_rast_size(int dis_rast_size)
-
getGet_info
public int getGet_info()
-
setGet_info
public void setGet_info(int get_info)
-
getHtmlPageWidth
public double getHtmlPageWidth()
-
setHtmlPageWidth
public void setHtmlPageWidth(double htmlPageWidth)
-
getHtmlPageHeight
public double getHtmlPageHeight()
-
setHtmlPageHeight
public void setHtmlPageHeight(double htmlPageHeight)
-
getDis_pPage
public com.snowbound.rastermaster.PAGE_INFO getDis_pPage()
-
setDis_pPage
public void setDis_pPage(com.snowbound.rastermaster.PAGE_INFO dis_pPage)
-
getDisplay
public com.snowbound.rastermaster.Display getDisplay()
-
setDisplay
public void setDisplay(com.snowbound.rastermaster.Display display)
-
getHtmlBitsPerPix
public int getHtmlBitsPerPix()
-
setHtmlBitsPerPix
public void setHtmlBitsPerPix(int htmlBitsPerPix)
-
getHtmlResolution
public int getHtmlResolution()
-
setHtmlResolution
public void setHtmlResolution(int htmlResolution)
-
getContrast
public int getContrast()
-
setContrast
public void setContrast(int contrast)
-
getOverlay
public int getOverlay()
-
setOverlay
public void setOverlay(int overlay)
-
getDis_orientation
public int getDis_orientation()
-
setDis_orientation
public void setDis_orientation(int dis_orientation)
-
getOrig_bits_pix
public int getOrig_bits_pix()
-
setOrig_bits_pix
public void setOrig_bits_pix(int orig_bits_pix)
-
getScroll_repaint
public int getScroll_repaint()
-
setScroll_repaint
public void setScroll_repaint(int scroll_repaint)
-
getSff
public java.awt.Container getSff()
-
setSff
public void setSff(java.awt.Container sff)
-
isDis_runs_buff
public boolean isDis_runs_buff()
-
setDis_runs_buff
public void setDis_runs_buff(boolean dis_runs_buff)
-
getWl_lut16
public short[] getWl_lut16()
-
setWl_lut16
public void setWl_lut16(short[] wl_lut16)
-
getWl_lut8
public byte[] getWl_lut8()
-
setWl_lut8
public void setWl_lut8(byte[] wl_lut8)
-
isWindow_level
public boolean isWindow_level()
-
setWindow_level
public void setWindow_level(boolean window_level)
-
getJpeg_tables_offset_fh
public Snow.SnbdFileio getJpeg_tables_offset_fh()
-
setJpeg_tables_offset_fh
public void setJpeg_tables_offset_fh(Snow.SnbdFileio jpeg_tables_offset_fh)
-
getJpeg_tables_offset
public int getJpeg_tables_offset()
-
setJpeg_tables_offset
public void setJpeg_tables_offset(int jpeg_tables_offset)
-
getmJpeg_ICC_ColorSpace
public java.awt.color.ICC_ColorSpace getmJpeg_ICC_ColorSpace()
-
setmJpeg_ICC_ColorSpace
public void setmJpeg_ICC_ColorSpace(java.awt.color.ICC_ColorSpace mJpeg_ICC_ColorSpace)
-
getDis_DecompXsize
public int getDis_DecompXsize()
-
setDis_DecompXsize
public void setDis_DecompXsize(int dis_DecompXsize)
-
getDis_DecompYsize
public int getDis_DecompYsize()
-
setDis_DecompYsize
public void setDis_DecompYsize(int dis_DecompYsize)
-
getPdf_ysize
public int getPdf_ysize()
-
setPdf_ysize
public void setPdf_ysize(int pdf_ysize)
-
getPdf_xsize
public int getPdf_xsize()
-
setPdf_xsize
public void setPdf_xsize(int pdf_xsize)
-
setPdfPassword
public void setPdfPassword(byte[] pdfPasswordUtf8)
Caches the PDF user or owner password (in the clear) to use when loading PDF data with some RasterMaster methods.- Parameters:
pdfPasswordUtf8
- An unprotected UTF-8 encoded byte array.- See Also:
getPdfPassword()
-
getPdfPassword
public byte[] getPdfPassword()
Get cached PDF user or owner password (in the clear) to use when loading PDF data with some RasterMaster methods. Default value is null.- Returns:
- The current UTF-8 encoded PDF user or owner password (in the clear).
- See Also:
setPdfPassword(byte[])
-
getJpeg_rows_per_strip
public int getJpeg_rows_per_strip()
-
setJpeg_rows_per_strip
public void setJpeg_rows_per_strip(int jpeg_rows_per_strip)
-
getGamma
public int getGamma()
-
setGamma
public void setGamma(int gamma)
-
getBrightnes
public int getBrightnes()
-
setBrightnes
public void setBrightnes(int brightness)
-
getDis_dpos
public int getDis_dpos()
-
setDis_dpos
public void setDis_dpos(int dis_dpos)
-
getDis_oldhPal
public int getDis_oldhPal()
-
setDis_oldhPal
public void setDis_oldhPal(int dis_oldhPal)
-
getDis_hPal
public int getDis_hPal()
-
setDis_hPal
public void setDis_hPal(int dis_hPal)
-
getDis_transparency
public int getDis_transparency()
-
setDis_transparency
public void setDis_transparency(int dis_transparency)
-
getDis_display_transp
public int getDis_display_transp()
-
setDis_display_transp
public void setDis_display_transp(int dis_display_transp)
-
getDis_tcolor
public int getDis_tcolor()
-
setDis_tcolor
public void setDis_tcolor(int dis_tcolor)
-
-