RMDLLProgrammers Guide
RMDLLProgrammers Guide
Note:
An online version of this manual contains information on the latest updates to Raster-
Master. To find the most recent version of this manual, please visit the online version at
www.rastermaster.com or download the most recent version from our website at
www.snowbound.com/support/manuals.html.
DOC-0131-09
Copyright Information
While Snowbound® Software believes the information included in this publication is correct as of the publication date,
information in this document is subject to change without notice.
UNLESS EXPRESSLY SET FORTH IN A WRITTEN AGREEMENT SIGNED BY AN AUTHORIZED
REPRESENTATIVE OF SNOWBOUND SOFTWARE CORPORATION MAKES NO WARRANTY OR
REPRESENTATION OF ANY KIND WITH RESPECT TO THE INFORMATION CONTAINED HEREIN,
INCLUDING WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PURPOSE. Snowbound Software Cor-
poration assumes no responsibility or obligation of any kind for any errors contained herein or in connection with the fur-
nishing, performance, or use of this document.
Software described in Snowbound documents (a) is the property of Snowbound Software Corporation or the third
party, (b) is furnished only under license, and (c) may be copied or used only as expressly permitted under the terms of
the license.
All contents of this manual are copyrighted by Snowbound Software Corporation. The information contained herein is
the exclusive property of Snowbound Software Corporation and shall not be copied, transferred, photocopied, trans-
lated on paper, film, electronic media, or computer-readable form, or otherwise reproduced in any way, without the
express written permission of Snowbound Software Corporation.
Microsoft, MS, MS-DOS, Windows, Windows NT, and SQL Server are either trademarks or registered trademarks of
Microsoft Corporation in the United States and/or other countries.
Adobe, the Adobe logo, Acrobat, and the Acrobat logo are trademarks of Adobe Systems Incorporated.
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc.
in the United States and other countries.
iText, the Initial Developers of the Original Code are Bruno Lowagie and Paolo Soares. Portions created by Bruno
Lowagie are Copyright (C) 1999-2009 by Bruno Lowagie.
Kakadu JPEG2000© , is copyrighted by Dr. David Taubman, and is proprietary to NewSouth Innovations, Pty. Ltd, Aus-
tralia.
Aspose™, Aspose.Cells© (copyrighted 2003), Aspose.Words© (copyrighted 2003), and Aspose.Slides© (copy-
righted 2004), are all proprietary to Aspose Software, Pty. Ltd, Australia.
United States Government Restricted Rights
The Software is provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the United States Govern-
ment is subject to restrictions as set forth under subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer
Software clause of DFARS 252.227 –19 or subparagraphs (c)(i) and (2) of the Commercial Computer Software-
Restricted Rights at 48 CFR 52.227 – 19 as applicable. The Manufacturer is Snowbound Software Corporation, 309
Waverley Oaks Rd., Suite 401, Waltham, MA 02452, USA.
All other trademarks and registered trademarks are the property of their respective holders.
Manual Title: Snowbound RasterMaster® for Dynamic Link Library (DLL), Windows and UNIX Programmer’s Refer-
ence Guide
Part Number: DOC-0131-09
Revision: 9
RasterMaster DLL Release Number: 19.0
RasterMaster® SDK Release Number: 19.0
Printing Date: June 2015
Published by Snowbound Software Corporation.
309 Waverley Oaks Road, Suite 401
Waltham, MA 02452 USA
phone: 617-607-2000
fax: 617-607-2002
©1996 - 2015 by Snowbound Software Corporation. All rights reserved.
Table of Contents
Chapter 1 - Additions and Improvements 35
New Features 35
Reading Images 40
Displaying an Image 41
System Overview 42
Multi-page Images 45
Overview of Callbacks 47
Decompressing Images 47
Saving Images 47
iii
Chapter 5 - Printing Images 48
Printing Overview 48
Printing Functions 48
Normal Printing 48
Fast Printing 48
Servers 49
Clients 49
Solution 49
Transparency Overview 50
Preferred Formats 56
iv
24-Bit Color Images 56
IMG_animate() 60
IMG_autocrop_bitmap() 60
IMG_auto_orient() 61
IMG_bitmap_info() 62
IMG_bitmap_palette() 63
IMG_color_combine() 65
IMG_color_separate() 65
IMG_color_gray() 66
IMG_create_handle() 66
IMG_create_handle_keep() 67
IMG_create_handle_shell() 68
IMG_decompress_bitmap() 68
v
IMG_decompress_bitmap_display() 69
IMG_decompress_bitmap_fd() 70
IMG_decompress_bitmap_mem() 71
IMG_decompress_bitmap_page() 72
IMG_decompress_fax() 73
IMG_decompress_fax_mem() 73
IMG_decompress_tiled_bitmap() 74
IMG_delete_bitmap() 75
IMG_delete_bitmap_keep() 76
IMG_dib_to_ddb() 76
IMG_display_bitmap() 77
IMG_display_bitmap_aspect() 78
IMG_display_bitmap_dti() 79
IMG_display_bitmap_iac() 80
IMG_display_bitmap_transp() 81
IMG_display_ddb() 82
IMG_erase_rect() 82
IMG_init_lib() 83
IMG_print_bitmap() 84
IMG_print_bitmap_fast() 85
IMG_remove_red_eye() 85
IMG_save_bitmap() 86
IMG_save_bitmap_fd() 87
IMG_save_bitmap_mem() 88
vi
IMG_save_mem() 89
IMG_set_encrypt() 90
IMG_unload_lib() 90
IMG_unload_plugins() 91
Scanning Constants 92
IMG_scan_acquire() 92
IMG_scan_acquire() 93
IMG_scan_acquire_feeder_fast() 94
IMG_scan_feeder_close() 94
IMG_scan_open_source() 95
IMG_scan_pages() 95
IMG_scan_pages_fast() 96
IMG_scan_get_cap() 97
IMG_scan_set_cap() 97
IMG_scan_set_caps() 98
IMG_scan_setup() 98
IMG_create_handle_ddb() 100
IMG_display_ddb_effect() 100
IMG_get_bitmap_palette() 101
IMG_get_croprect() 102
IMG_ifl_version() 103
IMG_ifl_version_ext() 103
vii
IMG_merge_bitmap() 104
IMG_merge_bitmap_alpha() 106
IMG_merge_bitmap_handle() 107
IMG_promote_8() 108
IMG_promote_24() 108
IMG_promote_32() 109
IMG_repaint_scroll() 110
IMG_scroll_bitmap() 111
IMG_set_croprect() 112
IMG_set_croprect_scroll() 113
IMG_set_display_angle() 114
IMG_set_statusbar() 115
IMG_zoom_bitmap() 116
IMG_zoom_bitmap_rect() 116
IMG_zoom_bitmap_1_to_1() 117
IMGLOW_map_image_to_wnd() 118
IMGLOW_map_wnd_to_image() 118
IMGLOW_get_fileinfo() 119
IMGLOW_get_fileinfo_page() 120
IMGLOW_set_rop() 120
IMGLOW_set_fileio() 122
IMGLOW_set_wipedelay() 122
viii
Standard Page Sizes 125
IMG_import_ascii() 126
IMG_RECT() 126
IMGLOW_get_ascii_attributes() 127
IMGLOW_get_ascii_page_width() 127
IMGLOW_set_ascii_attributes() 128
IMGLOW_autocolor() 129
IMGLOW_decompress_bitmap() 129
IMGLOW_decompress_bitmap_mem() 131
IMGLOW_detect_color() 133
IMGLOW_extract_text() 134
IMGLOW_extract_text_mem() 136
IMGLOW_get_anim_delay() 137
IMGLOW_get_bitmap_header() 137
IMGLOW_get_bitmap_name() 138
IMGLOW_get_custstring() 138
IMGLOW_get_display_rect() 139
IMGLOW_get_filetype() 139
IMGLOW_get_filetype_fd() 140
ix
IMGLOW_get_image_orientation() 141
IMGLOW_get_image_orientation_page() 141
IMGLOW_get_pages() 142
IMGLOW_get_pages_fd() 142
IMGLOW_get_pages_mem() 143
IMGLOW_get_tiff_tag() 143
IMGLOW_get_tiff_tag_page() 144
IMGLOW_get_tiff_tag_page_mem() 145
IMGLOW_get_tile_info() 145
IMGLOW_get_transp_color() 146
IMGLOW_is_tiled_image() 147
IMGLOW_save_bitmap() 147
IMGLOW_save_bitmap_mem() 149
IMGLOW_search_text() 150
IMGLOW_set_alias() 151
IMGLOW_set_alias_img() 152
IMGLOW_set_bitmap_name() 153
IMGLOW_set_comp_quality() 153
IMGLOW_set_dispfunc() 154
IMGLOW_set_document_input() 154
IMGLOW_set_document_page_size() 155
IMGLOW_set_image_orientation() 156
x
IMGLOW_set_jpeg_decompression 157
IMGLOW_set_jpeg2000_comp_ratio() 157
IMGLOW_set_jpg_interleave() 158
IMGLOW_set_msg_render_preferences() 158
IMGLOW_set_overlay_path() 159
IMGLOW_set_pdf_input() 159
IMGLOW_set_pdf_output() 160
IMGLOW_set_pdf_password() 161
IMGLOW_set_tiff_save_strips 161
IMGLOW_set_tiff_tag() 162
IMGLOW_set_transp_color() 163
IMGLOW_write_tiff_stream() 163
IMGLOW_set_cad_background() 165
IMGLOW_set_cad_input() 165
IMGLOW_set_cad_size() 166
IMGLOW_set_html_capabilities() 167
IMGLOW_set_html_home_dir() 168
IMGLOW_set_html_image_capability() 168
IMGLOW_set_html_input() 169
IMGLOW_set_html_javascript_capability() 169
IMGLOW_set_html_page_size() 170
xi
IMGLOW_set_html_page_size_ratio() 171
IMGLOW_set_html_page_size_ratio_capability() 171
IMGLOW_set_html_screen_dpi() 172
IMGLOW_set_html_use_page_breaks_exclusively() 172
IMGLOW_set_html_utf_bom() 173
IMGLOW_set_ooxml_license() 176
IMGLOW_ooxml_license_enable() 176
IMGLOW_set_ooxml_licenseW() 177
IMGLOW_get_ooxml_license_location() 178
IMGLOW_set_ooxml_license_filename() 178
IMGLOW_set_ooxml_license_filenameW() 179
IMGLOW_set_ooxml_license_path() 179
IMGLOW_set_ooxml_license_pathW() 180
IMG_auto_orient() 181
IMG_deskew_bitmap() 181
IMG_despeckle_bitmap() 182
IMGLOW_auto_invert() 183
IMGLOW_detect_blank_page() 184
IMGLOW_remove_halftone() 185
IMGLOW_remove_holepunch() 186
xii
IMG_apply_profile() 188
IMG_cmyk_to_rgb() 189
IMG_create_thumbnail() 189
IMG_deskew_bitmap() 190
IMG_despeckle_bitmap() 191
IMG_display_fit_to_height() 192
IMG_display_fit_to_width() 192
IMG_flip_bitmapx() 193
IMG_flip_bitmapy() 194
IMG_get_deskew_angle() 195
IMG_get_profile() 196
IMG_histogram_equalize() 196
IMG_invert_bitmap() 197
IMG_process_bitmap() 197
IMG_resize_bitmap() 198
IMG_resize_bitmap_bicubic() 199
IMG_resize_bitmap_interp() 200
IMG_resize_to_gray() 201
IMG_rgb_to_cmyk() 201
IMG_rotate_bitmap() 202
IMG_set_gamma() 203
IMG_set_lut() 204
IMG_sharpen_bitmap() 204
IMG_window_level() 205
xiii
IMGLOW_get_auto_detect() 206
IMGLOW_get_fileinfo_fd() 206
IMGLOW_get_palette() 207
IMGLOW_put_palette() 208
IMGLOW_read_pixel() 208
IMGLOW_set_auto_detect() 209
IMGLOW_set_decompsize() 209
IMGLOW_set_decomp_rect() 210
IMGLOW_set_decomp_reduction() 210
IMGLOW_set_dithermode() 211
IMGLOW_set_fast_convert() 212
IMGLOW_set_imnet_page_size() 213
IMGLOW_set_pcl_input() 213
IMGLOW_unset_auto_detect() 214
IMG_bayer_color() 215
IMG_bayer_mono() 215
IMG_color_gray() 216
IMG_dib_to_runs() 217
IMG_diffusion_color() 217
IMG_diffusion_mono() 218
IMG_halftone_mono() 219
IMG_mediancut_color() 219
IMG_octree_color() 220
xiv
IMG_popularity_color() 221
IMG_runs_to_dib() 222
IMG_thresh_mono() 222
IMGLOW_get_filetype_mem() 223
IMGLOW_get_raster() 223
IMGLOW_put_raster() 224
IMGLOW_set_alias_quality() 225
IMGLOW_extract_text() 226
IMGLOW_extract_text_mem() 229
IMG_save_document() 229
IMG_save_document_mem() 233
IMGLOW_set_fontmap_path() 235
IMGLOW_set_fontmap() 236
IMGLOW_set_pdfa_font_path() 237
IMGLOW_set_pdfa_font_map() 237
IMG_global_get_Xdisplay() 239
IMG_global_set_Xdisplay() 239
xv
IMG_global_get_Xscreen 240
IMG_global_set_Xscreen 240
IMG_global_get_Xreserverd_colors() 240
IMG_global_set_Xreserved_colors() 241
IMG_repaint_scroll() 241
IMG_scroll_bitmap() 242
IMG_zoom_bitmap() 243
IMG_zoom_bitmap_1_to_1() 244
IMG_zoom_bitmap_rect() 245
IMG_dib_to_GWorld() 247
IMG_dib_to_GWorld_bitDepth() 247
IMG_GWorld_to_dib() 248
IMG_display_bitmap_aspect() 249
IMG_repaint_scroll 249
IMG_scroll_bitmap() 250
IMG_set_croprect_scroll() 251
IMG_zoom_bitmap 252
IMG_zoom_bitmap_rect() 253
IMG_zoom_bitmap_1_to_1() 254
xvi
MS_Windows DIB Palette Format 257
Structure 258
Variables 259
SANN_activate_all_objects() 260
SANN_activate_object() 260
SANN_add_object() 261
SANN_choose_color() 261
SANN_choose_font() 262
SANN_choose_line_style() 262
SANN_choose_line_width() 262
SANN_create_ann() 263
SANN_deactivate_all_objects() 263
SANN_deactivate_object() 264
SANN_delete_all_objects() 264
SANN_delete_object() 264
SANN_display_annotations() 265
SANN_draw_object() 266
SANN_get_croprect() 266
SANN_get_object_bounds() 267
SANN_get_object_data() 267
SANN_get_object_info() 267
xvii
SANN_get_object_num() 268
SANN_highlight_object() 268
SANN_map_image_to_wnd() 269
SANN_map_wnd_to_image() 269
SANN_merge_ann() 270
SANN_mouse() 270
SANN_move_object() 271
SANN_print_annotations() 271
SANN_read_ann() 272
SANN_resize_object() 272
SANN_rotate() 272
SANN_set_bcolor() 273
SANN_set_croprect() 273
SANN_set_delete_flag() 274
SANN_set_fcolor() 274
SANN_set_font() 275
SANN_set_line_style() 275
SANN_set_line_width() 276
SANN_set_size() 276
SANN_write_ann() 276
Chapter 29 - Working with PDF and Other Document File Formats 278
Saving 279
xviii
Reading and Writing Support for PDF File Formats 279
Performance 280
xix
Alpha 308
Animate 308
Annotate 309
Aspect 309
Callback 310
Encrypt 310
Fit 311
Load 312
MFC_Sample 312
MFC_TextSearch_TextExtract_Sample 313
Page 314
Print 315
SaveMem 316
Scan 316
Tags 317
Transp 317
Vector_Convert 318
Zoom 318
xx
Appendix E - Snowbound Error Codes 352
Output Document Has Much Larger File Size than the Original Document 357
Output Document Has Much Lower Quality than the Original Document 358
xxi
List of Tables
xxii
Table 12.18: IMG_decompress_tiled_bitmap Function Variables 74
xxiii
Table 13.6: IMG_scan_page_fast Function Variables 96
xxiv
Table 14.20: IMG_zoom_bitmap_rect Function Variables 117
xxv
Table 16.10: IMGLOW_extract_text_mem Function Variables 136
xxvi
Table 16.34: IMGLOW_set_alias_img Function Variables 152
xxvii
Table 18.4: IMGLOW_set_html_input Function Variables 169
xxviii
Table 21.1: IMG_apply_profile Function Variables 188
xxix
Table 21.25: IMG_window_level Function Variables 206
xxx
Table 22.10: IMG_popularity_color Function Variable 221
xxxi
Table 25.8: IMG_zoom_bitmap_rect Function Variables 245
xxxii
Table 28.14: SANN_display_annotations Function Variables 265
xxxiii
Table 28.38: SANN_set_size Function Variables 276
Table A.3: File Type Constants listed by File Type Number 293
Table B.2: RasterMaster DLL Imaging SDK Docs Directory Files 304
Table E.2: General Error Define Values Retrieved from Status Property 355
xxxiv
Chapter 1 - Additions and Improvements
New Features
The following are the new features added to Version 19.0 of the product:
Format Fixes
l
Enhancements and bug fixes to the AFP file format.
l
Multiple enhancements and bug fixes to the PCL file format.
Office Enhancements
l
Added support for tab lead, paragraph border, and shading to extracted text buffer. Also
fixed center aligned images in extracted content used for searchable PDF output.
l
An XLSX document created by an application other than Microsoft Excel contained a
double byte null in the CONTINUE portion of a definition in the strings table. This is a
very unusual, but valid, construct. Enhanced RasterMaster to accept the double byte
NULL in the string definitions.
l
Added support for XLS custom and locale-specific date formats. In xls_use_format()
added support for the following custom date format:
l
Added beta support for PDF/A 1b with Embedded Fonts. Snowbound’s PDF/A 1b-com-
pliant output files use the basic fonts included with the Snowbound product. This may
result in the PDF output document looking slightly different than the original. You may
have additional fonts that you are licensed to embed in documents. You can tell Raster-
Master to use these additional fonts by calling IMGLOW_set_pdfa_fontpath to specify
the directory where the fonts are located.
35
Chapter 1 - Additions and Improvements
You can also tell RasterMaster to substitute one font for another using IMGLOW_set_
pdfa_fontmap. For example, if your documents use Arial but you own the Helvetica font
and want to use that instead, you could map Arial to Helvetica using this method.
The following two methods are available to make it possible for clients to have a bit of
control over the fonts:
IMGLOW_set_pdfa_fontpath tells us where to look for the base fonts. If this function is
not called, the fonts are expected to be in c:\fonts. The path is limited to one directory.
l
Enhanced support for MS Office 2013 file formats.
l
Added DWG support for the 64-bit library.
l
The Text format now supports auto-detection and handling of UTF-8 and UTF-16 text for
better support of international documents. UTF-16 text must be preceded by a Byte
Order Marker (BOM).
l Added functionality to auto-grow page width to accommodate files with many columns.
To set auto-grow in width to true set the page width parameter to -1 as shown in the fol-
lowing example:
Setting the width to -1 for auto-grow defaults the page width to US Letter (8.5").
The page width will auto-grow to fit all columns and image data in the file.
This is supported for XLS, XLSX. It should have no affect on DOC, DOCX, PPT,
PPTX, HTML or PDF files.
Currently there is no auto-grow in page height. Setting the page height to -1 will
not auto-grow the height, but instead set the height to a default value. For
example: US Letter 11”.
l Improved searching for Right-to-Left (RTL) text such as Hebrew and Arabic.
36
Chapter 1 - Additions and Improvements
Note:
Mixing Right-to-Left, numbers, and Left-to-Right characters on the same line may result
in unexpected results. We recommend not mixing the direction of characters.
37
Chapter 2 - Quick Start
If you do not find the information that you are looking for in this manual, please open a support
ticket at http://support.snowbound.com to request a specific sample, for clarification of a
method description, or to help you find the information they need. We are dedicated to helping
our customers succeed and we are constantly enhancing our products based on feedback from
customers like you.
The Format Conversion sample uses three routines that are at the heart of RasterMaster:
The functions mentioned above are described in detail later in this manual. This manual also
covers the following topics:
1. How to read and save multi-page documents. For more information, please see Chapter
3, Saving and Reading Multi-page Images.
2. How to adjust the color, compression and resolution attributes of documents for per-
formance, better quality output, or smaller output.
3. How to extract text and search for text in documents. For more information, please see
Chapter 23, Document Conversion and Text Extraction Functions. Please note that
Snowbound Software does not yet support OCR (Optical Character Recognition). There-
fore, we can only extract text from documents that contain text. You can use Raster-
Master in conjunction with OCR tools from other companies if you need to extract text
from scanned document images.
38
Chapter 2 - Quick Start
We include a lot of code samples to help you get started. These samples are listed in Appendix
C, RasterMaster DLL Samples. We have also indexed our documentation and made it search-
able to help you find what you need quickly.
If you have any questions please do not hesitate to open a support ticket at http://sup-
port.snowbound.com .
The samples directory contains four subdirectories that contain the RasterMaster DLL
samples: MFC_Sample and C_Samples.
The MFC_Sample directory is described in Table 2-1. For more information, about each
sample, see Appendix C, RasterMaster DLL Samples.
Sample Description
Sample showing how to open, save, and zoom images.
MFC_Sample
See MFC_Sample for more information.
Sample showing how to search and extract text from
MFC_TextSearch_TextExtract_
MODCA:PTOCA and PDF files. See MFC_Tex-
Sample
tSearch_TextExtract_Sample for more information.
Sample showing how to use the command line to
TextSearch extract text from a MODCA:PTOCA and PDF files. See
Vector_Convert for more information.
The C_Samples are described in Table 2-2. For more information about each sample, see
Appendix C - RasterMaster DLL Samples.
Sample Description
Sample for merging in an alpha channel image. See
alpha
Alpha for more information.
Sample for animation test. See Animate for more
animate
information.
Sample showing how to use Image Library to:
Decompress an image
39
Chapter 2 - Quick Start
Sample Description
Use display with corrected aspect ratio
Decompress an image
Rotate to screen
Reading Images
40
Chapter 2 - Quick Start
Syntax
The input filename is a standard string pointing to an image file name. The RasterMaster DLL
always detects the format of an image (i.e. .TIF, .PCX, .GIF). The return value from the DLL is
simply a number by which to reference the image.
You may call this function as many times as desired. This is limited only by the amount of
memory available.
Displaying an Image
Syntax
This function displays the image referenced by imghandle at the xpos, ypos, xsize and ysize
coordinates in pixels.
Imghandle is the number used to reference the image to display. HDC is the Windows Device
Context which can be obtained from BeginPaint() in the WM_PAINT message.
Before your application exits or when the image is no longer needed, you should remove the
image from memory to free any memory used by the library internally. Use the function below to
accomplish this task.
Syntax
All negative values are errors. See Appendix E, Snowbound Error Codes for error descriptions.
41
Chapter 2 - Quick Start
System Overview
RasterMaster DLL includes the technical specifications described below.
l Supported Platforms:
l Intel x86
l Intel x64
l AMD
l AMD 64
l Development Environments:
l MSVC ++
l MFC
l Visual Studio
l Visual Basic
l Powersoft Powerbuilder
l Borland Delphi
l
Minimum memory requirements are related to image size and necessary buffers. Buffers
may require multiple megabytes if images are large. For more information, please see
Determining Memory Requirements.
42
Chapter 2 - Quick Start
The amount of memory required to view documents varies depending on the size of the
documents you are processing and the number of documents you are processing at any
one time. The amount of memory needed increases as:
l You go from black and white, to grayscale, to color documents (bits per pixel
increases).
l You go from low resolution to high resolution documents (dots per inch / quality
increases).
l You go from small index card size images to large blueprint size images (number
of pixels increases).
The amount of memory required to display a document may be significantly larger than
the size of the document that is stored on disk. Just like a road map, the document is fol-
ded up and compressed when it is stored. In order to see the document, it must be unfol-
ded (decompressed) and spread out so you can see the whole map. The map takes up
much more room when open for viewing. The same is true of online documents. When a
document is open, a black and white letter size page at 300 dpi takes roughly 1MB of
memory to display and a color page takes 25MB.
Generally, higher quality documents require more memory to process. Snowbound Soft-
ware does not have a one-size-fits-all recommendation for memory because our cus-
tomers have such a variety of documents and different tolerances for the level of output
quality. However, you can try doubling the memory available to see if that resolves the
issue. Keep increasing memory until you stop getting out of memory errors. If you hit a
physical or financial limit on memory, then you can do the following:
l Decrease the quality of the images requested by decreasing bits per pixel, the res-
olution, or the size.
l Decrease the number of documents you have open at any one time.
To calculate the amount of memory required for an image, you will need to know the size
of the image in pixels and the number of bits per pixel in the image (black and white=1,
43
Chapter 2 - Quick Start
grayscale=8, color=24). If you do not know the height or width in pixels, but you do know
the size in inches and the dpi (dots per inch) of the image, then you can calculate the
size in pixels as (width_in_inches*dots_per_inch) = width_in_pixels.
To calculate the amount of memory (in bytes), multiply the height, width and number of
bits per pixel. Then, divide by 8 to convert from bits to bytes. See the following example:
44
Chapter 3 - Saving and Reading Multi-page Images
Multi-page Images
All Snowbound libraries decompress a single page at a time. This section describes the multi-
page formats and how to decompress, determine page count, and save multi-page images.
l TIFF
l DCX
l GIF
l MO:DCA/IOCA
l PDF
l MS Word - Reading
l MS Excel - Reading
l PowerPoint - Reading
l RTF - Reading
45
Chapter 3 - Saving and Reading Multi-page Images
Properties Description
Detects the number of pages in a file. See IMGLOW_get_
IMGLOW_get_pages()
pages() for more information.
Reads pages. Specify the specific page to import. See IMG_
IMG_decompress_bitmap() decompress_bitmap() for more information about this func-
tion.
Saves multi-page images.
For new files, new pages with the specified name are created
as necessary.
IMG_save_bitmap()
Note: Use a unique filename when saving to multi-page
formats; otherwise, images are automatically appended to
any file with the same name.
46
Chapter 4 - Callback Routines
Overview of Callbacks
Callback functions are useful for getting raw decompressed image data directly from a file
without using the library’s functions for displaying, printing, rotating, and more.
The low level functions for decompressing and saving images use function pointers passed in
as arguments. These are also called callback routines since they call back into the application.
These are mainly used to send image data (decompress) or retrieve image data (saving).
The format of the image data is always in Windows device independent bitmap (DIB) format.
This may be 1, 4, 8, or 24-bits per pixel. The data is always packed. That 1 byte will contain 8
pixels for a 1-bit per pixel image. Each raster is always on a long boundary or a multiple of 4
bytes. For 24-bit images, the data is stored as one byte each of blue, green, and red. The data is
a full 8-bits for each color.
Note:
If a negative value is returned from the callback, the save or decompress functions ter-
minate.
Decompressing Images
Use IMGLOW_decompress_bitmap() to decompress an image.
Syntax
Saving Images
Use IMGLOW_save_bitmap() to save an image.
Syntax
47
Chapter 5 - Printing Images
Printing Overview
All Snowbound products for Windows print to any device with a valid Windows printer driver
installed.
If a color or gray scale image is printed to a 1-bit or bi-level printer such as an HP-LASERJET
type printer, the image is dithered or reduced to 1-bit per pixel automatically.
The capabilities of the printer are detected by the Snowbound libraries to determine if the image
must be dithered. The technique employed is Stucky error diffusion. This technique simulates
grayscale by the placement of dots. The higher the resolution of the printer, the better the effect.
Note:
For color or grayscale images, IMG_print_bitmap_fast() command is the quick-
est.
Printing Functions
There are two printing functions available.
Normal Printing
Normally, to print an image, use the function below.
IMG_print_bitmap()
Fast Printing
To print an image using fast printing, use the function below.
IMG_print_bitmap_fast()
Fast printing is used with Postscript printers. It does a nice job of scaling and dithering images.
The whole image in its original size is sent to the printer with no preprocessing. A lot of pro-
cessing is done within the library when doing normal printing. See IMG_print_bitmap_fast() for
more information on fast printing.
Note:
This may not work with all printers.
48
Chapter 5 - Printing Images
Servers
Depending on the current Java Virtual Machine memory configuration for the Imaging server,
the need for additional resources may cause an out of memory error. Increasing the Java Virtual
Machine maximum heap size to the Imaging server during start up can help avoid memory
errors. Specify the minimum and maximum heap size by passing the parameter -Xms and -Xmx
to the Imaging server during start up, where the amount of memory is in megabytes or giga-
bytes you want to allocate to the Imaging server.
Clients
Each of the different browsers handles the increased resource demands uniquely. In some
cases, when printing documents that require additional resources, the document may print with
blank pages, fail to respond, or require the browser or computer to be restarted.
Solution
A workaround for this problem may be to download the document locally and then print it. If the
document does not have any annotations or the document is to be printed without annotations,
the original document can be downloaded and printed. However, if a document is to be printed
with annotations, a TIFF version of the document can be downloaded and printed.
49
Chapter 6 - Displaying and Saving Transparent Images
Transparency Overview
Transparency displays only the foreground colors of an image and ignores the specified back-
ground color when displaying the image. This is commonly used for icons in Internet HTML doc-
uments.
imghandle = IMG_decompress_bitmap(filename);
backcolor = IMGLOW_get_transp_color(imghandle);
3. Display the image as you would normally, but send in the transparent color with the state-
ment:
Note:
If the image does not contain transparent color information, you may receive the error
code NO_TCOLOR_FOUND
50
Chapter 6 - Displaying and Saving Transparent Images
51
Chapter 7 - Aspect Ratio Correction Functions
Function Description
Handles correction of aspect ratio but preserves the width
IMG_display_bitmap_aspect() and height of images when its window is resized. See
IMG_display_bitmap_aspect() for more information.
Maps screen coordinates to the image coordinates of a dis-
played image. Can be used for implementing a rubber band
IMGLOW_map_wnd_to_image()
zoom rectangle. See IMGLOW_map_wnd_to_image() for
more information.
Displays the area of the image specified by the passed-in
cropping rectangle. Also sets up the scroll bars to allow
IMG_set_croprect_scroll() scrolling.
52
Chapter 8 - RasterMaster Library
If the DPI information is present in the bitmap being compressed, then the information is
present in the DIB header. To change or look at the DPI information from an image use the fol-
lowing code:
change_dpi(void)
{
int image_handle;
HANDLE hdib;
LPBITMAPINFOHEADER lpbi;
int height,width,bit_pix;
image_handle = IMG_decompress_bitmap("filename.tif");
#ifdef PLATINUM
lpbi=(LPBITMAPINFOHEADER)IMG_get_bitmap_info
(image_handle,&width,&height,&bits_pix);
#else
hdib =IMG_bitmap_info(accu_handle,&width,&height,&bits_pix);
lpbi = (LPBITMAPINFOHEADER)GlobalLock(hdib);
#endif
/* set new value to 200 dots per inch */
lpbi->biXPelsPerMeter = 200;
lpbi->biYPelsPerMeter = 200;
#ifndef PLATINUM
GlobalUnlock(hdib);
#endif
return 0;
{
The structure elements are the biXPelsPerMeter and biYPelsPerMeter. The units are
always in DPI (dots per inch).
53
Chapter 9 - Display Quality
This will, however, take a little longer to display the image. By far, the best quality for 24-bit
images is obtained using the following call:
IMG_octree_color();
Use 256 for the number of colors to optimize to. This call permanently changes the image to an
8-bit image so you need only call the function once. The image contains an optimized palette;
allowing one quality image to be displayed at a time.
Large images at 200 DPI or larger must be scaled to fit on a standard resolution monitor. The
default scaling skips pixels so small lines or details may be ignored.
Aliasing
When the aliasing function is turned on, the scaling algorithm looks at neighboring pixels to pre-
serve details that might normally be lost.
Scale to Gray
The scale to gray function converts the neighboring pixels to an 8-bit gray scale value. Best res-
ults are obtained on text type documents.
54
Chapter 9 - Display Quality
Preserve Black
The preserve black function creates a 1-bit pixel based on neighboring pixels. This has been
found to work well on large engineering type drawings. It is suggested to try both to see which
yields the best results on the type of images you are using.
55
Chapter 10 - Image Compression
Preferred Formats
Most of the compression algorithms only compress a specific type of image data. Compression
techniques for 24-bit color images usually do not work well on 1-bit or bi-level images. Similarly,
compression for 1-bit images do not compress well for 24-bit color images.
56
Chapter 11 - File Format Conversion
All RasterMaster products import and convert file formats to Snowbound’s internal format at
decompress time. The format is a simple uncompressed DIB format stored in memory. This
format is decompressed or imported and can be saved out to any supported format. See
Appendix A, Supported File Formats for a complete list of supported file formats.
In general, RasterMaster handles details like file format, bit-depth, bit ordering and compression
formats automatically. You will need only a few RasterMaster calls to handle a wide variety of
input and output file types.
RasterMaster supports automatic promotion of images to destination files. For example, JPEG
images can only be written out at 8 and 24-bits per pixel. In order to save a 1-bit TIFF image as
JPEG, the developer must promote the TIFF to 8 or 24-bits per pixel.
In our other libraries, this is accomplished by calling one of the promote functions. In Raster-
Master, however, the library automatically determines the bits per pixel for the destination
format and promotes accordingly.
You can read in almost any type of image or document using the IMG_decompress_bitmap()
method. RasterMaster examines the content of the document and not the file type extension to
determine the file type. If a file does not have a file extension or has the wrong file name exten-
sion, RasterMaster will still identify the format correctly.
Before you read a document in, you have the option of adjusting the input quality. Reading in at
a high resolution DPI (dots per inch) will result in a higher quality document. This will give you
the option of producing higher quality output. However there is a trade-off. Higher quality doc-
uments take longer to process and take up more space in memory and when stored. You can
adjust the quality using one of the IMGLOW_set_document_input() methods.
57
Chapter 11 - File Format Conversion
RasterMaster will automatically read in black and white, grayscale, and color documents at the
appropriate bit-depth (1, 8 and 24 respectively). The bit-depths RasterMaster uses auto-
matically vary by input format. For more information on file formats, please see Appendix A,
Supported File Formats
You can tell RasterMaster to read in color documents as black and white to increase per-
formance. You do this by calling IMGLOW_set_document_input() with a bit-depth of 1. You can
tell RasterMaster to read in black and white documents as color. However, that is not recom-
mended because it will hurt performance for no gain in quality.
Most of the time, the input that you read in will convert successfully to the output format you
select in either the IMG_save_bitmap() or IMG_save_document().
A Pixel_Depth_Unsupported error indicates that the bit-depths do not match. You can
look at the file formats you are using in Appendix A, Supported File Formats to compare the bit-
depths supported by your input and output file formats. The goal is to find a bit-depth that the file
formats have in common.
If you do not know the file format of the input file, you can use the IMGLOW_get_filetype() to
determine it. You can find the bit depth/bits per pixel of your image by calling IMG_bitmap_info()
and looking at the value in biBitCount.
In some cases, you will find you do not have enough bits-per-pixel to go to the desired output
format. If you are going from a black and white or grayscale to a color document that is color pro-
motion because the bit-depth is going from low to high. Please see the Chapter 14, Image Man-
agement Functions for information on RasterMaster functions that you can use to get to the bits
per pixel depth you need.
If you have too many bits per pixel for the desired output format, then you are going from color or
grayscale towards black and white. Going from a higher bits per pixel to a lower one is color
reduction. Please see the Chapter 22, Bit Depth Conversion Functions for information on
RasterMaster functions that you can use to adjust your image to a lower pixel depth.
The output quality is affected by several factors described in the sections below:
If you are reading in color documents and getting out black and white, then your bit-depth (color)
may be lower than that of your desired output. Try increasing bit-depth (color) of the input doc-
ument using IMGLOW_set_document_input().
If your output is coming out grainy, then check to see if your input is grainy too.
58
Chapter 11 - File Format Conversion
If the input document looks good, then increase the input DPI using IMGLOW_set_document_
input().
If the input is grainy, then you may need to do some image enhancement techniques. Contact
Snowbound Support at http://support.snowbound.com for help.
Color Reduction - Going from a Color Document to Black and White or Grayscale
RasterMaster will automatically handle color promotion and reduction. However there is no
excellent one-size-fits-all method for either of these. You can adjust the quality by using dif-
ferent color promotion or color reduction methods to fine tune your results. Please see the
Chapter 14, Image Management Functions and Chapter 22, Bit Depth Conversion Functions
chapters for more information.
Lossy Compression
If your output format is using a lossy compression, you may lose details. You may want to try a
different lossless output format.
In some rare cases, there may be an error during conversion. Please provide the input file and a
sample of the bad output to Snowbound Support at http://support.snowbound.com.
If you have selected high quality output and selected a high resolution (DPI) or a high bit-depth
(color), there will be a lot more data than for a lower quality image. The data takes longer to pro-
cess and takes more space. Please see Determining Memory Requirements for information on
determining your memory requirements. If you reduce the DPI or the bits per pixel in your input.
using IMGLOW_set_document_input() and/or in the output using color reduction, you should
see better performance and smaller files.
59
Chapter 12 - High Level Functions
IMG_animate()
This function draws all frames of the animated GIF file passed in as bm_name once. Call repet-
itively for continuous display.
Use the delay time in the image for proper frame synchronization.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Animate sample.
Syntax
int SNBDAPI IMG_animate(IMGPORT hdc, char *bm_name, int xs, int ys,
int xsize, int ysize);
Remark
Variable Description
IMGPORT Device port (HDC) to draw images
bm_name Animated GIF filename to use
xs Starting x position to draw
ys Starting y position to draw
xsize X size of image drawing rectangle
ysize Y size of image drawing rectangle
Returns
Returns the status of the animate operation. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_autocrop_bitmap()
This function finds and clips any white border around the image on every side. The border is dis-
carded and the image is resized to the new cropped rectangle plus the margin.
60
Chapter 12 - High Level Functions
Note:
This function only works with 1-bit images. If you use this function with an image that is
not a 1-bit image, you will get a PIXEL_DEPTH_UNSUPPORTED (-21) error message.
See Appendix A, Supported File Formats for more information.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress function
imghandle
such as IMG_decompress_bitmap()
margin Number of pixels to add to the autocrop rectangle
Returns
Returns the status of the autocrop bitmap operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_auto_orient()
This function returns the orientation of the image. The value is 90 or 0. If the value is 90, you
may want to fix the image by using IMG_rotate_bitmap(). See IMG_rotate_bitmap() for
more information.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress function
imghandle
such as IMG_decompress_bitmap().
Angle returned as the current orientation. Number of pixels to
p_angle
add to the autocrop rectangle. Either 90 or 0 is returned.
61
Chapter 12 - High Level Functions
Returns
Returns the status of the auto orient operation. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_bitmap_info()
This function gets information about the current image and returns a pointer to the DIB data in
memory.
All images decompressed or imported into the library are converted to a Windows DIB. It con-
tains a header BITMAPINFOHEADER, palette RGBQUAD, and the raw DIB data. See
Chapter 27 - Format for Decompressed Images for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
l Aspect
l Encrypt
l Fit
l Format Conversion
l Load
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Page
l Print
l Scan
l Tags
62
Chapter 12 - High Level Functions
l Transp
l Zoom
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress function
imghandle
such as IMG_decompress_bitmap()
width Pointer to an integer filled with the width of the image
height Pointer to an integer filled with the height of the image
bits_per_pixel Pointer to an integer filled with the bits per pixel of the image
Returns
Returns a memory handle for the DIB. Returns a pointer to an image in memory.
IMG_bitmap_palette()
This function loads the palette from the image specified by imghandle into the video adapter’s
lut. 4 and 8-bit images have palettes associated with them. For best display quality, the video
adapter’s lut or video dac must be loaded with this palette.
For a 24-bit image displaying on a 256-color adapter, the function loads a special rainbow
palette which the library creates internally. For 1-bit images with aliasing set to SCALE_TO_
GRAY, it loads a 256 gray scale palette.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
63
Chapter 12 - High Level Functions
l Aspect
l Encrypt
l Fit
l Load
l Page
l Print
l Scan
l Tags
l Transp
l Zoom
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hdc Windows Device context to realize palette
Returns
Returns the status of the bitmap palette operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_bitmap_palette(nHandle, hdc);
64
Chapter 12 - High Level Functions
IMG_color_combine()
This function combines 3 or 4 planes into a new 24 or 32-bit image. Each argument is a Raster-
Master image handle to an 8-bit gray scale image.
If the 4th argument is a valid handle, a 32-bit CMYK image is created. If the 4th argument is not
valid or -1, a 24-bit RGB image is created.
Syntax
Remark
Variable Description
Standard image handle for 8-bit gray-scale image which
blue_handle
represents the blue plane (cyan).
Standard image handle for 8-bit gray-scale image which
green_handle
represents the green plane (magenta).
Standard image handle for 8-bit gray-scale image which
red_handle
represents the red plane (yellow).
Standard image handle for 8-bit gray-scale image which
k_handle represents the black plane (black). If negative, creates a
24-bit RGB image.
planes Number of planes for resulting image.
Returns
Returns the status of the color combine operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_color_separate()
This function gets an individual plane of color data and returns a new RasterMaster handle. The
new color plane is an 8-bit gray scale image.
Syntax
Remark
65
Chapter 12 - High Level Functions
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
The plane can be one of the following:
Returns
Returns the status of the color separate operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_color_gray()
This function converts a 24 or 32-bit image to an 8-bit grayscale image.
Syntax
Remark
Variable Description
hdib Handle of image to convert
Returns
Returns the status of the grayscale image operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_create_handle()
This function imports a Windows DIB created externally from the library. It returns a standard
image handle which is used for displaying, saving, or printing. This function makes a copy of
the image DIB and does not alter or delete the lpbih or the DIB data passed in.
66
Chapter 12 - High Level Functions
Syntax
Remark
Variable Description
Pointer to a windows DIB in memory containing the
lpbih
header palette and raw image data
Returns
Returns the status of the create handle operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_create_handle_keep()
This function imports a Windows DIB created externally from the library. It returns a standard
image handle which can be used for displaying, saving, or printing.
Note:
This function does not make a copy of the image DIB; it uses the pointer and data dir-
ectly. After a call to this function, do not delete the lpbih pointer or alter it in any way.
Syntax
Remark
Variable Description
Pointer to a windows DIB in memory containing the
lpbih
header palette and raw image data
Returns
Returns the status of the keep image handle operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
67
Chapter 12 - High Level Functions
IMG_create_handle_shell()
This function sets up a blank image in the RasterMaster libraries so users can provide their own
image data. It is backwards compatible and is a replacement for IMG_create_handle_keep
(). This function is used in all Snowbound products.
A new RasterMaster image object is created with the specified width, height, and bits per pixel.
No image data is initialized.
Syntax
Remark
Variable Description
Pointer to a Windows DIB in memory containing only the
lpbih
header and palette.
Returns
Returns the status of the create handle shell operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_decompress_bitmap()
This is the main function for loading a compressed or uncompressed image from disk. It con-
verts the data to a Windows DIB format in memory. It returns an image handle (integer) which
can be used to perform other operations on the image, such as print, rotate, display, and many
more.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
l Aspect
l Encrypt
l Fit
68
Chapter 12 - High Level Functions
l Format Conversion
l Load
l Page
l Print
l Tags
l Transp
l Zoom
Syntax
Remark
Variable Description
filename File or path/filename of the image to load
Returns
Returns the status of the decompress bitmap operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_decompress_bitmap_display()
This function is the same as IMG_decompress_bitmap() except the image is displayed
while being decompressed. The image is converted to a Windows DIB and stored in memory.
The return value is an integer for referencing the image for most other functions such as display,
print, rotate, and others.
Note:
This function is not recommended for 1-bit images. They decompress and display faster
using the normal IMG_decompress_bitmap() and IMG_display_bitmap() func-
tions. See IMG_decompress_bitmap() and IMG_display_bitmap() for more information.
69
Chapter 12 - High Level Functions
Syntax
Remark
Variable Description
filename File or path/filename of the image to load.
hdc Windows device context in which to display.
xpos Starting X coordinate for display of image.
ypos Starting Y coordinate for display of image.
width Width for display of image.
height Height for display of image.
0 for no correction, 1 if you want the library to correct for
aspect ratio. The original image proportions will be
aspect
retained. This may make the height or width smaller than
expected but never larger.
Returns
Returns the status of the decompress bitmap display operation. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_decompress_bitmap_fd()
This function decompresses from a file handle returned from Windows OpenFile() or _
lopen(). It returns an image handle (integer) which can perform other operations on the
image, such as print, rotate, display, and more.
The offset is usually set to 0, but may be any value for referencing images embedded within a
larger file. Data is converted to a Windows DIB in memory.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Page
Syntax
70
Chapter 12 - High Level Functions
Remark
Variable Description
fd Handle returned from a Windows OpenFile() call
offset Offset into file for embedded images, usually 0
Page number starting at 0 for decompressing multi-page
page
files such as TIFF, DCX, or MODCA:IOCA
Returns
Returns the status of the decompress file handle operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_decompress_bitmap_mem()
This function decompresses from a memory pointer. It returns an image handle (integer) which
can be used to perform other operations on the image, such as print, rotate, display, and more.
Like all other decompress functions, the data is converted to a Windows DIB format in memory.
It is recommended that you use the GlobalAlloc() call for allocating memory.
Note:
It is best to allocate an extra 30K of memory for the image buffer passed into the func-
tion.
Syntax
Remark
Variable Description
image_data Memory Pointer to compressed image data
Page number starting at 0 for decompressing multi-page
page
image files
Returns
Returns the status of the decompress bitmap memory operation. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
71
Chapter 12 - High Level Functions
IMG_decompress_bitmap_page()
The function decompresses PDF images. It renders the image as a bitmap. This function is
used with the apdfplugin.dll. After decompress, all RasterMaster functions can be used such as
rotate, flip, zoom, etc.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
Note:
Only use this function when utilizing the optional Adobe PDF plugin.
Syntax
Remark
Variable Description
Character string PDF file name to read. Must have .pdf
filename
extension.
page Desired page number starting at zero.
Returns
Returns the status of the decompress bitmap page operation. A value of 0 or 1 indicates suc-
cess. Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error
Codes for a list of error codes.
72
Chapter 12 - High Level Functions
IMG_decompress_fax()
This function decompresses fax or proprietary image formats which uses the CCITT G3 or G4
compression algorithms. The programmer opens the file with OpenFile()or _lopen() then
reads any header information to get the height and width of the image and also maybe the fill
order. It then seeks to the beginning of the compressed data.
Call this function to decompress the data and convert it into a Windows DIB in memory. It
returns an image handle (integer) which can be used to perform other operations on the image,
such as print, rotate, display, and more.
Syntax
Remark
Variable Description
fd Handle returned from a Windows OpenFile() call
xsize Horizontal width of the image after decompression
ysize Vertical height of the image after decompression
type 2 for Group 3 2d images, 3 for Group 3, 4 for Group 4 fax
Bit order in each byte, may be 0 or 2
fill_order 0 = Normally for CALS
2 = Normally for G3 and G4
Returns
Returns the status of the decompress fax operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_decompress_fax_mem()
This function decompresses fax or proprietary image formats which use the CCITT G3 or G4
compression algorithms. Using a memory pointer to the beginning of the compressed data, this
function decompresses the data and converts it into a Windows DIB in memory. It returns an
image handle (integer) which may perform other operations on the image, such as print, rotate,
display, and more.
Syntax
73
Chapter 12 - High Level Functions
Remark
Variable Description
image_ptr Pointer to image data in memory
xsize Horizontal width of the image after decompression
ysize Vertical height of the image after decompression
2 = for group 3 2d images
type
3 = for group 3 and 4 for Group 4 images
Bit order in each byte, may be 0 or 2, normally:
fill_order 2 for G3 and G4
0 for CALS
Returns
Returns the status of the decompress fax memory operation. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_decompress_tiled_bitmap()
This function decompresses the tiled image/pathname specified by the filename and returns a
standard RasterMaster image handle. The tiled image is completely decompressed and all tiles
are assembled into one image.
Syntax
Remark
Variable Description
bm_name Path/filename of tiled image to return information on
page Page number for multi-page files
Returns
Returns the status of the decompress tiled bitmap operation. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
74
Chapter 12 - High Level Functions
IMG_delete_bitmap()
This function removes the image from memory when you are finished with it or when ter-
minating the application.
After a call to this function the image handle is no longer valid. This call should be used for each
image handle generated by the library.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Animate
l Annotate
l Aspect
l Encrypt
l Fit
l Load
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Page
l Print
l Scan
l Tags
l Transp
l Zoom
Syntax
75
Chapter 12 - High Level Functions
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
Returns
Returns the status of the delete bitmap operation. A value of 0 or 1 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
IMG_delete_bitmap_keep()
This function can be used in conjunction with IMG_create_handle_keep() to delete all
internal library structures and data. It will not delete the pointer passed to IMG_create_
handle_keep(). See IMG_create_handle_keep() for more information.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
Returns
Returns the status of the delete bitmap keep operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_dib_to_ddb()
This function returns a DDB or old-style Windows bitmap (HBITMAP or Device Dependent Bit-
map). The original image is not altered.
Syntax
76
Chapter 12 - High Level Functions
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
width Width of desired DDB
height Height of desired DDB
Returns
IMG_display_bitmap()
This function is a standard image display routine. It takes the standard image handle (returned
by a decompress function) and displays the image into the device context specified by hdc.
Hdc is normally obtained from BeginPaint() when handling the WM_PAINT message.
This function detects the video display adapter and may reduce the number of colors in the
image when displaying, such as when displaying a 24-bit image on a 256 color display adapter.
If display quality is poor, try some of the color reduction functions such as IMG_octree_
color(), IMG_mediancut_color() or IMG_bayer_color().
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Fit
l Load
l Page
l Print
l Scan
l Zoom
Syntax
77
Chapter 12 - High Level Functions
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hdc Windows device context to display
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
width Horizontal width to display image
height Vertical height to display image
Returns
Returns the status of the display bitmap operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_display_bitmap_aspect()
This function is an image display routine with corrected aspect ratio. It takes a standard image
handle and displays the image into the device context specified by hdc. Hdc is normally
obtained from BeginPaint() when handling the WM_PAINT message.
After displaying the image, it turns scroll bars on or off for correct scrolling. A zoom factor of 100
displays the image with a one to one pixel ratio. A zoom of 0 fits the image horizontally or ver-
tically into the window.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
l Aspect
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Zoom
78
Chapter 12 - High Level Functions
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hdc Windows device context to display into
hwnd Handle to window in which to enable scroll bars
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
width Horizontal width to display image
height Vertical height to display image
Zoom factor:
zoom 0 = fit to window
100 = display pixels one to one
Returns
Returns the status of the display bitmap aspect operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_display_bitmap_dti()
This function is a special display function used with Document Technologies monitors. Since
this type of monitor can only scale images by 2, 3, or 4, it must first be scaled in memory before
being sent to the monitor using a value of 2, 3, or 4.
Syntax
Remark
79
Chapter 12 - High Level Functions
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hdc Windows device context in which to display
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
width Horizontal width to display image
height Vertical height to display image
zoom Specify 2, 3, or 4 for display quality
Returns
Returns the status of the display bitmap Document Technologies operation. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMG_display_bitmap_iac()
This function is a special display function used with Cornerstone monitors. Since this monitor
can also rotate images, a rotate_angle value is specified.
Note:
This function allows the monitor to do anti-aliasing, so do not use IMGLOW_set_alias()
with this function.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hdc Windows device context in which to display
hwnd Windows handle in which to display
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
width Horizontal width to display image
height Vertical height to display image
rotate_angle Specify 0, 90, 180, or 270
80
Chapter 12 - High Level Functions
Returns
Returns the status of the display bitmap Cornerstone operation. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_display_bitmap_transp()
This function displays transparent GIF images. It only draws the foreground color when dis-
playing, not the background color.
This function compares each pixel to the background color passed in and does not draw fore-
ground pixels that are identical. To get the background color from an image, use the IMGLOW_
get_transp_color() function. See IMGLOW_get_transp_color() for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Encrypt
l Transp
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hdc Windows device context to display
hwnd Handle of window within which to enable scroll bars
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
width Horizontal width to display image
height Vertical height to display image
tcolor Background color of image to ignore
Returns
Returns the status of the display bitmap tranparent GIF operation. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
81
Chapter 12 - High Level Functions
IMG_display_ddb()
This function displays a DDB obtained from IMG_dib_to_ddb() or any other DDB desired.
This may display 4 and 8-bit images faster on some display adapters. See IMG_dib_to_ddb()
for more information.
Syntax
Remark
Variable Description
hbitmap Old-style Windows DDB or HBITMAP
hdc Windows device context within which to display
xpos Starting X position to display image
ypos Starting Y position to display image
Returns
Returns the status of the device dependent bitmap (DDB) display operation. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMG_erase_rect()
This function draws the specified color inside or outside the rectangle passed in. It is used for
black border erasing or to permanently fill a solid color inside an image.
Syntax
int SNBDAPI IMG_erase_rect(int hdib, int xs, int ys, int xsize, int
ysize, int color, int in_outflag);
Remark
Variable Description
hdib RasterMaster image handle to process
xs X start of rectangle in pixels
ys Y start of rectangle in pixels
xsize X size of rectangle in pixels
ysize Y size of rectangle in pixels
82
Chapter 12 - High Level Functions
Variable Description
color Color to draw
1 = Draw inside rectangle
in_outflag
0 = Draw outside rectangle
Returns
Returns the status of the erase rectangle operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_init_lib()
This function loads the 32-bit DLL into memory and sets up the interface for calling functions.
Unload the library when finished to free resources. See IMG_unload_lib() for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Animate
l Annotate
l Callback
l Encrypt
l Tags
Syntax
Returns
Returns the status of the initial library operation. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
83
Chapter 12 - High Level Functions
IMG_print_bitmap()
This function is a standard image print routine. It takes a standard image handle and prints the
image into the device context specified by printerDC.
This function detects whether or not the printer is in color mode or black and white. If a black
and white printer is detected when printing a color or gray scale image, the image is reduced to
black and white using an error diffusion algorithm.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Annotate
l Print
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
printerDC Windows device context to printer
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
width Horizontal width to display image
height Vertical height to display image
Returns
Returns the status of the print bitmap operation. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_print_bitmap(
nHandle, hdc, (GetDeviceCaps(hdc, HORZRES) -
nHorRes) >> 1, (GetDeviceCaps(hdc, VERTRES) - nVertRes) >> 1,
nHorRes, nVertRes);
84
Chapter 12 - High Level Functions
IMG_print_bitmap_fast()
This function is a special image print routine. It takes a standard image handle and prints the
image into the device context specified by printerDC.
This function is different from IMG_print_bitmap() because it sends the current Windows
DIB specified by the image handle directly to the printer using StretchDiBits(). The printer
is required to do the scaling and color reduction if necessary.
Note:
This call may fail on some printers. If you have any problems with this function, use the
standard IMG_print_bitmap(). See IMG_print_bitmap() for more information
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
printerDC Windows device context to printer
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
width Horizontal width to display image
height Vertical height to display image
Returns
Returns the status of the print bitmap fast operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_remove_red_eye()
This function detects and converts very red eyes in photos to more natural colors.
Notes:
If xpos, ypos, xsize or ysize is set to -1, the entire photo is searched.
85
Chapter 12 - High Level Functions
Syntax
Remark
Variable Description
hdib Standard RasterMaster image handle
xpos Starting top left area for x coordinate
ypos Starting top left area for y coordinate
xsize Width of area to search
ysize Height of area to search
Returns
Returns the status of the remove red eye operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_save_bitmap()
This function saves an image to disk in any format desired. Once an image handle is obtained,
it may be saved out as almost any supported format.
One way to decrease the output file size is to use IMGLOW_set_document_input to specify a
lower DPI before opening the input file with IMG_decompress_bitmap. When saving to a JPEG
file format, you can decrease the file size by decreasing the quality level of the compression
using the IMGLOW_set_comp_quality method.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Encrypt
l Format Conversion
l MFC_Sample
86
Chapter 12 - High Level Functions
l MFC_TextSearch_TextExtract_Sample
Note:
If the type is -1, the library looks at the file extension for determining the output file type.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
filename File or path/filename for output image
See Appendix A, Supported File Formats for all image
type
types allowed and all files shipped with the product
Returns
Returns the status of the save bitmap operation. A value of 0 or 1 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMG_save_bitmap_fd()
This function saves an image to disk in any desired format. This allows saving anywhere into
an open file handle for embedded images.
After calling OpenFile, the programmer may seek any position in the file. This save function
begins writing compressed data in the format specified by type at this location. Once an image
handle is obtained, it may be saved out as any supported format.
Note:
If the type is -1, the library looks at the file extension for determining the output file type.
Syntax
87
Chapter 12 - High Level Functions
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
fd Windows file handle obtained from OpenFile or _lopen
See Appendix A, Supported File Formats for all image
type
types allowed
Returns
Returns the status of the save bitmap file handle operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_save_bitmap_mem()
This function saves an image to a memory pointer in the format specified by file type. After call-
ing GlobalAlloc() and GlobalLock(), the programmer sends the pointer to the saving
function. This function operates on only one page at a time. For multi-page saving, please use
IMG_save_bitmap().
The total size of the compressed image is returned in bytes. If using the same pointer more than
once, it is suggested that you clear the first 10 bytes to zero in order to avoid the library pre-
suming the memory location already contains an image.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
memptr Windows memory pointer already allocated
See Appendix A, Supported File Formats for all image
type
types allowed
88
Chapter 12 - High Level Functions
Returns
Returns the total size of the compressed image. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
Example 12.7:IMG_save_bitmap_mem
IMG_save_mem()
The function allows saving to a memory buffer which is returned. It calculates the size of the
memory buffer and grows it appropriately.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the SaveMem sample.
Syntax
Remark
Variable Description
hdib Snowbound handle referencing image to save.
initial_size Starting size of buffer to allocate.
Amount to grow the buffer if more space is needed to
buff_inc
save.
Compression type to save to. See Appendix A, Supported
comp_type
File Formats for all image types allowed.
An integer size array with one value of the final size of the
*data_size
saved buffer.
*error A one integer array to return an error code if failing.
Returns
Returns the memory buffer. Any value less than zero is a Snowbound error code. See Appendix
E, Snowbound Error Codes for a list of error codes.
89
Chapter 12 - High Level Functions
IMG_set_encrypt()
This function allows encrypting images while saving. The key passed in by the function is the
encryption key. The same key must be used before the image is read.
Syntax
Remark
Variable Description
on_off Turns encryption on or off for an image at save
key A long user defined key for encryption
Returns
Returns the set encryption. Any value less than zero is a Snowbound error code. See Appendix
E, Snowbound Error Codes for a list of error codes.
IMG_unload_lib()
This function unloads the 32-bit DLL from memory. The programmer is free to load and unload
the library as many times as needed. Call this function after the library has been unloaded to
free resources. See IMG_init_lib() for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Animate
l Annotate
l Callback
l Encrypt
l Tags
l Transp
90
Chapter 12 - High Level Functions
Note:
Any calls to the library fail after this call is made.
Syntax
Returns
Returns the unloaded library. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMG_unload_plugins()
This function unloads all RasterMaster plugins from memory. These include snbdpl1.dll (the
LZW plugin), pdfplug.dll (the PDF plugin), abic32.dll (the ABIC plugin), and more.
Syntax
Returns
Returns the unloaded RasterMaster plugins from memory. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
91
Chapter 13 - Scanning Functions
Scanning Constants
Shown below is the structure for setting scanning parameters.
Syntax
Example 13.1:Scanning
IMG_scan_acquire()
This TWAIN scanning routine scans an image on the currently installed scanner or input device
and returns the standard library image handle.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Scan sample.
Note:
IMG_scan_open_source()must be called first. See IMG_scan_open_source() for
more information.
Syntax
92
Chapter 13 - Scanning Functions
Remark
Variable Description
hwnd Current windows handle
0 = Do not display TWAIN dialog box.
showui
1 = Display TWAIN dialog box.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_acquire()
This TWAIN scanning function allows scanning from a scanner with an automatic document
feeder.
Call this function in a loop until the NO_MORE_PAGES error message is returned then close the
scanner with IMG_scan_feeder_close(). See IMG_scan_feeder_close() for more inform-
ation.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Scan sample.
Note:
A negative value indicates (NO_MORE_PAGES) is returned when the feeder is empty.
Syntax
Remark
Variable Description
hwnd Current windows handle
0 = Do not display TWAIN dialog box
showui
1 = Display TWAIN dialog box
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
93
Chapter 13 - Scanning Functions
IMG_scan_acquire_feeder_fast()
This function allows for new fast memory transfer scanning. A parameter can also be set to
duplex scanning if your scanner supports it.
Syntax
Remark
Variable Description
hwnd Current windows handle
0 = Do not display TWAIN dialog box
showui
1 = Display TWAIN dialog box
duplex 1 = set duplex scanning mode
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_feeder_close()
IMG_scan_feeder_close()
This TWAIN scanning function closes the scanner after calls to the IMG_scan_acquire_
feeder()function. Use this after receiving the NO_MORE_PAGES error message from the
IMG_scan_acquire_feeder()function. See IMG_scan_acquire() for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Scan sample.
Syntax
Returns
Returns the status of the close. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
94
Chapter 13 - Scanning Functions
IMG_scan_open_source()
This TWAIN scanning function displays a dialog box which allows for setting available input
devices. It then displays a dialog box to select the available input devices.
Syntax
Remark
Variable Description
hwnd Handle of parent window for the source dialog
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_pages()
This TWAIN scanning routine scans all pages from the currently selected scanner or input
device and saves them to the path/filename specified by filename in the image format file type.
For multi-page formats, all pages are stored in a single multi-page file. For single page formats,
images are created with the following filenames: 00000000.img, 00000001.img, etc. for each
page.
For multi-page file types such as TIFF, DCX, or MO:DCA:OCA, you must specify a valid file-
name. For other file types, the filename can only contain a path.
Note:
Normally the showui will be turned off for multi-page scanning.
Syntax
Remark
Variable Description
hwnd Handle of parent window for the source dialog
95
Chapter 13 - Scanning Functions
Variable Description
filename Output file name to create as scanned image
See Appendix A, Supported File Formats for file type
filetype
formats in which to save compressed images
0 = Do not display TWAIN dialog box
showui
1 = Display TWAIN dialog box
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_pages_fast()
This function allows for new fast memory transfer scanning. A parameter can also be set to
allow duplex scanning if your scanner supports it.
It scans all pages from the currently installed scanner or input device and saves them to the spe-
cified path/filename. The file format is specified by the filetype parameter.
For multi-page formats, all pages are stored in a single multi-page file. For single page formats,
images are created with the following filenames: 0000000.img, 00000001.img, etc. for each
page.
For multi-page file types such as TIFF, DCX, or MO:DCA:IOCA you must specify a valid file-
name and all pages will be stored in a single multi-page image. For other file types, the filename
can only contain a path.
Syntax
Remark
Variable Description
hwnd Handle of parent window for the source dialog
filename Output file name
filetype File type (from imglib.h)
0 = Do not display TWAIN dialog box
showui
1 = Display TWAIN dialog box
duplex 1 = set duplex scanning mode
96
Chapter 13 - Scanning Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_get_cap()
This function returns the value of the current specified TWAIN capability.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Scan sample.
Syntax
Remark
Variable Description
hwnd Handle of parent window for the source dialog
cap TWAIN scanner capability to retrieve
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_set_cap()
This function sets the value of the specified TWAIN capability.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Scan sample.
Syntax
Remark
Variable Descripition
hwnd Handle of parent window for the source dialog
97
Chapter 13 - Scanning Functions
Variable Descripition
cap Current TWAIN capability to set
value New setting for TWAIN capability
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_set_caps()
This function allows the user to set the scanning parameters such as height, width, and bits per
pixel for the current scanner.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Scan sample.
Syntax
Remark
Variable Description
new_caps Pointer to the SCAN_CAPS structure
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scan_setup()
This function TWAIN scanning routine allows the caller to bring up the TWAIN driver’s user
interface to set scanning parameters. After the parameters are set, they are saved. No scan-
ning occurs unless one of the other scan acquiring functions are called.
Syntax
Remark
98
Chapter 13 - Scanning Functions
Variable Description
hwnd Handle of parent window for the source dialog
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
99
Chapter 14 - Image Management Functions
IMG_create_handle_ddb()
This function allows importing of an old-style Windows HBITMAP or Device Dependent Bitmap
(DDB). It returns a standard library imghandle. This does not alter the original bitmap, but
simply copies and converts the data to the library’s internal DIB format.
Syntax
Remark
Variable Description
hbitmap Old-style Windows DDB or HBITMAP
hpalette Windows palette for the hbitmap image
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_display_ddb_effect()
This function displays the image, hbitmap, or DDB with the desired effect. These display
effects are also referred to as wipes.
Syntax
Remark
Variable Description
hbitmap Old-style Windows DDB or HBITMAP
hdc Windows device context in which to display
100
Chapter 14 - Image Management Functions
Variable Description
xpos Starting X coordinate for display of image
ypos Starting Y coordinate for display of image
Display the following effect:
3 - Displays image in the Window from the right to the left side in ver-
tical lines
4 - Displays image in the Window from the left to the right side using ver-
tical lines
7 - Displays image in the Window as blocks from the center of the Win-
dow
9 - Displays image in the Window as small blocks from the center of the
Window
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_get_bitmap_palette()
This function returns the palette of the image specified by imghandle in HPALETTE format.
The developer is responsible for releasing HPALETTE when finished with it.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
101
Chapter 14 - Image Management Functions
Returns
hPalette = (HPALETTE)::IMG_get_bitmap_palette(nHandle);
IMG_get_croprect()
This function returns the current crop rectangle for the imghandle. After decompression, the
default cropping rectangle is the height and width of the image.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Annotate
l Aspect
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Print
l Zoom
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
xpos Pointer to integer to receive the starting x coordinate
ypos Pointer to integer to receive the starting y coordinate
width Pointer to integer to receive the current crop width
height Pointer to integer to receive the current crop height
102
Chapter 14 - Image Management Functions
Returns
Returns the current crop rectangle for the image handle. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
if(pDC->IsPrinting())
{
hdc = pDC->GetSafeHdc();
::IMG_get_croprect(nHandle, &nOrgLeft, &nOrgTop, &nOrgWidth,
&nOrgHeight);
::IMG_set_croprect(nHandle, 0, 0, nWidth, nHeight);
IMG_ifl_version()
This function returns version information for your RasterMaster DLL.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Callback sample.
Syntax
Remark
Variable Description
Pointer to 8 bytes of memory to receive the major version
major
number
Pointer to 8 bytes of memory to receive the minor version
minor
number
Returns
Returns version information. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMG_ifl_version_ext()
This function returns version information for your RasterMaster DLL.
103
Chapter 14 - Image Management Functions
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Callback sample.
Syntax
Remark
Variable Description
Pointer to 8 bytes of memory to receive the major version
major
number
Pointer to 8 bytes of memory to receive the minor version
minor
number
Pointer to 8 bytes of memory to receive the point release
update
or specific bug fix version number
Pointer to 8 bytes of memory to receive the EMR or other
fix
minor release version number
Returns
Returns version information. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMG_merge_bitmap()
This function permanently merges an image from disk with the image in memory using the
boolean function specified by raster_operation. This opcode allows ANDing and ORing over
the current image.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap().
Path/filename of disk image to merge onto the image in
filename
memory specified by imghandle.
104
Chapter 14 - Image Management Functions
Variable Description
ROP opcode obtained from the list below or the Windows
SDK manual.
Note: These codes will not work in Unix. The valid Unix
OP Codes are:
GXclear
CXand
GXandReverse
GXcopy
GXandInverted
GXnoop
GXxor
GXor
GXequiv
GXinvert
GXorReverse
GXcopyInverted
GXorInverted
GXand
105
Chapter 14 - Image Management Functions
Variable Description
map.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_merge_bitmap_alpha()
This function merges a 32-bit alpha channel image onto a normal 24-bit DIB using the trans-
parency channel.
Syntax
Remark
Variable Description
Source alpha channel image to merge. Standard image
imghandle handle obtained from a decompress function such as
IMG_decompress_bitmap()
DIB_HEADER Pointer to 24-bit DIB to merge alpha channel image onto
xpos Starting x coordinate for which to merge image
ypos Starting y coordinate for which to merge image
1 = use transparency channel information to blend images
opaque 0 = do not draw any pixels with transparency channel
information pixels set
106
Chapter 14 - Image Management Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_merge_bitmap_handle()
This function merges two RasterMaster images specified by the source shdib and destination
dhdib image handles. The images merge at the coordinates’ xpos and ypos relating to the
upper left handle corner of the image.
Notes:
Both images must be 24, 8, or 1 bit(s) per pixel.
The pixel depth must be the same for the source and destination images.
You cannot merge an 8 bit image onto a 24 bit image. Use IMG_promote_8 or IMG_
promote_24 to match pixel depths.
Syntax
Remark
Variable Description
RasterMaster image handle for the destination image for
dhdib
which to be merged
RasterMaster image handle of source image being
shdib
merged into another image handle
Merging Raster operation
0= SRCCOPY - just copy pixels
rop 1 = SRCOR - Boolean Or of image pixels
2 = SRCAND - Boolean Anding of pixels; used for trans-
parent merging
xpos Starting x coordinate for which to merge image
ypos Starting y coordinate for which to merge image
Returns
Returns the source or destination image handle. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
107
Chapter 14 - Image Management Functions
IMG_promote_8()
This function permanently converts a 1 or 4-bit image to an 8-bit image in the current DIB spe-
cified by the imghandle.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvert8bitpromote()
{
SnowBndFuncCall(::IMG_promote_8);
}
IMG_promote_24()
This function permanently converts a 1, 4, or 8-bit image to a 24-bit image in the current DIB
specified by the imghandle.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
108
Chapter 14 - Image Management Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvert24bitpromote()
{
SnowBndFuncCall(::IMG_promote_24);
}
IMG_promote_32()
This function converts the 1, 4, 8, or 24-bit image to a 32-bit alpha channel image. 32-bit alpha
images contain 24 bits of red, green, and blue planes (8-bits each), and an extra (8-bits) alpha
channel plane for transparency.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress function such as
imghandle
IMG_decompress_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvert32bitpromote()
{
SnowBndFuncCall(::IMG_promote_32);
}
109
Chapter 14 - Image Management Functions
IMG_repaint_scroll()
This function should be called in the WM_PAINT message after a scroll message to repaint the
dirty scrolled area of the window.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
l Aspect
l Fit
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hdc Current windows device context
hwnd Current active window handle
scroll_dir Returned from IMG_scroll_bitmap()
Windows PAINTSTRUCT. Obtained from BeginPaint
ps
().
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
110
Chapter 14 - Image Management Functions
if(m_bRepaintScroll)
{
::IMG_repaint_scroll(nHandle,hdc,hwnd,m_nScrollDir,&((CPaintDC
*)pDC)->m_ps);
}
else
{
GetClientRect(rcClient);
IMG_scroll_bitmap()
This function is used in conjunction with IMG_repaint_scroll() for fast scrolling. Call this
function for handling the WM_HSCROLL and WM_VSCROLL Windows messages.
The value returned must be saved and passed to IMG_repaint_scroll(). The message,
wparam and lparam, are the arguments from the main windows handle procedure. See IMG_
repaint_scroll() for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
l Aspect
l Fit
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
111
Chapter 14 - Image Management Functions
Remark
Variable Descripton
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hwnd Current active window handle
wparam WPARAM from main windows procedure
lparam LPARAM from main windows procedure
message WM_HSCROLL or WM_VSCROLL
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
m_nScrollDir = ::IMG_scroll_bitmap
(GetDocument()->ImageHandle(), GetSafeHwnd(), uParam, nPos,
uMsg);
IMG_set_croprect()
This function sets the current crop rectangle for the imghandle. After decompression the default
cropping rectangle is the entire size of the image.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Print sample.
Note:
The cropping rectangle size cannot be bigger than the height or the width of the image.
Syntax
Remark
112
Chapter 14 - Image Management Functions
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
xpos Integer to set the starting crop x value
ypos Integer to set the starting crop y value
width Integer to set the starting crop x width
height Integer to set the current crop y height
Returns
Returns the current crop rectangle for the image handle. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
if(pDC->IsPrinting())
{
hdc = pDC->GetSafeHdc();
::IMG_get_croprect(nHandle, &nOrgLeft, &nOrgTop, &nOrgWidth,
&nOrgHeight);
::IMG_set_croprect(nHandle, 0, 0, nWidth, nHeight)
IMG_set_croprect_scroll()
This function sets the cropping rectangle for the image represented by imghandle. It also turns
on or off the scrollbars to enable scrolling.
If aspect is set to 1 the aspect ratio is corrected. This slightly changes the cropping rectangle in
the X or Y direction.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Aspect
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
113
Chapter 14 - Image Management Functions
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hwnd Handle of window image is currently displayed in
xpos Starting X coordinate for cropping rectangle
ypos Starting Y coordinate for cropping rectangle
width Width of cropping rectangle
height Height of cropping rectangle
1 or True = aspect ratio on
aspect
0 = aspect ratio off
Returns
Returns the cropping rectangle for the image handle. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_set_display_angle()
This function rotates the angle of the image at display time when calling IMG_display_bit-
map_aspect(). The original image data is not affected. See IMG_display_bitmap_aspect()
for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Aspect
l Zoom
Syntax
Remark
114
Chapter 14 - Image Management Functions
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
rotangle Rotates image by 0, 90, 180 or 270
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_set_statusbar()
This routine is called for each line processed when decompressing, saving, printing, or using
other functions. This allows the programmer to add a status bar or cancel the operation. To can-
cel, return a -1 in the statusbar callback routine.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Annotate
l Print
Syntax
Remark
Variable Description
Pointer allocated by the programmer. Use for data the programmer
private_data wants available when the callback routine is called. Helps avoid the
use of global variables.
statusbar Pointer to callback function.
115
Chapter 14 - Image Management Functions
Returns
Returns the scallback routine. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap()
This function is a standard library zoom function. A zoom value of 100 tells the function to dis-
play the whole image in the coordinates specified in the call to IMG_display_bitmap().
See IMG_display_bitmap() for more information.
Any value greater than 100 crops the image so only part of the image is displayed. If the entire
image does not fit into the current window, this function turns the scroll bars on or off.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hwnd Active window handle
zoom_factor Amount to zoom
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
Example 14.10:IMG_zoom_bitmap
IMG_zoom_bitmap_rect()
IMG_zoom_bitmap_rect()
This function is most effective for resizing a window. It turns the scroll bars on or off to allow
scrolling.
116
Chapter 14 - Image Management Functions
Call this function after the WM_SIZE Windows message has been processed when repainting
the image with IMG_display_bitmap(). See IMG_display_bitmap() for more information.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Zoom sample.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hwnd Active window handle
lpzoom Rectangle in image to zoom about
lpclient Client rectangle of image
Used to specify image or screen coordinates
mode 0 = Screen Coordinates
1 = Image Coordinates
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap_1_to_1()
IMG_zoom_bitmap_1_to_1()
This function displays images with a one to one pixel ratio. A zoom value of 100 displays each
pixel of the image to one pixel on the screen.
Syntax
Remark
Variable Description
imghandle Standard image handle obtained from a decompress func-
117
Chapter 14 - Image Management Functions
Variable Description
tion such as IMG_decompress_bitmap()
hwnd Active window handle
zoom_level Amount to zoom
center_flag Recenters image if set to 1
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_map_image_to_wnd()
This function translates the image coordinates passed in to reflect the window coordinates for
the displayed image. It takes into account scaling and cropping of the image on screen.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the MFC_TextSearch_TextExtract_Sample samples.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hwnd Handle of window image is displayed in
x Pointer to an integer of an X coordinate to convert
y Pointer to an integer of an Y coordinate to convert
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_map_wnd_to_image()
This function translates window coordinates to image coordinates for the displayed image. This
is useful for passing coordinates to the crop functions. Use IMG_set_croprect_scroll()
to display an area of the image and enable scrolling. See IMG_set_croprect_scroll() for more
information.
118
Chapter 14 - Image Management Functions
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Aspect
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
hwnd Handle of window image is currently displayed in
x Pointer to an integer of an X coordinate to convert
y Pointer to an integer of an Y coordinate to convert
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_fileinfo()
This function gets image information by filling in the lpbih structure containing height, width and
bits per pixel for the image. This structure should be allocated large enough to fit the size of the
lpbih structure (40 bytes).
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Animate sample.
Syntax
Remark
119
Chapter 14 - Image Management Functions
Variable Description
filename Any valid existing image on the disk
lpbih Pointer to a BITMAPINFOHEADER structure
Returns
Returns the image information. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_fileinfo_page()
This function gets the file information such as width and height of a particular page from a multi-
page image or document.
Syntax
Remark
Variable Description
filepath Source file name to get information from
lpbih Structure of data to return with file information
page Page number within the document or image
Returns
Returns the file information. Any value less than zero is a Snowbound error code. See Appendix
E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_rop()
This function allows images to be displayed on the screen using ANDing, ORing or any other
legal Windows opcode.
Syntax
Remark
Variable Description
imghandle Standard image handle obtained from a decompress func-
120
Chapter 14 - Image Management Functions
Variable Description
tion such as IMG_decompress_bitmap().
Boolean opcode to use when displaying the image. See
the list below for the available opcode or consult your
Windows SDK manual.
121
Chapter 14 - Image Management Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_fileio()
This function replaces the file I/O and calls the library when decompressing or saving an image.
These calls are called in place of the standard Windows file I/O function calls.
Use IMG_decompress_bitmap_fd() when using your own file I/O call routines. The para-
meters to these calls are the same as the normal Windows routines. See IMG_decompress_bit-
map_fd() for more information.
Syntax
Remark
Variable Description
newread_func Pointer read callback function
newwrite_func Pointer write callback function
newseek_func Pointer seek callback function
Returns
Returns the pointer callback function. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_wipedelay()
This function is used with IMG_display_ddb_effect() to speed up or slow down the
speed that the image is drawn on the screen.
Syntax
Remark
Variable Description
wipe_delay Delay time in seconds
122
Chapter 14 - Image Management Functions
Returns
Returns the delay time. Any value less than zero is a Snowbound error code. See Appendix E,
Snowbound Error Codes for a list of error codes.
123
Chapter 15 - ASCII Formats and Functions
The ASCII text format is not auto-detected by default. You may get a -7 FORMAT_NOT_
ALLOWED error when trying to convert the ASCII text format. To enable auto-detection of the
ASCII text format, call the IMGLOW_set_auto_detect() function with the file type number set to
38 for the ASCII file format before you get pages or decompress. Please see the example
below:
IMGLOW_set_auto_detect(38)
IMG_import_ascii()
IMG_RECT()
IMGLOW_get_ascii_attributes()
IMGLOW_get_ascii_page_width()
IMGLOW_set_ascii_attributes()
Syntax
124
Chapter 15 - ASCII Formats and Functions
Remark
1L << means shift a binary bit to the left by 1 position. Essentially this is 2 to the power of how-
ever many positions you shift.
Add up the values of all of the flags you want to turn on, then you end up with a hex number.
Flag Description
ASCIIXDPI (1L<<0) = 0
ASCIIYDPI (1L<<1) = 2
ASCIIMARGIN (1L<<2) = 4
ASCIITABSTOP (1L<<3) = 8
ASCIIPAGEWIDTH (1L<<4) = 16
ASCIIPAGEHEIGHT (1L<<5) = 32
ASCIIPOINTSIZE (1L<<6) = 64
ASCIICHARSPERLINE (1L<<7) = 128
ASCIILINESPERPAGE (1L<<8) = 256
ASCIIWEIGHT (1L<<9) = 512
ASCIIITALIC (1L<<10) = 1024
ASCIITYPEFACE (1L<<11) = 2048
Note:
To get the page count for ASCII files, use IMGLOW_set_auto_detect(38) before
getting the page count or decompressing. Please see IMGLOW_set_auto_detect for
more information,
125
Chapter 15 - ASCII Formats and Functions
IMG_import_ascii()
This function reads and converts ASCII data into a bitmap image. The value returned is a stand-
ard library image handle.
The ASCII text format is not auto-detected by default. You may get a -7 FORMAT_NOT_
ALLOWED error when trying to convert the ASCII text format. To enable auto-detection of the
ASCII text format, call the IMGLOW_set_auto_detect() function with the file type number set to
38 for the ASCII file format before you get pages or decompress. Please see the example
below:
IMGLOW_set_auto_detect(38)
Syntax
Remark
Variable Description
filename Path/filename of the ASCII file to convert
page Page number to start at
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_RECT()
This function implements serializable to convert an object into a format that can be stored in a
file or memory buffer. It provides four fields representing the four sides of a rectangle.
Syntax
int SNBDAPI IMG_RECT(int left, int top, int right, int bottom);
Remark
Variable Description
left Left edge (point on X axis).
top Top edge (point on Y axis).
right Right edge (point on X axis).
bottom Bottom edge (point on X axis).
126
Chapter 15 - ASCII Formats and Functions
Returns
Returns the field representing the four sides of a rectangle. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_ascii_attributes()
This function gets the current parameters for IMG_import_ascii(). It allows getting the font
margins and other parameters when converting the ASCII data to a bitmap. See IMG_import_
ascii() for more information.
Note:
Please note that this method is not thread safe.
Syntax
Remark
Variable Description
lpattributes Pointer to ASCIITEXTATTR structure
Returns
Returns the pointer to ASCIITEXTATTR structure. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_ascii_page_width()
This function calculates the minimum page width required to make a bitmap image from the
given ASCII file.
Syntax
Remark
Variable Description
filename Path/filename of the ASCII file to convert
127
Chapter 15 - ASCII Formats and Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_ascii_attributes()
This function sets the current parameters for IMG_import_ascii(). It allows setting the
font, margins, and other parameters when converting the ASCII data to a bitmap. See IMG_
import_ascii() for more information.
Note:
Please note that this method is not thread safe.
Syntax
Remark
Variable Description
lpattributes Pointer to ASCIITEXTATTR structure
Returns
Returns the pointer to ASCIITEXTATTR structure. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
128
Chapter 16 - Low Level Functions
IMGLOW_autocolor()
This function displays multiple palette images at the same time. A single rainbow palette cre-
ated by the library is displayed when IMG_bitmap_palette() is called for any palette
image. See IMG_bitmap_palette() for more information.
This forces the library to dither all 8-bit images to this palette for best display quality when using
multiple palette images.
Syntax
Remark
Variable Description
0 = Off (default)
on_off
1 = On
Returns
Returns the multiple palette images. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_decompress_bitmap()
Use this routine if you are not interested in using the library’s high-level routines for displaying,
printing, or image processing. The low-level routine returns the image header and data in the
Windows DIB format.
The put_header routine is called from the library to return the header and palette information.
The put_dib_data is called for each raw raster.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Callback sample.
129
Chapter 16 - Low Level Functions
Syntax
Remark
Variable Description
File handle for the image obtained from OpenFile or _
fd
lopen.
offset File offset from which to begin decompression.
page Page number for multi-page files.
Pointer to "C" function to receive lines of image data. See
put_dib_data
put_dib_data for more information.
Pointer to private data passed into callbacks to be used
private_data
by the application.
Pointer to "C" function to receive header/palette inform-
set_header
ation. See set_header for more information.
Returns
Returns the image header and data in the Windows device-independent bitmap (DIB) format.
Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes
for a list of error codes.
Syntax
Remark
Variable Description
Same pointer as private_data (argument 5). Pointer
private_data that is passed to the set_header and put_dib_data
callback routine.
130
Chapter 16 - Low Level Functions
Variable Description
Buffer containing new raster data in DIB format. See
buffer
format for decompressed images.
Line number of raw data in buffer from image being decom-
ypos
pressed.
bytes Number of bytes in the buffer for one line of data.
Syntax
Remark
Variable Description
Standard image header information in DIB format. To be
LPBITMAPINFOHEADER followed by the palette data in RGBQUAD format. See
imglib.h for structures.
private_data Private data pointer for application use.
IMGLOW_decompress_bitmap_mem()
Use this low level decompress if you are not interested in using the library’s high level routines
for displaying, printing, or image processing. The low-level routine returns the image header and
data in the Windows DIB format.
The put_header routine is called from the library to return the header and palette information,
then the put_dib_data is called for each raw raster. The data is not retained by the library but
is sent to the callback routines only.
Syntax
Remark
131
Chapter 16 - Low Level Functions
Variable Description
imageptr Memory location from which to decompress.
page Page number for multi-page files.
Pointer to "C" function to receive lines of image data. See
put_dib_data
put_dib_data for more information.
Pointer to private data passed into callbacks to be used
private_data
by the application.
Pointer to "C" function to receive header/palette inform-
set_header
ation. See set_header for more information.
Returns
Returns the image header and data in the Windows device-independent bitmap (DIB) format.
Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes
for a list of error codes..
Syntax
Remark
Variable Description
Same pointer as private_data (argument 5). Pointer
private_data that is passed to the set_header and put_dib_data
callback routine.
Buffer containing new raster data in DIB format. See
buffer
format for decompressed images.
Line number of raw data in buffer from image being decom-
ypos
pressed.
bytes Number of bytes in the buffer for one line of data.
132
Chapter 16 - Low Level Functions
Syntax
Remark
Variable Description
Standard image header information in DIB format. To be
LPBITMAPINFOHEADER followed by the palette data in RGBQUAD format. See
imglib.h for structures.
private_data Private data pointer for application use.
IMGLOW_detect_color()
This function checks all pixels to determine if the image is color or gray scale. In documents
with a mix of black and white and color pages, you can improve performance and reduce the out-
put document size by ensuring the black and white pages are saved as 1-bit per pixel (mono-
chrome) rather than 24-bits per pixel (color). Use this function to detect the presence of
grayscale or color pixels on the current page. If the bit depth returned by this method is less
than the bit-depth returned by IMG_bitmap_info() in biBitCount, then you should consider
converting to a lower bit per pixel format. Snowbound Software recommends converting to
CCITT_TIFF_G4 format for black and white text images.
Notes:
The quality of the conversion to black and white or grayscale can be enhanced by spe-
cifying the alias and alias quality. We highly recommend the JPEG compression format
as the best compression available in our library for photo type images
Syntax
int IMGLOW_detect_color(int);
Returns
Returns the bits per pixel of the image. If this function returns 1, then this image contains only
black and white pixels. If this function returns 8, then this image contains grayscale data such
as black and white photo or shaded graphics. If this function returns 24, then this image
133
Chapter 16 - Low Level Functions
contains at least some content that uses full color. A value of 0 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
int x,bits_pix;
for (x = 0;x < pages; x++)
{
stat = tSimage.IMG_decompress_bitmap(st,x);
bits_pix = tSimage.IMGLOW_detect_color();
if (bits_pix == 24)
tSimage.IMG_save_bitmap("c:\\temp\\mix_java.-
tif",Snow.Defines.TIFF_LZW);
else
{
if (bits_pix == 8)
tSimage.IMG_thresh_mono();
tSimage.IMG_save_bitmap("c:\\temp\\mix_java.-
tif",Snow.Defines.TIFF_G4_FAX);|
}
}
IMGLOW_extract_text()
This function extracts text from PTOCA, PCL, PDF, MS Word, AFP, and MS Excel files.
Returns the buffer of extracted text in ASCII format.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l MFC_TextSearch_TextExtract_Sample
l Vector_Convert
134
Chapter 16 - Low Level Functions
Syntax
Remarks
Variable Description
*bm_name Name of file from which to extract text
**ptr Pointer for buffer from which to receive extracted text
*length Pointer to an integer to return the length of the extracted buffer
page Page number of file from which to extract text
Returns
Returns the buffer of extracted text in ASCII format. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
Note:
Some PDF or PCL files may be in a format that will not allow text searching.
%%SOF
/Page=0
/Width=1700
/Height=2200
/FontName=TimesRoman
/FontHeight=44
/FontBold=1
/FontItalic=0
/Xpos=1300 /Ypos=240
%%SOT
Devadas
%%EOT
/Xpos=1253 /Ypos=240
%%SOT
S.
%%EOT
%%EOF
%%SOI
%%EOI
135
Chapter 16 - Low Level Functions
Extracted text uses %%SOT for regular ASCII text. If Unicode text is detected, RasterMaster
will use %%SOTU. The text inside %%SOTU and %%EOTU may include null characters
Variable Description
%%SOF Signals the start of the buffer
%%EOF Marks the end of extracted text
Specified once at the beginning of the file to indicate the
Page
page number
Specified once at the beginning of the file to indicate page
Width
width in pixels
Specified once at the beginning of the file to indicate page
Height
height in pixels
Font Name Name of font
FontHeight Font height in pixels
Font to be drawn plain or in bold
FontBold 1 = bold
0 = plain
Font to be drawn in normal or italic
FontItalic 1 = italic
0 = normal
Xpos X pos in pixels
Ypos Y pos in pixels
%%SOT Start of text block
%%EOT End of text block
%%SOI Start of image
%%EOI End of image
%%SOTU Start of Text Unicode/UTF.
%%EOTU End of Text Unicode/UTF.
IMGLOW_extract_text_mem()
This function extracts text from memory. It returns the buffer of extracted text in ASCII format.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
Syntax
Remarks
136
Chapter 16 - Low Level Functions
Variable Description
*image_ptr Memory pointer to extract text from
**ptr Address of the pointer to the extracted text returned data
*length Pointer to the size of the extracted text buffer
page Page number of the input document/image to extract from
Returns
Returns the buffer of extracted text in ASCII format. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_anim_delay()
This function returns the animation delay time for GIF files which have a graphic extension
block containing the animation delay time parameter. If it is not found, the function returns the
error code NO_DELAY_TIME_FOUND.
Syntax
Remark
Variable Description
bm_name Path/filename of the file to return animation delay time
Returns
Returns the animation delay time for GIF files which have a graphic extension block containing
the animation delay time parameter. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_bitmap_header()
This function fills in the BITMAPINFOHEADER structure for the image referenced by
imghandle. It is used to get height, width, bits_pix and other information.
Syntax
Remark
137
Chapter 16 - Low Level Functions
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
header Pointer to BITMAPINFOHEADER structure
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_bitmap_name()
This function returns a text string from the image, if available. It is mainly used for TIFF images.
Each buffer should be at least 200 bytes.
Syntax
Remark
Variable Description
Pointer to memory to receive the name or author string
nameptr
from the last image decompressed
Pointer to memory to receive the date string from the last
dateptr
image decompressed
Returns
Returns the text string from the image. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_custstring()
This function returns a string stored in the RasterMaster product. The name of the corporation
licensed to use this product is embedded in the RasterMaster product by Snowbound Software.
This allows detection of the DLL or OCX to ensure that the user has the correct version.
Syntax
Remark
138
Chapter 16 - Low Level Functions
Variable Description
string Pointer in which to store custom string data
Returns
Returns the string stored in the RasterMaster product. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_display_rect()
This function returns the coordinates of the last displayed rectangle.
Syntax
Remark
Variable Description
hdib Handle to RasterMaster image
xs Starting x position (top)
xsize Height of display
ys Starting y position (left)
ysize Width of display
Returns
Returns the coordinates of the last displayed rectangle. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_filetype()
This function returns the filetype as defined in imglib.h.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Format Conversion
l MFC_Sample
139
Chapter 16 - Low Level Functions
Syntax
Remark
Variable Description
filename Path/filename of image to return file type
Returns
Returns the file type as defined in the image library (imgelib.h). For example, a Word file would
return the file type number 86. For a list of file type numbers, please see Appendix A, Supported
File FormatsAny value less than zero is a Snowbound error code. See Appendix E, Snowbound
Error Codes for a list of error codes.
IMGLOW_get_filetype_fd()
This function returns the file types as defined in imglib.h for the file handle of the image currently
open.
The regular decompress bitmap starts at the beginning of the file, position zero. If the image you
want to open is embedded in a file, use IMG_ decompress_bitmap_fd to open the content at the
current position without rewinding to the beginning of the file.
Syntax
Remark
Variable Description
File handle obtained from OpenFile() or _lopen()
fd
Windows call
Returns
Returns the file type as defined in the image library (imgelib.h). For example, a Word file would
return the file type number 86. For a list of file type numbers, please see Appendix A, Supported
File Formats. Any value less than zero is a Snowbound error code. See Appendix E, Snow-
bound Error Codes for a list of error codes.
140
Chapter 16 - Low Level Functions
IMGLOW_get_image_orientation()
This function returns the orientation of TIFF, MO:DCA, and Kodak PCD images.
Syntax
Remark
Variable Description
filename Path/filename of image to return orientation information
Returns
Returns the orientation of TIFF, MO:DCA and Kodak PCD images. Any value less than zero is
a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_image_orientation_page()
This function returns the rotation angle for the file name and page specified. It is used to get the
orientation of images in multi-page file formats. It returns the same values as IMGLOW_get_
image_orientation().
Syntax
Remark
Variable Description
filename Path/filename of image to return orientation information
page Page number to return orientation
Returns
Returns the rotation angle for the file name and page specified. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
141
Chapter 16 - Low Level Functions
IMGLOW_get_pages()
This function returns the number of pages for a multi-page file. If the file is not of the multi-page
variety (such as TIFF, .DCX, PDF, or MO:DCA:IOCA) the function returns 1.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Format Conversion
l MFC_TextSearch_TextExtract_Sample
l Vector_Convert
Syntax
Remark
Variable Description
filename Path/filename of image to return page information
Returns
Returns the number of pages for a multi-page file. A value of 0 or 1 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
IMGLOW_get_pages_fd()
This function returns the number of pages for a multi-page file. If the file is not of the multi-page
variety (such as TIFF or MO:DCA:IOCA), the function returns 1.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Multi-page Splitting and Saving samples.
Syntax
142
Chapter 16 - Low Level Functions
Remark
Variable Description
Integer file handle obtained from the low level file I/O “C”
fh
commands
Returns
Returns the number of pages for a multi-page file. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_pages_mem()
This function returns the number of pages from an image stored in the pointer passed as the
first argument. This is similar to IMGLOW_get_pages() but is used for an image stored in a
memory pointer.
It is recommended that you use the GlobalAlloc() call for allocating memory. After calling
GlobalAlloc() and GlobalLock(), send the pointer to the saving function.
Syntax
Remark
Variable Description
image_ptr Pointer to image data in memory
Returns
Returns the number of pages from an image stored in the pointer passed as the first argument.
Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes
for a list of error codes.
IMGLOW_get_tiff_tag()
This function reads a TIFF tag from the file specified by bm_name. The tag may be either a
string returned in buff or a long, int, or char returned in value.
If the return value is 1, the value returned is a string. A return value of 0 indicates a non-string
value.
143
Chapter 16 - Low Level Functions
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Animate
l Tags
Syntax
Remark
Variable Description
tag TIFF tag number to return
max_bytes Maximum bytes to read for string tags
value Tag value returned
bm_name Filename to read tags from
buff String buffer for returning string tags
Returns
Returns a string or a non-string value. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_tiff_tag_page()
This function reads a TIFF tag from the file specified by bm_name and page specified by page.
The tag may be either a string returned in buff or a long, int or char returned in value.
If the return value is 1, the value returned is a string. Return values of 0 indicate non-string val-
ues.
Syntax
Remark
Variable Description
tag TIFF tag number to return
144
Chapter 16 - Low Level Functions
Variable Description
max_bytes Maximum bytes to read for string tags
value Tag value returned
bm_name File name from which to read tags
buff String buffer for returning string tags
page Page number from which to read tags
Returns
Returns a string or a non-string value. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_tiff_tag_page_mem()
This function reads a TIFF tag from the file specified by bm_name and page specified by page.
The tag may be either a string returned in buff or a long, int or char returned in value.
If the return value is 1, the value returned is a string. Return values of 0 indicate non-string val-
ues.
Syntax
Remark
Variable Description
imageptr Pointer to image data in memory containing tiff tag
tag TIFF tag number to return
max_bytes Maximum bytes to read for string tags
value Tag value returned
bm_name File name from which to read tags
buff String buffer for returning string tags
page Page number from which to read tags
Returns
Returns a string or a non-string value. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_tile_info()
This function fills in the tile structure information on width, height, tile width, and tile height.
145
Chapter 16 - Low Level Functions
Syntax
Remark
Variable Description
Path/file name of tiled image for which to return inform-
bm_name
ation
stile Pointer to the tile information structure to return
Returns
Returns the filename of a tiled image. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_transp_color()
This function returns the background color for GIF images if this information is available in the
header. It returns 1 byte or NO_TCOLOR_FOUND error message if not available.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Encrypt
l Tags
l Transp
146
Chapter 16 - Low Level Functions
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_is_tiled_image()
This function returns 1 if the image passed as argument is a tiled image. Currently TIFF and
JEDMICS images can be tiled.
Syntax
Returns
Returns the value of the tiled image. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_save_bitmap()
This function is used when there is data from an external source not located in the library. For
instance, use this function when writing a scanner driver and the raw data needs to be saved to
disk as a TIFF file.
The low-level routines are called to receive each line of raw data from the application in Win-
dows DIB format.
Use lpbih to specify the height, width, bits_pixel, and palette of the output image.
Syntax
147
Chapter 16 - Low Level Functions
Remark
Variable Description
Windows file handle for image obtained from OpenFile
fd
() or _lopen().
Pointer to BITMAPINFOHEADER and palette of image to
lpbih
save.
type Image file type as which to save data.
Pointer to “C" function to retrieve lines of image data
get_dib_data get_dib_data(). See the get_dib_data for variable
descriptions.
Pointer to private data passed into callbacks to be used
private_data
by the application.
Returns
Returns the image header and data in the Windows device-independent bitmap (DIB) format.
Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes
for a list of error codes.
Syntax
Remark
Variable Description
Pointer for use by the application which is the same
private_data private pointer as passed into the get_dib_data call-
back
Buffer containing new raster data in DIB format. See
buffer
format for decompressed images
Line number of raw data in the buffer from image being
ypos
decompressed
bytes Number of bytes in the buffer for one line of data
148
Chapter 16 - Low Level Functions
IMGLOW_save_bitmap_mem()
This function saves any format to a memory location. The return value is the size in bytes of the
compressed image. Use lpbih to specify the height, width, bits_pixel, and palette of the out-
put image.
Syntax
Remark
Variable Description
imageptr Pointer to memory location to save data.
Pointer to BITMAPINFOHEADER and palette of image to
lpbih
save.
type Image file type for which to save data.
Pointer to "C" function to retrieve lines of image data. See
get_dib_data
get_dib_data for variable descriptions.
A pointer to private data passed into callbacks to be used
private_data
by the application.
Returns
Returns the status of the size in bytes of the compressed format. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
Syntax
Remark
Variable Description
private_data Pointer for use by the application which is the same
149
Chapter 16 - Low Level Functions
Variable Description
private pointer as passed into the get_dib_data call-
back.
Buffer containing new raster data in DIB format. See
buffer
format for decompressed images.
Line number of raw data in buffer from image being decom-
ypos
pressed.
bytes Number of bytes in the buffer for one line of data.
IMGLOW_search_text()
The function returns an array of structures of classes of the type, SNBD_SEARCH_RESULT.
For each class or structure there is an array of rectangles. This is to allow a search term to wrap
to a new line requiring more than two rectangles to highlight.
The nCount parameter will be set to the number of rectangles required for each instance of a
search term. The rectangles will be sorted from the top of the page to the bottom from the left
side to the right.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l MFC_TextSearch_TextExtract_Sample
Note:
The following file formats are supported: AFP, PCL, PDF, Word and Excel.
Syntax
Remark
Variable Description
Character buffer to search. Returned from a call to
buffer
IMGLOW_extract_text().
search_string Search string
Determines if the search is case sensitive.
case_sensitive 0 = Not case sensitive
1 = case sensitive
150
Chapter 16 - Low Level Functions
Variable Description
error Error code
Returns
Returns the status of the array of structures of classes of the type, SNBD_SEARCH_
RESULT. Any value less than zero is a Snowbound error code. See Appendix E, Snowbound
Error Codes for a list of error codes.
IMGLOW_set_alias()
This function displays scaled-down (zoomed out) 1-bit (black and white) and color images.
Preserve Black checks neighboring pixels for any adjacent black values and literally inter-
polates (inserts) black pixels so that small black lines or objects are not lost when scaling a
large black and white image. It is recommended to use preserve black for large schematics and
engineering drawings.
Scale to Gray converts a black and white image to gray scale upon display when zooming out
on a large drawing or document. It is recommended for use with documents or other images that
contain text.
Scale to Color is used when scaling down color images and prevents loss of visual data, cre-
ating a smoother rendering of text and lines.
Alias All turns scale to gray and scale to color on and is the default setting.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Aspect
l Fit
l Load
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Page
l Print
l Scan
151
Chapter 16 - Low Level Functions
l Tags
l Zoom
Syntax
Remark
Variable Description
Sets the aliasing factor. Choose from:
0 = No aliasing
1 = Use the preserve black algorithm
alias_type
2 = Use the scale to gray algorithm
3 = Use the scale to color algorithm
4 = Alias all. Use scale to gray and scale to color
Returns
Returns the status of the aliasing factor. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_alias_img()
This function sets the aliasing factor for the specified image. It is used to turn aliasing on or off
for a specific image when one or more images are loaded in memory. See IMGLOW_set_alias()
for more information.
Syntax
Remark
Variable Description
hdib Handle to RasterMaster image
Sets the aliasing factor. Choose from:
0 = No aliasing
1 = Use the preserve black algorithm
alias
2 = Use the scale to gray algorithm
3 = Use the scale to color algorithm
4 = Alias all. Use scale to gray and scale to color
152
Chapter 16 - Low Level Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_bitmap_name()
This function sets a text string such as image name or author for the image, if the format sup-
ports it. Each buffer should be at least 200 bytes.
Syntax
Remark
Variable Description
Pointer to memory to set name or author string for any sub-
nameptr
sequent images to be saved
Pointer to memory to set date string for any subsequent
dateptr
images to be saved
Returns
Returns the pointer to memory. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_comp_quality()
This function sets the compression ratio to quality factor to use when saving JPEG images.
This is a global setting and affects all threads. The default value is 70. This is a write only set-
ting. There is no get method.
Syntax
Remark
Variable Description
Integer between 1 - 100
quality 0 = Smallest file size but least quality
100 = Best image quality and largest file size
153
Chapter 16 - Low Level Functions
Returns
Returns the compression ratio to quality factor. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_dispfunc()
This function calls the callback routine, before display, to allow the application to process data.
The Snowbound library will have already scaled, gamma corrected, brightened, contrasted and
color reduced the image.
Syntax
Remark
Variable Description
DISPLAYCB Pointer to a C callback routine
Returns
Returns the callback routine. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_document_input()
This function sets the level of color and resolution quality when reading in documents for the
specified document format. This function should be called before the input document is read in
using IMG_decompress_bitmap().
You can override RasterMaster’s default bits-per-pixel and DPI settings for the specified format
using this function.
l Set the input bits-per-pixel to 1 for black and white input to remove the extra overhead
and performance costs of processing color images.
154
Chapter 16 - Low Level Functions
l Increase your output image quality by increasing the input document DPI.
l Increase your processing throughput by decreasing the document DPI or bits per pixel.
Note:
The default is 200 DPI and 24 bits per pixel for PDF. The default is 300 dpi and 1 bit per
pixel for PCL, AFP, Word, and Excel.
Syntax
Remark
Variable Description
Sets the input resolution in dots per inch. A higher dpi
dpi yields a higher quality document that takes longer to pro-
cess and takes up more memory and storage space.
Sets the bits per pixel.
1 = black and white documents
bits_pix
24 = color images
Returns
Returns the status of the document input. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.,
IMGLOW_set_document_page_size()
This function sets the document's page size.
This function can be set to auto-grow page width to accommodate files with many columns. To
set auto-grow in width to true set the page width parameter to -1 as shown in the following
example:
IMGLOW_set_document_page_size(-1.0, 11, XLS)
155
Chapter 16 - Low Level Functions
Setting the width to -1 for auto-grow defaults the page width to US Letter (8.5"). The page width
will auto-grow to fit all columns and image data in the file.
Note:
Currently, this method only supports .xls and .xlsx files.
Syntax
Remark
Variable Description
height Sets the page size height. Units in inches.
width Sets the page size width. Units in inches.
Sets the format parameter. A file format number as spe-
format cified in Appendix A, Supported File Formats i.e. Excel
(XLS) is 84.
Returns
Returns the status of the document page size. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_image_orientation()
This function sets the orientation for CALS or TIFF images. It orients the image in 45 degree
increments.
Syntax
Remark
Variable Description
orient Integer value between 0 and 8
Returns
Returns the status of the image orientation. A value of 0 or 1 indicates success. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
156
Chapter 16 - Low Level Functions
error codes.
IMGLOW_set_jpeg_decompression
This function gets the frequency components in JPEG images after the Huffman decom-
pression. These values will also be de-quantized. They will replace the internal RGB data nor-
mally returned from decompressing a JPEG image.
The components will be in the exact same order as the uncompressed image, except they will
be 32-bit integer values for each plane.
Syntax
Remark
Variable Description
0 = normal JPEG decompression
mode 1 = returns the array of 8x8 blocks of frequency com-
ponents
Returns
Returns the status of the JPEG decompression. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_jpeg2000_comp_ratio()
This function specifies the amount of compression when saving a JPEG2000 file. The integer
value is the final desired compressed size in kilobytes.
Note:
JPEG2000 is available as an optional add on to the Windows DLL and ActiveX product.
Syntax
Remark
157
Chapter 16 - Low Level Functions
Variable Description
comp_ratio Compression ratio of JPEG2000 output file
Returns
Returns the status of the JPEG2000 compression ratio. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_jpg_interleave()
This function sets values for blue and red chroma decimation. This function should be used
before saving images to JPEG format.
A value of 2 for h and 2 for v will skip every other chroma pixel horizontally and vertically. This
may give better compression results for saving images as JPEG.
The default is 2:1, though the best quality will be at 1:1. Developers should experiment with a
value, to determine which will give the best image compression while maintaining acceptable
quality.
Syntax
Remark
Variable Description
h_int Horizontal interleaving factor
v_int Vertical interleaving factor
Returns
Returns the status of the JPEG interleave factor. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_msg_render_preferences()
This function sets the rendering preferences for Microsoft’s .MSG files. This preference is loose
and may not actually take effect due to technical complications such as there is no data of that
type within the .MSG file.
Syntax
158
Chapter 16 - Low Level Functions
Remark
Variable Description
Rendering data source preference for email body data.
ASCII, Unicode, RTF, and HTML are recognized but may
preferences
not be all supported. Please see Appendix A, Supported
File Formats for the specific integer values.
Returns
Returns the status of rendering preferences for Microsoft’s .MSG files. Any value less than
zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error
codes.
IMGLOW_set_overlay_path()
This function sets the path for overlay files for PT:OCA images. The library searches this path
for overlay files required by PT:OCA images. If you pass in a NULL parameter, it toggles
between the two ways in which the overlay file is decompressed.
For example, you have a check overlay image file (the file has a check image on a larger white
background). If a null parameter is entered, toggling occurs, which lets you retrieve just the
check image itself without the extraneous white space. This way, you just get the check image.
Calling this method again retrieves the original image.
Note:
This function is only used with certain overlay files.
Syntax
Returns
Returns the status of overlay path. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_pdf_input()
IMGLOW_set_pdf_input()
This function converts PDF files into a raster image when being decompressed into Raster-
Master products. This function allows the type of bitmap created to be specified.
159
Chapter 16 - Low Level Functions
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
Note:
PDF reading is an optional module available in the PDF plugin for Windows DLL and Act-
iveX products.
Syntax
Remark
Variable Description
Controls the width and height of the file. Set to 200 or 300
dpi for black and white images. Set to 100 or 200 for color
images.
Allows importing color or black and white images.
bits_pix 1 = black and white documents
24 = color images
Returns
Returns the status of PDF input. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_pdf_output()
This function sets the destination size for saving PDF files. The xsize and ysize are the output
sizes in points. A point is 1/72 of an inch. Only PDF, PCL, and AFP file formats can be saved.
The PCL and APF file formats are saved as bitmap. The PDF file format can be saved as bit-
map or searchable text.
Syntax
160
Chapter 16 - Low Level Functions
Remark
Variable Description
double xsize Width of image in points
double ysize Height of image in points
Returns
Returns the status of PDF output. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_pdf_password()
This function allows passing a password string to allow for decompressing PDF files that are
password protected. You should make this call before calling any of the RasterMaster decom-
press calls such as IMG_decompress_bitmap().
Syntax
Remark
Variable Description
String represented password to use to open a password
filename
protecting PDF file
Returns
Returns the status of PDF password. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_tiff_save_strips
This function saves data in strips, which is known as ‘stripped TIFFs’, when saving to TIFF file
formats with the following compression types:
l Uncompressed
l LZW
l Packbits
l Group 4
161
Chapter 16 - Low Level Functions
This breaks up the data into smaller segments instead of all lines of the image being saved in
the same offset.
Syntax
Remark
Variable Description
0 = Off
on_off
1 = On
Returns
Returns the status of stripped TIFFs. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_tiff_tag()
This function writes new tags as well as all current tags. This function can be called multiple
times for adding multiple tags.
Note:
If you read in a TIFF file, RasterMaster does not save any of the tags. None of the tag
data is saved except for the needed data such as bits per pix, height, and DPI. This is
saved in the LPBITMAPINFOHEADER struct in RasterMaster's internal format. Any
other tags are not preserved. You could read in the tags and data you need from a
source TIFF, then set new tags and data before saving.
Setting the tag ID to -1 clears out all extra tags from being written to the file. It
stores the previous values between calls. Then, set new tag values as shown in the fol-
lowing example:
Simage.IMGLOW_set_tiff_tag(-1,0,0,null);
Syntax
Remark
162
Chapter 16 - Low Level Functions
Variable Description
tag ID of tag to write
max_bytes Total size of tag value or data in bytes
value Integer value for a tag size of 4 bytes
Data binary or ascii to write if tag size is greater than 4
buff
bytes
Returns
Returns the status of TIFF tags. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_transp_color()
This function sets the transparent color for GIF images.
Syntax
Remark
Variable Description
Standard image handle obtained from a decompress func-
imghandle
tion such as IMG_decompress_bitmap()
color Background color to set
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_write_tiff_stream()
The function creates a TIFF file directly from raw or compressed data. This is best used when
receiving raw data (no header info) directly from a scanner or other input device.
Note:
A negative value indicates an error. See Appendix E, Snowbound Error Codes for a list
of error codes.
163
Chapter 16 - Low Level Functions
Syntax
Remark
Variable Description
LPBITMAPINFOHEADER Pointer to the bitmapinfoheader structure
data_stream Data to write out
data_size Size of data stream in bytes
file_type Tiff file type to write. See above constants
bm_name Output file name
Returns
Returns the status of the TIFF stream. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
164
Chapter 17 - DWG and DXF Functions
IMGLOW_set_cad_background()
This function sets the background color for CAD rendering. The default color is black or [0,0,0].
Syntax
Remarks
Variable Description
r Sets the red background color.
g Sets the green background color.
b Sets the blue background color.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_cad_input()
This function sets the parameters for CAD rendering.
Syntax
Remarks
Variable Description
Sets the dots per inch. The default value is 300.0. Only
dpi
24-bit is supported.
Sets the bits per pixel. Only 1-bit and 24-bit are supported.
bits_pix
The default value is 24.
165
Chapter 17 - DWG and DXF Functions
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_cad_size()
This function sets the pixel size of the output image for CAD rendering. It will overwrite the DPI
setting.
Syntax
Remarks
Variable Description
width Sets the width.
height Sets the height.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
166
Chapter 18 - HTML Functions
IMGLOW_set_html_capabilities()
This function sets various parameters for the HTML renderer:
Note:
The new version of our HTML renderer engine has JavaScript and image downloading
enabled by default. Malicious JavaScript code and maliciously constructed embedded
images may compromise the security of the host computer. Please use these features
with caution.
Syntax
Remarks
Variable Description
Set the value to 0 to disable. Set the value to 1 to enable.
isImageEnabled
The default value is 1.
Set the value to 0 to disable. Set the value to 1 to enable.
isJavascriptEnabled
The default value is 1.
Set the value to 0 to disable. Set the value to 1 to enable.
isRatioEnabled
The default value is 1.
Set the value to 0 to disable. Set the value to 1 to enable.
isPageBreaksExclusive
The default value is 1.
Sets the width/height ratio. The default value is 8.5/11.0.
ratio (i.e. US LETTER portrait-mode).
167
Chapter 18 - HTML Functions
Variable Description
value is disabled.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_html_home_dir()
This function sets the home directory for the HTML renderer.
Syntax
Remarks
Variable Description
This value does not support double-byte characters
dir
(i.e. ASCII only).
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_html_image_capability()
This function enables or disables image downloading and image loading capabilities for the
HTML renderer.
Note:
The new version of our HTML renderer engine has JavaScript and image downloading
enabled by default. Malicious JavaScript code and maliciously constructed embedded
images may compromise the security of the host computer. Please use these features
with caution.
Syntax
168
Chapter 18 - HTML Functions
Remarks
Variable Description
Set the value to 0 to disable. Set the value to 1 to enable.
isEnabled
The default value is 1.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_html_input()
This function sets the parameters for HTML rendering.
Note:
If you call this function, the values of the width and height will immediately change.
Syntax
Remarks
Variable Description
print_dpi Used for rendering purposes. The default value is 200.0.
Sets the bits per pixel. Only 1, 24, and 32 are supported.
bits_pix
The default value is 24.
Returns
Returns the status of the Snowbound error code. A value of 0 or 1 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_set_html_javascript_capability()
This function enables or disables JavaScript capabilities for the HTML renderer.
169
Chapter 18 - HTML Functions
Notes:
The new version of our HTML renderer engine has JavaScript and image downloading
enabled by default. Malicious JavaScript code and maliciously constructed embedded
images may compromise the security of the host computer. Please use these features
with caution.
JavaScript is interpreted differently with each web browser. In particular, our new ren-
derer engine does not support all Microsoft Internet Explorer-only functions.
Syntax
Remarks
Variable Description
Set the value to 0 to disable. Set the value to 1 to enable.
isEnabled
The default value is 1.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_html_page_size()
This function sets the page size in pixels for screen size purposes. These values are just a sug-
gestion and will probably be over-written to more appropriate values during program execution.
Syntax
Remarks
Variable Description
Sets the width. The default value is 0.
w Note: Setting the width to anything but zero will force the
user-defined screen DPI to be ignored.
h Sets the height. The default vaule is 0.
170
Chapter 18 - HTML Functions
Returns
Returns the status of the Snowbound error code. A value of 1 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_set_html_page_size_ratio()
This function sets the ratio of the width to the height of the pages extracted from the HTML doc-
ument.
Syntax
Remarks
Variable Description
Sets the width/height ratio. The default value is 8.5/11.0.
(i.e. US LETTER portrait-mode).
ratio
Note: The value is ignored if the page size ratio capability
is disabled.
Returns
Returns the status of the Snowbound error code. A value of 0 or 1 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_set_html_page_size_ratio_capability()
This function enables or disables the use of the page size ratio capability of the HTML doc-
ument by forcing a page size ratio capability in the HTML document.
Syntax
Remarks
Variable Description
isEnabled Set the value to 0 to disable. Set the value to 1 to enable.
171
Chapter 18 - HTML Functions
Variable Description
The default value is 1.
Returns
Returns the status of the Snowbound error code. A value of 0 or 1 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_set_html_screen_dpi()
This function sets the screen DPI used for layout purposes.
Syntax
Remarks
Variable Description
Set the screen DPI. The default value is 94.0.
screen_dpi Note: The value is ignored if the pixel width is set to any-
thing but zero (0).
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_html_use_page_breaks_exclusively()
This function enables or disables the ability to force the exclusive use of print page breaks to
signal page boundaries.
Syntax
Remarks
Variable Description
isEnabled Set the value to 0 to disable. Set the value to 1 to enable.
172
Chapter 18 - HTML Functions
Variable Description
The default value is 1.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_html_utf_bom()
This function forces this Unicode Byte-Order-Mark (BOM) to all HTML data read by Raster-
master.
The byte order mark (BOM) is a Unicode character used to signal the endianness (byte order) of
a text file or stream. Its code point is U+FEFF. BOM use is optional, and, if used, should appear
at the start of the text stream. Beyond its specific use as a byte-order indicator, the BOM char-
acter may also indicate which of the several Unicode representations the text is encoded in.
Since Unicode can be encoded as 16-bit or 32-bit integers, a computer receiving Unicode text
from arbitrary sources needs to know which byte order the integers are encoded in. The BOM
gives the producer of the text a way to describe the text stream's endianness to the consumer
of the text without requiring some contract or metadata outside of the text stream itself. Once
the receiving computer has consumed the text stream, it presumably processes the characters
in its own native byte order and no longer needs the BOM. Hence the need for a BOM arises in
the context of text interchange, rather than in normal text processing within a closed envir-
onment.
Syntax
Remarks
Variable Description
May be set to one of the following values as defined in imglib.h:
utf_bom NOT_UNICODE 0
UTF_8 1
UTF_16BE 2
173
Chapter 18 - HTML Functions
Variable Description
UTF_16LE 3
UTF_32BE 4
UTF_32LE 5
UTF_7 6
UTF_1 7
UTF_EBCDIC 8
SCSU 9
BOCU_1 10
B_18030 11
174
Chapter 18 - HTML Functions
1While identifying textas UTF-8, this is not really a "byte order" mark. Since the byte is also the
word in UTF-8, there is no byte order to resolve.
2In UTF-7, the fourth byte of the BOM, before encoding as base64, is 001111xx in binary, and
xx depends on the next character (the first character after the BOM). Hence, technically, the
fourth byte is not purely a part of the BOM, but also contains information about the next (non-
BOM) character. For xx=00, 01, 10, 11, this byte is, respectively, 38, 39, 2B, or 2F when
encoded as base64. If no following character is encoded, 38 is used for the fourth byte and the
following byte is 2D.
3SCSU allows other encodings of U+FEFF, the shown form is the signature recommended in
UTR #6.
4 For BOCU-1 a signature changes the state of the decoder. Octet 0xFF resets the decoder to
the initial state.
Returns
Returns the status of the Snowbound error code or the current BOM the system will use. See
Appendix E, Snowbound Error Codes for a list of error codes.
175
Chapter 19 - Open Office 2007 XML (OOXML) Functions
RasterMaster DLL Microsoft Office plugin supports the seamless conversion of Word 2007 and
Excel 2007 documents which use the OOXML format. These documents are frequently stored
with the file extension .docx/.xlsx.
This chapter contains the following functions that ensure the location of the location of the
Aspose products library is registered with RasterMaster:
IMGLOW_set_ooxml_license()
This function loads the OOXML license file.
Syntax
Remark
Variable Description
File name of the license file. For example:
licenseFile
“c:\\temp\\license.txt”
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_ooxml_license_enable()
This function simplifies Aspose licensing by setting the license path.
176
Chapter 19 - Open Office 2007 XML (OOXML) Functions
Syntax
Remark
Variable Description
Buffer to receive path name of folder containing Aspose License file or
licensePath[out] NULL if no licenses found. This buffer must be allocated by calling
application.
nPathLength[in] Length in bytes of licensePath buffer.
Returns
Returns the status of the Snowbound error code. If no license file is found, returns -52,
OOXML_LICENSE_NOT_FOUND. If a license is found but is invalid, returns -53, OOXML_
LICENSE_EXPIRED. Any value less than zero is a Snowbound error code. See Appendix E,
Snowbound Error Codes for a list of error codes.
IMGLOW_set_ooxml_licenseW()
This function loads the OOXML license file.
Syntax
Remark
Variable Description
File name of the license file. For example:
licenseFile
”c:\\temp\\license.txt”
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
177
Chapter 19 - Open Office 2007 XML (OOXML) Functions
IMGLOW_get_ooxml_license_location()
This function gets the location of the OOXML license file.
Syntax
Notes:
This function supports wide characters. If you are using wide characters, then Windows
Unicode UTF-16LE is supported.
If the locationRequiredLength variable is longer than the locationLength variable, then
the value of the locationLength variable is used.
Remark
Variable Description
location Sets the location of where to write the location's characters.
The length of elements allocated in the location passed-para-
locationLength
meter.
The number of characters the location data actually requires.(0
locationRequiredLength
indicates that there is no license location.)
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_ooxml_license_filename()
This function sets the filename of the OOXML license file.
Syntax
178
Chapter 19 - Open Office 2007 XML (OOXML) Functions
Remark
Variable Description
licenseFilename File name of the license file.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_ooxml_license_filenameW()
This function sets the filename of the OOXML license file.
Syntax
Note:
This function supports wide characters. If you are using wide characters, then Windows
Unicode UTF-16LE is supported.
Remark
Variable Description
licenseFilename File name of the license file.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_ooxml_license_path()
This function sets the absolute path of the OOXML license file path.
Syntax
Remark
179
Chapter 19 - Open Office 2007 XML (OOXML) Functions
Variable Description
licensePath Path to the license file.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_ooxml_license_pathW()
This function sets the absolute path of the OOXML license file path.
Syntax
Note:
This function supports wide characters. If you are using wide characters, then Windows
Unicode UTF-16LE is supported.
Remark
Variable Description
licensePath Path to the license file.
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
180
Chapter 20 - DocClean Functions
IMG_auto_orient()
This function returns the orientation of the image. The value is 90 or 0. If the value is 90, you
may want to fix the image by using IMG_rotate_bitmap. See IMG_rotate_bitmap() for
more information.
Syntax
Remark
Variable Description
hdib Standard RasterMaster image handle.
Angle returned as the current orientation. Number of pixels to add
p_angle
to the autocrop rectangle. Either 90 or 0 is returned.
Returns
Returns the status of the auto orient detection operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
IMG_deskew_bitmap()
This function uses the angle returned from IMG_get_deskew_angle to do the rotation. This
allows angle detection to be separate from the actual rotation in case the angle is 0 and no rota-
tion is needed. See IMGLOW_auto_invert() for more information.
Note:
When a call is made to IMG_deskew_bitmap, the internal Snowbound image object
is stored in memory for viewing. The function needs to be saved to the library for the
change to be permanent.
181
Chapter 20 - DocClean Functions
Syntax
Remark
Variable Description
hdib Standard RasterMaster image handle.
*p_angle Angle value returned.
int deskew_angle_start Starting angle to test for. This may be negative.
Last angle to test for. This may be negative.
int IMG_deskew_bitmap(
int rot_angle
);
Returns
Returns the status of the Snowbound error code. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_despeckle_bitmap()
This function removes small specks or noise on the image.
Note:
When a call is made to IMG_despeckle_bitmap, the internal Snowbound image
object is stored in memory for viewing. The function needs to be saved to the library for
the change to be permanent.
Syntax
182
Chapter 20 - DocClean Functions
Remark
Variable Description
hdib Standard RasterMaster image handle.
Sets the coarseness of the amount of data to be filtered or
removed.
quality Quality factor 1 - 100
1 = Remove only single pixels
100 = Removes large black areas
Returns
Returns the status of the despeckle operation. A value of 0 indicates success. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_auto_invert()
This function inverts the colors of the image if the passed background color is found to not be
the dominant and presumably the background color of the image.
Syntax
Remark
Variable Description
hdib Standard RasterMaster image handle.
24-bpp: Red component of the detection color or the full back-
ground color for 1, 4 and 8-bit per pixel images. May have the
red value of [0-255]. 1-bpp/4-bpp/8-bpp: Index value of the detec-
tion color. May have the value of [0-1], [0-127], and [0-255],
respectively.
Green component of the detection color. Ignored for non-24-
green
bpp images. May have the value of [0-255].
183
Chapter 20 - DocClean Functions
Variable Description
Blue component of the detection color. Ignored for non-24-bpp
blue
images.May have the value of [0-255].
Per color-channel pixel-value match tolerance linear distance
colourTolerance
value.
Mismatch tolerance percentage. If negative, it will default to
75. An example of a valid value is 50.26. If the percentage of
mismatchTolerance
background pixels on the page is less than the mismatch tol-
erance, the image will not be inverted.
Returns
Returns 1 if the image is inverted and 0 if the image is not inverted. Any value less than zero is
a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_detect_blank_page()
This function can be used to detect blank pages. It can also be used to detect pages that are
essentially blank though there are some scan artifacts or other “dirt” on them.
This function returns the percentage of pixels present that are not equal to the passed detection
or background color. If autodetect is set to 1, then the detection or background color will be
determined automatically and will correspond to the dominant color in the image. The tolerance
value can be set to allow for a more lenient color matching the algorithm.
Syntax
Remark
Variable Description
hdib Standard RasterMaster image handle.
Auto-detect the background color (0: no; 1: yes). 1 will force the
autodetect
system to ignore the passed color.
24-bpp: Red component of the detection color. May have the
value of [0-255]. 1-bpp/4-bpp/8-bpp: Index value of the detection
red
color. May have the value of [0-1], [0-127], and [0-255], respect-
ively.
Green component of the detection color. Ignored for non-24-bpp
green
images. May have the value of [0-255].
Blue component of the detection color. Ignored for non-24-bpp
blue
images.May have the value of [0-255].
tolerance Per color-channel pixel-value match tolerance linear distance
184
Chapter 20 - DocClean Functions
Variable Description
value. Use this value in comparing background pixels. This num-
ber is in the range [0-255].
Execute the low-quality version of the autodetect algorithm (0:
no; 1: yes). The low-quality version will not guarantee the global
isLowQuality
maximum, but it will execute much faster. The tolerance level is
not taken into consideration.
Execute the low-memory version of the autodetect algorithm (0:
no; 1: yes). The low-memory version will not guarantee the global
isLowMemory
maximum. The tolerance level is not taken into consideration.
This setting is only for 24-bpp images.
Returns
Double. The percentage of pixels on the page that are not equal to the background color. If the
percentage is zero or near zero the page is blank. Note the percentage is a floating point num-
ber. For example, a return value of 50.26 means 50.26% of the page is non-blank. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_remove_halftone()
This function removes small blobs from images.
Syntax
Remark
Variable Description
hdib Standard RasterMaster image handle.
minSize Minimum diameter of a blob. (This value should be at least 1.)
Maximum diameter of a blob. (This value should be kept very
maxSize
small.)
Returns
Returns the status of the halftone removal operation. A value greater or equal to 0 indicates suc-
cess and represents the number of blobs removed. Any value less than zero is an error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
185
Chapter 20 - DocClean Functions
IMGLOW_remove_holepunch()
This function removes hole punches from specified areas on the page or automatically finds the
hole punches. Specifying a fixed area to repair is faster than having the method find and fill the
holes. This may be done manually by specifying the exact span of any hole punches along with
the fill color. Alternatively, this may be done automatically where both the holes and the fill color
are determined algorithmically.
This function removes hole punches by filling in the hole area with a background color. The
background color is passed in as red, green and blue or you can have the function automatically
detect the background color.
Note:
This will not work with alpha-channel enabled images.
Syntax
Remark
Variable Description
hdib Standard RasterMaster image handle.
Auto-detect the fill color (0: no; 1: yes). 1 will force the system
autoDetectFillColour
to ignore the passed fill color.
24-bpp: Red component of the detection color or the full back-
ground color for 1, 4 and 8-bit per pixel images. May have the
red value of [0-255]. 1-bpp/4-bpp/8-bpp: Index value of the detec-
tion color. May have the value of [0-1], [0-127], and [0-255],
respectively.
Green component of the detection color for 24-bit images.
green
Ignored for non-24-bpp images. May have the value of [0-255].
Blue component of the detection color for 24-bit images.
blue
Ignored for non-24-bpp images.May have the value of [0-255].
Auto-detect the hole punches (0: no; 1: yes). 1 will force the
autoFindHoles
system to ignore the passed holes.
Array of hole punch spans to fill. If there are regions-of-interest
(ROI), then all holes which do not completely lie within an ROI
holes are ignored. Similarly, holes which span several ROIs but not
a single ROI will be ignored. May be NULL when
autoFindHoles is 1.
holeNum Number of elements in the holes array. May be 0 when
186
Chapter 20 - DocClean Functions
Variable Description
autoFindHoles is 1.
Array of regions-of-interest (ROI). ROIs are areas where holes
may span. If ROIs is NULL and the holes are not auto-
ROIs matically found, then the entire image will be taken as the
ROI. If ROIs is NULL and the holes are automatically found,
then sensible ROIs will be determined algorithmically.
Number of elements in the ROIs array. May be 0 when ROIs
ROIsNum
is NULL.
Minimum diameter in pixels of any holes. This is only used
minHoleDiameter
when holes are automatically found.
Maximum diameter in pixels of any holes. This is only used
maxHoleDiameter
when holes are automatically found.
Returns
Returns the number of holes found. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
187
Chapter 21 - Image Processing Functions
IMG_apply_profile()
This function takes the input_profile from the creating device, such as a scanner, and
output_profile for a printer or display and applies them to the image. If an input file is not
available, the parameter can be set to to NULL or zero.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap().
Pointer to a buffer containing the input pro-
*input_profile
file.
Pointer to a buffer containing the output pro-
*output_profile
file.
mode For mode choices, see below.
Mode Description
0 Apply permanently to the image data.
1 Apply only at display time.*
2 Apply only at print time.*
3 Apply at display and print time.*
Returns
Returns the status of the apply profile operation. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
188
Chapter 21 - Image Processing Functions
IMG_cmyk_to_rgb()
This function converts the 32-bit CMYK data to 24-bit RGB data.The RasterMaster products
supports full 32-bit CMYK data as an internal 32-bit DIB format.
Syntax
Remark
Variable Description
hdib RasterMaster image handle to convert
Returns
Returns the status of the convert CMYK to RGB operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
void CSnowBndView::OnConvertCmyktorgb()
{
SnowBndFuncCall(::IMG_cmyk_to_rgb);
}
IMG_create_thumbnail()
This function creates a thumbnail with the correct pixel depth and automatically selects the cor-
rect resize function for the image. See IMG_resize_bitmap() and IMG_resize_bitmap_bicubic()
for more information.
1-bit images are converted to grayscale with our “scale to gray” algorithm. 8 and 24-bit images
are resized with our bicubic interpolation algorithm.
189
Chapter 21 - Image Processing Functions
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
xsize New width of image in pixels
ysize New height of image in pixels
Returns
Returns the status of the create thumbnail operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_deskew_bitmap()
This function uses the angle returned from IMG_get_deskew_angle to do the rotation. This
allows angle detection to be separate from the actual rotation in case the angle is 0 and no rota-
tion is needed. See IMG_get_deskew_angle() for more information.
Note:
When a call is made to IMG_deskew_bitmap, the internal Snowbound image object is
stored in memory for viewing. The function needs to be saved to the library for the
change to be permanent.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
angle Angle in degrees by which to rotate image
190
Chapter 21 - Image Processing Functions
Returns
Returns the status of the deskew bitmap operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
Example 21.2:IMG_deskew_bitmap
IMG_despeckle_bitmap()
This function is a noise removal algorithm.
Note:
When a call is made to IMG_despeckle_bitmap, the internal Snowbound image
object is stored in memory for viewing. The function needs to be saved to the library for
the change to be permanent.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Quality factor 1 - 100
value 1 = Remove only single pixels
100 = Removes large black areas
Returns
Returns the status of the despeckle bitmap operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
191
Chapter 21 - Image Processing Functions
IMG_display_fit_to_height()
This function displays the full height of the image vertically scaling it to fit. It crops the image
horizontally for aspect ratio correction and enables the scroll bars.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Fit sample.
Syntax
Remark
Variable Description
hdib RasterMaster image handle to display
hdc hdc port or device context to display
hwnd Windows handle to display
xs X starting position to display
ys Y starting position to display
xsize X size of rectangle to display
ysize Y size of rectangle to display
Returns
Returns the status of the display fit to height operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
case Height:
::IMG_display_fit_to_height(nHandle,h-
dc,hwnd,nLeft,nTop,nWidth,nHeight);
IMG_display_fit_to_width()
This function displays the full width of the image horizontally scaling it to fit. It crops the image
vertically for aspect ratio correction and enables the scroll bars.
192
Chapter 21 - Image Processing Functions
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Fit sample.
Syntax
Remark
Variable Description
hdib RasterMaster image handle to display
hdc Port or device context to display
hwnd Windows handle to display
xs X starting position to display
ys Y starting position to display
xsize X size of rectangle to display
ysize Y size of rectangle to display
Returns
Returns the status of the display fit to width operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
case Width:
::IMG_display_fit_to_width(nHandle,h-
dc,hwnd,nLeft,nTop,nWidth,nHeight);
IMG_flip_bitmapx()
This function swaps horizontal pixels to produce a mirror image of the original image. It per-
manently changes the image in memory.
Syntax
Remark
193
Chapter 21 - Image Processing Functions
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the status of the flip bitmapx operation. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_flip_bitmapy()
This function swaps vertical pixels to produce a mirror image of the original image. It per-
manently changes the image in memory.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the status of the flip bitmapy operation. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
194
Chapter 21 - Image Processing Functions
{
if(FlipDir==XDir)
SnowBndFuncCall(::IMG_flip_bitmapx);
else //(FlipDir==YDir)
SnowBndFuncCall(::IMG_flip_bitmapy);
}
IMG_get_deskew_angle()
This function detects the skew angle for 1-bit images by checking all angles starting at the start
angle and continuing in one degree increments until the stop angle is reached. The example
below uses -20 and 20 for starting and stopping angles. Your application may want to check for
only positive or negative angles.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
angle Pointer to integer to receive deskew angle
start_angle Starting angle for which to check
stop_angle Ending angle for which to check
Returns
Returns the status of the get deskew angle operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
195
Chapter 21 - Image Processing Functions
IMG_get_profile()
This function gets an input profile from an image file. ICC profiles may be embedded in the
image. In order to make an exact match, color profiles are created so that the identical color val-
ues can be printed or displayed.
Supported file formats include: TIFF, JPEG, PICT, PDF, GIF and PNG. These formats can con-
tain an embedded color profile.
Syntax
Remark
Variable Description
File name for the image to be read in from the
*bm_name
profile.
page Page number to be read in from the profile.
A pointer to return the length of the profile in
*length
the buffer.
Returns
Returns the character buffer. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
IMG_histogram_equalize()
This function is a histogram equalization which improves the dynamic range of 8 or 16-bit gray
scale images by remapping pixels based on a probability algorithm.
Syntax
Remark
Variable Description
hdib Snowbound image handle
196
Chapter 21 - Image Processing Functions
Returns
Returns the status of the histogram equalize operation. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_invert_bitmap()
This function changes each bit in the image from 0 to 1 or from 1 to 0. This works well for invert-
ing documents which have a black background. This permanently changes the image in
memory.
Syntax
Remark
Variable Description
Standard image handle obtained from a
Imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the status of the invert bitmap operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_process_bitmap()
This function is a Sobel image processing function. A simple 3 x 3 matrix is applied to the image
for 8 and 24-bit images. If the value for matrix pointer is not NULL, it assumes that it contains
values to be applied to the image.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle
decompress function such as IMG_decom-
197
Chapter 21 - Image Processing Functions
Variable Description
press_bitmap()
type Specify the type of filter to be performed
0 = User defined 3 * 3 matrix
1 = Isolate points
2 = Edge detection
3 = Horizontal edge detection
4 = Vertical edge detection
matrix
5 = 45 degree edge detection
6 = -45 degree edge detection
7 = Laplacian
8 = Dialation
9 = Roberts Cross
Returns
Returns the status of the process bitmap operation. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_resize_bitmap()
This function scales the image up or down to the new height and width. This permanently
changes the height and width of the image.
Note:
IBM AFP printers require the width of an image to be an exact multiple of 8. To be on the
safe side, set the width to a multiple of 8.
Set the width and height to the original width and height of the image after decompress as
shown in the following example:
198
Chapter 21 - Image Processing Functions
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
width New width of image
height New height of image
Returns
Returns the resize bitmap operation. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
if(CResizeDlg::Normal==rd.Resize)
nRes = ::IMG_resize_bitmap(nHandle, rd.m_nHorz,rd.m_nVert);
IMG_resize_bitmap_bicubic()
This function uses a bicubic interpolation algorithm to scale down images. This is good for cre-
ating high-resolution thumbnails of color images. Because this operation is floating point intens-
ive, it is not as fast as IMG_resize_bitmap(), which uses a linear interpolation.
Syntax
Remark
Variable Description
imghandle Standard image handle obtained from a
199
Chapter 21 - Image Processing Functions
Variable Description
decompress function such as IMG_decom-
press_bitmap()
xsize Width of image in pixels
ysize Height of image in pixels
Returns
Returns the resize bitmap bicubic interpolation algorithm operation. Any value less than zero is
a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_resize_bitmap_interp()
This function scales the image up or down to the new height and width in pixels. It resizes with
interpolation to provide a higher quality result simple resizing when scaling a 24-bit color or a
grayscale image up or down. The interp averages neighboring pixels for scaling down all image
types. This permanently changes the height and width of the image.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
width New width of image
height New height of image
Returns
200
Chapter 21 - Image Processing Functions
IMG_resize_to_gray()
This function resizes up 1-bit black and white images to 8-bit grayscale images using the scale
to gray anti-aliasing algorithm. This converts a 1-bit image to an 8-bit that may be saved in a
JPEG file format. This function is excellent for creating small, good looking thumbnails of large
documents or 1-bit black and white images.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
hres Destination width of image to resize
vres Destination height of image to resize
Returns
Returns the status of the resize to gray operation. A value of 0 indicates success. Returns a
PIXEL_DEPTH_UNSUPPORTED error message if the image has a bit depth of more than one if
the image is not black and white. May return an OUT_OF_MEMORY error message. Returns an
OUT_OF_MEMORY error if there is not enough memory to complete the operation. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMG_rgb_to_cmyk()
IMG_rgb_to_cmyk()
This function converts 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.
Syntax
Remark
Variable Description
hdib RasterMaster image handle to convert
201
Chapter 21 - Image Processing Functions
Returns
Returns the status of the convert RGB to CMYK operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
void CSnowBndView::OnConvertRgbtocmyk()
{
SnowBndFuncCall(IMG_rgb_to_cmyk);
}
IMG_rotate_bitmap()
This function permanently rotates the image buffer in memory by the specified angle. The value
is in hundredths of degrees. For example, for 90 degrees use 9000.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Aspect
l Zoom
Note:
It is expected behavior that the image is smaller in each rotation using IMG_rotate_
bitmap. If an image is rotated by 90 degrees, RasterMaster flips from portrait to land-
scape (or vice-versa) and preserves the page content. If the image is rotated by some-
thing other than 90 degrees, RasterMaster shrinks the page so that all the content is
preserved. RasterMaster does not crop the edges during the rotation.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
202
Chapter 21 - Image Processing Functions
Variable Description
angle Rotation in hundredths of degrees
Returns
Returns the rotate bitmap operation. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
{
BeginWaitCursor();
GetFrame()->StartStatusBar();
nRes = ::IMG_rotate_bitmap(nImageHandle, nAngle);
GetFrame()->EndStatusBar();
if(nRes>=0)
{
UpdateImageWindow(nImageHandle);
GetDocument()->SetModifiedFlag();
}
EndWaitCursor();
}
return nRes;
IMG_set_gamma()
This function corrects for the gamma or response curve of the monitor. The default is 100. This
drastically improves the quality of gray scale or 24-bit images.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
gamma Integer ranging from 0 to 200
203
Chapter 21 - Image Processing Functions
Returns
Returns the status of the set gamma operation. A value of 0 indicates success. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMG_set_lut()
This function changes the contrast or brightness of the image. A LUT (look up table) is used to
map the brightness values of the image between the upper and lower bound of the contrast
enhancement. This function changes the contrast or brightness of the image. Positive values
add contrast or brightness to the image while negative values darken or decrease the contrast
of the image.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
contrast Integer value from -127 to 127
brightness Integer value from -127 to 127
Returns
Returns the status of the set look up table operation. A value of 0 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMG_sharpen_bitmap()
This function sharpens or blurs the image. Positive values sharpen the image using a Laplacian
function while negative values blur the image using an image-averaging filter.
204
Chapter 21 - Image Processing Functions
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
sharpness Integer value from -127 to 127
Returns
Returns the sharpen bitmap operation. A value of 0 indicates success. Returns a FORMAT_
NOT_ALLOWED error message for 1-bit (black and white) images and for 4-bit or 8-bit color
images. Returns an OUT_OF_MEMORY error if there is not enough memory to complete the oper-
ation. Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error
Codes for a list of error codes.
IMG_sharpen_bitmap(nHandle,_ttoi((LPCTSTR)ad.m_strSharpness));
IMG_window_level()
This function turns window-leveling on or off for 16 or 8-bit gray scale images. Window-leveling
remaps pixel values to increase or decrease dynamic range of gray values.
Many medical images have been created to use only a portion of the total range of gray values
possible. They appear very dark or washed out and need contrast enhancement or window lev-
eling. This is typical. The window-leveling function improves the contrast to allow more details
to be present in the image at display time. A normal 16 bit image that does not need window lev-
eling should be display correctly.
If the min and max values are set to 0 the function automatically calculates the best values for
min and max. The image data is never changed since the pixel remapping is done at display
time.
Syntax
int SNBDAPI IMG_window_level(int hdib, int min, int max, int on_
off);
205
Chapter 21 - Image Processing Functions
Remark
Variable Description
hdib Snowbound image handle
min Starting pixel gray value
max Ending pixel gray value
Turn Windows leveling on or off
on_off 0 = Off
1 = On
Returns
Returns the status of the set window level operation. A value of 0 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_get_auto_detect()
This function returns the current auto-detect status for the specified file type.
Syntax
Remark
Variable Description
Image format type from the defined list in
type
imglib.h.
Returns
Returns the status of the get auto-detect status operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
IMGLOW_get_fileinfo_fd()
This function reads and returns the file header information from the image file I/O handle passed
in. This handle is from an open() call and not the standard Snowbound image handle. It fills in
the DIB_HEADER structure with width, height, DPI and bits per pixel.
206
Chapter 21 - Image Processing Functions
Syntax
Remark
Variable Description
fh File I/O handle
Pointer to a DIB_HEADER structure in which
lpbi
to fill
Returns
Returns the status of the read and return file header information operation. A value of 0 indic-
ates success. Any value less than zero is a Snowbound error code. See Appendix E, Snow-
bound Error Codes for a list of error codes.
IMGLOW_get_palette()
This function returns the palette entries of the specified image into an array of RGBQUAD struc-
tures.
24-bit images have no palettes but the autocolor or rainbow palette is returned.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
prgb Pointer to array of RGBQUAD structures
207
Chapter 21 - Image Processing Functions
Returns
Returns the status of the get palette operation. A value of 0 indicates success. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_put_palette()
This function sets the palette entries of the specified image from an array of RGBQUAD struc-
tures.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
prgb Pointer to array of RGBQUAD structures
Returns
Returns the status of the put palette operation. A value of 0 indicates success. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_read_pixel()
This function reads and returns a pixel value from the image referenced by the image handle
hdib. The xpos and ypos specify the location in the image from which to read. You must first
call IMG_runs_to_dib() (and only once to read in 1-bit pixels). See IMG_runs_to_dib() for
more information.
Syntax
208
Chapter 21 - Image Processing Functions
Remark
Variable Description
hdib Snowbound image handle
xpos X coordinate of pixel to read
ypos Y coordinate of pixel to read
Returns
Returns the status of the read pixel operation. A value of 0 indicates success. Any value less
than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_set_auto_detect()
This function turns the automatic file type detection on for verifying the desired format.
Syntax
Remark
Variable Description
Image format type from the defined list in
type
imglib.h
Returns
Returns the status of the set auto-detect operation. A value of 0 or 1 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
IMGLOW_set_decompsize()
This function forces all images to be scaled as they are decompressed. This is useful for cre-
ating icons. If the width and height are set to 100, the image in memory is scaled to 100 by 100
using much less memory.
Syntax
209
Chapter 21 - Image Processing Functions
Remark
Variable Description
width Width to decompress image
height Height to decompress image
Returns
Returns the status of the set decompressed size operation. A value of 0 indicates success.
Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes
for a list of error codes.
IMGLOW_set_decomp_rect()
This function decompresses and holds in memory only the data contained in the specified crop-
ping rectangle. Set this before any decompression calls are made.
This stays in effect until it is reset to 0 for each parameter. 0 is the default.
Syntax
Remark
Variable Description
xstart Start of x cropping rectangle
ystart Start of y cropping rectangle
xsize Width of cropping rectangle
ysize Height of cropping rectangle
Returns
Returns the status of the set decompressed rectangle operation. A value of 0 indicates suc-
cess. Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error
Codes for a list of error codes.
IMGLOW_set_decomp_reduction()
This function forces color reduction at decompression. If set to 8, for instance, all 24-bit images
are reduced and stored in memory as 8-bit images.
210
Chapter 21 - Image Processing Functions
Syntax
Remark
Variable Description
bits_per_pix May be set to 1, 4 or 8-bits
Returns
Returns the status of the set decompressed reduction operation. A value of 0 indicates suc-
cess. Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error
Codes for a list of error codes.
IMGLOW_set_dithermode()
This function dithers 24-bit images to a 256-color display. Also 8 and 24-bit images are dithered
on 16-color display adapters.
If the display is set to DITHER_NONE, you are at the mercy of the display driver. For instance,
24-bit images on a 256 color display adapter can take 2 or more minutes to display with dither
mode off.
Syntax
Remark
Variable Description
Use the above values to decide how or how
dither_mode
not to dither. The default is -1.
Returns
Returns the status of the set dither mode reduction operation. A value of 0 indicates success.
Any value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes
for a list of error codes.
211
Chapter 21 - Image Processing Functions
IMGLOW_set_fast_convert()
This function greatly improves performance for decompression and conversion. Pages must be
decompressed sequentially. This function can be used with any of the decompression func-
tions, either from File I/O based or memory. To turn this function on, set the off_on value to 1.
To reset this function, set the off_on value to 0.
This function makes the decompression functions non-reentrant or no longer thread safe when
turned on.
Note:
This function currently only works with MO:DCA or AFP images.
Syntax
Remark
Variable Description
0 = Off
off_on
1 = On
format Sets the format.
Returns
Returns the status of the set fast conversion operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
212
Chapter 21 - Image Processing Functions
IMGLOW_set_imnet_page_size()
This function sets the size of an IMNET image in points or 1/72 of an inch. It also sets the dots
per inch (DPI).
Note:
The default value is 200 for the DPI and 0 for the width and height.
Syntax
Remark
Variable Description
xsize Sets the document’s width
ysize Sets the document’s height
dpi Sets the document in dots per inch (DPI)
Returns
Returns the status of the set IMNET page size operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
IMGLOW_set_pcl_input()
This function sets the rendering for PCL decompression. PCL files are rendered as a bitmap at
decompression time. These values allow you to set the dots per inch and the pixel depth of the
resulting bitmap.
Syntax
Remark
Variable Description
dpi Resolution in dots per inch.
Bits per pixel to render image. May be 1 or 24
bits_pix
only.
213
Chapter 21 - Image Processing Functions
Returns
Returns the status of the set PCL input operation. A value of 0 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
IMGLOW_unset_auto_detect()
This function turns the automatic file type detection off for the desired format. This file type is
then no longer decompressed by the library.
Syntax
Remark
Variable Description
Image format type from the defined list in
type
imglib.h
Returns
Returns the status of the unset auto-detection operation. A value of 0 indicates success. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
214
Chapter 22 - Bit Depth Conversion Functions
IMG_bayer_color()
This function permanently converts 8 or 24-bit images to 4-bit per pixel using a 16 by 16 Bayer
matrix dither.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvertBayercolor()
{
SnowBndFuncCall(::IMG_bayer_color);
}
IMG_bayer_mono()
This function permanently converts 4, 8, or 24-bit images to 1-bit per pixel using a Bayer fixed
matrix dithering technique.
Syntax
215
Chapter 22 - Bit Depth Conversion Functions
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvertBayermono()
{
SnowBndFuncCall(::IMG_bayer_mono);
}
IMG_color_gray()
This function permanently converts 4, 8, or 24-bit images to an 8-bit gray scale image.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvertGrayscale()
216
Chapter 22 - Bit Depth Conversion Functions
{
SnowBndFuncCall(::IMG_color_gray);
}
IMG_dib_to_runs()
This function converts the internal library image format from the Windows DIB format to a Snow-
bound runs format. This only works for 1-bit bi-level images.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_diffusion_color()
This function permanently converts 8 or 24-bit images to 4-bit per pixel using the Stucky error
diffusion technique.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
217
Chapter 22 - Bit Depth Conversion Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvertDiffusioncolor()
{
SnowBndFuncCall(::IMG_diffusion_color);
}
IMG_diffusion_mono()
This function permanently converts 4, 8, or 24-bit images to 1-bit per pixel using the Stucky
error diffusion technique.
Note:
IMG_decompress_bitmap must be called before IMG_diffusion_mono. It is
designed for use on rasterized pages. It cannot be used on pages with vector content
created by IMGLOW_extract_text.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvertDiffusionmono()
{
218
Chapter 22 - Bit Depth Conversion Functions
SnowBndFuncCall(::IMG_diffusion_mono);
}
IMG_halftone_mono()
This function permanently converts 4, 8, or 24-bit images to 1-bit per pixel using a fixed halftone
matrix dithering technique.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
nRes = ::IMG_halftone_mono(nHandle);
IMG_mediancut_color()
This function permanently converts 24-bit images to 8-bit per pixel using a combination of the
popularity algorithm and error diffusion.
Syntax
Remark
219
Chapter 22 - Bit Depth Conversion Functions
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvertMediancut()
{
SnowBndFuncCall(::IMG_mediancut_color);
}
IMG_octree_color()
This function converts 4, 8, or 24-bit images into 4 or 8-bit as specified. It uses a complex
octree function to reduce to the best palette and number of colors chosen, or reduces the image
to the palette passed into input_prgb if the pointer is not NULL. This is by far the best color
reduction algorithm in the library.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
bits_per_pixel Pixel depth to convert to: 4 or 8
input_prgb Pointer to array of RGBQUAD structures
Number of colors to reduce
entries 1 - 16 for 4-bit images
1 - 256 for 8-bit images
220
Chapter 22 - Bit Depth Conversion Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
GetFrame()->StartStatusBar();
nRes ::IMG_octree_color(nHandle, nBits, pRGB, nolorsToReduce);
GetFrame()->EndStatusBar();
IMG_popularity_color()
This function permanently converts 24-bit images to 8-bit per pixel using the popularity
algorithm. Popularity chooses 256 of the most populous colors from the image.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
void CSnowBndView::OnConvert256colors()
{
SnowBndFuncCall(::IMG_popularity_color);
}
221
Chapter 22 - Bit Depth Conversion Functions
IMG_runs_to_dib()
The RasterMaster library stores all 1-bit images as a series of runs. A call to this function forces
the image to be stored as raw uncompressed data. This only works for 1-bit images.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
if (nBits == 1)
{
::IMG_runs_to_dib(nHandle);
pDib = ::IMG_bitmap_info(nHandle, &nXSize, &nYSize, &nBits);
}
IMG_thresh_mono()
This function permanently converts 4, 8, or 24-bit images to 1-bit per pixel using a threshold
passed as the second argument.
Syntax
Remark
Variable Description
imghandle Standard image handle obtained from a
222
Chapter 22 - Bit Depth Conversion Functions
Variable Description
decompress function such as IMG_decom-
press_bitmap()
Threshold value to use. The range is from 1 -
thresh
255
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_get_filetype_mem()
This function gets the file type number of the image stored in memory at the location pointed to
by the file name pointer.
Syntax
Remark
Variable Description
filename Pointer to image in memory
Returns
Returns the standard library image handle. For example, a Word file would return the file type
number 86. For a list of file type numbers, please see Appendix A, Supported File Formats. Any
value less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a
list of error codes.
IMGLOW_get_raster()
This function gets a line of raw data from the line number specified by ypos.
Note:
Returns no more than the number of bytes specified. If set to -1, the number of bytes in
one line are calculated and returned.
Syntax
223
Chapter 22 - Bit Depth Conversion Functions
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap().
destination_ptr Buffer to receive a line of raw raster data.
ypos Line number of raster to get.
Returns no more than this number of bytes.
bytes If set to -1, it calculates the number of bytes
in one line and returns that amount.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_put_raster()
This function puts a line of raw data into the DIB specified by imghandle at the ypos line num-
ber.
Syntax
Remark
Variable Description
Standard image handle obtained from a
imghandle decompress function such as IMG_decom-
press_bitmap()
destination_ptr Buffer of raw data to put into DIB
ypos Line number in which to put data
bytes Replaces no more than this number of bytes
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
224
Chapter 22 - Bit Depth Conversion Functions
IMGLOW_set_alias_quality()
This function sets the effectiveness of scale to gray and preserve black algorithms. This func-
tion works when using IMGLOW_set_alias(). A value of 100 ensures that no black pixels will be
discarded when displaying the image. See IMGLOW_set_alias() for more information.
Syntax
Remark
Variable Description
Alias Quality; 0 to 100
quality 0 = Discard black pixels
100 = Do not discard any black pixels
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
225
Chapter 23 - Document Conversion and Text Extraction
IMGLOW_extract_text()
IMGLOW_extract_text_mem()
IMG_save_document()
IMG_save_document_mem()
Currently, only AFP/MO:DCA, MS Word, Excel and PCL formats are supported.
Conversion and text extraction occur in the following two step process:
1. A call is made to extract the text, graphics, and bitmap data. The IMGLOW_extract_
text() function extracts text, graphics, and position information from the file name
passed in. The buffer returned is used as an argument in the call to write out the new
PDF file. See IMGLOW_extract_text() for more information.
IMGLOW_extract_text()
This function extracts text from PTOCA, PCL, PDF, MS Word, AFP, and MS Excel files.
Returns the buffer of extracted text in ASCII format.
226
Chapter 23 - Document Conversion and Text Extraction
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l MFC_TextSearch_TextExtract_Sample
l Vector_Convert
Syntax
Remarks
Variable Description
*bm_name Name of file from which to extract text
Pointer for buffer from which to receive
**ptr
extracted text
Pointer to an integer to return the length of
*length
the extracted buffer
Page number of file from which to extract
page
text
Returns
Returns the buffer of extracted text in ASCII format. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
Note:
Some PDF or PCL files may be in a format that will not allow text searching.
%%SOF
/Page=0
/Width=1700
/Height=2200
/FontName=TimesRoman
/FontHeight=44
/FontBold=1
/FontItalic=0
/Xpos=1300 /Ypos=240
227
Chapter 23 - Document Conversion and Text Extraction
%%SOT
Devadas
%%EOT
/Xpos=1253 /Ypos=240
%%SOT
S.
%%EOT
%%EOF
%%SOI
%%EOI
Extracted text uses %%SOT for regular ASCII text. If Unicode text is detected, RasterMaster
will use %%SOTU. The text inside %%SOTU and %%EOTU may include null characters
Variable Description
%%SOF Signals the start of the buffer
%%EOF Marks the end of extracted text
Specified once at the beginning of the file to
Page
indicate the page number
Specified once at the beginning of the file to
Width
indicate page width in pixels
Specified once at the beginning of the file to
Height
indicate page height in pixels
Font Name Name of font
FontHeight Font height in pixels
Font to be drawn plain or in bold
FontBold 1 = bold
0 = plain
Font to be drawn in normal or italic
FontItalic 1 = italic
0 = normal
Xpos X pos in pixels
Ypos Y pos in pixels
%%SOT Start of text block
%%EOT End of text block
%%SOI Start of image
%%EOI End of image
%%SOTU Start of Text Unicode/UTF.
%%EOTU End of Text Unicode/UTF.
228
Chapter 23 - Document Conversion and Text Extraction
IMGLOW_extract_text_mem()
This function extracts text from memory. It returns the buffer of extracted text in ASCII format.
Syntax
Remarks
Variable Description
*image_ptr Memory pointer to extract text from
Address of the pointer to the extracted text
**ptr
returned data
*length Pointer to the size of the extracted text buffer
Page number of the input document/image to
page
extract from
Returns
Returns the buffer of extracted text in ASCII format. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_save_document()
This function takes a buffer passed in with text, graphics, and position information obtained
from IMGLOW_extract_text() to create the document file output. The output file contains
searchable text. This currently only supports the PDF file as an output file.
Since PDF is a multi-page file format, it is possible for a single file to contain multiple pages. If a
PDF file already exists, a new page will be appended.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l MFC_TextSearch_TextExtract_Sample
l Vector Convert
229
Chapter 23 - Document Conversion and Text Extraction
Syntax
Remark
Variable Description
*bm_name Name of the output PDF file
Buffer of extracted text, graphics, and bit-
vbuff
maps
filetype Currently only supports PDF - file type 59
Note:
Some PDF or PCL files may be in a format that will not allow text searching.
Returns
Returns the document file output. Any value less than zero is a Snowbound error code. See
Appendix E, Snowbound Error Codes for a list of error codes.
Data Format for Extracted Text Buffer for both Windows and Java
Note:
Each of the tags below should be followed by a new line.
230
Chapter 23 - Document Conversion and Text Extraction
The Save Searchable PDF sample extracts the text from the
input document and saves it as a searchable PDF. The user can
also specify a text string to search for by assigning a value
to the 'stringToSearch' variable.
231
Chapter 23 - Document Conversion and Text Extraction
import Snow.SNBD_SEARCH_RESULT;
String stringToSearch="";
//annotations that have been added and are stored with the doc-
ument.";
System.out.println("fileName"+fileName);
int totalPages = snow.IMGLOW_get_pages(fileName);
System.out.println("total Pages ="+totalPages);
for (int page = 0; page < totalPages; page++) {
saveStatus = snow.IMG_save_document("h:\\testfiles\\output_
file.pdf", extractedText, 59);
System.out.println("extractedText..."+length[0]);
System.out.println("save doc status..."+saveStatus);
//mSearchResults = snow.IMGLOW_search_text(extrac-
tedText,stringToSearch,0,errorA);
//System.out.println("mSearchRes-
ults>>.."+mSearchResults.getClass());
System.out.println("errorA..."+errorA[0]);
}
}
232
Chapter 23 - Document Conversion and Text Extraction
IMG_save_document_mem()
This function takes a buffer passed in with text, graphics, and position information obtained
from IMGLOW_extract_text_mem() to save the document file output to memory. The out-
put file contains searchable text. This currently only supports the PDF file as an output file.
Since PDF is a multi-page file format, it is possible for a single file to contain multiple pages. If a
PDF file already exists, a new page will be appended.
Syntax
Remark
Variable Description
*image_ptr Memory buffer pointer already allocated
Buffer of extracted text, graphics, and bit-
vbuff
maps
filetype Currently only supports PDF - file type 59
Note:
Some PDF or PCL files may be in a format that will not allow text searching.
Returns
Returns the exact document size saved in memory. A value of 0 indicates success. Any value
less than zero is a Snowbound error code. See Appendix E, Snowbound Error Codes for a list of
error codes.
233
Chapter 24 - AFP Font Mapping Functions
IMGLOW_set_fontmap_path()
IMGLOW_set_fontmap()
RasterMaster automatically loads the snbd_map.fnt file if it is found in one of the following dir-
ectories:
l The directory into which images are being read. For example: C:\\AFP\\fontmap
l The directory where your application exists as long as you are not changing directories
with a dialog box
1. The IMGLOW_set_fontmap_path() function sets the path of the font mapping file. See
IMGLOW_set_fontmap_path() for more information.
l face name
l point size
234
Chapter 24 - AFP Font Mapping Functions
l bold attributes
l italic attributes
The snbd_map.fnt file is a simple ASCII text file. Each entry is ended with a carriage return line
feed. The following are two sample entries:
C0BC25I3,Courier,10,0,0
Variable Description
Font resource name in the AFP
C0BC25I3
file.
Courier New face name to map to.
New size in points or 1/72 of an
10
inch.
0 Bold attribute, 0 - off , 1 - on.
0 Italic attribute 0 - off, 1 - on.
If you have a mix of monochrome and color pages that you are converting and saving to another
format, then you may want to use IMGLOW_detect_color() to identify black and white pages
that can safely be converted to a higher performance 1-bit deep format. The color pages should
be converted to an output format that supports color, such as JPEG. Please see Appendix A,
Supported File Formats for details on which formats support color information at different bit-
depths.
IMGLOW_set_fontmap_path()
This function defines the path where Snowbound Software will look for the font mapping file,
snbd_map.fnt. If the path is not currently set, RasterMaster DLL looks for it in the current dir-
ectory. The current directory is whatever folder the program is currently in, usually wherever the
file being decompressed is located.
Syntax
235
Chapter 24 - AFP Font Mapping Functions
Remark
Variable Description
A string pointer to the path to
look for the snbd_map.fnt file.
Returns
Returns the status of the path of the font mapping file. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_fontmap()
This function programmatically sets font mapping.
Syntax
Remark
Variable Description
Pointer to font mapping data. This
is the whole buffer of data found in
the font map file, snbd_map.fnt.
This variable overrides existing font
mapping in the snbd_map.fnt file.
font_map The following are some examples
of the data in this variable:
C0H400xx90,PrecisionID Postnet
L DEMO,12,0,0
C0BPOSBX,CCodePostnet,10,0,0
The integer length of font mapping
maplength
data
236
Chapter 24 - AFP Font Mapping Functions
Returns
Returns the status of the font mapping data. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMGLOW_set_pdfa_font_path()
This method defines where to look for the base fonts. If this function is not called, the fonts are
expected to be in c:\fonts. The path is limited to one directory.
Syntax
Remark
Variable Description
A pointer to where to look for the base fonts. If this func-
pdfaFontPath
tion is not called, the fonts are expected to be in c:\fonts.
Returns
Returns the pointer to the base fonts. A value of 0 indicates success. Any value less than zero
is a Snowbound error code. See Appendix D, Snowbound Error Codes for a list of error codes.
IMGLOW_set_pdfa_font_map()
This method programmatically sets font mapping for PDF/A. Snowbound's PDF/A 1b-com-
pliant output files use the basic fonts included with the Snowbound product. This may result in
the PDF output document looking slightly different than the original. You may have additional
fonts that you are licensed to embed in documents. You can tell RasterMaster to use these addi-
tional fonts by calling IMGLOW_set_pdfa_fontpath to specify the directory where the fonts are
located.
You can also tell RasterMaster to substitute one font for another using IMGLOW_set_pdfa_
font_map. For example, if your documents use Arial but you own the Helvetica font and want to
use that instead, you could map Arial to Helvetica using this method.
IMGLOW_set_pdfa_font_map allows the client to provide a stream of bytes defining the map-
ping from one font/style to another. The remapData stream should contain multiple entries sep-
arated by a newline character. The len parameter indicates how many bytes are in the stream.
The base 14 fonts are: Times (New Roman), Helvetica, Courier, Symbol and Zapf Dingbats.
Syntax
237
Chapter 24 - AFP Font Mapping Functions
Remarks
Variable Description
The buff array contains five element indicators to handle
font mappings. Each record contains an alias, the
PostScript font name for that font, the font file name as it
exists in the font directory, an integer (0 or 1) indicating
bold, and an integer (0 or 1) indicating italic.
buff
Each set maps an alias and the bold and italic attributes to
a specific font and the font file representing that font.
Returns
Returns the status of the font mapping data. A value of 0 indicates success. Any value less
than zero is a Snowbound error code. See Appendix D, Snowbound Error Codes for a list of
error codes.
238
Chapter 25 - Standard UNIX and XWindows Specific Functions
IMG_global_get_Xdisplay()
This function returns the cached display pointer.
Syntax
Returns
Returns the status of the Cached display pointer. Any value less than zero is a Snowbound
error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_global_set_Xdisplay()
Call this function before doing any display functions with the library. This value is used to obtain
information from XWindows. The default screen parameter is saved in an internal global when
the display is set. Reserved colors for the display default to 256. XAllocColorCells() is
called to set up the color cells.
Syntax
Remark
Variable Description
display Type of display
Returns
Returns the status of the type of display. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
239
Chapter 25 - Standard UNIX and XWindows Specific Functions
IMG_global_get_Xscreen
This function returns the cached screen parameter in use.
Syntax
Returns
Returns the status of the cached screen in use. Any value less than zero is a Snowbound error
code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_global_set_Xscreen
This function sets the screen. Call this function if the screen you are working with is not the
default screen (from DefaultScreen()) of the display. The default screen is saved in an internal
global when the display is set.
Syntax
Remark
Variable Description
screen Screen to use
Returns
Returns the status of the screen to use. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_global_get_Xreserverd_colors()
This function returns the cached number of color cells allocated. In X, color map entries are
called color cells. A color map is a table with entries specifying the RGB values of available col-
ors. The number of color cells is equal to or greater than 2N where N is the number of bits in a
pixel value.
Syntax
240
Chapter 25 - Standard UNIX and XWindows Specific Functions
Returns
Returns the status of the cached number of color cells allocated. Any value less than zero is a
Snowbound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_global_set_Xreserved_colors()
This function sets the number of color cells to allocate. Set this parameter before the first call to
IMG_global_set_Xdisplay() if you wish to allocate fewer than the default number of
color cells. The default is 2N where N is the number of bits in a pixel value.
Syntax
Remark
Variable Description
reserved Number of color cells to allocate
Returns
Returns the status of the number of color cells to allocate. Any value less than zero is a Snow-
bound error code. See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_repaint_scroll()
This function is used in the update event code after a scroll to repaint dirty scrolled areas of the
window.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
l Aspect
l Fit
l MFC_Sample
241
Chapter 25 - Standard UNIX and XWindows Specific Functions
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
Remark
Variable Description
Library image handle integer returned from
imghandle most decompress functions. This is the
standard library image handle.
Pointer to X+window where the image is cur-
window
rently displayed.
scroll_dir Returned from IMG_scroll_bitmap().
xrange Width of the area to repaint after scrolling.
yrange Height of the area to repaint after scrolling.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scroll_bitmap()
This function is used to scroll the image in a window. Call this as a result of a mouse down
event. This function calls TrackControl() to scroll the image until the mouse button is
released. Provide only the ControlHandle of the scroll bar you wish to scroll, the other argu-
ments should be zero.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Alpha
l Annotate
l Aspect
l Fit
242
Chapter 25 - Standard UNIX and XWindows Specific Functions
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
Remark
Variable Description
Library image handle integer returned from most decompress
imghandle
functions. This is the standard library image handle.
window Pointer to X+window where the image is currently displayed.
SB_HORZ to scroll in x direction, SB_VERT to scroll in y dir-
orientation
ection.
Amount to scroll.
amount Positive for right/down
Negative for left/up
xrange Current scaled width of the image.
yrange Current scaled height of the image.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap()
This function is the standard library zoom function. A zoom value of 100 tells the function to dis-
play the whole image at the coordinates in the IMG_display_bitmap() call. Any value
greater than 100 crops the image so it is not fully displayed in the current window. x_normal and
y_normal are used to calculate zooming. The scaled image coordinates and size are returned
for your use.
Syntax
243
Chapter 25 - Standard UNIX and XWindows Specific Functions
Remark
Variable Description
Library image handle integer returned from
imghandle most decompress functions. This is the
standard library image handle.
Pointer to X+window where the image is cur-
window
rently displayed.
zoom_factor Amount to zoom.
(output) Scaled X origin with current rotation
x_pos
accounted for.
(output) Scaled Y origin with current rotation
y_pos
accounted for.
(output) Scaled X size with current rotation
x_range
accounted for.
(output) Scaled Y size with current rotation
y_range
accounted for.
x_normal (input) original X image size.
y_normal (input) original Y image size.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap_1_to_1()
This function is used to display images with a one-to-one pixel correspondence. A zoom value
of 100 tells the function to display each pixel of the image for one pixel on the screen. x_normal
and y_normal are used to base the zooming calculations on. The scaled image coordinates and
size are returned for your use.
Syntax
Remark
Variable Description
Library image handle integer returned from
imghandle
most decompress functions. This is the
244
Chapter 25 - Standard UNIX and XWindows Specific Functions
Variable Description
standard library image handle.
Pointer to X+window where the image is cur-
window
rently displayed.
zoom_level Amount to zoom.
center_flag Re-centers image if set to 1.
(output) Scaled X origin with current rotation
x_pos
accounted for.
(output) Scaled Y origin with current rotation
y_pos
accounted for.
(output) Scaled X size with current rotation
x_range
accounted for.
(output) Scaled Y size with current rotation
y_range
accounted for.
x_normal (input) original X image size.
y_normal (input) original Y image size.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap_rect()
This function is most effective for resizing a window. Call after the zoom event has been pro-
cessed when repainting the image with IMG_display_bitmap(). The scaled image coordin-
ates and size are returned for your use. An IMG_RECT is the same as a Rect, except the
elements of the structure are long, not short.
Syntax
Remark
Variable Description
Library image handle integer returned from
imghandle most decompress functions. This is the
standard library image handle.
Pointer to X+window where the image is cur-
window
rently displayed.
lprect Rectangle in image to zoom
mode Using image or screen coordinates.
245
Chapter 25 - Standard UNIX and XWindows Specific Functions
Variable Description
(input/output) X origin client rectangle of
x_pos
image.
(input/output) Y origin client rectangle of
y_pos
image.
(input/output) X size client rectangle of
x_range
image.
(input/output) Y size client rectangle of
y_range
image.
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
246
Chapter 26 - Macintosh High Level and Image Management Functions
IMG_dib_to_GWorld()
This function generates a GWorld. It is the current pixel depth of the image of the screen from
the image passed in.
Syntax
Remark
Variable Description
Standard image handle obtained from a
hdib decompress function such as IMG_decom-
press_bitmap()
Pointer to a GWorldPtr, receives the created
*gWorldRef
GWorld
xsize Width of the image
ysize Height of the image
Additional flags to use when creating
flags
GWorld
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_dib_to_GWorld_bitDepth()
This function generates a GWorld from the image passed in. If the bitDepth is zero, the GWorld
is generated at the current depth of the screen. If the bitDepth is not zero, then a GWorld is cre-
ated using the bitDepth of the image. 24-bit images are promoted to 32-bit images.
247
Chapter 26 - Macintosh High Level and Image Management Functions
Syntax
Remark
Variable Description
Standard image handle obtained from a
hdib decompress function such as IMG_decom-
press_bitmap()
GWorld pointer that receives the created
*gWorldRef
GWorld
xsize Width of the image
ysize Height of the image
flags Additional flags to use when creating GWorld
bitDepth Value of the bit depth
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_GWorld_to_dib()
This function creates an image from a GWorld. GWorld is the Macintosh’s virtual graphic envir-
onment. This does not alter the original GWorld; it just copies and converts the data to Raster-
Master’s internal DIB format. The function returns standard library codes.
Syntax
Remark
Variable Description
hdib Imghandle for the image created
gWorldPtr Pointer to GWorld to convert
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
248
Chapter 26 - Macintosh High Level and Image Management Functions
IMG_display_bitmap_aspect()
This function is an image display routine with corrected aspect ratio. It takes a standard image
handle and displays the image into the device context specified by hdc.
After displaying the image, it turns scroll bars on or off for correct scrolling. A zoom factor of 100
displays the image with a one-to-one pixel ratio. A zoom of 0 fits the image horizontally or ver-
tically into the window.
Syntax
Remark
Variable Description
hdib Imghandle of the image created
xs Starting X coordinate for display of image
ys Starting Y coordinate for display of image
xsize Width of the image
ysize Height of the image
Zoom factor:
zoom 0 = fit to window
100 = display pixels one to one
Modifies the vertical scroll bar when set to
vertScroll
nonzero
Modifies the horizontal scroll bar when set to
horizScroll
nonzero
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_repaint_scroll
This function should be called after a scroll message to repaint the scrolled area of the window.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
249
Chapter 26 - Macintosh High Level and Image Management Functions
l Alpha
l Annotate
l Aspect
l Fit
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
Remark
Variable Description
Standard image handle obtained from most
hdib
decompress functions.
theWindow Current active handle
scroll_dir Returned from IMG_scroll_bitmap()
*paint Pointer to the Rectange to Paint
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_scroll_bitmap()
This function is used in conjunction with the IMG_repaint_scroll() function for fast
scrolling.
The value returned must be saved and passed to the IMG_repaint_scroll() function. The
message, wparam and lparam, are the arguments from the main windows handle procedure.
Syntax
250
Chapter 26 - Macintosh High Level and Image Management Functions
horizScroll);
Remark
Variable Description
Standard image handle obtained from a
handle decompress function such as IMG_decom-
press_bitmap()
theWindow Current active window handle
mouseLocation Current mouse pointer location
Modifies the vertical scroll bar when set to
vertScroll
nonzero
Modifies the horizontal scroll bar when set to
horizScroll
nonzero
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_set_croprect_scroll()
This function sets the cropping rectangle for the image represented by hdib. It also turns on or
off the scrollbars to enable scrolling.
If the aspect is set to 1, the aspect ratio is corrected. This slightly changes the cropping rect-
angle in the X or Y direction.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the following samples:
l Aspect
l MFC_Sample
l MFC_TextSearch_TextExtract_Sample
l Zoom
Syntax
251
Chapter 26 - Macintosh High Level and Image Management Functions
Remark
Variable Description
Standard image handle obtained from a
hdib decompress function such as IMG_decom-
press_bitmap()
Handle of window image is currently dis-
theWindow
played in
xs Starting X coordinate for cropping rectangle
ys Starting Y coordinate for cropping rectangle
xe Width of cropping rectangle
ye Height of cropping rectangle
1 or True = aspect ratio on
aspect
0 = aspect ratio off
Modifies the vertical scroll bar when set to
vertScroll
nonzero
Modifies the horizontal scroll bar when set to
horizScroll
nonzero
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap
This function is a standard library zoom function. A zoom value of 100 tells the function to dis-
play the whole image in the coordinates specified in the call to IMG_display_bitmap().
Any value greater than 100 crops the image to display only part of the image. If the entire image
does not fit into the current window, this function turns the scroll bars on or off.
Syntax
Remark
Variable Description
Standard image handle obtained from a
handle decompress function such as IMG_decom-
press_bitmap()
252
Chapter 26 - Macintosh High Level and Image Management Functions
Variable Description
theWindow Active window handle
zoom Amount to zoom
Modifies the vertical scroll bar when set to
vertScroll
nonzero
Modifies the horizontal scroll bar when set to
horizScroll
nonzero
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap_rect()
This function resizes a window. It turns the scroll bars on or off to allow scrolling.
You can find the samples for using this function in the following directory C:\Program
Files\Snowbound Software\RasterMaster® DLL Evaluation\DLL\Samples.
This function is used in the Zoom sample.
Syntax
Remark
Variable Description
Standard image handle obtained from a
handle decompress function such as IMG_decom-
press_bitmap()
theWindow Active window handle
lprect Rectangle in image to zoom about
lplast Client rectangle of image
Used to specify image or screen coordinates
mode 0 = Screen Coordinates
1 = Image Coordinates
Modifies the vertical scroll bar when set to
vertScroll
nonzero
Modifies the horizontal scroll bar when set to
horizScroll
nonzero
253
Chapter 26 - Macintosh High Level and Image Management Functions
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
IMG_zoom_bitmap_1_to_1()
This function displays images with a one-to-one pixel ratio. A zoom value of 100 maps each
pixel of the image to one pixel on the screen.
Syntax
Remark
Variable Description
Standard image handle obtained from a
handle decompress function such as IMG_decom-
press_bitmap()
theWindow Active window handle
zoom Amount to zoom
center Re-centers image if set to 1
Modifies the vertical scroll bar when set to
vertScroll
nonzero
Modifies the horizontal scroll bar when set to
horizonScroll
nonzero
Returns
Returns the standard library image handle. Any value less than zero is a Snowbound error code.
See Appendix E, Snowbound Error Codes for a list of error codes.
254
Chapter 27 - Format for Decompressed Images
Extended Product
All formats are converted to either 1, 4, 8, or 24-bits. All 1, 4, and 8-bit images have a palette.
However, 24-bit images never have a palette. The raw uncompressed image data follows the
palette specification.
For RasterMaster plus options, 1-bit images are stored differently. The image format for 1-bit
images is the normal DIB header, a palette consisting of 2 RGBQUAD structures, and then the
compressed data. The image data is compressed and each raster is stored as a series of runs.
Each run is stored as a 32-bit integer. The first word is a byte count of the entire raster including
the byte count word. This is followed by a white then black column. The line alternates from
white to black until the end of the raster.
A line always starts with a white column. If the first pixel is black, the first white entry is then
zero. The line must end with at least 3 entries for the horizontal width.
255
Chapter 27 - Format for Decompressed Images
Note:
In RasterMaster V17.6, the pelsPerMeter attribute queries return the actual value con-
tained in the attribute. In previous versions, the bi{X/Y}PelsPerMeter would return a
default value of 100 if the value was not set in the image. This method resulted in there
being no way to tell if RasterMaster was returning the default value or the actual value
that was set. Beginning with RasterMaster V17.6, it will return the actual value even if it
is 0. If you want to preserve the previous behavior, you can add a check to see if the bi
{X/Y}pelsPerMeter attribute is valued at 0. If it is valued at 0, replace it with 100.
256
Chapter 27 - Format for Decompressed Images
All rasters must end on a long or a multiple of 4 bytes. Extra bytes are added to rasters not meet-
ing this criterion. They are stored with upside down or the last raster first up to the first or line 0.
257
Chapter 28 - Annotation and Redlining Toolkit
Note:
This is an optional tool for the RasterMaster product. Please contact sales if you would
like more information.
The library is called from the developer’s application. Annotation objects are created through an
interface and then stored in one or more annotation layers; each stored as a separate file. The
annotation objects are registered with the underlying image permitting zooming and scrolling of
the overall display without losing registration of the annotation information. The display of the
underlying image can be managed through the use of Snowbound’s RasterMaster product or
any other application or tool that displays images.
ANN_GRAPHIC_STRUCT Structure
This structure represents an annotation object stored in its internal format within the Raster-
Master Annotation SDK.
Structure
Below is the structure for the ANN_GRAPHIC_STRUCT function.
258
Chapter 28 - Annotation and Redlining Toolkit
Variables
Table 28.1: ANN_GRAPHIC_STRUCT Class Variables
Variable Description
ANN_GRAPHIC_STRUCT next Next Annotation object
char FAR next Next Annotation object
char FAR prev Previous Annotation object
SANN_RECT rc Rectangle
char FAR text Byte array of text
long edit_hwnd Text area
long data_size Size of data in bytes
long fhmem Used internally
long hmem Used internally
long thmem Used internally
long imghandle Image handle
char font_name Name of font
short int italic Indicates italicized font
short int bold Indicates bold font
short int font_height Font height
short int fred Red plane of foreground color
short int fblue Blue plane of foreground color
short int fgreen Green plane of foreground
short int bred Red plane of background color
short int bblue Blue plane of background color
short int bgreen Green plane of background color
259
Chapter 28 - Annotation and Redlining Toolkit
Variable Description
short int width Width of annotation object
short int height Height of annotation object
short int bits_pix Bits per pixel of image
short int transp Indicates transparency
short int graphic_id Annotation object type
short int line_width Line width
short int line_style Line style
SANN_activate_all_objects()
This function is used on SANN_EDIT and SANN_POSTIT objects to allow editing of the text in
the box. This makes the window active and usable. This call activates all objects on the page.
Notes:
In this mode you cannot move or delete the object.
You must call the SANN_deactivate_object first.
Syntax
Remark
Variable Description
hann Standard annotation handle.
SANN_activate_object()
SANN_activate_object()
This function is currently used on SANN_EDIT and SANN_POSTIT objects to allow editing of
the text in the box. This makes the window active and usable.
Notes:
In this mode you cannot move or delete the object.
You must call the SANN_deactivate_object first.
Syntax
260
Chapter 28 - Annotation and Redlining Toolkit
Remark
Variable Description
hann Standard annotation handle
graphic_num The object to activate
SANN_add_object()
This function adds a new object to the current annotation. Use data size, data for text, and free-
hand annotations to point to the text of array of points for freehand annotations. The size must
be in image coordinates. Use SANN_map_wnd_to_image to convert from screen to image
coordinates.
Syntax
Remark
Variable Description
hann Standard annotation handle.
graphic_id A unique number for each graphic object.
Pointer to rectangle defining outline of points
rc for most graphics functions in the current
image’s coordinates.
Data for text, freehand annotations, and
data
edits.
data_size The size in bytes for text, freehand, or edits.
SANN_choose_color()
This function displays a dialog box suitable for selecting a color with which to draw. It returns
the selected color in a format packed in the following order: 3 bytes of red, green, and blue.
Syntax
Remark
261
Chapter 28 - Annotation and Redlining Toolkit
Variable Description
hann Standard annotation handle.
SANN_choose_font()
This function displays a dialog box for choosing the font type and height for the annotation. If
the OK button is pressed, the current font height and name is set in the current annotation group
specified by the annotation handle.
Syntax
Remark
Variable Description
hann Standard annotation handle.
SANN_choose_line_style()
This function displays a dialog box for selecting and setting the current line style in the annota-
tions specified by the annotation handle.
Syntax
Remark
Variable Description
hann Standard annotation handle.
SANN_choose_line_width()
This function displays a dialog box for selecting and setting the current line width in the annota-
tions specified by the annotation handle.
Syntax
262
Chapter 28 - Annotation and Redlining Toolkit
Remark
Variable Description
hann Standard annotation handle.
SANN_create_ann()
This function creates and returns a new annotation handle if it is not reading an annotation from
a file.
Syntax
Remark
Variable Description
width Width in pixels of image to annotate
height Height in pixels of image to annotate
hWnd Window in which currently displayed
SANN_deactivate_all_objects()
This function is used on SANN_EDIT and SANN_POSTIT objects to stop the editing of text in
the box. It makes the window inactive and now draws the object as any other data object. This
call deactivates all objects on the page.
Notes:
In this mode you can move or delete the object.
You must call the SANN_activate_object to edit the text.
Syntax
Remark
Variable Description
hann Standard annotation handle
263
Chapter 28 - Annotation and Redlining Toolkit
SANN_deactivate_object()
This function is used on SANN_EDIT and SANN_POSTIT objects to stop the editing of text in
the box. It makes the window inactive and draws the object as any other data object. In this
mode you can move or delete the object.
Note:
You must call the SANN_activate_object to edit the text.
Syntax
Remark
Variable Description
hann Standard annotation handle
graphic_num Specify the object to deactivate
SANN_delete_all_objects()
This function deletes all graphics and memory associated with the graphics handle.
Syntax
Remark
Variable Description
hann After this call the hann will no longer be valid
SANN_delete_object()
This function deletes a graphic from the current list referred to by the graphics handle.
Syntax
264
Chapter 28 - Annotation and Redlining Toolkit
Remark
Variable Description
hann Standard annotation handle
This is an internal number for each graphic
returned by SANN_get_object_num. It is
the number in a linked list of graphics. Use
graphic_num this number after the call to SANN_get_
object_number as SANN_delete_
object. This may change the number of
existing graphics
SANN_display_annotations()
This function displays the current annotation to the device context pointed by HDC. This func-
tion always assumes that the image is aspect ratio corrected into the coordinates xs, ys, xz,
and yz.
Note:
Before calling you may want to call SANN_set_croprect to allow for zooming and
scrolling.
Syntax
Remark
Variable Description
hann Standard annotation handle
hDC Windows device context
xs Starting X position
ys Starting Y position
xz X size of window
yz Y size of window
265
Chapter 28 - Annotation and Redlining Toolkit
SANN_draw_object()
This function draws the object (graphic_num) at the coordinates passed that are image
coordinates.
Syntax
Remark
Variable Description
hann Standard annotation handle
hDC Device into which to draw context
graphic_num Specify the object to draw
xs X position to start drawing
ys Y position to start drawing
xz X size to draw object
yz Y size to draw object
SANN_get_croprect()
This function returns the annotations cropping area, which should be the same as the annotated
images.
Syntax
int SNBDAPI SANN_get_croprect(int hann, int *xs, int *ys, int FAR
*xe, int *ye);
Remark
Variable Description
hann Standard annotation handle
xs X starting coordinate to be returned
ys Y starting coordinate to be returned
xe X crop rectangle size to be returned
ye Y crop rectangle size to be returned
266
Chapter 28 - Annotation and Redlining Toolkit
SANN_get_object_bounds()
This function returns the bounding box of the object (graphic_num) in image pixel coordinates.
Syntax
Remark
Variable Description
hann Standard annotation handle
graphic_num Specify the object to return bounding box
rc Rectangle of bounding box
SANN_get_object_data()
This function returns the data of the object (graphic_num). The function returns the size of the
data in bytes. This function is currently only implemented for SANN_EDIT and SANN_POSTIT
to return the text input into the object.
Syntax
Remark
Variable Description
hann Standard annotation handle
graphic_num Specify the object from which to return data
data Pointer in which to put data
SANN_get_object_info()
This function returns as instance of the ANN_GRAPHIC_STRUCT class, which is the internal
wrapper for the object number passed in. This has information about the size, color, and object
attributes.
267
Chapter 28 - Annotation and Redlining Toolkit
Syntax
Remark
Variable Description
hann Standard annotation handle
Specify the object for which to return a struc-
graphic_num
ture pointer
SANN_get_object_num()
This function tries to find a graphic whose bounding box surrounds the points xpos and ypos. If
found, return the graphic number usable by SANN_delete_object and other functions.
Syntax
Remark
Variable Description
hann Standard annotation handle
hWnd Window currently being displayed in
xpos X coordinate in the windows coordinates
ypos Y coordinate in the windows coordinates
SANN_highlight_object()
This function highlights the bound box of the graphic specified by graphic_num. This number
is found by SANN_get_object_num.
Syntax
Remark
268
Chapter 28 - Annotation and Redlining Toolkit
Variable Description
hann Standard annotation handle
Windows currently in use by image and
hWnd
annotations
graphic_num Graphic to highlight
SANN_map_image_to_wnd()
This function converts the internal graphics coordinates relative to the image coordinates rel-
ative to the current window.
Syntax
Remark
Variable Description
hann Standard annotation handle.
Displays current rectangle. Use GetCli-
disprect
entRect if using the whole window.
xs Set the X coordinate to convert.
ys Set the Y coordinate to convert.
SANN_map_wnd_to_image()
This function converts the window coordinates to the current annotated image coordinates.
Syntax
Remark
Variable Description
hann Standard annotation handle.
Displays current rectangle. Use GetCli-
disprect
entRect if using the whole window.
xs Set the X coordinate to convert.
ys Set the Y coordinate to convert.
269
Chapter 28 - Annotation and Redlining Toolkit
SANN_merge_ann()
This function reads in the annotation from the file name.
Notes:
Do not replace the existing annotations specified by the hann handle. Append all annota-
tion objects from the file to the existing annotations specified by the handle.
Syntax
Remark
Variable Description
*filename File name of a snowbound annotation file
Handle to existing snowbound annotation
hann
object
SANN_mouse()
This function is part of the annotation toolkit user interface handling routines. It handles the user
interface for adding, deleting, and moving annotations and puts it into the main windows mes-
saging handling loop.
Notes:
Not necessary to call.
You may do your own user interface with all of the above calls.
Syntax
Remark
Variable Description
hWnd Current window handle being used
Window handling function message para-
msg
meter
270
Chapter 28 - Annotation and Redlining Toolkit
Variable Description
Window handling function wParam para-
wParam
meter
lParam Window handling function lParam parameter
hann Standard annotation handle
graphic_id Current graphic id to add
Extra data to add to EDIT or POSTIT
textbuff
objects or name of bitmap to import
SANN_move_object()
This function moves or resizes the object graphic_num. Use the rectangle passed in as rc.
Syntax
Remark
Variable Description
hann Standard annotation handle
graphic_num Specify the object to move
rc Rectangle for new object position and size
SANN_print_annotations()
This function prints the current annotation to the device context pointed by HDC. It always
assumes that the image is aspect ratio corrected into the coordinates xs, ys, xz, yz.
Syntax
Remark
Variable Description
hann Standard annotation handle
hDC Windows device context to print
xs Starting X position
ys Starting Y position
xz X size of window
271
Chapter 28 - Annotation and Redlining Toolkit
Variable Description
yz Y size of window
SANN_read_ann()
This function reads an annotation file from disk and returns a handle to it. You do not need to
call SANN_create_ann if you call this function.
Syntax
Remark
Variable Description
Refers to the name of the file in which to
Filename
read
hWnd Window currently being displayed
SANN_resize_object()
This function resizes an annotation object specified by the Id. The new size is specified in the
Rect structure. Hann is the handle to the group of annotation objects.
Syntax
Remark
Variable Description
hann Standard annotation handle
graphic_num The ID of the object to resize
rc Rectangle to hold new size of object
SANN_rotate()
This function rotates all annotations in the current handle by the specified angle: 90, 180, or 270
degrees.
272
Chapter 28 - Annotation and Redlining Toolkit
Syntax
Remark
Variable Description
hann Standard annotation handle
angle Angle by which to rotate annotation
SANN_set_bcolor()
This function sets the current background drawing color for all graphics. Currently only used by
the text graphic.
Syntax
Remark
Variable Description
hann Standard annotation handle
red Red value 0 - 255
green Green value 0 - 255
blue Blue value 0 - 255
SANN_set_croprect()
This function allows proper zooming, panning, and scrolling for annotations. The annotation
toolkit needs to know the images’ current cropping rectangle to work properly.
Syntax
int SNBDAPI SANN_set_croprect(int hann, int xs, int ys, int xe, int
ye);
Remark
273
Chapter 28 - Annotation and Redlining Toolkit
Variable Description
hann Standard annotation handle
xs Set the X starting coordinate
ys Set the Y starting coordinate
xe Set the X crop rectangle size
ye Set the Y crop rectangle size
SANN_set_delete_flag()
This function allows you to turn on or off the Delete menu option in the popup window used
when editing annotations.
Syntax
Remark
Variable Description
0 = on
on_off
1 = off
SANN_set_fcolor()
This function sets the current foreground drawing color for all graphics.
Syntax
Remark
Variable Description
hann Standard annotation handle
red Red value 0 - 255
green Green value 0 - 255
blue Blue value 0 - 255
274
Chapter 28 - Annotation and Redlining Toolkit
SANN_set_font()
This function sets the current type of font to use. It uses the values returned from the
CHOOSEFONT common dialog box LOGFONT data structure.
Syntax
Remark
Variable Description
hann Standard annotation handle.
name Name of font to use. (lfFaceName)
italic Use an italic font. (lfItalic)
bold Use bold font. (lpWeight)
font_height Size of the font to use. (lfHeight)
SANN_set_line_style()
This function sets current line style for lines, ellipses, rectangles, and freehand drawings.
Syntax
Remark
Variable Description
hann Standard annotation handle.
Line drawing style. Currently, the Raster-
Master Annotation Toolkit supports the fol-
lowing line styles:
style PS_DASH 1
PS_DASHDOT 3
PS_DASHDOTDOT 4
PS_DOT 2
PS_SOLID 0
275
Chapter 28 - Annotation and Redlining Toolkit
SANN_set_line_width()
This function sets the current line width for lines, ellipses, rectangles, and freehand drawings.
Syntax
Remark
Variable Description
hann Standard annotation handle
width Width of lines in pixels
SANN_set_size()
This function sets the height and width of the current image being annotated. The internal
format for Snowbound annotations contains this information.
When reading in other annotation file formats, you need to call this function to set the height and
width of the current annotation image being annotated after reading in the annotation file.
Syntax
Remark
Variable Description
hann Standard annotation handle
width Width of current image being annotated
height Height of current image being annotated
SANN_write_ann()
This function writes out annotations to disk file. The extra_size and extra_data variables
allow the embedding of other data into the file such as company name, data, or other elements
one would like to put into the file.
276
Chapter 28 - Annotation and Redlining Toolkit
Syntax
Remark
Variable Description
hann Standard annotation handle
filename Path name or file to write
extra_size Size of extra data to write after first header
extra_data Pointer to extra data to write
Annotation Constants
The annotation and redlining toolkit also comes with pre-determined annotation constants. They
are as follows:
Annotation Constant
SANN_FILED_RECT 1
SANN_HIGHLIGHTED_RECT 2
SANN_RECTANGLE 3
SANN_LINE 4
SANN_ELLIPSE 5
SANN_FILLED_ELLIPSE 6
SANN_FREEHAND 7
SANN_BITMAP 8
SANN_POSTIT 9
SANN_POLYGON 10
SANN_FILLED_POLYGON 11
SANN_ARROW 12
SANN_EDIT 13
277
Chapter 29 - Working with PDF and Other Document File Formats
Performance
These, like any other file formats supported by Snowbound Software’s products, are read in
using a call such as IMG_decompress_bitmap(). For ActiveX, use the Image property.
Snowbound Software’s products auto-detect the file format so there is no need to specify which
format you are reading. You don't even need a specific extension.
These formats contain graphics commands such as line and text drawing. This differs from bit-
map formats that are a 2-dimensional array of bytes forming a picture. Normally, documents are
drawn or “rendered” to a bitmap in RasterMaster, but RasterMaster can also produce search-
able text document.
The rendering size for the bitmap can be set by the following call to our library:
IMGLOW_set_document_input(int dpi, int bits_pix, int format);
278
Chapter 29 - Working with PDF and Other Document File Formats
Variable Description
dpi Sets the document in dots per inch.
bits_pix Sets the bits per pixel.
1 = black and white documents
24 = color images
format Sets the format parameter.
Saving
This function sets the destination size for saving PDF files. The xsize and ysize are the output
sizes in points. A point is 1/72 of an inch. Only PDF, PCL, and AFP file formats can be saved.
The PCL and APF file formats are saved as bitmap. The PDF file format can be saved as bit-
map or searchable text.
You can specify the output size with PDF using the following call:
IMGLOW_set_pdf_output(int double xsize, int double ysize);
Variable Description
double xsize Width of image in points.
double ysize Height of image in points.
Currently, Snowbound Software does not provide PDF reading support in UNIX and Macintosh
products. Snowbound Software does provide PDF writing support for its UNIX and Macintosh
products.
PDF reading is available as a separate option. For the RasterMaster Imaging SDK for Java, a
special PDF version is available. For the other RasterMaster products, the pdfplug.dll file is
required for PDF reading support. This file must be included in the same directory as the Act-
iveX, .NET library, or RasterMaster DLL. You can also include the file in the following directory:
\Windows\system.
279
Chapter 29 - Working with PDF and Other Document File Formats
The default size for decompressing PDF documents is 200 dots per inch (DPI) and 24 bits per
pixel. To alter this or to convert PDF files, you can call the IMGLOW_set_pdf_input(dpi,-
dots_per_inch) function. For RasterMaster Imaging SDK for ActiveX, call the PdfDpi and
PdfBitsPerPixel properties.
If you are working with black and white documents, you will save a lot of memory and increase
performance by setting the DPI to 300 or 200 and the bits per pixel to 1 when reading PDF
images. For 1-bit or black and white images, RasterMaster will write out or save a PDF with
CCITT - G4 compression for black and white images.
Performance
If you are working with black and white documents, you will save a lot of memory and increase
performance by setting the DPI to 300 or 200 and the bits per pixel to 1 when reading all doc-
ument formats.
280
Appendix A - Supported File Formats
RasterMaster is a powerful conversion tool that can transform your documents and images into
many different formats. Some format types are limited in the amount of color (bit-depth) they
support in an image. Some file formats read and write only black and white (1-bit deep) and
other file formats support only color images (8+ bits deep). For many of these cases, Raster-
Master automatically converts the pixel depth to the appropriate value, based on the output
format specified. The chart below will help you determine whether your black and white or color
document will be able to convert straight to the desired output format with no additional pro-
cessing.
You can open a document in almost any supported input format by using IMG_decompress_bit-
map(). You do not have to pass in the format type, it is automatically recognized. You can save
a document to almost any supported output format by using IMG_save_bitmap(). You pass the
format type number from the chart below to indicate the format you want. Please see Chapter
11, File Format Conversion for more details.
Please note that the higher the bit depth (bits per pixel), then the larger the size of the image on
the disk or in memory. The higher bit depth may offer more quality, but the performance may suf-
fer because there is a lot more image data to process. Many users may have images that
appear to be black and white, however, they are stored in 24-bit color. Converting these doc-
uments to a 1-bit file format will decrease the size of the file and improve performance with no
perceivable loss in quality.
If you have any questions about what format to select you may contact Snowbound Technical
support on the web at http://support.snowbound.com.
281
Appendix A - Supported File Formats
You can find the bit depth/bits per pixel of your image by calling IMG_bitmap_info() and looking
at the value in biBitCount.
B = Base
D = In Development
O = Optional format/Additional charges may apply. Note: Optional formats are not avail-
able for UNIX.
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
IBM image compression for
ABIC scanned checks. Note:
Not yet supported with 46 1 1 - O - No
(reading) RasterMaster .NET x64
or RasterMaster DLL x64.
Advanced Function Presentation™.
AFP IBM format which uses CCITT G3, G4,
74 1, 24 1, 24 .afp O O Yes
(MO:DCA) and IBM MMR formats. 1-bit only.
This is a multi-page file format
Snowbound reads in ASCII text
files and converts them to a bitmap.
To enable auto-detection of the
ASCII text format, call the
ASCII 38 1 No .txt B - Yes
IMGLOW_set_auto_detect() function
with the file type number set
to 38 for the ASCII file format
before you get pages or decompress.
Originated by Microsoft,
BMP_
BMP supports 1, 4, 8, and 24-bit 12 4, 8 4, 8 .bmp B - No
COMPRESSED
images.
Originated by Microsoft,
BMP_ 1, 4, 8, 16, 1, 4, 8, 16,
BMP supports 1, 4, 8, and 24-bit 1 .bmp B B No
UNCOMPRESSED 24 24
images.
BROOK_TROUT Brooktrout FAX format. 27 1 1 .brk B B No
CALS Government specified format. 18 1 1 .cal B B No
Group 3 compression
CCITT_G3 33 1 1 .tif B B No
for bitonal (1-bit) image data.
Group 3 compression
CCITT_G3_FO 53 1 1 .tif B B No
for bitonal (1-bit) image data.
Group 4 compression
CCITT_G4 34 1 1 .tif B B No
for bitonal (1-bit) image data.
Group 4 compression
CCITT_G4_FO 52 1 1 .tif B B No
for bitonal (1-bit) image data.
Compact Font Format
is a lossless compaction of the
Type 1 format using
Type 2 charstrings. It is designed
to use less storage space
than Type 1 fonts by using
CFF operators with multiple 83 1 , 8, 24 1 , 8, 24 .cif O - No
arguments, various
pre-defined default values,
more efficient
allotment of encoding
values and shared subroutines
within a FontSet (family of fonts).
CIFF Camera Image File Format is 81 1 , 8, 24 1 , 8, 24 .cif O - No
282
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
a raw image format designed by Canon.
Check Image Management System.
Developed by
CIMS Carreker. Same as ABIC. Note: Not
80 1 No - O - No
(ABIC) yet
supported with RasterMaster .NET x64
or RasterMaster DLL x64.
1, 4, 8, 24,
CLIP Microsoft Windows clipboard format. 27 1, 4, 8, 24 .cip B B No
32
COD Liberty IMS black and white format. 72 1 No .cod B B No
Comma separated value list,
CSV 77 1,24 No .csv O - No
a text spreadsheet.
Cut images are only 8 bits per pixel
and the palette is
CUT 31 8 No .cut B - No
stored in a separate file.
Originated by Media Cybernetics.
The DCS format is a
DCS standard Quark Express Format. 62 32 32 .dcs B B No
Each plane is stored as an EPS record.
Intel created this format as
a multi-page .PCX format.
DCX Each page is a .PCX file 11 1, 4, 8, 24 1, 4, 8, 24 .dcx B B No
in whole which can be 1, 4, 8, and 24-
bit.
Standard Windows Device Independent
Bitmap. 1, 4, 8, 16,
DIB 48 1, 4, 8, 24 .dib B B No
Supports 1, 4, 8 and 24-bits. 24, 32
This is a multi-page file format.
Medical image format
DICOM supporting 1, 12, 16, and 24 pixel 55 8, 16, 24 No .dcm B - No
images.
Microsoft Word format.
Supports Microsoft Word 77, version 8
or later.
Supports 1-bit images.
Cannot decompress (view)
document while open in MS Word.
The following features have not
yet been implemented:
right-to-left text flow, underlined
URLs, section and paragraph borders
DOC and shading, 86 1, 8, 24, 32 No .doc O - Yes
text boxes, multi-column
paragraph, Windows Meta Files
(WMF) clip art, autoshapes,
and embedded OLE objects.
Inconsistencies exist
between MS Word and the Word
plugin with regards
to character and line spacing.
Reading support only.
This is a multi-page file format.
The .docx format is part of a family
of open office
XML-based formats
developed by Microsoft
. It is the default document format
DOCX for saving applications in 73 1, 8, 24, 32 No .docx O - Yes
Microsoft Word starting with Office
2007.
It is based on XML rather
than Microsoft’s .doc format.
Reading support only.
283
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
This is a multi-page file format.
Autodesk® AutoCAD® format.
Used for computer aided design (CAD)
data and metadata.
DWG 70 0 24 .dwg O - No
The DWG format can be read
in the VirtualViewer
.NET Content Server.
Autodesk® AutoCAD® format.
Used for computer aided design
(CAD) data and metadata.
See the following, for the ful
l specification
: http://usa.autodesk.-
DXF com/adsk/servlet/ 71 0 24 .dxf O - No
item?siteID=123112&id=8446678
The DWG format can be
read in the VirtualViewer
.NET Content Server.
E-mail message created with MS
EMAIL 87 1 .msg O - No
Outlook.
Encapsulated Postscript originated
by Adobe. Postscript
is an interpreted language.
Snowbound does not suppor
EPS 1, 8, 24,
t full Postscript but will extract an 14 1, 4, 8, 24 .eps B B No
(preview) 32
embedded .
TIF file in the image.
Sometimes called
a bitmap representation file.
EPS Compressed bitmap format.
It is an Adobe encapsulated 1, 8, 24,
EPS_BITMAP 63 8, 24, 32 .eps B B No
Postscript file with either 32
G4 or JPEG data embedded.
EPS Compressed bitmap format.
It is an Adobe encapsulated 1, 8, 24,
EPS_BITMAP_G4 64 No .eps - B No
Postscript file with either 32
G4 or JPEG data embedded.
EPS Compressed bitmap format.
It is an Adobe encapsulated 1, 8, 24,
EPS_BITMAP_LZW 67 No .eps - B No
Postscript file with either 32
G4 or JPEG data embedded.
Image format developed
FileNet by FileNET Corporation for viewing doc- 78 1 1 - B - No
uments.
24-bit tiled JPEG format
FLASHPIX that includes multiple resolution 54 8, 24 No .fpx B - No
images.
Created by CompuServe
for compressing 2, 3, 4, 5, 6, 7, and 8- 2, 3, 4, 5,
GIF 4 4, 8 .gif B B No
bit palette images. Uses the LZW 6, 7, 8
algorithm.
Same as GIF except stores 1, 2, 3, 4,
GIF_INTERLACED 44 4, 8 .gif B B No
the raster data in an interlaced order. 5, 6, 7, 8
Originated by Brightbill Roberts
for ShowPartner DOS applications.
GX2 22 4, 8 No .gx2 B - No
Supports 4 and 8-bit images.
Simple run length encoding technique.
Hyperlink Text Markup Language
HTML (HTML) 82 0 24 .htm, .html - O* Yes
is a tag-based language
284
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
used to create documents for the
Web. HTML forms are often
used to capture information from web
sites.
Full HTML, Javascript and CSS sup-
port.
Microsoft icon format.
Contains a standard
ICONTYPE 25 1, 4 No .ico B - No
device independent bitmap.
Supports 1 and 4 bits uncompressed.
Used on the
Commodore Amiga computers
IFF_ILBM for native bitmap format. 26 1, 4, 8, 24 1, 4, 8, 24 .iff B B No
Uses a run length format for
1, 4, and 8-bit palette images.
Originated by Digital Research
IMG 28 1 No .img B - No
for storing 1-bit images.
IMNET IMNET G4 compressed format. 42 1 No - B - No
Image Object Content Architecture.
IBM format which uses
IOCA CCITT G3, G4, and IBM MMR
24 1, 24 1 .ico O O No
(MO:DCA) * formats.
1-bit only. This is a multi-page file
format.
Joint bi-level Image Experts Group.
This is a highly compressed |
1 (with plu-
JBIG format which is stored in a 71 1 .jbg B - No
gin)
TIFF header. It supports
1 or 8-bit gray scale images.
JBIG2 is a highly-compressed
black and white image format
that uses symbol recognition
and substitution for very
dramatic compression results.
1 (with plu-
JBIG2 Snowbound's viewers and 77 1 .jbg B B No
gin)
conversion programs can
be used to directly view JBIG2
documents or
convert those documents
to a variety of output formats.
US Military CCITT G4 tiled image
format for storing
JEDMICS 56 1 1 .jed B B No
Government documents and drawings.
Supports 1-bit per pixel.
Joint Photographics Experts Group.
This was a group
spearheaded by Kodak for 24, 32,
and 8-bit gray scale lossy compression
JPEG 13 8, 24, 32 8, 24, 32 .jpg B B No
. This is by far the best compression
available for these types of images
supported in the current Snowbound lib-
rary.
JPEG 2000 specification.
This is similar to JPEG but produces
much better compression
JPEG2000 with better quality. It is 70 8, 24 8, 24 .jpg2 O O No
supported as a separate plugin.
An option exists to set the
compression level for saving.
KOFAX Kofax Format. 23 1 No - B - No
Compression for documents
LASER_DATA 17 1 No - B - No
originated by
285
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
LaserData Corp. 1-bit images only.
Presents data for each
LINE_DATA 75 1 1 - B - No
variable on a single line.
Original Apple bitmap file format.
MACPAINT All MacPaint 21 1 No - - - No
images are 720 x 576 pixels 1 bit.
MAG Mag Format. 61 1 No .mag B - No
Mixed Object: Document
Content Architecture
. IBM format which uses
MO:DCA 47 1, 24 1 .mca O O Yes
CCITT G3, G4, and IBM MMR formats.
1-bit only.
This is a multi-page file format.
Microsoft Paint program bitmap
file format. Supports 1-bit images
MSP 30 1 No .msp B - No
. Uses a type of RLE compression
found also in compressed .BMP files.
A simple header with CCITT group 4
NCR 65 1 No .ncr B - No
data.
Open Document Format is
an XML-based file format for
representing electronic documents
ODF such as 78 No No .odf O - No
spreadsheets, charts,
presentations and
word processing documents.
Open Document Format
ODP 101 No No .odp O - Yes
for presentations.
Open Document Format
ODS 77 1, 24 No .ods O - Yes
for spreadsheets.
Open Document Format
ODT 76 1, 24 No .odt O - Yes
for word processing (text) documents.
Office Open Extended
Markup Language or Office
Open XML
(also informally
known as OOXML or OpenXML)
is a zipped XML-based file format
OOXML developed by Microsoft for 74 1, 8, 24 No - O - Yes
representing spreadsheets,
charts, presentations
and word processing documents
that is intended for use with the 2007
and later versions
of the Microsoft Office suite.
Hewlett Packard printer
PCL_1 file format. Support for
color and grayscale output. 57 1, 24 1 .pcl O B Yes
(with plugin) Supported as a separate plugin.
This is a multi-page file format.
Hewlett Packard printer
file format. Support for color
PCL_1
and grayscale output. 57 No 1 .pcl O B Yes
(without plugin)
Supported as a separate plugin.
This is a multi-page file format.
Hewlett Packard
printer file format.
PCL_5 Support for 76 No 1 .pcl O B Yes
color and grayscale output.
This is a multi-page file format.
Zsoft bitmap file format.
PCX 2 1, 4, 8, 24 1, 4, 8, 24 .pcx B B No
Similar to pack bits compression.
286
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
Supports 1, 4, 8, and 24-bit images.
Portable Document
Format. File format developed by
Adobe to capture formatting
information from a
variety of desktop
publishing applications.
It allows the user to
send formatted documents
and have them appear
on the recipient's monitor
or printer as they were intended.
Compatible with the
PDF/A specification
PDF and conforms to 1, 2, 4, 8,
57 1, 24 .pdf O B Yes
(with plugin) PDF v1.4. 16, 24, 32
Does not currently support JPEG2000
in PDF for Java.
Supports some types
of Adobe specified
PDF annotations
, however does not support XFA annota-
tions.
Does not support corrupt
PDF documents.
Snowbound Software requires
that the fonts needed
be available on the system.
This is a multi-page file format.
Portable Document
Format. File format developed by
Adobe to capture formatting
information from a
variety of desktop
publishing applications.
It allows the user to
send formatted documents
and have them appear
on the recipient's monitor
or printer as they were intended.
Compatible with the
PDF/A specification
PDF and conforms to
57 No 1, 24 .pdf O B Yes
(without plugin) PDF v1.4.
Does not currently support JPEG2000
in PDF for Java.
Supports some types
of Adobe specified
PDF annotations
, however does not support XFA annota-
tions.
Does not support corrupt
PDF documents.
Snowbound Software requires
that the fonts needed
be available on the system.
This is a multi-page file format.
Portable Document
Format. File format developed by
Adobe to capture formatting
PDF_15 information from a 77 No 1, 24 .pdf O B Yes
variety of desktop
287
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
send formatted documents
and have them appear
on the recipient's monitor
or printer as they were intended.
Compatible with the
PDF/A specification
and conforms to
PDF v1.4.
Does not currently support JPEG2000
in PDF for Java.
Supports some types
of Adobe specified
PDF annotations
, however does not support XFA annota-
tions.
Does not support corrupt
PDF documents.
Snowbound Software requires
that the fonts needed
be available on the system.
This is a multi-page file format.
Note: Only supported with
RasterMaster .NET or RasterMaster
DLL
. This format is not yet
supported in Rastermaster Java.
Portable Document
Format. File format developed by
Adobe to capture formatting
information from a
variety of desktop
publishing applications.
It allows the user to
send formatted documents
and have them appear
on the recipient's monitor
or printer as they were intended.
Compatible with the
PDF/A specification
and conforms to
PDF v1.4.
Does not currently support JPEG2000
PDF_16 in PDF for Java. 72 No 1, 24 .pdf O B Yes
Supports some types
of Adobe specified
PDF annotations
, however does not support XFA annota-
tions.
Does not support corrupt
PDF documents.
Snowbound Software requires
that the fonts needed
be available on the system.
This is a multi-page file format.
Note: Only supported with
RasterMaster .NET or RasterMaster
DLL.
This format is not yet
supported in Rastermaster Java.
Portable Document
Format. File format developed by
PDF_LZW 88 No 1, 24 .pdf O B Yes
288
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
variety of desktop
publishing applications.
It allows the user to
send formatted documents
and have them appear
on the recipient's monitor
or printer as they were intended.
Compatible with the
PDF/A specification
and conforms to
PDF v1.4.
Does not currently support JPEG2000
in PDF for Java.
Supports some types
of Adobe specified
PDF annotations
, however does not support XFA annota-
tions.
Does not support corrupt
PDF documents.
Snowbound Software requires
that the fonts needed
be available on the system.
This is a multi-page file format.
Kodak photo CD format.
Supports only 24-bit images.
This format contains at leas
t 5 images. Get these images
as you would a multi-page file format.
Page 0 - 768 x 512
Page 1 384 x 256
Page 2 172 x 128
Page 3 1536 x 1024
PHOTOCD 37 24 No .pcd B - No
Page 4 3072 x 2048
Images are uncompressed
until the 1536 x 1024 images or greater.
All images are stored as
YCC data which is luminance
then blue and red
chrominance channels.
The large image must be built
from the smaller images by
interpolation then adding the residual
data stored by Huffman encoding.
Adobe Photoshop format for
storing 1, 4, 8, 16, 24, and 32-bit
images.
1, 4, 8, 24, 1, 8, 24,
PHOTOSHOP Can be compressed or 41 .psd B B No
32 32
uncompressed. Images
may also be stored as CMYK data or
RGB.
Apple Macintosh
bitmap file format
. These images may contain
vector information
such as lines and circles. 1, 2, 4, 8,
PICT 15 1, 4, 8, 24 .pct B B No
Only the bitmap 16, 24, 32
portion of data is decompressed.
Uses pack bits compression
. Supports 1, 2, 3, 4, 8,
16, 24, and 32-bit images.
289
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
Originated by CompuServe
to replace the .GIF file format.
Uses the Huffman
PNG encoding variant 1, 4, 8, 16, 1, 4, 8, 16,
43 .png B B No
(optional) . Supports 1, 4, 8, 15, 16, 24, 24, 32 24, 32
and 32-bit images.
Also supports
interlaced and transparency.
Microsoft PowerPoint
Binary File Format which is the
binary file format used
by Microsoft PowerPoint 77,
PPT Microsoft PowerPoint 2000, 85 1, 8, 24, 32 No .ppt O - Yes
Microsoft PowerPoint 2002,
and Microsoft Office PowerPoint 2003.
Reading support only.
This is a multi-page file format.
The .pptx format is
part of a family of open office
XML-based formats
developed by Microsoft.
It is the default documen
t format for saving applications
PPTX in Microsoft PowerPoint 100 1, 8, 24, 32 No .pptx O - Yes
starting with Office 2007
. It is based on XML rather
than Microsoft's .ppt format.
Reading support only.
This is a multi-page file format
. Supported on Java 7.
Sun raster format.
RAST Supports 1, 8, 24, and 32-bits. 37 1, 8, 24 1, 8, 24 .ras B B No
Run length encoded format.
The Rich Text Format
is a method of encoding
RTF 87 1, 8, 24, 32 No .rft O - Yes
formatted text and graphics
for easy transfer between applications.
The SCITEX format is a proprietary
format
originated from SCITEX Corporation.
SCITEX 60 24, 32 24, 32 .sct B B No
Gray scale color and CMYK color
images.
Usually compressed.
Searchable PDF, also known
SEARCHABLE_ as "vector PDF"
is a regular PDF file that contains 57 No No .pdf O B Yes
PDF searchable
text content vs rasterized text.
The SCITEX format is a proprietary
TARGA format 32 16 24, 32 .tga B B No
originated from SCITEX Corporation.
The SCITEX format is a proprietary
TARGA16 format 32 16 24, 32 .tga B B No
originated from SCITEX Corporation.
Tagged image file format.
Created by an independent
group and was supported by Aldus.
.TIF files can be any number
of bits per pixel,
TIFF_2D 17 1 No .tif B - No
planes and several
compression algorithms.
The byte order may be
Intel or Motorola format.
290
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
The bytes may also be
filled from right to left or left to right.
Compression may be
uncompressed, pack bits,
LZW, modified Huffman,
CCITT G4, CCITT G3,
CCITT G32D or JPEG.
The CCITT G4 file format only saves to
black and white.
This is a multi-page file format.
TIFF file with Arithmetic
Binary encoding.
Requires a special
ABIC version of our tools.
TIFF_ABIC Very popular for check imaging 46 4, 8 No .tif O - No
. BW is used for
1-bit bilevel and TIFF_ABIC
is for 4-bit gray scale images.
This is a multi-page file format.
TIFF file with Arithmetic
Binary encoding.
Requires a special
ABIC version of our tools.
TIFF_ABIC_BW Very popular for 47 1 No .tif O - No
check imaging. BW is used f
or 1-bit bilevel and TIFF_ABIC
is for 4-bit gray scale images.
This is a multi-page file format.
ANSI baseline Group 3
or Group 4 compression
TIFF_G3_FAX 8 1 1 .tif B B No
embedded in a TIFF.
This is a multi-page file format.
ANSI baseline Group 3
or Group 4 compression
TIFF_G4_FAX 10 1 1 .tif B B No
embedded in a TIFF.
This is a multi-page file format.
ANSI baseline Group 3
or Group 4 compression
TIFF_G4_FAX_FO 51 1 1 .tif B B No
embedded in a TIFF.
This is a multi-page file format.
ANSI baseline Group 3
TIFF_G4_ or Group 4 compression
67 No 1 .tif B B No
FAX_STRIP embedded in a TIFF.
This is a multi-page file format.
TIFF file compressed
using the Huffman
TIFF_HUFFMAN 7 1 1 .tif B B No
compression algorithm.
This is a multi-page file format.
Standard ANSI baseline
JBIG compression
TIFF_JBIG 66 1 1 .tif B B No
embedded in a TIFF.
This is a multi-page file format.
TIFF_JPEG
If you have Standard ansi baseline
issues viewing, JBIG compression
40 8, 24 8, 24, 32 .tif B B No
please see embedded in a TIFF.
Appendix F, This is a multi-page file format.
Troubleshooting.
Black and white gray scale format.
TIFF_JPEG7 73 1, 8 1, 8 .tif B B No
This is a multi-page file format.
TIFF file compressed using the
LZW compression algorithm. 1, 4, 8, 24, 1, 4, 8, 16,
TIFF_LZW 7 .tif B B No
The LZW algorithm includes the 32 24, 32
291
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
look-up table of codes as part of the
compressed file.
This is a multi-page file format.
Simple run length encoding algorithm. 1, 4, 8, 16,
TIFF_PACK 16 1, 8 .tif B B No
This is a multi-page file format. 24, 32
TIFF Uncompressed raw binary data 1, 2, 4, 8, 1, 4, 8, 16,
0 .tif B B No
UNCOMPRESSED . This is a multi-page file format. 16, 24, 32 24, 32
UTF-8 is a text format.It is a variable
width
UTF-8 encoding for the Unicode character 38 1 No .txt B - No
set.It may start with the
Byte Order Mark of 0xFF FE
UTF-16 is a text format.It is a variable
width encoding for the Unicode
UTF-16 87 1, 8, 24, 32 No .txt B - No
character set.It may start with the
Byte Order Mark of 0xFE FF.
Windows file format
WBMP 68 1 1 .wbmp B B No
for wireless devices.
A simple header with
WINFAX 58 1 No - B - No
CCITT group 3 compression.
Microsoft Windows Metafile format
. These may contain vector information
such as lines and circles.
Only the bitmap data is extracted.
This is in the form of a standard win- 1, 4, 8, 16,
WMF 6 1, 4, 8, 24 .wmf B B No
dows 24, 32
DIB. May be 1, 4, 8, and 24-bit.
The 4 and 8-bit images may be
compressed using Microsoft
RLE compression as in .BMP files.
WordPerfect’s metafile format.
This is similar to the WMF file
format in that it may contain
WPG 5 1, 4, 8, 24 1, 4, 8 .wpg B B No
vector information.
Supports 1, 4, 8, and 24-bit images.
Only the bitmap data is extracted.
Xwindows file format which encodes
XBM each pixel as an ASCII byte 20 1 1 .xbm B B No
. Only supports 8-bits per pixel.
Xerox_EPS Encapsulated Postscript for Xerox. 45 1 No - B B No
Microsoft Excel Spreadsheet format for
structuring and analyzing data.
This is the binary file format used by
Microsoft Excel 77, Microsoft Excel
XLS 2000, 84 1, 8, 24, 32 No .xls O - Yes
Microsoft Excel 2002, and |
Microsoft Office Excel 2003.
Reading support only.
This is a multi-page file format.
The .xlsx format is part of
a family of open office
XML-based formats
developed by Microsoft.
It is the default document
format for saving
XLSX 75 1, 8, 24, 32 No .xlsx O - Yes
applications in Microsoft Excel
starting with Office 2007.
It is based on XML rather
than Microsoft's .xls format.
Reading support only.
This is a multi-page file format.
Xwindows bitmap file
XPM 35 1, 4, 8 8 .xpm B B No
format stored as ASCII data.
292
Appendix A - Supported File Formats
Common Supports
File Input Output Win Win
File Format Description Type Bit Bit File Text
Number Depth Depth Read Write
Ext. Search
Each pixel is stored
as an ASCII byte.
UNIX XWD Raster format. 1, 8, 24,
XWD 36 1, 4, 8 .xwd B B No
Each pixel is stored as an ASCII byte. 32
* = The .NET 4.0 framework must be installed in order to process HTML documents, even if
you are using a .NET 2.0 build of VirtualViewer or RasterMaster.
293
Appendix A - Supported File Formats
294
Appendix A - Supported File Formats
295
Appendix B - Software Installation
Directory Structure
Installed Files
You can get an evaluation by contacting a member of our sales team at sales@s-
nowbound.com or 1-617-607-2010. The evaluation copy expires at the end of each month.
Both the developer and runtime version of RasterMaster DLL ship as fully serialized builds
which are very easy to install. This product is fully enabled as either a developer or runtime
product.
RasterMaster DLL is delivered as a .zip archive that can be manually extracted to an install-
ation directory chosen by the user. For example:
C:\Program Files\Snowbound\RMDLL
Notes:
For RasterMaster DLL, Snowbound requests that you place all Snowbound components
in a non-common directory within Windows. They should NOT be placed in the \win-
dows or \windows\system directory or other such common area.
Starting with version 14, RasterMaster’s file naming convention will no longer include
the version number in the file name and will follow a generic naming convention. For
example, in the previous version, the file named snbd13cm.dll will now be named
snbdcm.dll.
When a developer's license is purchased, a Developer’s Version banner appears. You must
interactively select the notification box for the program to continue. Contact sales if you need to
eliminate this notification for your development purposes.
296
Appendix B - Software Installation
Notes:
You are running an evaluation version of the software if an evaluation banner appears on
the screen. Contact support at ([email protected]) for help with these issues.
If you download an update or receive one from Snowbound technical support, please
ensure that you obtain a serialized version of the product before you go into distribution.
Your application will link to one or more Snowbound dlls, including snbdcm.dll and plug-in .dlls.
When your application is deployed, the Snowbound files should be placed in either the same dir-
ectory as your application or in a Snowbound directory where the application can find them.
These files should not be placed in a Windows\System directory or other common Windows
directory.
If more than one Snowbound dll is used, they should all be kept at the same version. If one dll is
updated or upgraded they should all be updated or upgraded.
l
You will see a pop up banner when you view or convert your first document. Subsequent
documents in the same session will not elicit the banner.
l
You will see large thin Xs across each page after the first 50 pages or thumbnails.
l
After your expiration date, you will see a banner stating the evaluation has expired. You
will not see any output.
Other than that you will have full use of the product including support for all document formats.
297
Appendix B - Software Installation
Note:
The installation dialogs that you see during your actual installation may be slightly dif-
ferent depending on which version of the SDK you install. In this example, Raster-
Master DLL with PDF is being installed.
2. After reading the dialog, click Next to display the License Agreement dialog.
298
Appendix B - Software Installation
l
If you agree with the license agreement, select “I accept the license agreement”
and click Next to display the Readme Information dialog.
l
If you do not agree with the license agreement, you cannot proceed with the
installation.
4. Click Next after reading the Readme information to display the Installation Folder dialog.
299
Appendix B - Software Installation
5. Accept the default destination folder and click Next to display the Ready to Install dia-
log.
300
Appendix B - Software Installation
6. Click Install to begin the installation. Installation begins. This may take a few seconds.
7. You will see a warning message if you do not have the Visual C++ 2005 Redistributable
prerequisite file installed. If you want to use the RasterMaster Imaging SDK Microsoft
Office plugin to convert Word 2007 (.docx) documents, you need to click Yes to install
the Visual C++ 2005 Redistributable prerequisite file and continue RasterMaster DLL
installation.
301
Appendix B - Software Installation
Directory Structure
The installation of RasterMaster DLL creates a new directory called C:\Program
Files\Snowbound\RM<version><type><product>. The example below is a version 18
DLL directory.
RM18DLL
Docs
Images
Marketing
Sample-Documents
Samples
Installed Files
This section describes the files that are installed during the RasterMaster DLL installation. The
main installation directory is RM<Version><Product>DLL. For example, if you install the
302
Appendix B - Software Installation
version 18 DLL, the directory will be RM18DLL. There is also a Product Documentation,
Product Information, and Samples subdirectory.
The files installed into the main directory are defined in Table B-1.
Note:
If you have an evaluation copy of RasterMaster installed, please remove the
Aspose.Total.Product.Family.lic file when you install your purchased version with the
Office 2007-2010 option.
File Description
abicplug.dll ABIC plugin file for use.
Annlib.h Defines annotation functions.
Aspose.Cells.dll Aspose.Cells library file.
Aspose.Slides.dll Aspose slides library file
Aspose.Total.Product.Family.lic Aspose product license.
Aspose.Words.dll Aspose.Words library file.
docplug.dll MS Word plugin file.
dwgplg.dll DWG plugin file.
filters.h Defines file extensions.
HtmlHelper.dll HTML plugin file.
htmlplg.dll HTML plugin file.
icudt38.dll HTML plugin file.
Defines standard error codes
IMG_ERR.h
for the Snowbound library.
Used in an the application pro-
gram for defining the Snow-
Imglib.h
bound Library function
prototypes.
jb2plug.dll JBIG2 plugin file.
jp2plug.dll JPEG2 plugin file.
Glue layer for connecting lib-
Nt_glue.h rary to a Windows NT applic-
ation.
Open Office XML (OOXML) plu-
ooxmlplug.dll
gin file.
pclplug.dll PCL plugin file.
pdfplug.dll PDF plugin file.
snbdan32.dll Main Snowbound file.
snbdan32.lib Snowbound Extended library.
snbdcm.dll Main Snowbound file.
303
Appendix B - Software Installation
File Description
sndbcm.lib Snowbound library.
SnowboundDllLocations.exe The application file.
The files installed into the Docs directory are defined in Table B-2.
File Description
Aspose end user license agree-
Aspose_LicenseAgreement.pdf
ment.
Open source software license
^^Open Source Software Components used in Snowbound
agreement bundled with Snow-
products.pdf
bound Software products.
Complete DLL programmers
RMDLLProgrammersGuide.pdf
guide.
RMDLLActiveXDotNetReleaseNotes.pdf DLL Release Notes.
The files installed into the Marketing directory are defined in Table B-3.
File Description
Provides an overview of Snow-
bound Software including com-
Snowbound Corporate Overview.pdf
pany facts, products, and
formats.
Provides an overview of Snow-
Snowbound Software RasterMaster Overview.pdf bound Software’s Raster-
Master products.
Provides an overview of Snow-
Snowbound Software VirtualViewer Overview.pdf bound Software’s VirtualViewer
products.
The samples directory contains four subdirectories that contain the RasterMaster DLL
samples:
The C_Samples are described in Table B-5. For more information about each sample, see
Appendix C,RasterMaster DLL Samples.
304
Appendix B - Software Installation
Sample Description
Sample for merging in an alpha
alpha channel image. See Alpha for
more information.
Sample for animation test. See
animate
Animate for more information.
Sample showing how to use
Image Library to:
Decompress an image
305
Appendix B - Software Installation
Sample Description
version for more information.
Sample for saving multi-page
images. See Multi-page Split-
simplemutlipagsplitting
ting and Saving for more inform-
ation.
Sample showing how to use
Snowbound Library for reading
tags
.TIF tags. See Tags for more
information.
Sample showing how to use
Snowbound Library for a trans-
transp parent decompress and display
using .GIF images. See Transp
for more information.
Sample showing how to use the
command line to extract text
from a MODCA:PTOCA and/or
Vector_Convert
AFP files. It saves the text in
vector format and writes out to
a searchable PDF
Sample showing how to use
Image Library to:
Decompress an image
Rotate to screen
306
Appendix C - RasterMaster DLL Samples
If you do not find the sample that you are looking for in this manual, please open a support ticket
at http://support.snowbound.com to request a specific sample. We are dedicated to helping our
customers succeed and we are constantly enhancing our products based on feedback from cus-
tomers like you.
Note:
If you are running one of the RasterMaster DLL samples described in this appendix on a
64-bit machine, select x64 as the Active Solution Platform under the Build > Con-
figuration Manager menu of Microsoft Visual Studio.
Alpha
Animate
Annotate
Aspect
Callback
Encrypt
Fit
Format Conversion
Load
MFC_Sample
MFC_TextSearch_TextExtract_Sample
Page
SaveMem
Scan
Tags
Transp
307
Appendix C - RasterMaster DLL Samples
Vector_Convert
Zoom
Alpha
This sample describes how to use the Snowbound Image Library to merge in an alpha channel
image. You can select Zoom In, Zoom Out, and Zoom Restore. You can rotate the image 90,
180, or 270 degrees. You can rotate the screen 0 or 180 degrees.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
Animate
This sample is an example of an animation test. It allows you to open and test animated GIF
files.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_animate() draws all frames of the animated GIF file passed to it.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
308
Appendix C - RasterMaster DLL Samples
Annotate
This sample demonstrates how to use the image library and the annotation library together.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
IMG_display_bitmap_aspect() displays the current bitmap with the corrected aspect ratio.
See Chapter 28, Annotation and Redlining Toolkit for more information on the annotation library
functions used.
Aspect
This sample demonstrates how to use the Snowbound Image Library to accomplish the tasks
listed below.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
l Decompress an image
l Scroll through an image
l Rotate to screen
l Convert screen coordinates to images coordinates
l Use display with corrected aspect ratio
309
Appendix C - RasterMaster DLL Samples
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
IMG_display_bitmap_aspect() displays the current bitmap with the corrected aspect ratio.
IMG_set_croprect_scroll() enables and disables the scroll bar and sets the cropping rectangle.
Callback
This sample demonstrates how to use the Snowbound Image Library for low-level callback for
decompress. Callback functions are useful for getting raw decompressed image data directly
from a file without using the library’s functions for displaying, printing, rotating, and more. For
more information see Chapter 4, Callback Routines.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
Encrypt
This sample demonstrates how to use the Snowbound Image Library for a transparent decom-
press and display using .GIF images. It allows you to open an image, input a transparency
color, and save it in a desired format.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
310
Appendix C - RasterMaster DLL Samples
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
IMGLOW_get_transp_color() gets the GIF image’s background color if the information is not
available in the header.
Fit
This sample is a basic load and display program. It allows you to open an image and display it
as fit-to-width or fit-to-height.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
IMG_display_fit_to_width() displays the full width of the image horizontally scaling to fit.
IMG_display_fit_to_height() displays the full height of the image vertically scaling to fit.
Format Conversion
This sample demonstrates a simple conversion. It takes the path to the image to convert and
the format name or integer value for the type of file format you want to output, then saves the
image as out.sbd into the current directory.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
311
Appendix C - RasterMaster DLL Samples
Load
This sample is a basic load and display program. It allows you to open and display an image.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
MFC_Sample
This sample demonstrates how to open, save, and zoom a file in the MFC framework. It allows
you to open multiple images. You can zoom in, zoom out, or zoom into an area selected by drag-
ging a rectangle of the image through the menu or buttons on the toolbar. This sample displays
a toolbar and a status bar. You can save the image in a desired format.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMGLOW_set_pdf_input( ) converts PDF files into a raster image when being decompressed
into RasterMaster products.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
312
Appendix C - RasterMaster DLL Samples
IMG_display_bitmap_aspect() displays the current bitmap with the corrected aspect ratio.
IMG_set_croprect_scroll() enables and disables the scroll bar and sets the cropping rectangle.
MFC_TextSearch_TextExtract_Sample
This sample demonstrates the use of IMGLOW_extract_text and IMGLOW_search_text
in the SnbdText_Extract_Search Class in MODCA:PTOCA and PDF files.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
Select Find > Find menu command and type in your search string. Click the Find All option to
highlight all text found for each page or click OK to find the first instance of your search string
from the page you are currently viewing.
The F3 key highlights the next found search text and loops to the beginning page when the last
page is reached. Also, with this option on if you go to the next page the first instance of the
search string will be highlighted regardless.
To deactivate the search, select Find > Find and click the Cancel button.
To extract the text, open a MODCA:PTOCA or PDF document and select File > Save Extrac-
ted Text.
IMGLOW_set_pdf_input() converts PDF files into a raster image when being decompressed
into RasterMaster products.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
313
Appendix C - RasterMaster DLL Samples
IMG_display_bitmap_aspect() displays the current bitmap with the corrected aspect ratio.
IMG_save_document() takes a buffer passed in with text, graphics, and position information
obtained from IMGLOW_extract_text() to create the document file output.
IMG_set_croprect_scroll() enables and disables the scroll bar and sets the cropping rectangle.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
Page
This sample displays any page of an image. It allows you to open a TIFF, IOCA, PCX, or text
file. You can view the next page or previous page of the image. If desired, it can also use anti-ali-
asing. You can select anti-aliasing, Preserve Black, and Scale to Gray.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
314
Appendix C - RasterMaster DLL Samples
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
Print
This sample demonstrates how to print an image and also how to use status bars. It allows you
to open and print an image.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_decompress_bitmap() frees up the library handle and removes the image from memory.
IMG_save_document() takes a buffer passed in with text, graphics, and position information
obtained from IMGLOW_extract_text() to create the document file output.
315
Appendix C - RasterMaster DLL Samples
IMGLOW_extract_text() extracts text from PTOCA, PCL, PDF, MS Word, AFP, and MS Excel
files.
SaveMem
This sample saves a document image to memory. The memory buffer is automatically sized to
fit the image. The output is written to C:\TEMP\out.tif. You can find the samples in the fol-
lowing directory C:\Program Files\Snowbound Software\RasterMaster® DLL
Evaluation\DLL\Samples.
IMG_decompress_bitmap() frees up the library handle and removes the image from memory.
IMG_save_mem() takes a buffer passed in with text, graphics, and position information
obtained from IMGLOW_extract_text() to create the document file output.
Scan
This sample demonstrates the scanning process. It allows you to select Scan Acquire, Scan
Feeder, Set Caps, and Show UI.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
IMG_scan_acquire_feeder() scans in the image from the feeder on the currently installed
device.
316
Appendix C - RasterMaster DLL Samples
Tags
This sample demonstrates how to use the Snowbound Image Library for reading TIF tags. It
allows you to open an image, input a transparency color, and save it in a desired format.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
IMGLOW_get_transp_color() gets the GIF image’s background color if the information is not
available in the header.
Transp
This sample demonstrates how to use the Snowbound Image Library for a transparent decom-
press and display using .GIF images. It allows you to open an image, input a transparency
color, and save it in a desired format.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
317
Appendix C - RasterMaster DLL Samples
IMGLOW_get_transp_color() gets the GIF image’s background color if the information is not
available in the header.
Vector_Convert
This sample uses the command line to extract text from a MODCA:PTOCA and/or AFP files. It
saves the text in vector format and writes out to a searchable PDF.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
Zoom
This sample demonstrates how to use the Snowbound Image Library to accomplish the tasks
listed below.
You can find the samples in the following directory C:\Program Files\Snowbound Soft-
ware\RasterMaster® DLL Evaluation\DLL\Samples.
l Decompress an image
l Zoom in or out of an image
l Zoom into an area selected by dragging a rectangle
l Restore zoom
l Scroll through an image
l Rotate the image 90, 180, or 270 degrees
l Rotate the image 0, 90, 180, or 270 degrees to the screen
318
Appendix C - RasterMaster DLL Samples
IMG_set_croprect_scroll() enables and disables the scroll bar and sets the cropping rectangle.
IMG_delete_bitmap() frees up the library handle and removes the image from memory.
319
Appendix D - TIFF Tags
To call the TIFF tags in RasterMaster, use the IMGLOW_get_tiff_tag() function. This function
reads a TIFF tag from the file specified by bm_name. To set the TIFF tags in RasterMaster, use
the IMGLOW_set_tiff_tag() function. This function reads a TIFF tag from the file specified by
bm_name.This function writes new tags as well as all current tags.
The TIFF file format was created by an independent group and was supported by Aldus. .TIF
files can be any number of bits per pixel, planes and several compression algorithms. The byte
order may be Intel or Motorola format. The bytes may also be filled from right to left or left to
right. Compression may be uncompressed, pack bits, LZW, modified Huffman, CCITT G4,
CCITT G3, CCITT G3-2D or JPEG. The CCITT G4 file format only saves to black and white.
If you have any questions about the TIFF file format and the tags described below, you may con-
tact Snowbound Technical support on the web at http://support.snowbound.com .
TIFF Baseline: The baseline set of tags were documented in TIFF 5.0 and carried over on
pages 11-47 of the 1992 TIFF 6.0 specification.
TIFF Extended: The extended set includes some additional tags and added values for existing
tags, as documented on pages 48-115 of the TIFF 6.0 specification.
TIFF Private: Originally, the term private meant just that. The TIFF 6.0 specification (page 8)
states, “An organization might wish to store information meaningful to only that organization . . .
. Tags numbered 32768 or higher, sometimes called private tags, are reserved for that purpose.
Upon request, the TIFF administrator . . . will allocate and register one or more private tags for
an organization . . . . You do not need to tell the TIFF administrator what you plan to use them
for, but giving us this information may help other developers to avoid some duplication of effort.”
Over time, however, many private tags have become well established and well documented,
e.g., tag 34675 for the ICC profile, dubbed InterColorProfile in the TIFF/EP standard.
Thus, many members of the private tag class can be viewed as open extensions rather than as
containers for secret information.
TIFF/EP, TIFF/IT, and DNG: A number of tags, some of which may once have been private,
have been defined in TIFF/EP (ISO 12234-2, 2001), TIFF/IT (ISO 12639, 2004), and DNG_1_1,
an Adobe-sponsored extension of the TIFF 6.0 specification.
TIFF Private IFD: The TIFF 6.0 specification (page 9) states, “If you need more than 10 tags,
we suggest that you reserve a single private tag, define it as a LONG TIFF data type, and use
its value as a pointer (offset) to a private IFD [image file directory] or other data structure of your
320
Appendix D - TIFF Tags
choosing. Within that IFD, you can use whatever tags you want, since no one else will know
that it is an IFD unless you tell them.” As with private tags, we can understand private IFDs as
an extension to TIFF, often very public and well documented.
The private IFD tags of greatest interest to the Library of Congress are those associated with
the EXIF_2_2 specification, pertaining to image generation by digital still cameras. Exif is an
abbreviation for EXchangeable Image File format, although Exif does not relate to TIFF as, say,
JFIF relates to JPEG_DCT. The Exif IFD is pointed to by the Private Exif IFD tag 34665. This
and other Exif tags are listed in the numerical table below.
For the Exif specification and other related information, see Exif.org. There are actually three
private IFDs specified by the Exif standard. The other two are the GPS IFD, for positioning
information, and the Interoperability IFD, used to encode compability information. With numer-
ical sequences of their own, the GPS and interoperability tags are not included in the table
below.
HD Photo tags: Although not a true TIFF implementation, WMP_1_0 (originally called Win-
dows Media Photo) is a 2006 specification with a container format that borrows heavily from
TIFF and adds a few new tags of interest. Included in the table.
Code Source of
Name Description
Dec Hex Tag
A general indication of the kind of
data that is contained in this sub-
file. This field is made up of a set of
32 flag bits. Unused bits are expec-
ted to be 0. Bit 0 is the low-order
bit.
The default is 0.
A general indication of the kind of
data that is contained in this sub-
255 00FF SubfileType file. Baseline
321
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
A general indication of the kind of
data that is contained in this sub-
file.
The default is 1.
1 = No compression, but pack data
into bytes as tightly as possible,
259 0103 Compression with no unused bits except at the Baseline
end of a row. The bytes are stored
322
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
as an array of bytes, for Bit-
sPerSample <= 8, word if Bit-
sPerSample > 8 and <= 16, and
dword if BitsPerSample > 16 and
<= 32. The byte ordering of data >8
bits must be consistent with that
specified in the TIFF file header
(bytes 0 and 1). Rows are required
to begin on byte boundaries.
3 = Facsimile-compatible CCITT
Group 3, exactly as specified in
"Standardization of Group 3 fac-
simile apparatus for document
transmission," Recommendation
T.4, Volume VII, Fascicle VII.3,
Terminal Equipment and Protocols
for Telematic Services, The Inter-
national Telegraph and Telephone
Consultative Committee (CCITT),
Geneva, 1985, pages 16 through
31. Each strip must begin on a byte
boundary. (But recall that an image
can be a single strip.) Rows that
are not the first row of a strip are
not required to begin on a byte
boundary. The data is stored as
bytes, not words - byte-reversal is
not allowed. See the Group3Op-
tions field for Group 3 options such
as 1D vs 2D coding.
4 = Facsimile-compatible CCITT
Group 4, exactly as specified in
"Facsimile Coding Schemes and
Coding Control Functions for
Group 4 Facsimile Apparatus,"
Recommendation T.6, Volume VII,
323
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
Fascicle VII.3, Terminal Equip-
ment and Protocols for Telematic
Services, The International Tele-
graph and Telephone Consultative
Committee (CCITT), Geneva,
1985, pages 40 through 48. Each
strip must begin on a byte bound-
ary. Rows that are not the first row
of a strip are not required to begin
on a byte boundary. The data is
stored as bytes, not words. See
the Group4Options field for Group 4
options.
324
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
three samples, 0 represents min-
imum intensity, and 2**Bit-
sPerSample - 1 represents
maximum intensity. For PlanarCon-
figuration = 1, the samples are
stored in the indicated order: first
Red, hen Green, then Blue. For
PlanarConfiguration = 2, the
StripOffsets for the sample planes
are stored in the indicated order:
first the Red sample plane StripOff-
sets, then the Green plane StripOff-
sets, then the Blue plane
StripOffsets.
325
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
continuous tone data such as pho-
tographs. BitsPerSample must be
1.
3 = Error Diffused.
The width of the dithering or halfton-
264 0108 CellWidth ing matrix used to create a dithered Baseline
or halftoned bilevel file.
The length of the dithering or
265 0109 CellLength halftoning matrix used to create a Baseline
dithered or halftoned bilevel file.
The logical order of bits within a
266 010A FillOrder Baseline
byte.
The name of the document from
269 010D DocumentName Extended
which this image was scanned.
A string that describes the subject
of the image. For example, a user
270 010E ImageDescription may wish to attach a comment Baseline
such as "1988 company picnic" to
an image.
Manufacturer of the scanner, video
271 010F Make digitizer. Baseline
Mandatory for TIFF/EP.
The model name/number of the
scanner, video digitizer. This tag is
272 0110 Model intended for user information only Baseline
so format is arbitrary.
326
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
hand side.
327
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
grayscale, and palette color
images. SamplesPerPixel is 3 for
RGB images.
The number of rows per strip. The
image data is organized into strips
for fast access to individual rows
when the data is compressed -
though this field is valid even if the
278 0116 RowsPerStrip data is not compressed. Baseline
328
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
the columns for row 0 are stored
first, followed by the columns of
row 1, and so on.) Pho-
tometricInterpretation describes
the type of data that is stored in
each sample plane. For example,
RGB data is stored with the Red
samples in one sample plane, the
Green in another,and the Blue in
another.
If SamplesPerPixel is 1,
PlanarConfiguration is irrelevant,
and should not be included.
The default is 1.
The name of the page from which
285 011D PageName Extended
this image was scanned.
The X offset of the left side of the
286 011E XPosition image, with respect to the left side Extended
of the page, in ResolutionUnits.
The Y offset of the top of the
image, with respect to the top of
the page, in ResolutionUnits. In the
287 011F YPosition Extended
TIFF oordinate scheme, the pos-
itive Y direction is down, so that
YPosition is always positive.
For each string of contiguous
288 0120 FreeOffsets unused bytes in a TIFF file, the Baseline
byte offset of the string.
For each string of contiguous
289 0121 FreeByteCounts unused bytes in a TIFF file, the Baseline
number of bytes in the string.
The precision of the information
contained in the GrayRe-
sponseCurve.
329
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
sandths of a unit.
1 - Image is uncompressed
330
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
encoded as if it were a separate
image. In particular, each strip
begins on a byte boundary; and the
coding for the first row of a strip is
encoded independently of the pre-
vious row, using horizontal codes,
as if the previous row is entirely
white. Each strip ends with the 24-
bit end-of-facsimile block (EOFB).
Bit map:
0 - reserved (unused)
2-31 - reserved
To be used with XResolution and
YResolution.
2 = Inch.
3 = Centimeter.
The default is 2.
This tag is used to specify page
numbers of a multiple page (e.g.
facsimile) document. Two word val-
297 0129 PageNumber Extended
ues are specified. The first value is
the page number; the second value
is the total number of pages in the
331
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
document. Note that pages need
not appear in numerical order. The
first page is 0 (zero).
Describes a transfer function for
301 012D TransferFunction Extended
the image in tabular style.
Name and release number of the
305 0131 Software software package that created the Baseline
image. User information only.
Date and time of image creation.
Uses the format "YYYY:MM:DD
HH:MM:SS", with hours on a 24-
306 0132 DateTime hour clock, and one space char- Baseline
acter between the date and the
time. The length of the string,
including the null, is 20 bytes.
Person who created the image.
315 013B Artist Baseline
Copyright notice.
The computer and/or operating sys-
tem in use at the time of image cre-
316 013C HostComputer ation. Baseline
ENIAC.
A mathematical operator that is
applied to the image data before an
encoding scheme is applied.
2 = Horizontal differencing.
Gives TIFF color image readers a
better idea of what kind of color
image it is. There will be borderline
cases.
332
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
The default value is 1.
A list of colors that are used in this
image. Use of this field is only prac-
tical for images containing a greatly
restricted (usually less than or
equal to 256) range of colors. Col-
orImageType should be 2. See Col-
orImageType.
319 013F ColorList The list is organized as an array of Extended
RGB triplets, with no pad. The
RGB triplets are not guaranteed to
be in any particular order. Note that
the red, green, and blue com-
ponents can either be a BYTE or a
word in length. BYTE should be suf-
ficient for most applications.
This tag defines a Red-Green-Blue
color map for palette color images.
The palette color pixel value is
used to index into all 3 subcurves.
The subcurves are stored sequen-
tially. The Red entries come first,
followed by the Green entries, fol-
320 0140 ColorMap lowed by the Blue entries. The Baseline
width of each entry is 16 bits, as
implied by the type of word. 0 rep-
resents the minimum intensity, and
65535 represents the maximum
intensity.
333
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
pressed) bytes in that tile.
Used in the TIFF-F standard,
denotes the number of 'bad' scan
326 0146 BadFaxLines Extended
lines encountered by the facsimile
device.
Used in the TIFF-F standard, indic-
ates if 'bad' lines encountered dur-
327 0147 CleanFaxData ing reception are stored in the data, Extended
or if 'bad' lines have been replaced
by the receiver.
Used in the TIFF-F standard,
denotes the maximum number of
328 0148 ConsecutiveBadFaxLines Extended
consecutive 'bad' scanlines
received.
330 014A SubIFDs Offset to child IFDs. Extended
The set of inks used in a separated
332 014C InkSet (PhotometricInterpretation=5) Extended
image.
The name of each ink used in a sep-
333 014D InkNames Extended
arated image.
334 014E NumberOfInks The number of inks. Extended
The component values that cor-
336 0150 DotRange Extended
respond to a 0% dot and 100% dot.
A description of the printing envir-
337 0151 TargetPrinter onment for which this separation is Extended
intended.
338 0152 ExtraSamples Description of extra components. Baseline
Specifies how to interpret each
339 0153 SampleFormat Extended
data sample in a pixel.
Specifies the minimum sample
340 0154 SMinSampleValue Extended
value.
Specifies the maximum sample
341 0155 SMaxSampleValue Extended
value.
Expands the range of the Trans-
342 0156 TransferRange Extended
ferFunction.
Mirrors the essentials of
343 0157 ClipPath PostScript's path creation func- Extended
tionality.
The number of units that span the
344 0158 XClipPathUnits width of the image, in terms of Extended
integer ClipPath coordinates.
The number of units that span the
345 0159 YClipPathUnits height of the image, in terms of Extended
integer ClipPath coordinates.
334
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
Aims to broaden the support for
346 015A Indexed indexed images to include support Extended
for any color space.
JPEG quantization and/or Huffman
347 015B JPEGTables Extended
tables.
351 015F OPIProxy OPI-related. Extended
Used in the TIFF-FX standard to
point to an IFD containing tags that
400 0190 GlobalParametersIFD Extended
are globally applicable to the com-
plete TIFF file.
Used in the TIFF-FX standard,
401 0191 ProfileType denotes the type of data stored in Extended
this file or IFD.
Used in the TIFF-FX standard,
402 0192 FaxProfile denotes the 'profile' that applies to Extended
this file.
Used in the TIFF-FX standard,
403 0193 CodingMethods indicates which coding methods Extended
are used in the file.
Used in the TIFF-FX standard,
404 0194 VersionYear denotes the year of the standard Extended
specified by the FaxProfile field.
Used in the TIFF-FX standard,
405 0195 ModeNumber denotes the mode of the standard Extended
specified by the FaxProfile field.
Used in the TIFF-F and TIFF-FX
standards, holds information about
433 01B1 Decode the ITULAB (Pho- Extended
tometricInterpretation = 10) encod-
ing.
Defined in the Mixed Raster Con-
tent part of RFC 2301, is the
434 01B2 DefaultImageColor Extended
default color needed in areas where
no image is available.
Old-style JPEG compression field.
512 0200 JPEGProc TechNote2 invalidates this part of Extended
the specification.
Old-style JPEG compression field.
513 0201 JPEGInterchangeFormat TechNote2 invalidates this part of Extended
the specification.
Old-style JPEG compression field.
514 0202 JPEGInterchangeFormatLength TechNote2 invalidates this part of Extended
the specification.
515 0203 JPEGRestartInterval Old-style JPEG compression field. Extended
335
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
TechNote2 invalidates this part of
the specification.
Old-style JPEG compression field.
517 0205 JPEGLosslessPredictors TechNote2 invalidates this part of Extended
the specification.
Old-style JPEG compression field.
518 0206 JPEGPointTransforms TechNote2 invalidates this part of Extended
the specification.
Old-style JPEG compression field.
519 0207 JPEGQTables TechNote2 invalidates this part of Extended
the specification.
Old-style JPEG compression field.
520 0208 JPEGDCTables TechNote2 invalidates this part of Extended
the specification.
Old-style JPEG compression field.
521 0209 JPEGACTables TechNote2 invalidates this part of Extended
the specification.
The transformation from RGB to
YCbCr image data.
529 0211 YCbCrCoefficients Extended
Mandatory for TIFF/EP YCbCr
images.
Specifies the subsampling factors
530 0212 YCbCrSubSampling used for the chrominance com- Extended
ponents of a YCbCr image.
Specifies the positioning of sub-
531 0213 YCbCrPositioning sampled chrominance components Extended
relative to luminance samples.
Specifies a pair of headroom and
532 0214 ReferenceBlackWhite footroom image data values Extended
(codes) for each pixel component.
Defined in the Mixed Raster Con-
tent part of RFC 2301, used to
559 022F StripRowCounts Extended
replace RowsPerStrip for IFDs
with variable-sized strips.
XML packet containing XMP
700 02BC XMP Extended
metadata
32781 800D ImageID OPI-related. Extended
Annotation data, as used in 'Ima-
32932 80A4 Wang Annotation Private
ging for Windows.
For camera raw files from sensors TIFF/EP
33421 828D CFARepeatPatternDim
with CFA overlay. spec, p. 23
For camera raw files from sensors TIFF/EP
33422 828E CFAPattern
with CFA overlay. spec, p. 23
33423 828F BatteryLevel Encodes camera battery level at TIFF/EP
336
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
time of image capture. spec, p. 45
33432 8298 Copyright Copyright notice. Baseline
Exif Private
IFD
33434 829A ExposureTime Exposure time given in seconds.
TIFF/EP
spec, p. 38
Exif Private
IFD
33437 829D FNumber The F number.
TIFF/EP
spec, p. 39
Specifies the pixel data format
33445 82A5 MD FileTag encoding in the Molecular Dynam- Private
ics GEL file format.
Specifies a scale factor in the
33446 82A6 MD ScalePixel Molecular Dynamics GEL file Private
format.
Used to specify the conversion
33447 82A7 MD ColorTable from 16bit to 8bit in the Molecular Private
Dynamics GEL file format.
Name of the lab that scanned this
33448 82A8 MD LabName file, as used in the Molecular Private
Dynamics GEL file format.
Information about the sample, as
33449 82A9 MD SampleInfo used in the Molecular Dynamics Private
GEL file format.
Date the sample was prepared, as
33450 82AA MD PrepDate used in the Molecular Dynamics Private
GEL file format.
Time the sample was prepared, as
33451 82AB MD PrepTime used in the Molecular Dynamics Private
GEL file format.
Units for data in this file, as used in
33452 82AC MD FileUnits the Molecular Dynamics GEL file Private
format.
Used in interchangeable GeoTIFF_
33550 830E ModelPixelScaleTag Private
1_0 files.
IPTC-NAA (International Press
Telecommunications Council- TIFF/EP
33723 83BB IPTC/NAA
Newspaper Association of Amer- spec, p. 33
ica) metadata.
Intergraph Application specific stor-
33918 847E INGR Packet Data Tag Private
age.
33919 847F INGR Flag Registers Intergraph Application specific Private
337
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
flags.
Originally part of Intergraph's
33920 8480 IrasB Transformation Matrix GeoTIFF tags, but likely under- Private
stood by IrasB only.
Originally part of Intergraph's
GeoTIFF tags, but now used in
interchangeable GeoTIFF_1_0
33922 8482 ModelTiepointTag Private
files. In GeoTIFF_1_0, either this
tag or 34264 must be defined, but
not both
TIFF/IT
34016 Site Site where image created.
spec, 7.2.3
TIFF/IT
Sequence of colors if other than
34017 ColorSequence spec,
CMYK.
7.2.8.3.2
TIFF/IT
34018 IT8Header Certain inherited headers.
spec, 7.2.3
TIFF/IT
34019 RasterPadding Type of raster padding used, if any.
spec, 7.2.6
Number of bits for short run length TIFF/IT
34020 BitsPerRunLength
encoding. spec, 7.2.6
Number of bits for long run length TIFF/IT
34021 BitsPerExtendedRunLength
encoding. spec, 7.2.6
TIFF/IT
34022 ColorTable Color value in a color pallette. spec,
7.2.8.4
Indicates if image (foreground) TIFF/IT
34023 ImageColorIndicator
color or transparency is specified. spec, 7.2.9
TIFF/IT
34024 BackgroundColorIndicator Background color specification.
spec, 7.2.9
TIFF/IT
34025 ImageColorValue Specifies image (foreground) color. spec,
7.2.8.4
TIFF/IT
34026 BackgroundColorValue Specifies background color. spec,
7.2.8.4
TIFF/IT
Specifies data values for 0 percent
34027 PixelIntensityRange spec,
and 100 percent pixel intensity.
7.2.8.4
TIFF/IT
Specifies if transparency is used in
34028 TransparencyIndicator spec,
HC file.
7.2.8.4
Specifies ASCII table or other ref- TIFF/IT
34029 ColorCharacterization
erence per ISO 12641 and ISO spec,
338
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
12642. 7.2.8.4
Indicates the type of information in TIFF/IT
34030 HCUsage
an HC file. spec, 7.2.6
Indicates whether or not trapping TIFF/IT
34031 TrapIndicator
has been applied to the file. spec, 7.2.6
TIFF/IT
Specifies CMYK equivalent for spe-
34032 CMYKEquivalent spec,
cific separations.
7.2.8.3.4
TIFF/IT
34033 Reserved For future TIFF/IT use
spec
TIFF/IT
34034 Reserved For future TIFF/IT use
spec
TIFF/IT
34035 Reserved For future TIFF/IT use
spec
Used in interchangeable GeoTIFF_
1_0 files. In GeoTIFF_1_0, either
34264 85D8 ModelTransformationTag Private
this tag or 33922 must be defined,
but not both
Collection of Photoshop 'Image
34377 8649 Photoshop Private
Resource Blocks.
34665 8769 Exif IFD A pointer to the Exif IFD. Private
TIFF/EP
34675 8773 InterColorProfile ICC profile data.
spec, p. 47
Defined in the Mixed Raster Con-
tent part of RFC 2301, used to
34732 87AC ImageLayer denote the particular function of Extended
this Image in the mixed raster
scheme.
Used in interchangeable GeoTIFF_
34735 87AF GeoKeyDirectoryTag 1_0 files. Mandatory in GeoTIFF_ Private
1_0.
Used in interchangeable GeoTIFF_
34736 87B0 GeoDoubleParamsTag Private
1_0 files.
Used in interchangeable GeoTIFF_
34737 87B1 GeoAsciiParamsTag Private
1_0 files.
Exif Private
The class of the program used by IFD
34850 8822 ExposureProgram the camera to set exposure when
the picture is taken. TIFF/EP
spec, p. 41
Exif Private
Indicates the spectral sensitivity of IFD
34852 8824 SpectralSensitivity
each channel of the camera used. TIFF/EP
spec, p. 48
339
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
A pointer to the Exif-related GPS TIFF/EP
34853 8825 GPSInfo
Info IFD. spec, p. 34
Exif Private
Indicates the ISO Speed and ISO IFD
34855 8827 ISOSpeedRatings Latitude of the camera or input
device as specified in ISO 12232. TIFF/EP
spec, p. 47
Exif Private
Indicates the Opto-Electric Con- IFD
34856 8828 OECF version Function (OECF) specified
in ISO 14524. TIFF/EP
spec, p. 48
Indicates the field number of mul- TIFF/EP
34857 8829 Interlace
tifield images. spec, p. 22
Encodes time zone of camera TIFF/EP
34858 882A TimeZoneOffset
clock relative to GMT. spec, p. 38
Number of seconds image capture TIFF/EP
34859 882B SelfTimeMode
was delayed from button press. spec, p. 45
34908 885C HylaFAX FaxRecvParams Used by HylaFAX. Private
34909 885D HylaFAX FaxSubAddress Used by HylaFAX. Private
34910 885E HylaFAX FaxRecvTime Used by HylaFAX. Private
The version of the supported Exif
Exif Private
36864 9000 ExifVersion standard. Mandatory in the Exif
IFD
IFD.
Exif Private
The date and time when the original IFD
36867 9003 DateTimeOriginal image data was generated. Man-
datory for TIFF/EP. TIFF/EP
spec, p. 37
The date and time when the image Exif Private
36868 9004 DateTimeDigitized
was stored as digital data. IFD
Specific to compressed data; spe-
cifies the channels and com- Exif Private
37121 9101 ComponentsConfiguration
plements IFD
PhotometricInterpretation
Exif Private
Specific to compressed data; IFD
37122 9102 CompressedBitsPerPixel states the compressed bits per
pixel. TIFF/EP
spec, p. 27
Exif Private
IFD
37377 9201 ShutterSpeedValue Shutter speed.
TIFF/EP
spec, p. 39
Exif Private
37378 9202 ApertureValue The lens aperture.
IFD
340
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
TIFF/EP
spec, p. 39
Exif Private
IFD
37379 9203 BrightnessValue The value of brightness.
TIFF/EP
spec, p. 40
Exif Private
IFD
37380 9204 ExposureBiasValue The exposure bias.
TIFF/EP
spec, p. 40
Exif Private
IFD
37381 9205 MaxApertureValue The smallest F number of the lens.
TIFF/EP
spec, p. 40
Exif Private
The distance to the subject, given IFD
37382 9206 SubjectDistance
in meters. TIFF/EP
spec, p. 44
Exif Private
IFD
37383 9207 MeteringMode The metering mode.
TIFF/EP
spec, p. 41
Exif Private
IFD
37384 9208 LightSource The kind of light source.
TIFF/EP
spec, p. 46
Exif Private
Indicates the status of flash when IFD
37385 9209 Flash
the image was shot. TIFF/EP
spec, p. 42
Exif Private
The actual focal length of the lens, IFD
37386 920A FocalLength
in mm. TIFF/EP
spec, p. 44
TIFF/EP
37387 920B FlashEnergy Amount of flash energy (BCPS).
spec, p. 43
TIFF/EP
37388 920C SpatialFrequencyResponse SFR of the camera.
spec, p. 49
TIFF/EP
37389 920D Noise Noise measurement values.
spec, p. 49
341
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
Number of pixels per
FocalPlaneResolutionUnit (37392) TIFF/EP
37390 920E FocalPlaneXResolution
in ImageWidth direction for main spec, p. 18
image.
Number of pixels per
FocalPlaneResolutionUnit (37392) TIFF/EP
37391 920F FocalPlaneYResolution
in ImageLength direction for main spec, p. 19
image.
Unit of measurement for
FocalPlaneXResolution(37390) TIFF/EP
37392 9210 FocalPlaneResolutionUnit
and FocalPlaneYResolution spec, p. 19
(37391).
Number assigned to an image, TIFF/EP
37393 9211 ImageNumber
e.g., in a chained image burst. spec, p. 32
Security classification assigned to TIFF/EP
37394 9212 SecurityClassification
the image. spec, p. 33
Record of what has been done to TIFF/EP
37395 9213 ImageHistory
the image. spec, p. 33
Exif Private
Indicates the location and area of IFD
37396 9214 SubjectLocation the main subject in the overall
scene. TIFF/EP
spec, p. 45
Encodes the camera exposure
TIFF/EP
37397 9215 ExposureIndex index setting when image was cap-
spec, p. 47
tured.
For current spec, tag value equals
1 0 0 0. TIFF/EP
37398 9216 TIFF/EPStandardID
spec, p. 16
Mandatory in TIFF/EP.
Type of image sensor. TIFF/EP
37399 9217 SensingMethod
Mandatory in TIFF/EP. spec, p. 22
Exif Private
37500 927C MakerNote Manufacturer specific information.
IFD
Keywords or comments on the
Exif Private
37510 9286 UserComment image; complements ImageDe-
IFD
scription.
A tag used to record fractions of Exif Private
37520 9290 SubsecTime
seconds for the DateTime tag. IFD
A tag used to record fractions of
Exif Private
37521 9291 SubsecTimeOriginal seconds for the DateTimeOriginal
IFD
tag.
A tag used to record fractions of
Exif Private
37522 9292 SubsecTimeDigitized seconds for the DateTimeDigitized
IFD
tag.
342
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
37724 935C ImageSourceData Used by Adobe Photoshop. Private
The Flashpix format version sup-
ported by a FPXR file., Exif Private
40960 A000 FlashpixVersion
IFD
Mandatory in the Exif IFD
The color space information tag is
always recorded as the color space Exif Private
40961 A001 ColorSpace specifier. IFD
Mandatory in the Exif IFD.
Specific to compressed data; the
Exif Private
40962 A002 PixelXDimension valid width of the meaningful
IFD
image.
Specific to compressed data; the
Exif Private
40963 A003 PixelYDimension valid height of the meaningful
IFD
image.
Used to record the name of an Exif Private
40964 A004 RelatedSoundFile
audio file related to the image data. IFD
A pointer to the Exif-related Inter-
40965 A005 Interoperability IFD Private
operability IFD.
Indicates the strobe energy at the
time the image is captured, as Exif Private
41483 A20B FlashEnergy
measured in Beam Candle Power IFD
Seconds
Records the camera or input
device spatial frequency table and
SFR values in the direction of Exif Private
41484 A20C SpatialFrequencyResponse
image width, image height, and IFD
diagonal direction, as specified in
ISO 12233.
Indicates the number of pixels in
the image width (X) direction per Exif Private
41486 A20E FocalPlaneXResolution
FocalPlaneResolutionUnit on the IFD
camera focal plane.
Indicates the number of pixels in
the image height (Y) direction per Exif Private
41487 A20F FocalPlaneYResolution
FocalPlaneResolutionUnit on the IFD
camera focal plane.
Indicates the unit for measuring
Exif Private
41488 A210 FocalPlaneResolutionUnit FocalPlaneXResolution and
IFD
FocalPlaneYResolution.
Indicates the location of the main Exif Private
41492 A214 SubjectLocation
subject in the scene. IFD
Indicates the exposure index selec-Exif Private
41493 A215 ExposureIndex
ted on the camera or input device IFD
343
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
at the time the image is captured.
Indicates the image sensor type on Exif Private
41495 A217 SensingMethod
the camera or input device. IFD
Exif Private
41728 A300 FileSource Indicates the image source.
IFD
Exif Private
41729 A301 SceneType Indicates the image source.
IFD
Indicates the color filter array
(CFA) geometric pattern of the Exif Private
41730 A302 CFAPattern
image sensor when a one-chip IFD
color area sensor is used.
Indicates the use of special pro-
Exif Private
41985 A401 CustomRendered cessing on image data, such as
IFD
rendering geared to output.
Indicates the exposure mode set Exif Private
41986 A402 ExposureMode
when the image was shot. IFD
Indicates the white balance mode Exif Private
41987 A403 WhiteBalance
set when the image was shot. IFD
Indicates the digital zoom ratio Exif Private
41988 A404 DigitalZoomRatio
when the image was shot. IFD
Indicates the equivalent focal
Exif Private
41989 A405 FocalLengthIn35mmFilm length assuming a 35mm film cam-
IFD
era, in mm.
Indicates the type of scene that Exif Private
41990 A406 SceneCaptureType
was shot. IFD
Indicates the degree of overall Exif Private
41991 A407 GainControl
image gain adjustment. IFD
Indicates the direction of contrast
Exif Private
41992 A408 Contrast processing applied by the camera
IFD
when the image was shot.
Indicates the direction of saturation
Exif Private
41993 A409 Saturation processing applied by the camera
IFD
when the image was shot.
Indicates the direction of sharp-
Exif Private
41994 A40A Sharpness ness processing applied by the
IFD
camera when the image was shot.
This tag indicates information on
Exif Private
41995 A40B DeviceSettingDescription the picture-taking conditions of a
IFD
particular camera model.
Indicates the distance to the sub- Exif Private
41996 A40C SubjectDistanceRange
ject. IFD
Indicates an identifier assigned Exif Private
42016 A420 ImageUniqueID
uniquely to each image. IFD
42112 A480 GDAL_METADATA Used by the GDAL library, holds an Private
344
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
XML list of name=value 'metadata'
values about the image as a whole,
and about specific samples.
Used by the GDAL library, con-
42113 A481 GDAL_NODATA tains an ASCII encoded nodata or Private
background pixel value.
A 128-bit Globally Unique Identifier HD Photo
48129 BC01 PixelFormat (GUID) that identifies the image Feature
pixel format. Spec, p. 17
Specifies the transformation to be
HD Photo
applied when decoding the image
48130 BC02 Transformation Feature
to present the desired rep-
Spec, p. 23
resentation.
HD Photo
Specifies that image data is uncom-
48131 BC03 Uncompressed Feature
pressed.
Spec, p. 23
Specifies the image type of each HD Photo
48132 BC04 ImageType individual frame in a multi-frame Feature
file. Spec, p. 27
The image's width, in pixels (X:ho- HD Photo
48256 BC80 ImageWidth rizontal). The number of columns in Feature
the image. Spec, p. 21
Specifies the number of pixels or HD Photo
48257 BC81 ImageHeight scan lines in the transformed Feature
photo. Spec, p. 21
Specifies the horizontal resolution HD Photo
48258 BC82 WidthResolution of a transformed image expressed Feature
in pixels per inch. Spec, p. 21
Specifies the vertical resolution of HD Photo
48259 BC83 HeightResolution a transformed image expressed in Feature
pixels per inch. Spec, p. 21
Specifies the byte offset pointer to HD Photo
48320 BCC0 ImageOffset the beginning of the photo data, rel- Feature
ative to the beginning of the file. Spec, p. 22
HD Photo
Specifies the size of the photo in
48321 BCC1 ImageByteCount Feature
bytes.
Spec, p. 22
Specifies the byte offset pointer
HD Photo
the beginning of the planar alpha
48322 BCC2 AlphaOffset Feature
channel data, relative to the begin-
Spec, p. 22
ning of the file.
HD Photo
Specifies the size of the alpha
48323 BCC3 AlphaByteCount Feature
channel data in bytes.
Spec, p. 23
345
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
Signifies the level of data that has
HD Photo
been discarded from the image as
48324 BCC4 ImageDataDiscard Feature
a result of a compressed domain
Spec, p. 25
transcode to reduce the file size.
Signifies the level of data that has
been discarded from the planar HD Photo
48325 BCC5 AlphaDataDiscard alpha channel as a result of a com- Feature
pressed domain transcode to Spec, p. 26
reduce the file size.
Specifies the image type of each HD Photo
48132 BC04 ImageType individual frame in a multi-frame Feature
file. Spec, p. 27
50215 C427 Oce Scanjob Description Used in the Oce scanning process. Private
50216 C428 Oce Application Selector Used in the Oce scanning process. Private
50217 C429 Oce Identification Number Used in the Oce scanning process. Private
Oce ImageLogic Char-
50218 C42A Used in the Oce scanning process. Private
acteristics
Encodes DNG four-tier version
number; for version 1.1.0.0, the tag DNG spec,
50706 C612 DNGVersion
contains the bytes 1, 1, 0, 0. Used p. 17
in IFD 0 of DNG files.
Defines oldest version of spec with
DNG spec,
50707 C613 DNGBackwardVersion which file is compatible. Used in
p. 17
IFD 0 of DNG files.
Unique, non-localized nbame for
DNG spec,
50708 C614 UniqueCameraModel camera model. Used in IFD 0 of
p. 18
DNG files.
Similar to 50708, with localized
DNG spec,
50709 C615 LocalizedCameraModel camera name. Used in IFD 0 of
p. 19
DNG files.
Mapping between values in the
CFAPattern tag and the plane num-
bers in LinearRaw space. Used in DNG spec,
50710 C616 CFAPlaneColor Raw IFD of DNG files. p. 19
Required for non-RGB CFA
images.
Spatial layout of the CFA. Used in DNG spec,
50711 C617 CFALayout
Raw IFD of DNG files. p. 20
Lookup table that maps stored val-
DNG spec,
50712 C618 LinearizationTable ues to linear values. Used in Raw
p. 20
IFD of DNG files.
Repeat pattern size for BlackLevel
DNG spec,
50713 C619 BlackLevelRepeatDim tag. Used in Raw IFD of DNG
p. 21
files.
346
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
Specifies the zero light encoding
DNG spec,
50714 C61A BlackLevel level.Used in Raw IFD of DNG
p. 21
files.
Specifies the difference between
zero light encoding level for each
DNG spec,
50715 C61B BlackLevelDeltaH column and the baseline zero light
p. 22
encoding level. Used in Raw IFD
of DNG files.
Specifies the difference between
zero light encoding level for each
DNG spec,
50716 C61C BlackLevelDeltaV row and the baseline zero light
p. 23
encoding level. Used in Raw IFD
of DNG files.
Specifies the fully saturated encod-
DNG spec,
50717 C61D WhiteLevel ing level for the raw sample values.
p. 23
Used in Raw IFD of DNG files.
For cameras with non-square
pixels, specifies the default scale
DNG spec,
50718 C61E DefaultScale factors for each direction to convert
p. 24
the image to square pixels. Used in
Raw IFD of DNG files.
Specifies the origin of the final
image area, ignoring the extra
DNG spec,
50719 C61F DefaultCropOrigin pixels at edges used to prevent
p. 25
interpolation artifacts. Used in Raw
IFD of DNG files.
Specifies size of final image area in
DNG spec,
50720 C620 DefaultCropSize raw image coordinates. Used in
p. 25
Raw IFD of DNG files.
Defines a transformation matrix
that converts XYZ values to ref-
erence camera native color space DNG spec,
50721 C621 ColorMatrix1
values, under the first calibration p. 27
illuminant. Used in IFD 0 of DNG
files.
Defines a transformation matrix
that converts XYZ values to ref-
erence camera native color space DNG spec,
50722 C622 ColorMatrix2
values, under the second cal- p. 28
ibration illuminant. Used in IFD 0 of
DNG files.
Defines a calibration matrix that
transforms reference camera nat- DNG spec,
50723 C623 CameraCalibration1
ive space values to individual cam- p. 28
era native space values under the
347
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
first calibration illuminant. Used in
IFD 0 of DNG files.
Defines a calibration matrix that
transforms reference camera nat-
ive space values to individual cam- DNG spec,
50724 C624 CameraCalibration2
era native space values under the p. 29
second calibration illuminant. Used
in IFD 0 of DNG files.
Defines a dimensionality reduction
matrix for use as the first stage in
converting color camera native DNG spec,
50725 C625 ReductionMatrix1
space values to XYZ values, under p. 30
the first calibration illuminant. Used
in IFD 0 of DNG files.
Defines a dimensionality reduction
matrix for use as the first stage in
converting color camera native DNG spec,
50726 C626 ReductionMatrix2
space values to XYZ values, under p. 30
the second calibration illuminant.
Used in IFD 0 of DNG files.
Pertaining to white balance,
defines the gain, either analog or
DNG spec,
50727 C627 AnalogBalance digital, that has been applied to the
p. 31
stored raw values. Used in IFD 0 of
DNG files.
Specifies the selected white bal-
ance at the time of capture,
encoded as the coordinates of a DNG spec,
50728 C628 AsShotNeutral
perfectly neutral color in linear ref- p. 31
erence space values. Used in IFD
0 of DNG files.
Specifies the selected white bal-
ance at the time of capture,
DNG spec,
50729 C629 AsShotWhiteXY encoded as x-y chromaticity
p. 32
coordinates. Used in IFD 0 of DNG
files.
Specifies in EV units how much to
move the zero point for exposure DNG spec,
50730 C62A BaselineExposure
compensation. Used in IFD 0 of p. 32
DNG files.
Specifies the relative noise of the
camera model at a baseline ISO
DNG spec,
50731 C62B BaselineNoise value of 100, compared to ref-
p. 33
erence camera model. Used in IFD
0 of DNG files.
348
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
Specifies the relative amount of
sharpening required for this camera
DNG spec,
50732 C62C BaselineSharpness model, compared to reference cam-
p. 33
era model. Used in IFD 0 of DNG
files.
For CFA images, specifies, in arbit-
rary units, how closely the values
of the green pixels in the blue/green DNG spec,
50733 C62D BayerGreenSplit
rows track the values of the green p. 34
pixels in the red/green rows. Used
in Raw IFD of DNG files.
Specifies the fraction of the encod-
ing range above which the
DNG spec,
50734 C62E LinearResponseLimit response may become sig-
p. 34
nificantly non-linear. Used in IFD 0
of DNG files.
Serial number of camera. Used in DNG spec,
50735 C62F CameraSerialNumber
IFD 0 of DNG files. p. 35
Information about the lens. Used in DNG spec,
50736 C630 LensInfo
IFD 0 of DNG files. p. 35
Normally for non-CFA images,
provides a hint about how much DNG spec,
50737 C631 ChromaBlurRadius
chroma blur ought to be applied. p. 36
Used in Raw IFD of DNG files.
Provides a hint about the strength
DNG spec,
50738 C632 AntiAliasStrength of the camera's anti-aliasing filter.
p. 36
Used in Raw IFD of DNG files.
Used by Adobe Camera Raw to
DNG spec,
50739 ShadowScale control sensitivity of its shadows
p. 38
slider. Used in IFD 0 of DNG files.
Provides a way for camera man-
ufacturers to store private data in
DNG spec,
50740 C634 DNGPrivateData DNG files for use by their own raw
p. 37
convertors. Used in IFD 0 of DNG
files.
Lets the DNG reader know whether
the Exif MakerNote tag is safe to DNG spec,
50741 C635 MakerNoteSafety
preserve. Used in IFD 0 of DNG p. 38
files.
Illuminant used for first set of cal-
DNG spec,
50778 C65A CalibrationIlluminant1 ibration tags. Used in IFD 0 of
p. 26
DNG files.
Illuminant used for second set of
DNG spec,
50779 C65B CalibrationIlluminant2 calibration tags. Used in IFD 0 of
p. 26
DNG files.
349
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
Specifies the amount by which the
values of the DefaultScale tag
DNG spec,
50780 C65C BestQualityScale need to be multiplied to achieve
p. 24
best quality image size. Used in
Raw IFD of DNG files.
Contains a 16-byte unique identifier
DNG spec,
50781 RawDataUniqueID for the raw image file in the DNG
p. 39
file. Used in IFD 0 of DNG files.
Alias Sketchbook Pro layer usage
50784 C660 Alias Layer Metadata Private
description.
Name of original file if the DNG file
results from conversion from a non- DNG spec,
50827 OriginalRawFileName
DNG raw file. Used in IFD 0 of p. 39
DNG files.
If the DNG file was converted from
a non-DNG raw file, then this tag DNG spec,
50828 OriginalRawFileData
contains the original raw data. p. 40
Used in IFD 0 of DNG files.
Defines the active (non-masked)
DNG spec,
50829 ActiveArea pixels of the sensor. Used in Raw
p. 41
IFD of DNG files.
List of non-overlapping rectangle
coordinates of fully masked pixels,
which can optimally be used by DNG spec,
50830 MaskedAreas
DNG readers to measure the black p. 42
encoding level. Used in Raw IFD
of DNG files.
Contains ICC profile that, in con-
junction with the AsShotPrePro-
fileMatrix tag, specifies a default
color rendering from camera color DNG spec,
50831 AsShotICCProfile
space coordinates (linear reference p. 42
values) into the ICC profile con-
nection space. Used in IFD 0 of
DNG files.
Specifies a matrix that should be
applied to the camera color space
coordinates before processing the DNG spec,
50832 AsShotPreProfileMatrix
values through the ICC profile spe- p. 43
cified in the AsShotICCProfile tag.
Used in IFD 0 of DNG files.
The CurrentICCProfile and Cur-
rentPreProfileMatrix tags have the DNG spec,
50833 CurrentICCProfile same purpose and usage as the p. 44
AsShotICCProfile and
350
Appendix D - TIFF Tags
Code Source of
Name Description
Dec Hex Tag
AsShotPreProfileMatrix tag pair,
except they are for use by raw file
editors rather than camera man-
ufacturers. Used in IFD 0 of DNG
files.
The CurrentICCProfile and Cur-
rentPreProfileMatrix tags have the
same purpose and usage as the
AsShotICCProfile and
DNG spec,
50834 CurrentPreProfileMatrix AsShotPreProfileMatrix tag pair,
p. 44
except they are for use by raw file
editors rather than camera man-
ufacturers. Used in IFD 0 of DNG
files.
1Content for base and extended tags used by permission of the author, Max Maischein.
351
Appendix E - Snowbound Error Codes
352
Appendix E - Snowbound Error Codes
353
Appendix E - Snowbound Error Codes
354
Appendix E - Snowbound Error Codes
Error Description
The image in memory cannot
DELETE_ERROR
be removed.
Any problems with displaying
DISPLAY_ERROR an image will return this error
code.
IMAGE_NOT_AVAILABLE No image data is available to
355
Appendix E - Snowbound Error Codes
Error Description
do manipulations on.
This is returned if a parameter
NOT_VALID
passed into an API is not valid.
This is returned if an API
SNOWBND_API_NOT_AVAILABLE method is not implemented in
the current build.
General API error code of an
SNOWBND_ERROR
unsuccessful action.
General API status of a suc-
SNOWBND_OK
cessful action.
This is returned when a Critical
SYSTEM_CRASH
Exception is thrown.
356
Appendix F - Troubleshooting
Appendix F - Troubleshooting
This appendix describes solutions to issues that you may run across when installing and using
RasterMaster DLL.
l
Use the following function prior to decompression to reduce the output dots per inch
(DPI) or bit depth. Please see Chapter 16, Low Level Functions for more detailed inform-
ation.
l
Use one of the following color reduction functions to reduce 8-bit and 24-bit images to
smaller gray scale images. Please see Chapter 12, High Level Functions , Chapter 21,
357
Appendix F - Troubleshooting
Image-Processing Functions and Chapter 22, Bit Depth Conversion Functions for more
detailed information.
IMG_color_gray(int hdib) converts 24-bit color images to 8-bit gray scale images.
Please see IMG_color_gray() for more information.
IMG_resize_to_gray(int imghandle, int hres, int vres) resizes a 1-bit black and
white image to a (smaller) 8-bit grayscale image. Please see IMG_resize_to_gray()
for more information.
If this is a simple bitmap format such as TIFF, you can try adjusting the sharpening, contrast
and brightness. To improve the quality of a 1-bit file format document, first convert it to gray
scale using IMG_promote_8().
If the source image or document is vector or it is composed of text and drawing commands
such as PDF, Word, or AFP, you can set the conversion to be 1-bit or increase the dots per inch
using IMGLOW_set_document_input(Dpi, bits_pix). Please see IMGLOW_set_document_
input() for more information.
Please note that a higher resolution will almost always yield a better quality conversion but will
probably result in a larger output file size.
Also it is common to convert to TIFF_G4. This is a 1-bit per pixel format. Make sure that if you
are converting from a color image, that it is mostly text. There will be a noticeable loss in quality
for pictures or color graphics such as logos when converting a color image to a 1-bit per pixel
format. Text will usually work well.
If your document requires color, then try saving to a color output format such as TIFF_Packbits,
TIFF_ JPEG or TIFF_LZW.
The output quality of your output document may be much lower than the original document if
you convert a high quality image to a low quality output such as TIFF_G4_FAX. Please see the
following suggestions to improve the quality of the output document:
Choose a different output format such as TIFF_LZW to produce an output document with suf-
ficient pixel depth. Appendix A, Supported File Formats shows a list of file formats and their sup-
ported bit depths.
358
Appendix F - Troubleshooting
l
Use the following function prior to decompression to reduce the output dots per inch
(DPI) or bit depth. Please see Chapter 16, Low Level Functions for more detailed inform-
ation.
l
Use the color promotion function, IMG_promote_24(), to promote 1-bit, 4-bit and 8-bit
images to 24-bit images. Please see Chapter 14, Image Management Functions for
more detailed information.
Improving Performance
The more colors there are in the input or output image, the bigger the file and the slower the pro-
cessing speed. To reduce the number of colors and improve performance, reduce the bit depth
(bits per pixel) value to grayscale (8-bit) or black and white (1-bit).
l
Use one of the following color reduction functions to reduce 8-bit and 24-bit images to
smaller gray scale images. Please see Chapter 12, High Level Functions, Chapter 21,
Image-Processing Functions, and Chapter 22, Bit Depth Conversion Functions for more
detailed information.
IMG_color_gray(int hdib) converts 24-bit color images to 8-bit gray scale images.
Please see IMG_color_gray() for more information.
IMG_resize_to_gray(int imghandle, int hres, int vres) resizes a 1-bit black and
white image to a (smaller) 8-bit grayscale image. Please see IMG_resize_to_gray()
for more information.
Please note that there is always a trade off between performance and quality. To improve per-
formance, the quality of the image may be less. This is true whenever working with any imaging
software.
359
Appendix F - Troubleshooting
l
To improve performance in RasterMaster, consider the input file type. To reduce the res-
olution, reduce the DPI value. If the input file is not a raster image, such as PCL, vector
PDF, Word or Excel, use the following function to set the DPI and bit depth prior to
decompression. Please see Chapter 16, Low-Level Functions for more detailed inform-
ation.
Some PDF document generators do not properly specify all of the information needed in a doc-
ument. To resolve this issue in PDF documents that are generated by custom applications,
open the document in Adobe Acrobat and then save it. You should then be able to process the
newly saved document in RasterMaster.
360
Appendix F - Troubleshooting
This issue typically occurs when the file in question is converted at 1-bit black and white or 8-bit
grayscale, rather than 24-bit color. By default, RasterMaster will often choose 1 bit/pixel to
ensure better performance during conversion. Formats which are converted to 1-bit by default
include AFP, DOC, XLS, and PCL. For these formats, we recommend that you call the
IMGLOW_set_document_input() method prior to decompression if you wish to convert to TIFF_
JPEG. Please see the following example:
status = s.IMGLOW_set_document_input(200, 24, Defines.DOC)
status = s.IMG_decompress_bitmap("C:\\input\\file.doc", page);
status = s.IMG_save_bitmap("C:\\output\\file.tif", Defines.TIFF_JPEG)
In the above example, the input DPI and bit-depth are set to 200 and 24 respectively for the
input DOC file before being converted to TIFF_JPEG.
Please also note that while color input images (e.g. JPEG, TIFF, PNG) will be converted to 24
bits/pixel by default, you still might see this issue for black and white or grayscale input images.
In the case where your input file is a black and white or grayscale image, you can promote the
bit-depth to 24 by calling IMG_promote_24() after decompression. Please see the following
example:
status = s.IMG_decompress_bitmap("C:\\input\\file.png", page);
status = s.IMG_promote_24();
status = s.IMG_save_bitmap("C:\\output\\file.tif", Defines.TIFF_JPEG)
This should produce an output TIFF that can be viewed by most third party image viewers.
If you have a mix of monochrome and color pages that you are converting and saving to another
format, then you may want to use IMGLOW_detect_color() to identify black and white pages
that can safely be converted to a higher performance 1-bit deep format. The color pages should
361
Appendix F - Troubleshooting
be converted to an output format that supports color, such as JPEG. Please see Appendix A,
Supported File Formats for details on which formats support color information at different bit-
depths.
362
Index: -1 error code – -43 error code
363
Index: -44 error code – ASCIICHARSPERLINE
364
Index: ASCIII text format – BMP_UNCOMPRESSED
ASCIITABSTOP 125
B
ASCIITYPEFACE 125
BAD_DISPLAY_AREA error
ASCIIWEIGHT 125 code 352
365
Index: BOM – CXand
CIMS (ABIC)
C
described 283
Callback 310
CLIP
Callback Routines 47
file type 283, 293
CALS
COD
described 282
file type 283, 294
file type 293
color page input 58, 235, 361
CANT_CREATE_FILE error code 352
color page ouput 235, 361
CANT_FIND_TWAIN_DLL error
code 353 color reduction 59
366
Index: DCS – EPS
367
Index: EPS_BITMAP – error code
368
Index: error during conversion – error code
BAD_DISPLAY_AREA 352
369
Index: error during conversion – error code
GENERAL_STATUS.SYSTEM_ OOXML_LICENSE_NOT_
CRASH 355 FOUND 354
370
Index: error during conversion – file type
371
Index: file type constants – Excel
372
Index: file type constants – FILENET
373
Index: files – GlobalLock()
files GENERAL_STATUS.DISPLAY_
ERROR error code 355
redistributed 297
GENERAL_STATUS.IMAGE_NOT_
filters.h 303
AVAILABLE error code 355
Fit 311
GENERAL_STATUS.NOT_VALID
FLASHPIX error code 355
G GIF_INTERLACED
374
Index: GX2 – IMG_autocrop_bitmap
GXandInverted 105
I
GXandReverse 105
ICONTYPE
GXclear 105
file type 285, 293
GXcopy 105
icudt38.dll 303
GXcopyInverted 105
IFF_ILBM
GXequiv 105
file type 285, 293
GXinvert 105
image
GXnoop 105
return orientation 181
GXor 105
rotate 181
GXorInverted 105
Image Compression 56
GXorReverse 105
Image File Directories (IFDs) 320
GXxor 105
Image Processing Functions 188
H IMAGE_NOT_AVAILABLE error
code 355
halftone
IMG
remove 185
file type 285, 293
hole punch
IMG_animate 60
remove 186
IMG_apply_profile 188
HTML
IMG_auto_orient 61
described 284
IMG_auto_orient Function 181
file type 294-295
IMG_autocrop_bitmap 60
375
Index: IMG_bayer_color – IMG_get_bitmap_palette
IMG_create_handle_keep 67 IMG_display_bitmap 77
IMG_create_handle_shell 68 IMG_display_bitmap_aspect 78
IMG_decompress_bitmap 68 IMG_display_bitmap_iac 80
IMG_decompress_bitmap IMG_display_bitmap_transp 81
(java.awt.Image, int) 235, 361
IMG_display_ddb 82
IMG_decompress_bitmap_display 69
IMG_display_ddb_effect 100
IMG_decompress_bitmap_fd 70
IMG_display_fit_to_height 192
IMG_decompress_bitmap_mem 71
IMG_display_fit_to_width 192
IMG_decompress_bitmap_page 72
IMG_erase_rect 82
IMG_decompress_fax_mem 73
IMG_ERR.h 303
IMG_decompress_tiled_bitmap 74
IMG_flip_bitmapx 193
IMG_delete_bitmap 75
IMG_flip_bitmapy 194
IMG_delete_bitmap_keep 76
IMG_get_bitmap_palette 101
376
Index: IMG_get_croprect – IMG_scan_acquire_feeder_fast
IMG_global_set_Xreserved_ IMG_remove_red_eye 85
colors 241
IMG_repaint_scroll 249
IMG_global_set_Xscreen 240
IMG_resize_bitmap 198
IMG_GWorld_to_dib 248
IMG_resize_bitmap_bicubic 199
IMG_halftone_mono 219
IMG_resize_bitmap_interp 200
IMG_histogram_equalize 196
IMG_resize_to_gray 201
IMG_ifl_version 103
IMG_rgb_to_cmyk 201
IMG_ifl_version_ext 103
IMG_rotate_bitmap 202
IMG_import_ascii 126
IMG_runs_to_dib 222
IMG_init_lib 83
IMG_save_bitmap 86
IMG_invert_bitmap 197
IMG_save_bitmap_fd 87
IMG_mediancut_color 219
IMG_save_bitmap_mem 88
IMG_merge_bitmap 104
IMG_save_document 229
IMG_merge_bitmap_alpha 106
IMG_save_document_mem 233
IMG_merge_bitmap_handle 107
IMG_save_mem 89
IMG_octree_color 220
IMG_scan_acquire 92
IMG_popularity_color 221
IMG_scan_acquire_feeder 93
IMG_print_bitmap 84
IMG_scan_acquire_feeder_fast 94
377
Index: IMG_scan_feeder_close – IMGLOW_get_filetype_mem
IMG_scan_pages 95 IMGLOW_decompress_bitmap_
mem 131
IMG_scan_pages_fast 96
IMGLOW_detect_blank_page Func-
IMG_scan_set_cap 97
tion 184
IMG_scan_setup 98
IMGLOW_detect_color 133, 235, 361
IMG_scroll_bitmap 242
IMGLOW_extract_text 134
IMG_set_croprect 112
IMGLOW_extract_text_mem 136, 229
IMG_set_croprect_scroll 251
IMGLOW_get_anim_delay 137
IMG_set_display_angle 114
IMGLOW_get_ascii_attributes 127
IMG_set_encrypt 90
IMGLOW_get_ascii_page 127
IMG_set_gamma 203
IMGLOW_get_auto_detect 206
IMG_set_lut 204
IMGLOW_get_bitmap_header 137
IMG_set_statusbar 115
IMGLOW_get_bitmap_name 138
IMG_sharpen_bitmap 204
IMGLOW_get_custstring 138
IMG_thresh_mono 222
IMGLOW_get_display_rect 139
IMG_unload_lib 90
IMGLOW_get_fileinfo 119
IMG_unload_plugins 91
IMGLOW_get_fileinfo_fd 206
IMG_window_level 205
IMGLOW_get_fileinfo_page 120
IMG_zoom_bitmap 243
IMGLOW_get_filetype 139
IMG_zoom_bitmap_1_to_1 244
IMGLOW_get_filetype_fd 140
IMG_zoom_bitmap_rect 245
IMGLOW_get_filetype_mem 223
Imglib.h 303
378
Index: IMGLOW_get_image_orientation – IMGLOW_set_document_page_size
379
Index: IMGLOW_set_fast_convert – IMGLOW_set_tiff_tag
IMGLOW_set_html_image_ IMGLOW_set_ooxml_license_file-
capability 168 name Function 178
IMGLOW_set_html_page_size_ IMGLOW_set_ooxml_license_pathW
380
Index: IMGLOW_set_transp_color – KOFAX
IMGLOW_set_transp_color 163
J
IMGLOW_set_wipedelay 122
jb2plug.dll 303
IMGLOW_unset_auto_detect 214
JBIG
IMGLOW_write_tiff_stream 163
defined 285
IMNET
file type 294
described 285
JBIG2
file type 294
defined 285
input
file type 295
color page 235, 361
JEDMICS
input compatible with output 58
described 285
input quality 58
file type 294
Installation Process 296
jp2plug.dll 303
Installed Files 296
JPEG
invert
described 285
color 183
file type 293
IOCA
JPEG2000
described 285
defined 285
file type 293
file type 294
isImageEnabled 167
K
isJavascriptEnabled 167
KOFAX
isPageBreaksExclusive 167
file type 285, 293
isRatioEnabled 167
381
Index: large documents – NCR
MO
L
DCA 235, 361
large documents
MODCA
printing 49
defined 286
LASER_DATA
MODCA resource
file type 285, 293
not displayed 360
LINE_DATA
MODCA troubleshooting
file type 286, 295
overlay 360
Load 312
MS-Windows DIB 255
location
MS_Windows DIB Header
OOXML license file 178
Format 255
lossy compression 59
MS_Windows DIB Image Data
low output quality 58 Format 255
MSG
M
MACPAINT MSP
code 354
N
MFC_Sample 312
NCR
MFC_TextSearch_TextExtract_
defined 286
Sample 313
file type 294
382
Index: NO_ABIC_VERSION error code – OOXML license file
NO_CLIPBOARD_IMAGE error
O
code 353
ODF
NO_DELAY_TIME_FOUND error
code 353 defined 286
383
Index: OOXML_LICENSE_EXPIRED error code – PDF_16
384
Index: PDF_LZW – remove
PDF_PACKAGE_NOT_ PPTX
SUPPORTED error code 354
described 290
pdfplug.dll 303
file type 295
performance
Print 315
improving 359
Printing
PHOTOCD
large documents 49
file type 289, 294
Printing Images 48
PHOTOSHOP
production version
file type 289, 294
installing 297
PICT
R
file type 289, 293
RAST
pixel depth 58
file type 290, 294
PIXEL_DEPTH_
UNSUPPORTED 58, 281 RasterMaster
PIXEL_DEPTH_UNSUPPORTED version
described 290
385
Index: resolution – Saving Transparent Images
SANN_mouse 270
S
SANN_move_object 271
SANN_activate_all_objects 260
SANN_print_annotations 271
SANN_add_object 261
SANN_read_ann 272
SANN_choose_color 261
SANN_resize_object 272
SANN_choose_font 262
SANN_rotate 272
SANN_choose_line_style 262
SANN_set_bcolor 273
SANN_choose_line_width 262
SANN_set_croprect 273
SANN_create_ann 263
SANN_set_delete_flag 274
SANN_deactivate_all_objects 263
SANN_set_fcolor 274
SANN_deactivate_object 264
SANN_set_font 275
SANN_delete_all_objects 264
SANN_set_line_style 275
SANN_delete_object 264
SANN_set_line_width 276
SANN_display_annotations 265
SANN_set_size 276
SANN_draw_object 266
SANN_write_ann 276
SANN_get_croprect 266
Saving Transparent Images 50
386
Index: Scan – TIFF_G4_FAX
SCITEX
T
file type 290, 294
tag specifications 320
SEARCH_STRING_NOT_FOUND
Tags 317
error code 354
TARGA
set
file type 290, 293
absolute path for OOXML files 179-
180 TARGA16
387
Index: TIFF_G4_FAX_FO – VectorExtract
TIFF_LZW
U
file type 291, 293
USER_CANCEL error code 353
TIFF_PACK
USING_RUNTIME error code 353
file type 292-293
UTF-16 292
TIFF_TAG_NOT_FOUND error
UTF-8 292
code 353
TIFF_UNCOMPRESSED V
388
Index: version – XWindows-specific
version XWD
WINFAX
WMF
WPG
XBM
Xerox_EPS
XLS 278
XLSX
XPM
389