Package Snow

Class 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
    • 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 Format
      byte[] convertJsonToPdf​(java.lang.String blob, java.lang.String fontName)
      Converts a JSON blob containing OCR data into PDF file
      static 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 buffer
      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
      int 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 object
      int get_save_raster​(int[] dbuff, int ypos, int rasterSize)
      Retrieves one line of raster data from current Snowbound image object
      com.snowbound.rastermaster.AsciiAttributes getAsciiAttributes()  
      int getBitsPerPixel()  
      int getBrightnes()  
      int getContrast()  
      double getCropboxX()
      For PDF documents only
      double getCropboxY()
      For PDF documents only
      static 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 information
      int 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)  
      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 image
      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.
      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 String
      void 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 PDF
      byte[] IMG_save_document​(byte[] vbuff, int filetype)
      This method will convert Snowbound Intermediate File Format to SVG or PDF
      int IMG_save_document​(java.lang.String name, byte[] vbuff, int filetype)
      This method will convert Snowbound Intermediate File Format to SVG or PDF
      int 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 SVG
      int 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 list
      byte[] 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 document
      byte[] IMGLOW_convert_xfa_to_pdf​(java.lang.String name, int[] error)
      Converts a PDF/XFA document to a 'flattened' PDF document
      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.
      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 imageData
      byte[] IMGLOW_create_pdf​(byte[] imageData, boolean fitToPage)
      Converts image to a pdf file that contains imageData
      byte[] 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 object
      byte[] IMGLOW_docinfo_details​(java.lang.String name)
      Returns meta data from a PDF document
      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.
      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 file
      java.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 document
      int IMGLOW_get_filetype​(java.lang.String name)
      Returns the file type of document
      int 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 name
      com.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 file
      int 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 file
      byte[] IMGLOW_getAttachmentInfo​(byte[] data)
      Gets a list of attachment meta data
      int IMGLOW_getExifTagInteger​(byte[] buffer, int tag)
      Gets EXIF meta data integer tag from JPEG file
      byte[] IMGLOW_getExifTagString​(byte[] buffer, int tag)
      Gets EXIF meta data string tag from JPEG file
      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.
      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 folder
      java.lang.String IMGLOW_ocr_get_lan()
      Get language for Tesseract machine
      boolean 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 folder
      void IMGLOW_ocr_set_lan​(java.lang.String language)
      Set language for Tesseract machine
      boolean 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 data
      boolean 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 document
      boolean IMGLOW_page_is_jpeg_image​(java.lang.String name, int pageNum)
      Returns true if file is JPEG document
      int 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/XFA
      boolean IMGLOW_pdf_is_xfa​(java.lang.String name, int[] error)
      Returns true if document is PDF/XFA
      boolean 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 level
      int 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 rectangles
      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.
      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
      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.
      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 document
      int 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 file
      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.
      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 xrefs
      int 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 directly
      int 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 files
      int IMGLOW_set_j2k_decode_parameter​(java.lang.String name, java.lang.String value)
      Sets the j2k (JPEG2000) decode parameter
      int 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 stream
      int IMGLOW_set_license_path​(java.lang.String path)
      Set full path name to Snowbound License JAR or JSON file
      int 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 rendering
      int 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 conversions
      int 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 paths
      int IMGLOW_set_pdfa_font_path​(java.lang.String pdfaFontPath)
      Sets the path for PDF/A saving to use when looking for fonts
      int 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 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) document
      static boolean is_office​(byte[] buff)
      Returns true if buff is MSOffice 97-2003 format
      static boolean is_pcl​(Snow.SnbdFileio fh)
      Returns true if buff if PCL (Printer Control Language) document
      boolean 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 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 license
      int 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 object
      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
      int put_raster​(int[] sPtr, int ypos, int bytes)
      Callback function used to put raster data into current Snowbound image object
      static int remove00​(byte[] fromBuff, byte[] toBuff, int size)
      remove the 0x00 from double-byte encodings of characters
      void reset_warnings()
      Clear warningCode list
      void 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 information
      int set_header​(Snow.Dib lpbi, byte[] pData)
      Callback function used to set current Snowbound image object using information from a byte array
      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
      void set_mjics​(java.awt.color.ICC_ColorSpace colorSpace)
      Sets ICC color space used when converting JPEG CMYK images
      void 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 information
      void setPdf_xsize​(int pdf_xsize)  
      void setPdf_ysize​(int pdf_ysize)  
      static void setPdfParserBetaEnabled​(boolean enabled)
      Set whether the newer pdf parsing will be enabled.
      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 conversions
      int setYdpi​(int dpi)
      Sets the vertical resolution (in dots per inch) for subsequent conversions.
      void SnowExceptions​(java.lang.Throwable t)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • VERSION_QUALIFIER

        public static final java.lang.String VERSION_QUALIFIER
        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

      • 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.
      • 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.
      • 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 - boolean
        • true 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 decompress
        page - 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 file
        xsize - width, in pixels, of the image after decompression
        ysize - height, in pixels, of the image after decompression
        type - fax data type
        • 2 for Group 3 2D data
        • 3 for Group 3 data
        • 4 for Group 4 fax data
        fillOrder - byte order
        • 0 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 data
        xsize - Width, in pixels, of the image after decompression
        ysize - Height, in pixels, of the image after decompression
        type - fax data type
        • 2 for Group 3 2D data
        • 3 for Group 3 data
        • 4 for Group 4 fax data
        fillOrder - byte order
        • 0 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 file
        fitToPage - 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 data
        type - 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 format
        error - 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 data
        ypos - 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 data
        ypos - 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 data
        page - 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/display
        page - zero based page number
        sf - 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.tif
        page - zero based page number
        sf - 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.tif
        page - 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 pixels
        ysize - 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 image
        ys - starting Y position for cropping the image
        xe - horizontal size of cropped rectangle in pixels
        ye - 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 image
        pt - 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 image
        pt - 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 image
        pt - 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 image
        pt - 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 context
        xs - starting X position for drawing the image
        ys - starting Y position for drawing the image
        xsize - horizontal size of displayed image
        ysize - 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 port
        xs - starting X position
        ys - starting Y position
        xsize - horizontal size
        ysize - vertical size
        res - 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 displayed
        res - 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 image
        res - 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 context
        sf - current java.awt.Container for image
        xs - starting X position for drawing the image
        ys - starting Y position for drawing the image
        xsize - horizontal size of displayed image
        ysize - vertical size of displayed image
        zoom - 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 context
        sf - current java.awt.Container for image
        xs - starting X position for drawing the image
        ys - starting Y position for drawing the image
        xsize - horizontal size of displayed image
        ysize - vertical size of displayed image
        zoom - 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 window
        evt - 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 window
        ssb - 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 rectangle
        ys - coordinate on the Y axis for the left edge of the cropping rectangle
        xsize - width of the cropping rectangle in image pixels
        ysize - 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 header
        pData - 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 header
        pPage - 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 data
        dbuff - destination buffer to receive raster data
        ypos - image raster position
        rasterSize - 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 data
        dbuff - destination buffer to receive raster data
        dOffset - raster offset position from which to start copying
        ypos - image raster position
        rasterSize - 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 object
        ypos - y position in Snowbound raster object
        bytes - 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 object
        ypos - y position in Snowbound raster object
        bytes - 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 object
        typos - y position in Snowbound raster object
        tileNum - number of tiles to copy
        tileWidth - tile width
        tileHeight - 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 convert
        error - 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 convert
        length - integer array containing the length of the buffer passed back
        error - Integer array for returning Snowbound Error code
        layer - integer array specifying which layer(s) to convert
        view - 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 read
        offset - offset in bytes to document data
        page - zero based page number
        snow - 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 class java.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 level
        max - Maximum value of window level
        mode - 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 pixels
        ysize - 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 pixels
        ysize - 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 resizing
        ysize - 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 path
        outputName - 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 stream
        outputData - output stream
        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_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 pixels
        ysize - 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 element
        startAngle - 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 rectangle
        ys - Start Y coordinate of rectangle
        xsize - Width of rectangle
        ysize - Height of rectangle
        color - Color to fill
        in_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 merge
        xpos - Starting x merge position
        ypos - Starting y merge position
        operation -
        • 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
        CALS
        • 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 block
        ys - Starting Y position for the image block
        xsize - Horizontal size of the image block in pixels
        ysize - 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 data
        yoffset - 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 retrieve
        buff - 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 replace
        array - 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 fill
        ys - Start Y position of image to fill
        xsize - Width of pattern area to fill
        ysize - Height of pattern area to fill
        width - Width of data in pattern array
        height - Height of data in pattern array
        xoffset - X offset of data in pattern array
        yoffset - Y offset of data in pattern array
        pattern - 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 String
        name - 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 delete
        error - 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 page
        page - 0-based page index to delete
        error - 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 name
        pageNum - 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 data
        pageNum - 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 file
        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_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 file
        pageNumTarget - 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 links
        pageNumTarget - 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 index
        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

        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 index
        angle - 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 index
        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

        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 data
        error -
        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 name
        error -
        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 name
        error -
        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 convert
        error - 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 convert
        error - 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 index
        angle - 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 encrypt
        userPW - pass non-null string to force user to enter this password when opening the PDF
        ownerPW - password for encryption key, not required
        allowFlags - 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 document
        buff - 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 document
        target - Search string
        error - 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 document
        pattern - Search pattern (regular expression) string
        error - 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 mPdfWriter
        bMargin - 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 document
        error - 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 files
        folderName - folder where new files should be put, must exist with write access
        rootFileName - 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 text
        error - 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 write
        maxBytes - Total size of tag value or data in bytes
        value - Integer value for a tag size of 4 bytes
        buff - 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 String
        dis - 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 resizing
        ysize - 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 position
        ys - Starting Y position
        xe - Horizontal size of cropping rectangle
        ye - 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 DataInputStream
        userData - 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 the HTML conversion program. This method is only relevant on Windows. It must be a valid path.
        Parameters:
        path - Specifies the path of the directory to which the HTML conversion program will be written.
        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