RasterMaster SDK Imaging SDK for.net V19.9 Programmer s Reference Guide

Size: px
Start display at page:

Download "RasterMaster SDK Imaging SDK for.net V19.9 Programmer s Reference Guide"

Transcription

1 RasterMaster SDK Imaging SDK for.net V19.9 Programmer s Reference 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 download the most recent version from our website at DOC

2 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 Corporation assumes no responsibility or obligation of any kind for any errors contained herein or in connection with the furnishing, performance, or use of this document. Software described in Snowbound documents (a) is the property of Snowbound Software Corporation or the third party, (b) isfurnished 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, translated 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) by Bruno Lowagie. Kakadu JPEG2000, is copyrighted by Dr. David Taubman, and is proprietary to NewSouth Innovations, Pty. Ltd, Australia. Aspose, Aspose.Cells (copyrighted 2003), Aspose.Words (copyrighted 2003), and Aspose.Slides (copyrighted 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 Government is subject to restrictions as set forth under subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software clause of DFARS or subparagraphs (c)(i) and (2) of the Commercial Computer Software- Restricted Rights at 48 CFR 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 Imaging SDK for the.net Platform Programmer s Reference Guide Part Number: DOC Revision: 9 RasterMaster.NET Release Number: 19.9 RasterMaster SDK Release Number: 19.9 Printing Date: August 2017 Published by Snowbound Software Corporation. 309 Waverley Oaks Road Suite 401 Waltham, MA USA phone: fax: by Snowbound Software Corporation. All rights reserved.

3 Table of Contents Chapter 1 - Quick Start 39 Quickly Getting Started with the Conversion Sample 39 Viewing Samples Packaged with the Library 40 Sample Directory Files 40 Reading and Displaying Images 43 Reading Images 43 Displaying an Image 43 Return Values and Error Codes 43 System Overview 44 Determining System Requirements 44.NET Framework 4.0 Support 44 Determining Memory Requirements 45 Version 19.8 and 19.7 Additions and Improvements 46 New Features 46 Chapter 2 - Saving and Reading Multi-page Images 48 Multi-page Images 48 Supported Multi-page Formats 48 Decompressing a Multi-page Image 48 Determining Multi-page Page Count 48 Saving Multi-page File Formats 48 Multi-page Format Functions 49 Chapter 3 - Printing Images 50 3

4 Printing Overview 50 Printing Functions 50 Normal Printing 50 Fast Printing 50 CIMG_print_bitmap() 51 CIMG_print_bitmap_fast() 51 Printing Large Documents 52 Servers 52 Clients 53 Solution 53 Chapter 4 - Aspect Ratio Correction Function 54 Aspect Ratio Correction Function 54 Chapter 5 - Display Quality 55 Achieving the Best Display Quality Bit Images Displayed on a 256 Color Adapter 55 Bi-Level and 1-Bit Per Pixel Images 55 Chapter 6 - Image Compression 56 Preferred Formats Bit Color Images 56 8-Bit Gray Scale Images 56 1-bit Bi-Level Images 56 Chapter 7 - File Format Conversion 57 Converting File Formats 57 Automatically Detecting File Formats 57 4

5 Input Document Quality: Resolution/DPI 58 Input Document Quality: Color/bit-depth/Pixel Depth 58 Making Sure Input is Compatible with Output 58 Getting a Pixel_Depth_Unsupported Error 58 Adjusting Low Output Quality 58 Chapter 8 - Class Snow.Snowbnd Methods 60 Snowbnd() 60 Snowbnd(int, int, int) 61 Chapter 9 - SDK Class Specific Methods 63 isvalidimage() 63 clearimage() 63 ToErrorMessage() 64 Chapter 10 - SnowPanel Class Specific Methods 65 Properties 65 CustomPaint() 65 OnPaint() 66 OnPaintBackground() 66 OnSizeChanged() 66 Chapter 11 - Scanning Functions 68 Scanning Constants 68 CIMG_scan_acquire() 68 CIMG_scan_acquire_feeder() 69 CIMG_scan_acquire_feeder_fast() 70 CIMG_scan_feeder_close() 70 5

6 CIMG_scan_get_cap() 71 CIMG_scan_open_source() 71 CIMG_scan_pages() 72 CIMG_scan_pages_fast() 73 CIMG_scan_set_cap() 74 CIMG_scan_set_caps() 74 CIMG_scan_setup() 75 Chapter 12 - Scrollbar Default Functions 76 Properties 76 SnowbndCNet_HScrollBar() 76 SnowbndCNet_VScrollBar() 76 Chapter 13 - Image Decompression Functions 78 CIMG_decompress_bitmap() 78 CIMG_decompress_bitmap_display() 80 CIMG_decompress_bitmap_fd() 81 CIMG_decompress_bitmap_FlexSnap() 81 CIMG_decompress_bitmap_mem() 82 CIMG_decompress_bitmap_page() 83 CIMG_decompress_bitmap_url() 84 CIMG_decompress_bitmap_xps() 84 CIMG_decompress_fax() 85 CIMG_decompress_fax_mem() 86 CIMG_decompress_tiled_bitmap() 86 Chapter 14 - Image Decompression Option Functions 88 6

7 CIMGLOW_set_auto_detect() 88 CIMGLOW_set_decomp_rect() 88 CIMGLOW_set_decomp_reduction() 89 CIMGLOW_set_decompsize() 90 CIMGLOW_set_jpeg_decompression 90 CIMGLOW_set_overlay_path() 91 CIMGLOW_set_pdf_input() 91 CIMGLOW_set_pdf_password() 92 CIMGLOW_unset_auto_detect() 93 Chapter 15 - Image Creation Functions 94 CIMG_create_bitmap_class() 94 CIMG_create_handle() 94 CIMG_create_handle_ddb() 95 CIMG_create_handle_keep() 95 Chapter 16 - HTML Functions 97 CIMGLOW_set_html_input() 97 CIMGLOW_set_html_page_size() 97 Functions Available in RasterMaster.NET V18.1 and Earlier 98 CIMGLOW_set_html_capabilities() 98 CIMGLOW_set_html_home_dir() 99 CIMGLOW_set_html_image_capability() 100 CIMGLOW_set_html_javascript_capability() 100 CIMGLOW_set_html_page_size_ratio() 101 CIMGLOW_set_html_page_size_ratio_capability() 101 7

8 CIMGLOW_set_html_screen_dpi() 102 CIMGLOW_set_html_use_page_breaks_exclusively() 102 CIMGLOW_set_html_utf_bom() 103 Chapter 17 - Open Office 2007 XML (OOXML) Functions 106 CIMGLOW_set_ooxml_license() 106 CIMGLOW_ooxml_license_enable() 106 Chapter 18 - Image Saving Functions 108 CIMG_save_bitmap() 108 CIMG_save_bitmap_fd() 109 CIMG_save_bitmap_mem() 110 CIMGLOW_write_tiff_stream() 111 Chapter 19 - Image Saving Option Functions 112 CIMG_set_encrypt() 112 CIMGLOW_set_comp_quality() 112 CIMGLOW_set_image_orientation() 113 CIMGLOW_set_jpeg2000_comp_ratio() 114 CIMGLOW_set_jpg_interleave() 114 CIMGLOW_set_pdf_output() 115 CIMGLOW_set_tiff_save_strips 115 CIMGLOW_set_tiff_tag() 116 Chapter 20 - Image Display Functions 118 bool repaintbackground() 118 CIMG_display_bitmap() 118 CIMG_display_bitmap_aspect() 120 8

9 CIMG_display_bitmap_transp() 121 CIMG_display_ddb() 121 CIMG_display_fit_to_height() 122 CIMG_display_fit_to_width() 123 CIMG_set_croprect() 123 CIMG_set_croprect_scroll() 124 CIMG_zoom_bitmap() 125 CIMG_zoom_bitmap_1_to_1() 125 CIMG_zoom_bitmap_rect() 126 CIMGLOW_map_image_to_wnd() 126 CIMGLOW_map_wnd_to_image() 127 double calcaspectzoom() 127 removescrollbars() 128 Chapter 21 - Image Display Option Functions 130 CIMG_animate() 130 CIMG_bitmap_palette() 130 CIMG_display_ddb_effect() 131 CIMG_set_gamma() 132 CIMG_set_lut() 133 CIMG_window_level() 133 CIMGLOW_autocolor() 134 CIMGLOW_set_alias() 135 CIMGLOW_set_alias_quality() 135 CIMGLOW_set_dithermode() 136 9

10 CIMGLOW_set_imnet_page_size() 137 CIMGLOW_set_rop() 137 CIMGLOW_set_transp_color() 139 CIMGLOW_set_wipedelay() 139 Chapter 22 - Information Query Functions 141 CIMG_bitmap_info() 141 CIMG_get_bitmap_palette() 142 CIMG_get_croprect() 143 CIMG_get_display_rect() 143 CIMG_get_version(int, int, int, int) 144 CIMG_get_version(String) 144 CIMG_ifl_version() 145 CIMGLOW_delete_page() 146 CIMGLOW_delete_page_mem() 146 CIMGLOW_get_anim_delay() 147 CIMGLOW_get_auto_detect() 147 CIMGLOW_get_bitmap_header() 148 CIMGLOW_get_bitmap_name() 148 CIMGLOW_get_custstring() 149 CIMGLOW_get_fileinfo() 149 CIMGLOW_get_fileinfo_fd() 150 CIMGLOW_get_fileinfo_page() 151 CIMGLOW_get_filetype() 151 CIMGLOW_get_filetype_fd()

11 CIMGLOW_get_filetype_mem() 152 CIMGLOW_get_filetype_url() 153 CIMGLOW_get_image_orientation_page() 153 CIMGLOW_get_pages() 154 CIMGLOW_get_pages_fd() 155 CIMGLOW_get_pages_mem() 155 CIMGLOW_get_pages_url() 156 CIMGLOW_get_tiff_tag() 157 CIMGLOW_get_tiff_tag_page() 158 CIMGLOW_get_tiff_tag_page_fd() 158 CIMGLOW_get_tiff_tag_page_mem() 159 CIMGLOW_get_tile_info() 160 CIMGLOW_get_transp_color() 161 CIMGLOW_is_tiled_image() 161 CIMGLOW_read_pixel() 161 CIMGLOW_redact_text() 162 CIMGLOW_redact_rects() 162 CIMGLOW_rotate_page_mem() 163 CIMGLOW_set_bitmap_header() 164 CIMGLOW_set_document() 165 CIMGLOW_set_document_input(int, int) 165 CIMGLOW_set_document_input(int, int, int) 166 CIMGLOW_set_document_page_size(int, int, int) 167 Chapter 23 - Text Search Functions

12 CIMG_save_document() 169 CIMG_save_mem() 171 CIMG_save_mem_page() 171 CIMGLOW_append_page() 172 CIMGLOW_extract_text() 172 CIMGLOW_extract_text_mem_pointer() 174 CIMGLOW_extract_page() 175 CIMGLOW_extract_page_mem() 175 CIMGLOW_search_text() 176 CIMGLOW_set_document_input() 177 Chapter 24 - AFP Font Mapping Functions 178 AFP Font Mapping 178 Format of Font Mapping Data 178 Color Documents Rendered as Black and White 179 CIMGLOW_set_fontmap_path() 179 CIMGLOW_set_fontmap() 180 CIMGLOW_set_pdf_flags() 181 CIMGLOW_set_pdf_fontpath() 181 CIMGLOW_set_pdfa_fontpath() 182 CIMGLOW_set_pdfa_fontmap() 182 Chapter 25 - Housekeeping Functions 184 CIMG_delete_bitmap() 184 CIMG_delete_bitmap_keep() 185 CIMG_unload_plugins()

13 CIMGLOW_set_bitmap_name() 185 CIMGLOW_set_tiff_indexing() 186 Chapter 26 - DocClean Functions 187 CIMG_auto_orient() 187 CIMG_deskew_bitmap() 187 CIMG_despeckle_bitmap() 188 CIMGLOW_auto_invert() 189 CIMGLOW_detect_blank_page() 190 CIMGLOW_image_dilation() 191 CIMGLOW_image_erosion() 192 CIMGLOW_remove_halftone() 192 CIMGLOW_remove_lines() 193 CIMGLOW_remove_holepunch() 193 Chapter 27 - Image Processing Functions 196 CIMG_antique_effect() 196 CIMG_apply_profile() 196 CIMG_auto_orient() 197 CIMG_autocrop_bitmap() 197 CIMG_create_thumbnail() 198 CIMG_deskew_bitmap() 199 CIMG_despeckle_bitmap() 199 CIMG_dib_to_ddb() 200 CIMG_dib_to_runs() 201 CIMG_erase_rect()

14 CIMG_flip_bitmapx() 201 CIMG_flip_bitmapy() 202 CIMG_get_deskew_angle() 202 CIMG_get_profile() 203 CIMG_histogram_equalize() 203 CIMG_invert_bitmap() 204 CIMG_merge_annotation() 204 CIMG_merge_bitmap() 205 CIMG_merge_bitmap() 206 CIMG_merge_bitmap_alpha() 208 CIMG_process_bitmap() 209 CIMG_remove_red_eye() 210 CIMG_resize_bitmap() 211 CIMG_resize_bitmap_bicubic() 212 CIMG_resize_bitmap_interp() 212 CIMG_rotate_bitmap() 213 CIMG_runs_to_dib() 214 CIMG_set_display_angle() 214 CIMG_sharpen_bitmap() 215 CIMGLOW_get_palette() 215 CIMGLOW_get_raster() 216 CIMGLOW_put_palette() 216 CIMGLOW_put_raster() 217 CIMGLOW_set_fast_convert()

15 Chapter 28 - Document Conversion and Text Extraction Functions 219 Document Conversion and Text Extraction 219 CIMGLOW_extract_text() 219 CIMGLOW_extract_text_mem() 221 CIMG_save_document() 222 CIMG_save_document_mem() 224 CIMGLOW_close_pdf_reader() 225 CIMGLOW_get_pdf_text() 225 CIMGLOW_set_pdf_reader() 226 Chapter 29 - Color Promotion Functions 227 CIMG_promote_8() 227 CIMG_promote_24() 228 CIMG_promote_32() 228 Changing Color Spaces Functions 228 CIMG_rgb_to_cmyk() 228 CIMG_cmyk_to_rgb() 229 CIMG_color_combine() 229 CIMG_color_separate() 230 CIMGLOW_get_tiff_tag() 231 Chapter 30 - Color Reduction Functions 233 CIMG_color_gray() 233 CIMG_resize_to_gray() 233 CIMG_popularity_color() 234 CIMG_mediancut_color()

16 CIMG_octree_color() 235 CIMG_bayer_color() 236 CIMG_bayer_mono() 236 CIMG_diffusion_mono() 237 CIMG_thresh_mono() 237 CIMG_halftone_mono() 238 CIMGLOW_detect_color() 239 Chapter 31 - ASCII Formats and Functions 241 ASCII Attribute Structure 241 CIMG_import_ascii() 245 CIMGLOW_get_ascii_attributes() 245 CIMGLOW_get_ascii_page_width() 246 CIMGLOW_set_ascii_attributes() 246 Chapter 32 - Format For Decompressed Images 248 Overview of Data Formats 248 RasterMaster Plus Options 248 MS_Windows DIB Header Format 249 MS_Windows DIB Palette Format 249 MS_Windows DIB Image Data Format 250 Chapter 33 - Annotation and Redlining Toolkit 251 public class CANN_GRAPHIC_STRUCT Structure 251 CSANN_activate_all_objects() 252 CSANN_activate_object() 253 CSANN_add_object()

17 CSANN_choose_color() 254 CSANN_choose_font() 254 CSANN_choose_line_style() 255 CSANN_choose_line_width() 255 CSANN_create_ann() 256 CSANN_deactivate_all_objects() 256 CSANN_deactivate_object() 257 CSANN_delete_all_objects() 257 CSANN_delete_non_text_objects() 257 CSANN_delete_object() 258 CSANN_delete_text_objects() 258 CSANN_display_annotations() 258 CSANN_draw_object() 259 CSANN_FlipX() 260 CSANN_FlipY() 260 CSANN_get_croprect() 260 CSANN_get_disprect() 260 CSANN_get_object_bounds() 261 CSANN_get_object_data() 261 CSANN_get_object_info() 262 CSANN_get_object_num() 262 CSANN_highlight_object() 263 CSANN_map_image_to_wnd() 263 CSANN_map_wnd_to_image()

18 CSANN_mouse() 264 CSANN_move_object() 265 CSANN_print_annotations() 265 CSANN_read_ann() 266 CSANN_read_ann_FlexSnap() 266 CSANN_read_ann_mem() 267 CSANN_read_ann_mem_page() 267 CSANN_read_ann_page() 268 CSANN_resize_object() 268 CSANN_rotate() 268 CSANN_set_bcolor() 269 CSANN_set_croprect() 269 CSANN_set_disprect() 270 CSANN_set_fcolor() 270 CSANN_set_font() 271 CSANN_set_line_style() 271 CSANN_set_line_width() 272 CSANN_set_size() 272 CSANN_write_ann() 273 CSANN_write_ann_FlexSnap() 274 CSANN_write_ann_mem() 274 CSANN_write_ann_mem_page() 274 CSANN_write_ann_page() 275 Annotation Constants

19 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions 277 Working with.net Bitmapsource for the WPF Image Control 278 CIMG_create_bitmapsource_class() 278 CIMG_create_bitmapsource_class() 278 CIMG_create_bitmapsource_annotation() 279 CIMG_scan_acquire_WPF() 279 CIMG_scan_acquire_feeder_WPF() 280 CIMG_scan_acquire_feeder_fast_WPF() 280 CIMG_scan_open_source_WPF() 281 CIMG_scan_pages_fast_WPF() 281 CIMG_scan_pages_WPF() 282 CIMG_scan_get_cap_WPF() 283 CIMG_scan_set_cap_WPF() 283 CIMG_scan_setup_WPF() 284 Annotating with.net WPF controls 285 CSANN_create_ann_WPF() 285 CSANN_get_object_num_WPF() 285 CSANN_highlight_object_WPF() 286 CSANN_read_ann_WPF() 286 CSANN_read_ann_page_WPF() 287 CSANN_read_ann_mem_page_WPF() 287 CSANN_read_ann_mem_WPF() 288 Working with XML Paper Specification (XPS) Documents 288 CIMG_get_pages_xps()

20 CIMG_get_pages_xps_mem() 289 CIMG_decompress_bitmap_xps() 290 CIMG_decompress_bitmap_xps_mem() 290 Chapter 35 - Working with PDF and Other Document File Formats 292 Working with Document File Formats 292 Saving 293 Reading and Writing Support for PDF File Formats 293 Reading or Decompressing a PDF Document 293 Saving to a PDF Document 294 Working with Black and White Images 294 Working with Color Images 294 Changing Output Page Size 294 Performance 295 Appendix A - Classes and Support Values 296 Type Property Define Values 296 General Error Define Values Retrieved from Status Property 297 public class CIMG_RECT 298 public class CIMG_SEARCH_RESULT 298 public class CASCIITEXTATTR 299 public class CSEARCH_TEXT 301 public class CDIB_HEADER 301 public class CTIFF_TAG 301 public class CSNBDTILESTRUCT 302 Appendix B - Supported File Formats

21 s of Supported File Formats 303 File Type Constants Listed by File Type Number 319 Appendix C - Software Installation 322 Overview of the Installation Process 322 Redistributing Snowbound Files 323 What to Expect When Installing an Evaluation Version 323 What to Expect in a Production Version 323 Installing the Production Version of RasterMaster.NET 323 Installing the Software 324 Directory Structure 329 Installed Files 329 Main Directory Files 330 Strong Name Support 330 XFA Support Files 331 Docs Directory Files 331 Marketing Directory Files 331 Sample Directory Files 332 Chapter D - Set Up for ASP.NET Samples 336 Overview of the Set Up Process 336 Setting Up the Environment to Run Web Applications 337 Setting Up Samples on a Web Server 338 Running ASP.NET Samples 342 Chapter E - Set Up for the Web Image Viewer Component 344 Introduction to the Web Image Viewer

22 Steps to Run the Web Image Viewer Control in Internet Explorer 344 Troubleshooting 345 Appendix F -.NET Samples 347 Overview of the.net Samples 348 Running a Sample 348 Building 32-bit Application Running on a 64-bit Operating System 348 Building for a 64-bit Operating System 349 Building a RasterMaster.NET x64 sample with.net Alpha 350 Animate 350 Annaction 350 Annotation 351 ASP Conversion 352 ASP Image View 353 ASP Memory Copy 353 ASP Multiple Pages 354 Batch_XPS_Convert 354 BatchConvert 354 ConsoleApp 355 Contrast 355 Conversion 355 Convert_Doc 356 DDB Effect 356 DocClean

23 Encryption 357 FileMem 358 Image Processing 358 Memory Copy 358 Merge Image 359 Page 359 Panning 360 Print 360 Scan 360 Split to Multiple Pages 361 Text Search 362 Thumbnail 362 Tiff Tag 363 Web Image Viewer Component 363 WPFAnnotation_CSHARP 363 WPFConversion_CSHARP 364 WPFScanning_CSHARP 364 WPF Image 365 VectorConvertMem_CSHARP 366 XPSMem_CSHARP 366 Appendix G - Snowbound Error Codes 367 Detailed Status/Error Codes 367 General Error Define Values Retrieved from Status Property 370 General Status/Error Codes

24 Appendix H - Troubleshooting 372 Receiving an Error Code When Loading, Saving or Converting a Document 372 Output Document Differs from Original Document 372 Output Document Has Much Larger File Size than the Original Document 372 Output Document Has Much Lower Quality than the Original Document 373 Output Document Displays Incorrect or Missing Characters 374 Improving Performance 374 Identifying an Unknown File Format 375 Receiving a -3 Corrupted File Error code 375 XLS or XLSX Page Content Truncated 375 Overlay Resources Not Pulled into APF or MODCA Document 375 Searching for Text in a Snowbound Software Generated PDF 376 Some TIFF_JPEG Files Produced By RasterMaster.NET Do Not Open In Third Party Image Viewers 376 Color Documents Rendered as Black and White 376 Upgrading to the RasterMaster.NET 18.0 Library 377 Getting RasterMaster.NET x32 to work with IIS Appendix I - TIFF Tags 378 Sources for Tag Specifications 378 s of Tags in Numerical Order

25 List of Tables Table 1.1: RasterMaster.NET Samples Directory 40 Table 1.2: Memory Requirements Based on Image Size 46 Table 2.1: Supported Multi-page Functions 49 Table 3.1: CIMG_print_bitmap Function s 51 Table 3.2: CIMG_print_bitmap_fast Function s 52 Table 4.1: Aspect Ratio Function 54 Table 8.1: Snowbnd(int width, int height, int bitsperpixel) Method s 62 Table 9.1: ToErrorMessage 64 Table 10.1: SnowPanel Class Specific Method Properties 65 Table 10.2: CustomPaint 65 Table 10.3: OnPaint 66 Table 10.4: OnPaintBackground 66 Table 10.5: OnSizeChanged 67 Table 11.1: CSCAN_CAPS s 68 Table 11.2: CIMG_scan_acquire Function 69 Table 11.3: CIMG_scan_acquire_feeder Function s 70 Table 11.4: CIMG_scan_acquire_feeder_fast Function s 70 Table 11.5: CIMG_scan_get_cap Function s 71 Table 11.6: CIMG_scan_open_source Function 72 Table 11.7: CIMG_scan_pages Function s 72 Table 11.8: CIMG_scan_page_fast Function s 73 Table 11.9: CIMG_scan_set_cap Function s 74 25

26 Table 11.10: CIMG_scan_set_caps Function 74 Table 11.11: CIMG_scan_setup Function 75 Table 12.1: Scrollbar Default Function Properties 76 Table 12.2: SnowbndCNet _HScrollBar s 76 Table 12.3: SnowbndCNet _VScrollBar s 77 Table 13.1: : CIMG_decompress_bitmap Function 79 Table 13.2: CIMG_decompress_bitmap_display Function s 80 Table 13.3: CIMG_decompress_bitmap_fd Function s 81 Table 13.4: CIMG_decompress_bitmap_FlexSnap Function s 81 Table 13.5: CIMG_decompress_bitmap_mem Function s 82 Table 13.6: CIMG_decompress_bitmap_page Function s 83 Table 13.7: CIMG_decompress_bitmap_url Function s 84 Table 13.8: CIMG_decompress_bitmap_xps Function s 85 Table 13.9: CIMG_decompress_fax Function s 85 Table 13.10: CIMG_decompress_fax_mem Function s 86 Table 13.11: CIMG_decompress_tiled_bitmap Function s 87 Table 14.1: CIMGLOW_set_auto_detect Function 88 Table 14.2: CIMGLOW_set_decomp_rect Function s 89 Table 14.3: CIMGLOW_set_decomp_reduction Function 89 Table 14.4: CIMGLOW_set_decompsize Function s 90 Table 14.5: CIMGLOW_set_jpeg_decompression Function 90 Table 14.6: CIMGLOW_set_pdf_input Function s 92 Table 14.7: CIMGLOW_set_pdf_password Function s 92 Table 14.8: CIMGLOW_unset_auto_detect Function 93 26

27 Table 15.1: CIMG_create_bitmap_class Function 94 Table 15.2: CIMG_create_handle Function 94 Table 15.3: CIMG_create_handle_ddb Function s 95 Table 15.4: CIMG_create_handle_keep Function 95 Table 16.1: CIMGLOW_set_html_input function variable descriptions. 97 Table 16.2: CIMGLOW_set_html_page_size function variable descriptions. 97 Table 16.3: CIMGLOW_set_html_capabilities Function s 98 Table 16.4: CIMGLOW_set_html_home_dir function variable descriptions. 99 Table 16.5: CIMGLOW_set_html_image_capability function variable descriptions. 100 Table 16.6: CIMGLOW_set_html_javascript_capability function variable descriptions. 101 Table 16.7: CIMGLOW_set_html_page_size_ratio function variable descriptions. 101 Table 16.8: CIMGLOW_set_html_page_size_ratio_capability function variable descriptions. 102 Table 16.9: CIMGLOW_set_html_screen_dpi function variable descriptions. 102 Table 16.10: CIMGLOW_set_html_use_page_breaks_exclusively function variable descriptions. 103 Table 16.11: CIMGLOW_set_html_utf_bom Function s 103 Table 16.12: Representations of byte order marks by encoding 104 Table 17.1: CIMGLOW_set_ooxml_license function variable descriptions. 106 Table 17.2: CIMGLOW_ooxml_license_enable Function 107 Table 18.1: CIMG_save_bitmap Function s 109 Table 18.2: CIMG_save_bitmap_fd Function s 109 Table 18.3: CIMG_save_bitmap_mem Function s 110 Table 18.4: CIMGLOW_write_tiff_stream Function s

28 Table 19.1: CIMG_set_encrypt Function s 112 Table 19.2: CIMGLOW_set_comp_quality Function 113 Table 19.3: CIMGLOW_set_image_orientation Function 113 Table 19.4: CIMGLOW_set_jpeg2000_comp_ratio Function 114 Table 19.5: CIMGLOW_set_jpg_interleave Function s 114 Table 19.6: CIMGLOW_set_pdf_output Function s 115 Table 19.7: CIMGLOW_set_tiff_save_strips Function 116 Table 19.8: CIMGLOW_set_tiff_tag Function 116 Table 20.1: bool repaintbackground s 118 Table 20.2: CIMG_display_bitmap Function s 119 Table 20.3: CIMG_display_bitmap_aspect s 120 Table 20.4: CIMG_display_bitmap_transp Function s 121 Table 20.5: CIMG_display_ddb Function s 121 Table 20.6: CIMG_display_fit_to_height Function s 122 Table 20.7: CIMG_display_fit_to_width Function s 123 Table 20.8: CIMG_set_croprect Function s 124 Table 20.9: CIMG_set_croprect_scroll Function s 124 Table 20.10: CIMG_zoom_bitmap Function s 125 Table 20.11: CIMG_zoom_bitmap_1_to_1 Function s 125 Table 20.12: CIMG_zoom_bitmap_rect Function s 126 Table 20.13: CIMGLOW_map_image_to_wnd Function s 127 Table 20.14: CIMGLOW_map_wnd_to_image Function s 127 Table 20.15: double calcaspectzoom s 128 Table 20.16: RemoveScrollbars s

29 Table 21.1: CIMG_animate Function s 130 Table 21.2: CIMG_bitmap_palette Function 131 Table 21.3: CIMG_display_ddb_effect Function s 131 Table 21.4: CIMG_set_gamma Function 132 Table 21.5: CIMG_set_lut Function s 133 Table 21.6: CIMG_window_level Function s 134 Table 21.7: CIMGLOW_autocolor Function 134 Table 21.8: CIMGLOW_set_alias_img Function 135 Table 21.9: CIMGLOW_set_alias_quality Function 136 Table 21.10: CIMGLOW_set_dithermode Function 136 Table 21.11: CIMGLOW_set_imnet_page_size Function s 137 Table 21.12: CIMGLOW_set_rop Function s 138 Table 21.13: CIMGLOW_set_transp_color Function 139 Table 21.14: CIMGLOW_set_wipedelay Function 139 Table 22.1: CIMG_bitmap_info Function 142 Table 22.2: CIMG_get_croprect Function 143 Table 22.3: CIMG_get_display_rect Function s 143 Table 22.4: CIMG_get_version Function 144 Table 22.5: CIMG_get_version Function 145 Table 22.6: CIMG_ifl_version Function 145 Table 22.7: CIMGLOW_delete_page Function s 146 Table 22.8: CIMGLOW_delete_page_mem Function s 146 Table 22.9: CIMGLOW_get_anim_delay Function 147 Table 22.10: CIMGLOW_get_auto_detect Function

30 Table 22.11: CIMGLOW_get_bitmap_header Function s 148 Table 22.12: CIMGLOW_get_bitmap_name Function s 148 Table 22.13: CIMGLOW_get_custstring Function 149 Table 22.14: CIMGLOW_get_fileinfo Function s 150 Table 22.15: CIMGLOW_get_fileinfo_fd Function s 150 Table 22.16: CIMGLOW_get_fileinfo_page Function s 151 Table 22.17: CIMGLOW_get_filetype Function 151 Table 22.18: CIMGLOW_get_filetype_fd Function 152 Table 22.19: CIMGLOW_get_filetype_mem Function 152 Table 22.20: CIMGLOW_get_filetype_url Function 153 Table 22.21: CIMGLOW_get_image_orientation_page Function s 153 Table 22.22: CIMGLOW_get_pages Function 154 Table 22.23: CIMGLOW_get_pages_fd Function 155 Table 22.24: CIMGLOW_get_pages_mem Function 155 Table 22.25: CIMGLOW_get_pages_url Function 156 Table 22.26: CIMGLOW_get_tiff_tag Function s 157 Table 22.27: CIMGLOW_get_tiff_tag_page Function s 158 Table 22.28: CIMGLOW_get_tiff_tag_page_fd Function s 159 Table 22.29: CIMGLOW_get_tiff_tag_page_mem Function s 159 Table 22.30: CIMGLOW_get_tile_info Function s 160 Table 22.31: CIMGLOW_is_tiled_image Function 161 Table 22.32: CIMGLOW_read_pixel Function s 162 Table 22.33: CIMGLOW_redact_text Function s 162 Table 22.34: CIMGLOW_redact_rects Function s

31 Table 22.35: CIMGLOW_rotate_page_mem Function s 163 Table 22.36: CIMGLOW_set_bitmap_header Function s 164 Table 22.37: CIMGLOW_set_document Function s 165 Table 22.38: CIMGLOW_set_document_input Function s 166 Table 22.39: CIMGLOW_set_document_input Function 167 Table 22.40: CIMGLOW_set_document_page_size Function 168 Table 23.1: CIMG_save_document Function s 169 Table 23.2: CIMG_save_mem Function s 171 Table 23.3: CIMG_save_mem_page Function s 171 Table 23.4: CIMGLOW_append_page Function s 172 Table 23.5: CIMGLOW_extract_text Function s 173 Table 23.6: Extracted Text s 173 Table 23.7: CIMGLOW_extract_text_mem_pointer Function s 174 Table 23.8: CIMGLOW_extract_page Function s 175 Table 23.9: CIMGLOW_extract_page_mem Function s 175 Table 23.10: CIMGLOW_search_text Function s 176 Table 23.11: CIMGLOW_set_document_input Function s 177 Table 24.1: of a sample entry in the snbd_map.fnt file 179 Table 24.2: CIMGLOW_set_fontmap_path Function s 180 Table 24.3: CIMGLOW_set_fontmap Function s 180 Table 24.4: CIMGLOW_set_pdf_flags Function s 181 Table 24.5: CIMGLOW_set_pdf_fontpath Function s 181 Table 24.6: CIMGLOW_set_pdfa_fontpath Function s 182 Table 24.7: CIMGLOW_set_pdfa_fontmap Function s

32 Table 25.1: CIMGLOW_set_bitmap_name Function s 185 Table 25.2: CIMGLOW_set_tiff_indexing Function s 186 Table 26.1: CIMG_auto_orient Function s 187 Table 26.2: CIMG_deskew_bitmap Function 188 Table 26.3: CIMG_despeckle_bitmap Function 188 Table 26.4: CIMGLOW_auto_invert Function s 189 Table 26.5: CIMGLOW_detect_blank_page Function s 190 Table 26.6: CIMGLOW_image_dilation Function 191 Table 26.7: CIMGLOW_image_erosion Function 192 Table 26.8: CIMGLOW_remove_halftone Function s 192 Table 26.9: CIMGLOW_remove_lines Function s 193 Table 26.10: CIMGLOW_remove_holepunch Function s 194 Table 27.1: CIMG_apply_profile Function s 196 Table 27.2: CIMG_apply_profile Modes 196 Table 27.3: CIMG_auto_orient Function 197 Table 27.4: CIMG_autocrop_bitmap Function 198 Table 27.5: CIMG_create_thumbnail Function s 198 Table 27.6: CIMG_deskew_bitmap Function 199 Table 27.7: CIMG_despeckle_bitmap Function 200 Table 27.8: CIMG_dib_to_ddb Function s 200 Table 27.9: CIMG_erase_rect Function s 201 Table 27.10: CIMG_get_deskew_angle Function s 202 Table 27.11: CIMG_get_profile Function s 203 Table 27.12: CIMG_merge_annotation Function s

33 Table 27.13: CIMG_merge_bitmap Function s 205 Table 27.14: CIMG_merge_bitmap Function s 207 Table 27.15: CIMG_merge_bitmap_alpha Function s 209 Table 27.16: CIMG_process_bitmap Function s 209 Table 27.17: CIMG_remove_red_eye Function s 210 Table 27.18: CIMG_resize_bitmap Function s 211 Table 27.19: CIMG_resize_bitmap_bicubic Function s 212 Table 27.20: CIMG_resize_bitmap_interp Function s 212 Table 27.21: CIMG_rotate_bitmap Function 213 Table 27.22: CIMG_set_display_angle Function 214 Table 27.23: CIMG_sharpen_bitmap Function 215 Table 27.24: CIMGLOW_get_palette Function s 215 Table 27.25: CIMGLOW_get_raster Function s 216 Table 27.26: CIMGLOW_put_palette Function s 216 Table 27.27: CIMGLOW_put_raster Function s 217 Table 27.28: CIMGLOW_set_fast_convert Function s 218 Table 28.1: CIMGLOW_extract_text Function s 220 Table 28.2: Extracted Text 220 Table 28.3: CIMGLOW_extract_text_mem Function s 221 Table 28.4: Extracted Text 221 Table 28.5: CIMG_save_document Function s 223 Table 28.6: CIMG_save_document_mem Function s 224 Table 28.7: IMGLOW_get_pdf_text(array, int) Method s 225 Table 28.8: CIMGLOW_set_pdf_reader(array<Byte>^ data) Method s

34 Table 29.1: CIMG_color_combine Function s 229 Table 29.2: CIMG_color_separate Function s 230 Table 29.3: CIMGLOW_get_tiff_tag Function s 231 Table 30.1: CIMG_resize_to_gray Function s 234 Table 30.2: CIMG_octree_color Function s 235 Table 30.3: CIMG_thresh_mono Function 238 Table 31.1: public class CASCIITEXTATTR s 242 Table 31.2: ASCIITEXTATTR Function Flags 243 Table 31.3: Standard Page Sizes 244 Table 31.4: CIMG_import_ascii Function s 245 Table 31.5: CIMGLOW_get_ascii_attributes Function 245 Table 31.6: CIMGLOW_get_ascii_page_width Function 246 Table 31.7: CIMGLOW_set_ascii_attributes Function 246 Table 32.1: MS_Windows DIB Palette Format 250 Table 32.2: MS_Windows DIB Image Data Format 250 Table 33.1: CANN_GRAPHIC_STRUCT Class s 252 Table 33.2: CSANN_activate_objectFunction s 253 Table 33.3: CSANN_add_object Function s 254 Table 33.4: CSANN_choose_color Function 254 Table 33.5: CSANN_choose_line_style Function 255 Table 33.6: CSANN_choose_line_width Function 256 Table 33.7: CSANN_create_ann Function s 256 Table 33.8: CSANN_deactivate_object Function s 257 Table 33.9: CSANN_delete_object Function s

35 Table 33.10: CSANN_display_annotations Function s 259 Table 33.11: CSANN_draw_object Function s 259 Table 33.12: CSANN_get_croprect Function s 260 Table 33.13: CSANN_get_disprect Function s 261 Table 33.14: CSANN_get_object_bounds Function s 261 Table 33.15: CSANN_get_object_dataFunction s 261 Table 33.16: CSANN_get_object_info Function s 262 Table 33.17: CSANN_get_object_num Function s 262 Table 33.18: CSANN_highlight_object Function s 263 Table 33.19: CSANN_map_image_to_wnd Function s 263 Table 33.20: CSANN_map_wnd_to_image Function s 264 Table 33.21: CSANN_mouse Function s 264 Table 33.22: Table 34-22: CSANN_move_object Function s 265 Table 33.23: CSANN_print_annotations Function s 266 Table 33.24: CSANN_read_ann Function s 266 Table 33.25: CSANN_read_ann_FlexSnap Function s 267 Table 33.26: CSANN_read_ann_mem Function s 267 Table 33.27: CSANN_read_ann_mem_page Function s 267 Table 33.28: CSANN_read_ann_page Function s 268 Table 33.29: CSANN_resize_object Function s 268 Table 33.30: CSANN_rotate Function s 269 Table 33.31: CSANN_set_bcolor Function s 269 Table 33.32: CSANN_set_croprect Function s 270 Table 33.33: CSANN_set_disprect Function s

36 Table 33.34: CSANN_set_fcolor Function s 271 Table 33.35: CSANN_set_font Function s 271 Table 33.36: CSANN_set_line_style Function s 272 Table 33.37: CSANN_set_line_width Function s 272 Table 33.38: CSANN_set_size Function s 273 Table 33.39: CSANN_write_ann Function s 273 Table 33.40: CSANN_write_ann_FlexSnap Function s 274 Table 33.41: CSANN_write_ann_mem Function s 274 Table 33.42: CSANN_write_ann_mem_page Function s 275 Table 33.43: CSANN_write_ann_page Function s 275 Table 33.44: Annotation Constants 275 Table 34.1: CIMG_create_bitmapsource_class Function 278 Table 34.2: CIMG_create_bitmapsource_class Function 278 Table 34.3: CIMG_create_bitmapsource_annotation Function s 279 Table 34.4: CIMG_scan_acquire_WPF Function s 279 Table 34.5: CIMG_scan_acquire_feeder_WPF Function s 280 Table 34.6: CIMG_scan_acquire_feeder_fast_WPF Function s 281 Table 34.7: CIMG_scan_open_source_WPF Function 281 Table 34.8: CIMG_scan_pages_fast_WPF Function 282 Table 34.9: CIMG_scan_pages_WPF Function s 282 Table 34.10: CIMG_scan_get_cap_WPF Function s 283 Table 34.11: CIMG_scan_set_cap_WPF Function s 284 Table 34.12: CSANN_create_ann_WPF Function s 285 Table 34.13: CSANN_get_object_num_WPF Function s

37 Table 34.14: CSANN_highlight_object_WPF Function s 286 Table 34.15: CSANN_read_ann_WPF Function s 287 Table 34.16: CSANN_read_ann_page_WPF Function s 287 Table 34.17: CSANN_read_ann_mem_page_WPF Function s 288 Table 34.18: CSANN_read_ann_mem_WPF Function s 288 Table 34.19: CIMG_get_pages_xps Function 289 Table 34.20: CIMG_get_pages_xps_mem Function 289 Table 34.21: CIMG_decompress_bitmap_xps Function s 290 Table 34.22: CIMG_decompress_bitmap_xps_mem Function s 290 Table 35.1: CIMGLOW_set_document Function s 292 Table 35.2: CIMGLOW_set_pdf_output Function s 293 Table A.1: Type Property Define Values 296 Table A.2: General Error Define Values Retrieved from Status Property 297 Table A.3: public class CIMG_RECT s 298 Table A.4: public class CIMG_SEARCH_RESULT s 299 Table A.5: public class CASCIITEXTATTR s 300 Table A.6: public class CTIFF_TAG s 302 Table B.1: File Format Key 303 Table B.2: File Type Constants listed by File Type Number 319 Table C.1: RasterMaster.NET Default Directory File 330 Table C.2: RasterMaster.NET Docs Directory Files 331 Table C.3: RasterMaster.NET Samples Directory 332 Table G.1: Error Codes 367 Table G.2: General Error Define Values Retrieved from Status Property

38 Table G.3: General Status/Error Codes 371 Table I.1: TIFF Tags in Numerical Order

39 Chapter 1 - Quick Start Chapter 1 - Quick Start This chapter describes how to quickly start decompressing and displaying images using Raster- Master.NET. If you do not find the information that you are looking for in this manual, please open a support ticket at 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. Quickly Getting Started with the Conversion Sample The fastest way to get started is to run the Conversion sample that is included with this product. You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET\Net\Sample. The Conversion sample will convert any supported document type into the file format you request and then display it. For more information, please see Appendix F,.NET Samples on how to find and run the Conversion sample. The Conversion sample uses three routines that are at the heart of RasterMaster.NET: 1. CIMG_decompress_bitmap() - reads in a document in any format and converts it to a valid Snowbound image. 2. CIMG_display_bitmap() - displays a valid Snowbound image. 3. CIMG_save_bitmap() - saves the valid Snowbound image to any available format. 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 performance, better quality output, or smaller output. For more information, please see Chapter 30, Color Promotion Functions and Chapter 31, Color Reduction Functions. 3. How to extract text and search for text in documents. For more information, please see Chapter 29, Document Conversion and Text Extraction Functions. Please note that Snowbound Software does not yet support OCR (Optical Character Recognition). Therefore, we can only extract text from documents that contain text. You can use Raster- Master.NET in conjunction with OCR tools from other companies if you need to extract text from scanned document images. 39

40 Chapter 1 - Quick Start We include a lot of code samples to help you get started. These samples are listed in Appendix F,.NET Samples. We have also indexed our documentation and made it searchable to help you find what you need quickly. If you have any questions please do not hesitate to open a support ticket at Viewing Samples Packaged with the Library To run a sample, open any of the samples described below in your development environment such as Visual Studio. Sample Directory Files The samples directory contains the.net Imaging SDK samples that are described in Table 2-1. All of the.net samples include C#.NET and VB.NET source code. For more information about each sample, see Appendix F,.NET Samples. Table 1.1: RasterMaster.NET Samples Directory Sample Alpha_csharp Alpha_VB Animate_CSHARP Animate_VB annaction_csharp annaction_vb Annotation_CSHARP Annotation_VB ASPConversion_CSHARP ASPConversion_VB ASPImageView_CSHARP Sample for using the.net library in C# to load, display the image, and use basic operations like zoom and rotate to manipulate the image. See Alpha for more information. Sample for using the.net library in Visual Basic to load, display the image, and use basic operations like zoom and rotate to manipulate the image. See Alpha for more information. Sample for displaying an animated GIF image in C#. See Animate for more information. Sample for displaying an animated GIF image in Visual Basic. See Animate for more information. Sample for using the.net library in C# mouse handler to add an annotation. See Annaction for more information. Sample for using the.net library in Visual Basic mouse handler to add an annotation. See Annaction for more information. Sample for using the.net library in C# to add an annotation. See Annotation for more information. Sample for using the.net library in Visual Basic to add an annotation. See Annotation for more information. Sample for demonstrating a simple conversion in C#. See ASP Conversion for more information. Sample for demonstrating a simple conversion in Visual Basic. See ASP Conversion for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in C# to load, display the 40

41 Chapter 1 - Quick Start Sample ASPImageView_VB ASPMemCopy_CSHARP ASPMemCopy_VB ASPMultiPage_CSHARP ASPMultiPage_VB Contrast_CSHARP Contrast_VB Conversion_CSHARP Conversion_VB ddbeffect_csharp ddbeffect_vb Encrypt_csharp Encrypt_VB FileMem_CSHARP image, and use basic operations like zoom and rotate to manipulate the image. See ASP Image View for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in Visual Basic to load, display the image, and use basic operations like zoom and rotate to manipulate the image. See ASP Image View for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in C# for saving and reading the image from memory. See ASP Memory Copy for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in Visual Basic for saving and reading the image from memory. See ASP Memory Copy for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in C# to browse multiple page images. See ASP Multiple Pages for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in Visual Basic to browse multiple page images. See ASP Multiple Pages for more information. Sample for comparing an image that had the brightness and contrast changed with the original/unmodified image in C#. See Contrast for more information. Sample for comparing an image that had the brightness and contrast changed with the original/unmodified image in Visual Basic. See Contrast for more information. Sample for demonstrating a simple conversion in C#. See Conversion for more information. Sample for demonstrating a simple conversion in Visual Basic. See Conversion for more information. Sample for showing how to get the DDB display effect from an image in C#. See DDB Effect for more information. Sample for showing how to get the DDB display effect from an image in Visual Basic. See DDB Effect for more information. Sample demonstrating how to use the Snowbound.Net library in C# to transparently decompress and display images. See Encryption for more information. Sample demonstrating how to use the Snowbound.NET library in Visual Basic to transparently decompress and display images. See Encryption for more information. Sample demonstrating how to read an image file into 41

42 Chapter 1 - Quick Start Sample ImageProcessing_CSHARP ImageProcessing_VB memcopy_csharp Memcopy_VB mergeimage_csharp page_csharp Page_VB panning_csharp panning_vb Print_CSHARP Print_VB Scan_CSHARP Scan_VB SimpleMultiPages_CSHARP SimpleMultiPages_VB textsearch_csharp textsearch_vb memory and use the Snowbound.NET library in C# to decompress the image from memory. See FileMem for more information. Sample showing how to apply the image processing operator in C#. See Image Processing for more information. Sample showing how to apply the image processing operator in Visual Basic. See Image Processing for more information. Sample demonstrating how to use the Snowbound.NET library in C# for saving and reading the image from memory. See Memory Copy for more information. Sample demonstrating how to use the Snowbound.NET library in Visual Basic for saving and reading the image from memory. See Memory Copy for more information. Sample demonstrating how to merge two images. See Merge Image for more information. Sample for displaying any page and using anti-aliasing if desired in C#. See Page for more information. Sample for displaying any page and using anti-aliasing if desired in Visual Basic. See Page for more information. Sample demonstrating panning in C#. See Panning for more information. Sample demonstrating panning in Visual Basic. See Panning for more information. Sample demonstrating printing and previewing in C# using the Snowbound product. See Print for more information. Sample demonstrating printing and previewing in Visual Basic using the Snowbound product. See Print for more information. Sample demonstrating how to use the Snowbound.NET library in C# for scanning functions. See Scan for more information. Sample demonstrating how to use the Snowbound.NET library in Visual Basic for scanning functions. See Scan for more information. Sample demonstrating how to split multiple pages in C#. See Split to Multiple Pages for more information. Sample demonstrating how to split multiple pages in Visual Basic. See Split to Multiple Pages for more information. Sample showing how to search text in the image in C#. See Text Search for more information. Sample showing how to search text in the image in Visual Basic. See Text Search for more information. 42

43 Chapter 1 - Quick Start Sample TIFFTag_CSHARP TIFFTag_VB Sample demonstrating how to use the Snowbound.NET library in C# for reading.tif tags. See Tiff Tag for more information. Sample demonstrating how to use the Snowbound.NET library in Visual Basic for reading.tif tags. See Tiff Tag for more information. Reading and Displaying Images The following section describes how to read and display images and remove images from memory. Reading Images To read an image, use the function below. int SNBDAPI CIMG_decompress_bitmap(String *filename); The input filename is a standard string pointing to an image file name. RasterMaster.NET always detects the format of an image (i.e..tif,.pcx,.gif). The return value is an error code that determines if the.net Snowbound object contains a valid image. You may call this function as many times as desired. See CIMG_decompress_bitmap() for more information on reading an image. Displaying an Image To display an image, use the function below. int SNBDAPI CIMG_display_bitmap(Graphics *g, int x, int y, int width, int height); This function displays the image referenced by the calling object at the x, y, width and height coordinates in pixels. See CIMG_display_bitmap_aspect() for more information on automatic aspect ratio correction. See bool repaintbackground() for more information on displaying an image. Return Values and Error Codes Snowbound file handles start with zero (0). The handle is simply an integer value to reference the image. 43

44 Chapter 1 - Quick Start All negative values are errors. See Appendix H, Snowbound Error Codes for a list of error codes for a list of error codes and error descriptions. System Overview RasterMaster.NET includes the technical specifications described below. Determining System Requirements System requirements to run RasterMaster.NET include: Supported Operating Systems - Any.NET Environment including the following: Microsoft Windows Vista Microsoft Windows XP Microsoft Windows XP/64* Microsoft Windows Server Microsoft Windows 2008 Microsoft Windows 7 Supported Platforms: Intel x86 AMD AMD x64 Development Environments: Microsoft Visual Studio.NET SDKs supporting.net 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..NET Framework 4.0 Support RasterMaster.NET is compatible with.net Framework 2.0 and above, including.net Framework 4.0. If you build with Visual Studio 2010 and select the target platform as.net 44

45 Chapter 1 - Quick Start Framework 4.0, then you must either: Set the project s app.config file to support the previous version of.net by setting the uselegacyv2runtimeactivationpolicy parameter to true as shown in the following example: uselegacyv2runtimeactivationpolicy="true" Request a special Visual Studio 2010.NET Framework 4.0 RasterMaster.NET build from Snowbound Software. You may do this by entering a support ticket at Once you have the.net 4.0 compatible RasterMaster library, you may reference it from your project. You do not have to set the uselegacyv2runtimeactivationpolicy parameter to true. Note: Please be careful about distinguishing the.net 2.0 and.net 4.0 RasterMaster libraries. Since the libraries have the same file names, please keep them in separate directories or rename the one you are not using. Determining Memory Requirements 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 folded up and compressed when it is stored. In order to see the document, it must be unfolded (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 Software does not have a one-size-fits-all recommendation for memory because our customers 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: Decrease the quality of the images requested by decreasing bits per pixel, the resolution, or the size. 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, 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. 45

46 Chapter 1 - Quick Start 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: (height_in_pixels * width_in_pixels * (bits_per_pixel/ 8)) = image_size_in_bytes Table 1.2: Memory Requirements Based on Image Size Image Size Required Memory 24-bit per pixel, 640 x 480 image 640 * 480 * (24 / 8) = bytes 1-bit per pixel, 8.5" x 11" image, at 300 dpi (2550 pixels 2550 * 3300 * (1 / 8) = bytes by 3300 pixels) 24-bit per pixel, 8.5" x 11" image, at 300 dpi (2550 pixels by 3300 pixels) 2550 * 3300 * (24 / 8) = bytes (25 megabytes) Version 19.8 and 19.7 Additions and Improvements The following are the new features and formats added to Version 19.8 and 19.7 of the RasterMaster.NET product. New Features Multiple enhancements and bug fixes. Microsoft Office 2016 support added as well. Extract and Append Page Ranges Added the ability to extract and append a range of pages instead of the entire document when saving to TIFF or PDF. This provides a shorter save time for documents with a large number of pages (100+). DOCM File Format Support Added support for the DOCM file format. DOCM is an MS Open Office XML format with macros enabled. Support <annid> Field Added support for the <annid> field. itext Licensing Update Updated the itext licensing call to use SnowboundLicense.jar. The following file is packaged within SnowboundLicense.jar: itextkey.xml File Update Moved the snowcommon.jar to the Samples directory because this file is needed to run the Java samples. This file was previously located in the SupportCode directory. 46

47 Chapter 1 - Quick Start If you have any questions you may contact Snowbound Technical Support at 47

48 Chapter 2 - Saving and Reading Multi-page Images Chapter 2 - Saving and Reading Multi-page Images This chapter describes how to decompress, determine page counts, save, and convert multipage images in the RasterMaster.NET. Multi-page Images All Snowbound libraries decompress a single page at a time. This section describes the multipage formats and how to decompress, determine page count, and save multi-page images. Supported Multi-page Formats RasterMaster.NET currently supports the following multi-page formats: TIFF DCX MO:DCA/IOCA PDF PCL MS Word - Reading MS Excel - Reading PowerPoint - Reading RTF - Reading: Please note that RTF does not do any vector conversions in Raster- Master.NET such as SVG, PDFA, or vector PDF. Decompressing a Multi-page Image Each page must be decompressed then saved separately. In other words, a decompress then save must be performed for each page. Determining Multi-page Page Count You can keep decompressing pages until a PAGE NOT FOUND or -11 error is returned from the decompress function or method, or you can query the number of pages with the CIMGLOW_ get_pages function. See CIMGLOW_get_pages() for more information. Saving Multi-page File Formats When saving to a multi-page file format, keep in mind that all RasterMaster products append or add new pages to an image file if the file already exists. If you do not want to keep saving to the 48

49 Chapter 2 - Saving and Reading Multi-page Images same file, you must save each page to a unique file name. Multi-page Format Functions Table 2.1: Supported Multi-page Functions Properties CIMGLOW_get_pages() CIMG_decompress_bitmap_page() Detects the number of pages in a file. See CIMGLOW_get_pages() for more information. Reads pages. Specify the specific page to import. See CIMG_decompress_ bitmap_page() for more information about this function. Saves multi-page images. For an existing file, new pages are appended. For new files, new pages with the specified name are created as necessary. CIMG_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. See CIMG_save_bitmap() for more informa-tion on these functions. 49

50 Chapter 3 - Printing Images Chapter 3 - Printing Images This chapter describes how to print images using the RasterMaster.NET. 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, the CIMG_print_bitmap_fast() command is the quickest. Printing Functions There are two printing functions available. Normal Printing Normally, to print an image, use the function below. CIMG_print_bitmap(Graphics *g, int x, int y, int width, int height) See CIMG_print_bitmap() for more information on normal printing. Fast Printing To print an image using fast printing, use the function below. CIMG_print_bitmap_fast(Graphics *g, int x, int y, int width, int height) 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 processing is done within the library when doing normal printing. See CIMG_print_bitmap_fast() for more information on fast printing. Note: This may not work with all printers. 50

51 Chapter 3 - Printing Images CIMG_print_bitmap() This function is a standard image print routine. 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.NET Evaluation\Net\Samples. This function is used in the Print sample. Note: A negative value indicates an error. See the imgerr.h file or Appendix H, Snowbound Error Codes. int SNBDAPI CIMG_print_bitmap(Graphics *g, int x, int y, int width, int height); Table 3.1: CIMG_print_bitmap Function s g x y width height Graphics object Starting X coordinate for display of image Starting Y coordinate for display of image Horizontal width to display image Vertical height to display image the status of the print bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_print_bitmap_fast() This function is a special image print routine. This function is different from CIMG_print_bitmap() because it sends the current Windows DIB specified by the image object directly to the printer. The printer is required to do the scaling and color reduction if necessary. Postscript printers will be much faster. 51

52 Chapter 3 - Printing Images Notes: This call may fail on some printers. If you have any problems with this function, use the standard CIMG_print_bitmap (). See CIMG_print_bitmap() for more information. The SNOWBND_ERROR value indicates a problem. See the SNOWBND_ERROR or Appendix H, Snowbound Error Codes for more information. int SNBDAPI CIMG_print_bitmap_fast(Graphics *g, int x, int y, int width, int height); Table 3.2: CIMG_print_bitmap_fast Function s g x y width height Graphics object Starting X coordinate for display of image Starting Y coordinate for display of image Horizontal width to display image Vertical height to display image the status of the print bitmap fast operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Printing Large Documents Printing large documents, such as documents approaching or exceeding 100 pages, or documents set to a resolution of 300 DPI or above, requires additional memory resources. These additional resource requirements can affect the performance of both servers and clients. 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 gigabytes you want to allocate to the Imaging server. 52

53 Chapter 3 - Printing Images 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. 53

54 Chapter 4 - Aspect Ratio Correction Function Chapter 4 - Aspect Ratio Correction Function This chapter describes the function used for aspect ratio correction within the RasterMaster.NET. Aspect Ratio Correction Function Table 4.1: Aspect Ratio Function Function CIMG_display_bitmap_aspect() Handles correction of aspect ratio but preserves the width and height of images when its window is resized. See CIMG_display_bitmap_aspect() for more information. 54

55 Chapter 5 - Display Quality Chapter 5 - Display Quality This chapter describes how to achieve the best display quality for an image using RasterMaster.NET. Achieving the Best Display Quality Achieving the best display quality of any image depends on the type of image being viewed. 24-Bit Images Displayed on a 256 Color Adapter To achieve the best display quality for 24-bit images displayed on a 256 color adapter, the default behavior is to convert the image at display time to 256 colors using a simple bayer matrix dither. You can change this to a better quality diffusion dithering by using the following call: CIMGLOW_set_dithermode(); This will, however, take a little longer to display the image. 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. See CIMGLOW_set_dithermode() and CIMG_remove_red_eye() for more information on displaying 24-bit images. Bi-Level and 1-Bit Per Pixel Images To achieve the best display quality for bi-level or 1-bit per pixel images, set the CIMGLOW_set_ alias() function to: 2 for scale to gray 1 for preserve black 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 preserve details that might normally be lost. Scale to Gray The scale to gray function converts the neighboring pixels to a 8-bit gray scale value. Best results are obtained on text type documents. 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

56 Chapter 6 - Image Compression Chapter 6 - Image Compression This chapter describes how to select the best compression for an image using RasterMaster.NET. 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. 24-Bit Color Images For 24-bit color images, use the JPEG format in RasterMaster.NET for the best conversion results. 8-Bit Gray Scale Images For 8-bit gray scale images, use the JPEG format in RasterMaster.NET for the best conversion results. 1-bit Bi-Level Images For 1-bit bi-level images, use the TIFF G4 in RasterMaster.NET for the best conversion results. The JBIG format works about twenty percent better than the TIFF G4 format, but it can be much slower. 56

57 Chapter 7 - File Format Conversion Chapter 7 - File Format Conversion This chapter describes how to convert an image to a different file format. Converting File Formats RasterMaster.NET supports over 100 file formats. Many formats such as TIFF are very broad in the internal support of compression and bit depths. Not all formats can support all bit depths. All RasterMaster products import and convert file formats to Snowbound s internal formats 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 B, Supported File Formats for a complete list of supported file formats. In general, RasterMaster.NET handles details like file format, bit-depth, bit ordering, and compression formats automatically. You will need only a few RasterMaster.NET calls to handle a wide variety of input and output file types. Automatically Detecting File Formats In most cases, you do not need to know the file format you wish to convert since RasterMaster.NET products automatically detect the file format regardless of the file extension. File extensions are not mandatory. RasterMaster.NET 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.NET, however, the library automatically determines the bits per pixel for the destination format and promotes accordingly. The data type CIMG_IMAGE_TYPE in.net library includes all current image types defined in the library. When we use.net library, instead of giving the format number such as 59, use CIMG_ IMAGE_TYPE.pdf. For example: status = simage.cimglow_set_auto_detect((int)cimg_image_type.ascii); You can read in almost any type of image or document using the CIMGLOW_set_document_ input(int, int, int) method. RasterMaster.NET 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 extension, RasterMaster.NET will still identify the format correctly. 57

58 Chapter 7 - File Format Conversion Input Document Quality: Resolution/DPI 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 documents take longer to process and take up more space in memory and when stored. You can adjust the quality using one of the CIMGLOW_set_document_input(int, int, int) methods. Input Document Quality: Color/bit-depth/Pixel Depth RasterMaster.NET 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.NET uses automatically vary by input format. For more information on file formats, please see Appendix B, Supported File Format. You can tell RasterMaster.NET to read in color documents as black and white to increase performance. You do this by calling CIMGLOW_set_document_input(int, int, int) with a bit-depth of 1. You can tell RasterMaster.NET to read in black and white documents as color. However, that is not recommended because it will hurt performance for no gain in quality. Making Sure Input is Compatible with Output Most of the time, the input that you read in will convert successfully to the output format you select in either CIMG_save_bitmap() or CIMG_save_document(). Getting a Pixel_Depth_Unsupported Error 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 B, Supported File Format to compare the bitdepths 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 CIMGLOW_get_filetype() to determine it. You can find the bit depth/bits per pixel of your image by calling CIMG_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. For example, if you are going from a black and white or grayscale to a color document that is color promotion because the bit-depth is going from low to high. Please see Chapter 30, Color Promotion Functions for information on RasterMaster.NET 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 31, Color Reduction Functions for information on Raster- Master.NET functions that you can use to adjust your image to a lower pixel depth. Adjusting Low Output Quality The output quality is affected by several factors described in the sections below: 58

59 Chapter 7 - File Format Conversion The Input Quality 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 document using CIMGLOW_set_document_input(int, int, int). If your output is coming out grainy, then check to see if your input is grainy too. If the input document looks good, then increase the input DPI using CIMGLOW_set_document_input(int, int, int). If the input is grainy, then you may need to do some image enhancement techniques. Contact Snowbound Support at for help. Color Reduction - Going from a Color Document to Black and White or Grayscale RasterMaster.NET 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 different color promotion or color reduction methods to fine tune your results. Please see the Chapter 30, Color Promotion Functions and Chapter 31, Color Reduction 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. Error During Conversion In some rare cases, there may be an error during conversion. The text for any of the error codes described in the table below can be obtained by calling ToErrorMessage(). Please provide the input file and a sample of the bad output to Snowbound Support at Conversion Takes Too Long or Output Is Too Large If you have selected high quality output by selecting 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 process 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 CIMGLOW_set_document_input(int, int, int) and/or in the output using color reduction, you should see better performance and smaller files. 59

60 Chapter 8 - Class Snow.Snowbnd Methods Chapter 8 - Class Snow.Snowbnd Methods This chapter describes the available methods for the Snow.Snowbnd class. Snowbnd() This is an alternate constructor that creates a new Snowbnd object by copying the contents of an existing Snowbnd object. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Alpha Animate Annaction Annotation ASP Conversion ASP Image View ASP Memory Copy ASP Multiple Pages Batch_XPS_Convert Contrast Conversion Convert_Doc DDB Effect DocClean Encryption FileMem 60

61 Chapter 8 - Class Snow.Snowbnd Methods Image Processing Memory Copy Merge Image Page Panning Print Scan Split to Multiple Pages Text Search Thumbnail Tiff Tag Web Image Viewer Component WPFAnnotation_CSHARP WPFConversion_CSHARP WPFScanning_CSHARP VectorConvertMem_CSHARP XPSMem_CSHARP Snowbnd(void); Snowbnd(int, int, int) This is an image constructor for the Snowbnd object. This allows the creation of a blank image with allocated memory. Snowbnd(int width, int height, int bitsperpixel); 61

62 Chapter 8 - Class Snow.Snowbnd Methods Table 8.1: Snowbnd(int width, int height, int bitsperpixel) Method s width Width of blank bitmap to create. height Height of bitmap to create. bitsperpixel Pixel depth of bitmap to create. Can be set to 1, 8, or

63 Chapter 9 - SDK Class Specific Methods Chapter 9 - SDK Class Specific Methods This chapter describes the SDK class specific functions for RasterMaster.NET. The chapter contains the following topics: isvalidimage() This function checks to see if the image is decompressed into the object. It checks that the image data for the object is present or valid. virtual bool isvalidimage(void); clearimage() This function takes what is in the object, removes image data, and resets the class. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Animate DDB Effect Encryption FileMem Image Processing Memory Copy Text Search Tiff Tag virtual int clearimage(void); 63

64 Chapter 9 - SDK Class Specific Methods ToErrorMessage() This method checks for errors and returns the appropriate error message for the found error. String SNBDAPI ToErrorMessage(status); Table 9.1: ToErrorMessage status The error code. he text of the error message. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 64

65 Chapter 10 - SnowPanel Class Specific Methods Chapter 10 - SnowPanel Class Specific Methods This chapter describes the SnowPanel class specific methods. Properties This section lists the properties used in the SnowPanel class specific methods: Table 10.1: SnowPanel Class Specific Method Properties Property Zoom Type DoubleBuffered Gets and sets user defined zoom value ASPECT_ZOOM type values. the zoom value as an ASPECT_ZOOM. Sets the double buffer display on or off CustomPaint() This function is the main paint method for the Snowbound image to the screen. This function is only used for the SnowPanel class. The user can override CustomPaint to provide his own CustomPaint method. public virtual void CustomPaint(Graphics *g); Table 10.2: CustomPaint g Graphics object the status of the graphics object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 65

66 Chapter 10 - SnowPanel Class Specific Methods OnPaint() This function calls CustomPaint to draw the image using the CustomPaint method. How this method paints is based on the DoubleBuffer property. protected virtual void OnPaint(PaintEventArgs *e); Table 10.3: OnPaint PaintEventArgs Standard.NET event handle the status of the standard.net event handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. OnPaintBackground() This function repaints the background color and image of the SnowPanel class depending on if the background image is available. How this method paints is based on the DoubleBuffer property. protected virtual void OnPaintBackground(PaintEventArgs *pevent); Table 10.4: OnPaintBackground PaintEventArgs Standard.NET event handle the status of the standard.net event handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. OnSizeChanged() This function is used when the SnowPanel class is resized to preserve the display. 66

67 Chapter 10 - SnowPanel Class Specific Methods protected virtual void OnSizeChanged(EventArgs *e); Table 10.5: OnSizeChanged EventArgs Standard.NET event handle the status of the standard.net event handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 67

68 Chapter 11 - Scanning Functions Chapter 11 - Scanning Functions This chapter describes the scanning functions and parameters. Scanning Constants Shown below is the structure for setting scanning parameters. Example 11.1: public gc class CSCAN_CAPS { public: int bitspix; /* bits per pixel */ double left; /* window x start pos in inches */ double top; /* window y start pos in inches */ double right; /* window x size in inches */ double bottom; /* window y size in inches */ int hres; /* x resolution in pixels */ int vres; /* y resolution in pixels */ s Table 11.1: CSCAN_CAPS s int bitspix double left double top double right double bottom int hres int vres Bits per pixel Window x start pos in inches Window y start pos in inches Window x size in inches Window y size in inches X resolution in pixels Y resolution in pixels CIMG_scan_acquire() This TWAIN scanning routine scans an image on the currently installed scanner or input device. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Scan sample. 68

69 Chapter 11 - Scanning Functions Notes: CIMG_scan_open_source()must be called first. See CIMG_scan_open_source() for more information. The Snowbound control must be visible. int SNBDAPI CIMG_scan_acquire(Control *win_control, int ishowui); Table 11.2: CIMG_scan_acquire Function win_control ishowui Window form control object 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_acquire_feeder() 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 is returned then close the scanner with the CIMG_scan_feeder_close() function. See CIMG_scan_feeder_close() for more information. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Scan sample. Note: A negative value indicates (NO_MORE_PAGES) is returned when the feeder is empty. int SNBDAPI CIMG_scan_acquire_feeder(Control *win_control, int ishowui); 69

70 Chapter 11 - Scanning Functions Table 11.3: CIMG_scan_acquire_feeder Function s win_control ishowui Window form control object 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. int SNBDAPI CIMG_scan_acquire_feeder_fast(Control *win_control, int ishowui, int iduplex); Table 11.4: CIMG_scan_acquire_feeder_fast Function s win_control ishowui iduplex Window form control object 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box 1 = set duplex scanning mode the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_feeder_close() This TWAIN scanning function closes the scanner after calls to the CIMG_scan_acquire_ feeder() function. Use this function after receiving the NO_MORE_PAGES error message from the CIMG_scan_acquire_feeder() function. See CIMG_scan_acquire_feeder() for more information. 70

71 Chapter 11 - Scanning Functions You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Scan sample. int SNBDAPI CIMG_scan_feeder_close(void); the status of the close. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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.NET Evaluation\Net\Samples. This function is used in the Scan sample. int SNBDAPI CIMG_scan_get_cap(Control *win_control, int cap); Table 11.5: CIMG_scan_get_cap Function s win_control cap Window form control object TWAIN scanner capability to retrieve the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_open_source() This TWAIN scanning function displays a dialog box which allows for setting available input devices. It then displays a dialog box for selecting the available input devices. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Scan sample. 71

72 Chapter 11 - Scanning Functions int SNBDAPI CIMG_scan_open_source(Control *win_control); Table 11.6: CIMG_scan_open_source Function win_control Window form control object the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_pages() This TWAIN scanning routine scans all pages from the currently selected scanner or input device and saves to the path/filename specified by the 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: img, img, etc. for each page. For multi-page file types such as TIFF, DCX, or MO:DCA:OCA, you must specify a valid filename. For other file types, the filename can only contain a path. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Scan sample. Note: Normally the ishowui will be turned off for multi-page scanning. int SNBDAPI CIMG_scan_pages(Control *win_control, String strfilename, int ifiletype, int ishowui); Table 11.7: CIMG_scan_pages Function s win_control strfilename Window form control object Output file name to create as a scanned image 72

73 Chapter 11 - Scanning Functions ifiletype ishowui See Appendix B, Supported File Format for file type formats in which to save compressed images 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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 current installed scanner or input device and saves them to the specified path/filename. The file format is specified by the ifiletype 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: img, img, etc. for each page. For multi-page file types such as TIFF, DCX, or MO:DCA:IOCA you must specify a valid filename and all pages will be stored in a single multi-page image. For other file types, the filename can only contain a path. Note: Normally the ishowui will be turned off for multi-page scanning. int SNBDAPI CIMG_scan_pages_fast(Control *win_control, String strfilename, int ifiletype, int ishowui, int iduplex); Table 11.8: CIMG_scan_page_fast Function s win_control strfilename ifiletype ishowui iduplex Window form control object Output file name File type (from imglib.h) 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box 1 = set duplex scanning mode 73

74 Chapter 11 - Scanning Functions the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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.NET Evaluation\Net\Samples. This function is used in the Scan sample. int SNBDAPI CIMG_scan_set_cap(Control *win_control, int cap, int value); Table 11.9: CIMG_scan_set_cap Function s win_control cap value Window form control object Current TWAIN capability to set New setting for TWAIN capability the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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.NET Evaluation\Net\Samples. This function is used in the Scan sample. int SNBDAPI CIMG_scan_set_caps(CSCAN_CAPS *new_caps); Table 11.10: CIMG_scan_set_caps Function 74

75 Chapter 11 - Scanning Functions new_caps Pointer to the CSCAN_CAPS structure the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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 scanning occurs unless one of the other scan acquiring functions are called. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Scan sample. int SNBDAPI CIMG_scan_setup(Control *win_control); Table 11.11: CIMG_scan_setup Function win_control Window form control object Example 11.2 CIMGLOW_ooxml_license_enable string licensepath = ""; status = snowbnd.cimglow_ooxml_license_enable(ref licensepath); Console.WriteLine(licensePath); the Window form control object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 75

76 Chapter 12 - Scrollbar Default Functions Chapter 12 - Scrollbar Default Functions This chapter describes the RasterMaster.NET scrollbar default functions. Properties Properties This section lists the properties used in the scrollbar default functions: Table 12.1: Scrollbar Default Function Properties Property Hsb Vsb Status StatusDetails Gets and sets the horizontal scrollbar Gets and sets the vertical scrollbar Gets the GENERAL_STATUS error codes Gets the detailed status error codes SnowbndCNet_HScrollBar() This function controls how an image is scrolled. virtual void SnowbndCNet_HScrollBar(Object *sender, ScrollEventArgs *se); Table 12.2: SnowbndCNet _HScrollBar s sender ScrollEventArgs Standard.NET object Standard.NET object the standard.net object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. SnowbndCNet_VScrollBar() This function controls how an image is scrolled. 76

77 Chapter 12 - Scrollbar Default Functions virtual void SnowbndCNet_VScrollBar(Object *sender, ScrollEventArgs *se); Table 12.3: SnowbndCNet _VScrollBar s sender ScrollEventArgs Standard.NET object Standard.NET object the standard.net object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 77

78 Chapter 13 - Image Decompression Functions Chapter 13 - Image Decompression Functions This chapter describes the RasterMaster.NET image decompression functions. CIMG_decompress_bitmap() This is the main function for loading a compressed or uncompressed image from disk. It converts the data to a Windows DIB format in memory. It supports unicode file name input. This function is used to read in any supported format including MO:DCA, AFP, PCL, PDF, RTF, or Word. See Appendix B, Supported File Format for a list of supported file formats.you do not need to know the format of the document before using the decompress bitmap function. Simply provide the document to this function and it will automatically detect the format and convert it to bitmap. Please note that RTF does not do any vector conversions in RasterMaster.NET such as SVG, PDFA, or vector PDF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Alpha Animate Annaction Annotation ASP Conversion ASP Image View ASP Memory Copy ASP Multiple Pages Contrast Conversion Convert_Doc 78

79 Chapter 13 - Image Decompression Functions DocClean DDB Effect Encryption Image Processing Memory Copy Merge Image Page Panning Print Scan Split to Multiple Pages Text Search Thumbnail Tiff Tag WPF Image WPFAnnotation_CSHARP WPFConversion_CSHARP WPFScanning_CSHARP int SNBDAPI CIMG_decompress_bitmap(String *filename); Table 13.1: : CIMG_decompress_bitmap Function filename File or path/filename of the image to load 79

80 Chapter 13 - Image Decompression Functions the status of the decompress bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_decompress_bitmap_display() This function is the same as CIMG_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. It decompresses and displays faster using the normal CIMG_decompress_bitmap() and CIMG_display_bitmap() functions. See CIMG_decompress_bitmap() and CIMG_display_bitmap() for more information. int SNBDAPI CIMG_decompress_bitmap_display(String *filename, Graphics* g, int xpos, int ypos, int width, int height, int aspect); Table 13.2: CIMG_decompress_bitmap_display Function s filename g xpos ypos width height aspect File or path/filename of the image to load. Graphics object. Starting X coordinate for display of image. Starting Y coordinate for display of image. Width for display of image. 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 retained. This may make the height or width smaller than expected but never larger. the status of the decompress bitmap display operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 80

81 Chapter 13 - Image Decompression Functions CIMG_decompress_bitmap_fd() This function decompresses from a file handle returned from Windows OpenFile() or _ lopen(). 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. int SNBDAPI CIMG_decompress_bitmap_fd(FileStream *filestream, int offset, int page); Table 13.3: CIMG_decompress_bitmap_fd Function s filestream Handle returned from a Windows OpenFile() call offset Offset into file for embedded images, usually 0 page Page number starting at 0 for decompressing multi-page files such as TIFF, DCX, or MODCA:IOCA the status of the decompress file handle operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_decompress_bitmap_FlexSnap() This function decompresses from Snowbound s FlexSnap server. int SNBDAPI CIMG_decompress_bitmap_FlexSnap(String *strserver, String *strfilename, int page); Table 13.4: CIMG_decompress_bitmap_FlexSnap Function s strserver strfilename page Server URL address The image file name to decompress The desired page number starting at zero 81

82 Chapter 13 - Image Decompression Functions the status of the decompress bitmap FlexSnap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_decompress_bitmap_mem() This function decompresses from a memory pointer. Like all other decompress functions, the data is converted to a Windows DIB format in memory. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: ASP Memory Copy Memory Copy FileMem Note: It is best to allocate an extra 30K of memory for the image buffer passed into the function. int SNBDAPI CIMG_decompress_bitmap_mem(Array *data, int page); Table 13.5: CIMG_decompress_bitmap_mem Function s data page Memory Pointer to compressed image data Page number starting at 0 for decompressing multi-page image files the status of the decompress bitmap memory operation. Any value less than zero is a Snowbound error code. See Appendix H,Snowbound Error Codes for a list of error codes. 82

83 Chapter 13 - Image Decompression Functions CIMG_decompress_bitmap_page() The function loads a compressed or uncompressed specific page of image file from disk. It converts the data to a Windows DIB format in memory. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: ASP Multiple Pages Batch_XPS_Convert DocClean Page Scan Split to Multiple Pages Text Search Thumbnail WPFAnnotation_CSHARP WPFConversion_CSHARP WPFScanning_CSHARP XPSMem_CSHARP int SNBDAPI CIMG_decompress_bitmap_page(String *filename, int page); Table 13.6: CIMG_decompress_bitmap_page Function s filename page File path and name of the image to load. Desired page number starting at zero. 83

84 Chapter 13 - Image Decompression Functions the status of the decompress bitmap page operation. A value of 0 or 1 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_decompress_bitmap_url() The function decompresses an image from a Uniform Resource Locator (URL) address. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Web Image Viewer Component sample. int SNBDAPI CIMG_decompress_bitmap_url(String *strurl, int page); Table 13.7: CIMG_decompress_bitmap_url Function s strurl page The URL address that points to the image. The page number starting at 0 for decompressing multipage image files. Example 13.1 CIMG_decompress_bitmap_url status = simage.cimg_decompress_bitmap_url(" 0); status = simage.cimg_decompress_bitmap_url(" images/test.pdf", 0); the status of the decompress bitmap URL operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_decompress_bitmap_xps() The function decompresses an XPS file. 84

85 Chapter 13 - Image Decompression Functions Note: This function is only available in the Visual Studio 2005.NET library build with.net Framework 3.0 support. int SNBDAPI CIMG_decompress_bitmap_xps(String *filename, int ipage); Table 13.8: CIMG_decompress_bitmap_xps Function s filename ipage Path/filename of the XPS file The page index of the XPS document to render the status of the decompress bitmap XPS operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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 (maybe fill order also). It then seeks the beginning of the compressed data. Call this function to decompress the data and convert it into a Windows DIB in memory. int SNBDAPI CIMG_decompress_fax(FileStream *filestream, int xsize, int ysize, int type, int fill_order); Table 13.9: CIMG_decompress_fax Function s filestream 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 fill_order Bit order in each byte, may be 0 or 2 85

86 Chapter 13 - Image Decompression Functions 0 = Normally for CALS 2 = Normally for G3 and G4 the status of the decompress fax operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. int SNBDAPI CIMG_decompress_fax_mem(Array *data, int xsize, int ysize, int type, int fill_order); Table 13.10: CIMG_decompress_fax_mem Function s data xsize ysize type fill_order Pointer to image data in memory Horizontal width of the image after decompression Vertical height of the image after decompression 2 = for group 3 2d images 3 = for group 3 and 4 for Group 4 images Bit order in each byte, may be 0 or 2, normally: 2 for G3 and G4 0 for CALS the status of the decompress fax memory operation. Any value less than zero is a Snowbound error codesee Appendix H, Snowbound Error Codes for a list of error codes. CIMG_decompress_tiled_bitmap() This function decompresses the tiled image/pathname specified by the filename. The tiled image is completely decompressed and all tiles are assembled into one image. The normal CIMG_decompress_bitmap() decompresses each tile as a multi-page, unassembled file of tile images. Each tile is decompressed into a separate file. 86

87 Chapter 13 - Image Decompression Functions To decompress a tiled image using CIMG_decompress_bitmap_fd(), treat each tile as if it were the next page of a multi-page image. See CIMG_decompress_bitmap() and CIMG_decompress_bitmap_fd()for more information. int SNBDAPI CIMG_decompress_tiled_bitmap(String *filename, int page); Table 13.11: CIMG_decompress_tiled_bitmap Function s filename page Path/filename of tiled image to return information on Page number for multi-page files the status of the decompress tiled bitmap operation. Any value less than zero is a Snowbound error code.see Appendix H, Snowbound Error Codes for a list of error codes. 87

88 Chapter 14 - Image Decompression Option Functions Chapter 14 - Image Decompression Option Functions This chapter describes the RasterMaster.NET image decompression option functions. CIMGLOW_set_auto_detect() This global function turns the automatic file type detection on for verifying the desired format. The data type CIMG_IMAGE_TYPE in.net library includes all current image types defined in library. When we use.net library, instead of giving the format number such as 59, use CIMG_ IMAGE_TYPE.pdf. For example: status = simage.cimglow_set_auto_detect((int)cimg_image_type.ascii); int SNBDAPI CIMGLOW_set_auto_detect(int format); Table 14.1: CIMGLOW_set_auto_detect Function format Image format type from the defined list in imglib.h 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 H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_decomp_rect() This global function decompresses and holds in memory only the data contained in the specified cropping 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. 88

89 Chapter 14 - Image Decompression Option Functions int SNBDAPI CIMGLOW_set_decomp_rect(int x, int y, int width, int height); Table 14.2: CIMGLOW_set_decomp_rect Function s x y width height Start of x cropping rectangle Start of y cropping rectangle Width of cropping rectangle Height of cropping rectangle the status of the set decompressed rectangle operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_decomp_reduction() This global function forces color reduction at decompression. If this function is set to 8, for instance, all 24-bit images are reduced and stored in memory as 8-bit images. int SNBDAPI CIMGLOW_set_decomp_reduction(int bitsperpixel); Table 14.3: CIMGLOW_set_decomp_reduction Function bitsperpixel Pixel depth of bitmap to create the status of the set decompressed reduction operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 89

90 Chapter 14 - Image Decompression Option Functions CIMGLOW_set_decompsize() This global function forces all images to be scaled as they are decompressed. This is useful for creating icons. If the width and height are set to 100, the image in memory is scaled to 100 by 100 using much less memory. int SNBDAPI CIMGLOW_set_decompsize(int width, int height); Table 14.4: CIMGLOW_set_decompsize Function s width height Width to decompress image Height to decompress image 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 H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_jpeg_decompression This global function gets the frequency components in JPEG images after the Huffman decompression. These values will also be de-quantized. They will replace the internal RGB data normally returned from decompressing a JPEG image. The components will be in the same order as the uncompressed image, except they will be 32- bit integer values for each plane. int SNBDAPI CIMGLOW_set_jpeg_decompression(int mode); Table 14.5: CIMGLOW_set_jpeg_decompression Function mode 0 = normal JPEG decompression 1 = returns the array of 8x8 blocks of frequency components 90

91 Chapter 14 - Image Decompression Option Functions the status of the JPEG decompression. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_overlay_path() This global 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, this function is used when 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: Only used with certain overlay files. int SNBDAPI CIMGLOW_set_overlay_path(String *path); the status of overlay path. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_pdf_input() This global function converts PDF files into a raster image when being decompressed into RasterMaster.NET. This function allows the type of bitmap created to be specified. Note: PDF reading is an optional module available in the PDF plugin for Windows DLL and ActiveX products. int SNBDAPI CIMGLOW_set_pdf_input(int dpi, int bitsperpixel); 91

92 Chapter 14 - Image Decompression Option Functions Table 14.6: CIMGLOW_set_pdf_input Function s dpi bitsperpixel Controls the width and height of the file. Set to 200 or 300 for black and white images. Set to 100 or 200 for color images. Allows importing color or black and white images. 1 = black and white documents 24 = color images the status of PDF input. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_pdf_password() This function allows passing a password string to allow for decompressing PDF files that are password protected. Make this call before calling any of the RasterMaster decompress calls such as CIMG_decompress_bitmap(). int SNBDAPI CIMGLOW_set_pdf_password(String *filename); Table 14.7: CIMGLOW_set_pdf_password Function s filename String represented password to use to open a password protecting PDF file. the status of PDF password. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 92

93 Chapter 14 - Image Decompression Option Functions CIMGLOW_unset_auto_detect() This global function turns the automatic file type detection off for the desired format. This file type is then no longer decompressed by the library. int SNBDAPI CIMGLOW_unset_auto_detect(int format); Table 14.8: CIMGLOW_unset_auto_detect Function format Image format type from the defined list in imglib.h 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 H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 93

94 Chapter 15 - Image Creation Functions Chapter 15 - Image Creation Functions This chapter describes the RasterMaster.NET image creation functions. CIMG_create_bitmap_class() This function creates a bitmap object from the Snowbound object. Bitmap* CIMG_bitmap_class(int width, int height); Table 15.1: CIMG_create_bitmap_class Function width height Width of the bitmap object Height of the bitmap object the status of the create bitmap object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_create_handle() This function imports a Windows DIB created externally from the library. This function makes a copy of the image DIB and does not alter or delete the lpbih or the DIB data passed in. int SNBDAPI CIMG_create_handle(int width, int height, int bitsperpixel); Table 15.2: CIMG_create_handle Function width height bitsperpixel Width of the handle Height of the handle Pixel depth of bitmap to create 94

95 Chapter 15 - Image Creation Functions the status of the create handle operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_create_handle_ddb() This function allows importing of an old-style Windows HBITMAP or Device Dependent Bitmap (DDB). This does not alter the original bitmap, but simply copies and converts the data to the library s internal DIB format. int SNBDAPI CIMG_create_handle_ddb(Graphics *g, Bitmap* pbitmap, IntPtr hpal); Table 15.3: CIMG_create_handle_ddb Function s g Bitmap hpal Graphics object GDI + Bitmap object Windows palette for the bitmap image the graphics object. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_create_handle_keep() This function imports a Windows DIB created externally from the library. It returns a standard image handle for displaying, saving, or printing. Note: This function does not make a copy of the image DIB; it uses the pointer and data directly. After a call to this function, do not delete the lpbih pointer or alter it in any way. int SNBDAPI CIMG_create_handle_keep(CDIB_HEADER *dib_header); Table 15.4: CIMG_create_handle_keep Function 95

96 Chapter 15 - Image Creation Functions dib_header Pointer to a CDIB_HEADER structure that contains the image header. For more information, see public class CDIB_HEADER. the status of the keep image handle operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 96

97 Chapter 16 - HTML Functions Chapter 16 - HTML Functions This chapter describes the HTML functions available in the current version of RasterMaster.NET. Note: The HTML plugin option requires.net 4.0 CIMGLOW_set_html_input() This function sets parameters for HTML rendering. int SNBDAPI CIMGLOW_set_html_input(int print_dpi, int bits_pix); s Table 16.1: CIMGLOW_set_html_input function variable descriptions. print_dpi Used for rendering purposes. The default value is bits_pix Sets the bits per pixel. Only 1, 24, and 32 are supported. The default value is 24. 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 H,Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_page_size() This function sets the page size in pixels for screen size purposes. These values are just a suggestion and will probably be over-written to more appropriate values during program execution. The measurement units are in inches. int SNBDAPI CIMGLOW_set_html_page_size(float w, float h); s Table 16.2: CIMGLOW_set_html_page_size function variable descriptions. 97

98 Chapter 16 - HTML Functions w Sets the width. The default value is 8.5. h Sets the height. The default vaule is 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 H,Snowbound Error Codes for a list of error codes. Functions Available in RasterMaster.NET V18.1 and Earlier The functions in this section are available in RasterMaster.NET V18.1 and any releases previous to V18.1. CIMGLOW_set_html_capabilities() This function sets various parameters for the HTML renderer: Enables or disables image capabilities for the HTML renderer. Enables or disables JavaScript capabilities for the HTML renderer. Enables or disables the use of the page size ratio capability of the HTML document. Enables or disables the exclusive use of print page breaks to signal page boundaries. Sets the ratio of the width to the height of the pages extracted from the HTML document. 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. int SNBDAPI CIMGLOW_set_html_capabilities(int isimageenabled, int isjavascriptenabled, int isratioenabled, int ispagebreaksexclusive, Double dratio); s Table 16.3: CIMGLOW_set_html_capabilities Function s 98

99 Chapter 16 - HTML Functions isimageenabled isjavascriptenabled isratioenabled ispagebreaksexclusive dratio Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. Sets the width/height ratio. The default value is 8.5/11.0. (i.e. US LETTER portrait-mode). Note: The ratio value is not set if the isratioenabled value is disabled. the status of the Snowbound error code. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_home_dir() This function sets the home directory for the HTML renderer. int SNBDAPI CIMGLOW_set_html_home_dir(String dir); s Table 16.4: CIMGLOW_set_html_home_dir function variable descriptions. dir This value does not support double-byte characters (i.e. ASCII only). the status of the Snowbound error code. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 99

100 Chapter 16 - HTML Functions CIMGLOW_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. int SNBDAPI CIMGLOW_set_html_image_capability(int isenabled); s Table 16.5: CIMGLOW_set_html_image_capability function variable descriptions. isenabled Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. the status of the Snowbound error code. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_javascript_capability() This function enables or disables JavaScript capabilities for the HTML renderer. 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 renderer engine does not support all Microsoft Internet Explorer-only functions. int SNBDAPI CIMGLOW_set_html_javascript_capability(int isenabled); 100

101 Chapter 16 - HTML Functions s Table 16.6: CIMGLOW_set_html_javascript_capability function variable descriptions. isenabled Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. the status of the Snowbound error code. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_page_size_ratio() This function sets the ratio of the width to the height of the pages extracted from the HTML document. int SNBDAPI CIMGLOW_set_html_page_size_ratio(int ratio); s Table 16.7: CIMGLOW_set_html_page_size_ratio function variable descriptions. ratio Sets the width/height ratio. The default value is 8.5/11.0. (i.e. US LETTER portrait-mode). Note: The value is ignored if the page size ratio capability is disabled. 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_page_size_ratio_capability() This function enables or disables the use of the page size ratio capability of the HTML document by forcing a page size ratio capability in the HTMLdocument. int SNBDAPI CIMGLOW_set_html_page_size_ratio_capability(int isenabled); 101

102 Chapter 16 - HTML Functions s Table 16.8: CIMGLOW_set_html_page_size_ratio_capability function variable descriptions. isenabled Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_screen_dpi() This function sets the screen DPI used for layout purposes. int SNBDAPI CIMGLOW_set_html_screen_dpi(Double screen_dpi); s Table 16.9: CIMGLOW_set_html_screen_dpi function variable descriptions. screen_dpi Set the screen DPI. The default value is Note: The value is ignored if the pixel width is set to anything but zero (0). the status of the Snowbound error code. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_use_page_breaks_exclusively() CIMGLOW_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. int SNBDAPI CIMGLOW_set_html_use_page_breaks_exclusively(int isenabled); 102

103 Chapter 16 - HTML Functions s Table 16.10: CIMGLOW_set_html_use_page_breaks_exclusively function variable descriptions. isenabled Set the value to 0 to disable. Set the value to 1 to enable. The default value is 1. Note: This variable is only to be used in specific cases where print page breaks tags are used. the status of the Snowbound error code. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_html_utf_bom() This function forces this Unicode Byte-Order-Mark (BOM) to all HTML data read by Raster- Master.NET. 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 character 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 environment. int SNBDAPI CIMGLOW_set_html_utf_bom(int utf_bom); s Table 16.11: CIMGLOW_set_html_utf_bom Function s utf_bom May be set to one of the following values as defined in imglib.h: Please see Table for byte order marks by encoding. 103

104 Chapter 16 - HTML Functions NOT_UNICODE 0 UTF_8 1 UTF_16BE 2 UTF_16LE 3 UTF_32BE 4 UTF_32LE 5 UTF_7 6 UTF_1 7 UTF_EBCDIC 8 SCSU 9 BOCU_1 10 B_ Table 16.12: Representations of byte order marks by encoding Encoding Representation Representation Representation (hexadecimal) (decimal) (ISO ) UTF_8 EF BB BF ï» UTF_16BE FE FF þÿ UTF_16LE FF FE ÿþ UTF_32BE FE FF ??þÿ (? is the ascii null character) UTF_32LE FF FE ÿþ?? (? is the ascii null character) UTF_7 2 2B 2F 76, and one of , and one of the +/v, and one of the following: the following: following: / [ B 2F ] [ ] UTF_1 F7 64 4C dl UTF_EBCDIC DD Ýsfs SCSU 0E FE FF ?þÿ (? is the ascii "shift out" 104

105 Chapter 16 - HTML Functions Encoding Representation Representation (hexadecimal) (decimal) BOCU_1 FB EE 28 optionally optionally followed by 255 followed by FF 4 GB_ Representation (ISO ) character) ûî( optionally followed by ÿ 1 3 ( and are unmapped ISO characters) 1 While identifying text as 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. 2 In UTF-7, the fourth byte of the BOM, before encoding as base64, is xx 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. 3 SCSU 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. the status of the Snowbound error code or the current BOM the system will use. See Appendix H, Snowbound Error Codes for a list of error codes. 105

106 Chapter 17 - Open Office 2007 XML (OOXML) Functions Chapter 17 - Open Office 2007 XML (OOXML) Functions This chapter describes the RasterMaster.NET Office Open XML (OOXML) format functions. RasterMaster.NET 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. The CIMG_decompress_bitmap() function will automatically detect OOXML format documents and process them when the DOCX library file has been installed and registered with Raster- Master.NET. If the Office2010 option evaluation license is not found by RasterMaster.NET, the system will return the error code DLL_NOT_LOADED (-24). CIMGLOW_set_ooxml_license() This function loads the OOXML license file. Note: Please use CIMGLOW_ooxml_license_enable() to enable the license file. CIMGLOW_ license_enable() only needs to be called once to cover all of the Office types: Word, Excel, and PPT. int CIMGLOW_set_ooxml_license(String licensefile); Table 17.1: CIMGLOW_set_ooxml_license function variable descriptions. licensefile File name of the license file. For example: c:\\temp\\license.txt the last error encountered while loading the products. The error returned will be for the last product that was loaded. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_ooxml_license_enable() This function simplifies Office2010 option evaluation licensing by setting the license path. 106

107 Chapter 17 - Open Office 2007 XML (OOXML) Functions int CIMGLOW_ooxml_license_enable(char* licensepath, int npathlength); Table 17.2: CIMGLOW_ooxml_license_enable Function licensepath Buffer to receive path name of folder containing the license file or NULL if no licenses found. This buffer must be allocated by calling application. 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 H, Snowbound Error Codes for a list of error codes. 107

108 Chapter 18 - Image Saving Functions Chapter 18 - Image Saving Functions This chapter describes RasterMaster.NET image saving functions. CIMG_save_bitmap() This function saves an image to disk in any format desired. It supports unicode file name input. You can save images as black and white, grayscale or color by specifying the appropriate bit depth and choosing an output format that supports that bit depth. See Chapter 30, Color Promotion Functions and Chapter 31, Color Reduction Functions for more information on changing the color and bit-depth of an image. See the Supported Bit Depths for Image Formats in Appendix B, Supported File Formatfor details on what bit-depths are available for each format. One way to decrease the output file size is to use CIMGLOW_set_document_input to specify a lower DPI before opening the input file with CIMG_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 CIMGLOW_set_comp_quality method. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: ASP Conversion ASP Memory Copy Batch_XPS_Convert Conversion Convert_Doc Encryption Merge Image Scan Split to Multiple Pages WPFAnnotation_CSHARP WPFConversion_CSHARP 108

109 Chapter 18 - Image Saving Functions WPFScanning_CSHARP XPSMem_CSHARP Note: If the type is -1, the library looks at the file extension for determining the output file type. int SNBDAPI CIMG_save_bitmap(String *filename, int format); Table 18.1: CIMG_save_bitmap Function s filename format File or path/filename for output image See Appendix B, Supported File Format for all image types allowed and all files shipped with the product 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 H, Snowbound Error Codes for a list of error codes. CIMG_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. Note: If the type is -1, the library looks at the file extension for determining the output file type. int SNBDAPI CIMG_save_bitmap_fd(FileStream *filestream, int format); Table 18.2: CIMG_save_bitmap_fd Function s 109

110 Chapter 18 - Image Saving Functions filestream format Windows file handle obtained from OpenFile or _lopen See Appendix B, Supported File Format for all image types allowed the status of the save bitmap file handle operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_save_bitmap_mem() This function saves an image to a memory pointer in the format specified by the file type. After calling 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 CIMG_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 to avoid the library presuming 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.NET Evaluation\Net\Samples. This function is used in the following samples: ASP Memory Copy Memory Copy long SNBDAPI CIMG_save_bitmap_mem(Array *data, int format); Table 18.3: CIMG_save_bitmap_mem Function s data format Windows memory pointer already allocated See Appendix B, Supported File Format for all image types allowed the total size of the compressed image. Any value less than zero is a Snowbound error code. See Appendix H - Error Codes for a list of error codes. 110

111 Chapter 18 - Image Saving Functions CIMGLOW_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 information) directly from a scanner or other input device. int SNBDAPI CIMGLOW_write_tiff_stream(CDIB_HEADER *dib_header, Array *arrdata, int data_size, int file_type, String *strfilename); Table 18.4: CIMGLOW_write_tiff_stream Function s dib_header arrdata data_size file_type strfilename Pointer to a CDIB_HEADER structure contains the image header. For more information, see public class CDIB_ HEADER. Data to write out Size of data stream in bytes TIFF file type to write Output file name the status of the TIFF stream. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 111

112 Chapter 19 - Image Saving Option Functions Chapter 19 - Image Saving Option Functions This chapter describes the RasterMaster.NET image saving option functions. CIMG_set_encrypt() This global 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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Encryption sample. Note: The key need only be set once for each instance of the program. int SNBDAPI CIMG_set_encrypt(int on_off, int key); Table 19.1: CIMG_set_encrypt Function s on_off key Turns encryption on or off for an image at save A long user defined key for encryption the set encryption. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_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 setting. There is no get method. 112

113 Chapter 19 - Image Saving Option Functions int SNBDAPI CIMGLOW_set_comp_quality(int quality); Table 19.2: CIMGLOW_set_comp_quality Function quality Integer between = Smallest file size but least quality 100 = Best image quality and largest file size the set compression ratio. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_image_orientation() This global function sets the orientation for CALS or TIFF images. It orients the image in 45 degree increments. int SNBDAPI CIMGLOW_set_image_orientation(int orient); Table 19.3: CIMGLOW_set_image_orientation Function orient Integer value between 0 and 8 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 H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 113

114 Chapter 19 - Image Saving Option Functions CIMGLOW_set_jpeg2000_comp_ratio() This global function specifies the amount of compression when saving a JPEG2000 file. The value is the ratio of the output file size to the original uncompressed file size. Note: JPEG2000 is available as an optional add on to the Windows DLL and ActiveX product. int SNBDAPI CIMGLOW_set_jpeg2000_comp_ratio(int ratio); Table 19.4: CIMGLOW_set_jpeg2000_comp_ratio Function ratio Compression ratio of JPEG2000 output file the status of the JPEG2000 compression ratio. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_jpg_interleave() This global 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. int SNBDAPI CIMGLOW_set_jpg_interleave(int h_int, int v_int); Table 19.5: CIMGLOW_set_jpg_interleave Function s 114

115 Chapter 19 - Image Saving Option Functions h_int v_int Horizontal interleaving factor Vertical interleaving factor the status of the JPEG interleave factor. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_pdf_output() This global 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 bitmap or searchable text.. int SNBDAPI CIMGLOW_set_pdf_output(double width, double height); Table 19.6: CIMGLOW_set_pdf_output Function s double width double height Width of image in points Height of image in points the status of PDF output. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_tiff_save_strips This global function saves data in strips, which is known as stripped TIFFs, when saving to TIFF file formats with the following compression types: Uncompressed LZW Packbits Group 4 115

116 Chapter 19 - Image Saving Option Functions This breaks up the data into smaller segments instead of all lines of the image being saved in the same offset. int SNBDAPI CIMGLOW_set_tiff_save_strips(int on_off); Table 19.7: CIMGLOW_set_tiff_save_strips Function on_off 0 = Off 1 = On the status of stripped TIFFs. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_tiff_tag() This global 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.NET 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.NET'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 following example: Simage.CIMGLOW_set_tiff_tag(-1,0,0,null); int SNBDAPI CIMGLOW_set_tiff_tag(CTIFF_TAG *tag); Table 19.8: CIMGLOW_set_tiff_tag Function 116

117 Chapter 19 - Image Saving Option Functions tag ID of tag to write. For more information, see public clas CTIFF_TAG the status of TIFF tags. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 117

118 Chapter 20 - Image Display Functions Chapter 20 - Image Display Functions This chapter describes the RasterMaster.NET image display functions. bool repaintbackground() This function predetermines if the background needs to be repainted. bool repaintbackground(double zoom, int type); Table 20.1: bool repaintbackground s double zoom type Zoom factor: 0 = fit to window if type = aspect default 100 = display pixels one to one if type = aspect default the zoom value of the particular tag the status of the background. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_display_bitmap() This function is a standard image display routine. 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, CIMG_mediancut_color()or CIMG_bayer_color(). See CIMG_mediancut_color() and CIMG_bayer_color() for more information. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Animate 118

119 Chapter 20 - Image Display Functions Contrast Conversion Convert_Doc DDB Effect FileMem Image Processing Memory Copy Page Panning Print Scan Split to Multiple Pages Text Search Thumbnail Tiff Tag int SNBDAPI CIMG_display_bitmap(Graphics *g, int x, int y, int width, int height); Table 20.2: CIMG_display_bitmap Function s g x y width height Graphics object Starting X coordinate for display of image Starting Y coordinate for display of image Horizontal width to display image Vertical height to display image 119

120 Chapter 20 - Image Display Functions the status of the display bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_display_bitmap_aspect() This function is an image display routine with corrected aspect ratio. After displaying the image, it turns scrollbars 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 vertically into the window. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Alpha ASP Image View Web Image Viewer Component int SNBDAPI CIMG_display_bitmap_aspect(Control *panel, Graphics *g, CIMG_RECT *view, double zoom, int type); Table 20.3: CIMG_display_bitmap_aspect s panel g view double zoom type Standard.NET control Graphics object Display area of interest Zoom factor: 0 = fit to window if type = aspect default 100 = display pixels one to one if type = aspect default the zoom value of the particular tag the status of the display bitmap aspect operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 120

121 Chapter 20 - Image Display Functions CIMG_display_bitmap_transp() This function displays transparent GIF images. It only draws the foreground color when displaying, not the background color. This function compares each pixel to the background color passed in and does not draw foreground pixels that are identical. To get the background color from an image, use the CIMGLOW_ get_transp_color()function. See CIMGLOW_get_transp_color() for more information. int SNBDAPI CIMG_display_bitmap_transp(Graphics *g, int xpos, int ypos, int width, int height, int tcolor); Table 20.4: CIMG_display_bitmap_transp Function s g xpos ypos width height tcolor Graphics object Starting X coordinate for display of image Starting Y coordinate for display of image Horizontal width to display image Vertical height to display image Background color of image to ignore the status of the display bitmap tranparent GIF operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_display_ddb() This function displays a DDB obtained from CIMG_dib_to_ddb() or any other DDB desired. This may display 4 and 8-bit images faster on some display adapters. See CIMG_dib_to_ddb() for more information. int SNBDAPI CIMG_display_ddb(bitmap* pbitmap, Graphics *g, int xpos, int ypos); Table 20.5: CIMG_display_ddb Function s 121

122 Chapter 20 - Image Display Functions Bitmap g xpos ypos GDI + Bitmap object Graphics object Starting X position to display image Starting Y position to display image the status of the device dependent bitmap (DDB) display operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 20.1 CIMG_display_ddb C#:Bitmap Bmp = simage.cimg_create_bitmap_class(picdisplay.width, picdisplay.height); simage.cimg_display_ddb(bmp,e.graphics,0,0); CIMG_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.NET Evaluation\Net\Samples. This function is used in the following samples: Animate Merge Image int SNBDAPI CIMG_display_fit_to_height(Graphics *g, Control *win_ control, int xs, int ys, int width, int height); Table 20.6: CIMG_display_fit_to_height Function s g win_control xs ys Graphics object Window form control object X starting position to display Y starting position to display 122

123 Chapter 20 - Image Display Functions width height width to display height to display 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 H, Snowbound Error Codes for a list of error codes. CIMG_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Animate sample. int SNBDAPI CIMG_display_fit_to_width(Graphics *g, Control *win_control, int xs, int ys, int width, int height); Table 20.7: CIMG_display_fit_to_width Function s g win_control xs ys width height Graphics object Window form control object X starting position to display Y starting position to display width to display height to display 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 H, Snowbound Error Codes for a list of error codes. CIMG_set_croprect() This function sets the current crop rectangle. After decompression the default cropping rectangle is the entire size of the image. 123

124 Chapter 20 - Image Display Functions You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Panning sample. Note: The cropping rectangle size cannot be bigger than the height or the width of the image. int SNBDAPI CIMG_set_croprect(CIMG_RECT *rect); Table 20.8: CIMG_set_croprect Function s rect Rectangle to set new size to crop. For more information, see public class CIMG_RECT. the current crop rectangle for the image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_set_croprect_scroll() This function sets the cropping rectangle for the image. 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. int SNBDAPI CIMG_set_croprect_scroll(Control *win_control, int xpos, int ypos, int scr_width, int scr_height, int aspect); Table 20.9: CIMG_set_croprect_scroll Function s win_control xpos ypos scr_width Window form control object Starting X coordinate for cropping rectangle Starting Y coordinate for cropping rectangle Width of cropping rectangle 124

125 Chapter 20 - Image Display Functions scr_height aspect Height of cropping rectangle 1 or True = aspect ratio on 0 = aspect ratio off the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_zoom_bitmap() This function is the standard library zoom function. A zoom value of 100 tells the function to display the whole image at the coordinates in the CIMG_display_bitmap() call. Any value greater than 100 crops the image so it is not fully displayed in the current window. int SNBDAPI CIMG_zoom_bitmap(Control *win_ctrl, int zoom_factor); Table 20.10: CIMG_zoom_bitmap Function s win_ctrl zoom_factor Window form control object. Amount to zoom. the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. int SNBDAPI CIMG_zoom_bitmap_1_to_1(Control *win_control, int zoom_ level, int center_flag); Table 20.11: CIMG_zoom_bitmap_1_to_1 Function s win_control Window form control object. 125

126 Chapter 20 - Image Display Functions zoom_level Amount to zoom. center_flag Re-centers image if set to 1. the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_zoom_bitmap_rect() This function is most effective for resizing a window. Call after the zoom event has been processed when repainting the image with CIMG_display_bitmap(). The scaled image coordinates and size are returned for your use. A CIMG_RECT is the same as a Rect, except the elements of the structure are long, not short. int SNBDAPI CIMG_zoom_bitmap_rect(Control *win_control, CIMG_RECT *prtzoom, CIMG_RECT *prtclient, int mode); Table 20.12: CIMG_zoom_bitmap_rect Function s win_control prtzoom mode Window form control object CIMG_RECT structure, rectangle in image to zoom Using image or screen coordinates 0 = Screen Coordinates 1 = Image Coordinates the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. int SNBDAPI CIMGLOW_map_image_to_wnd(Control *win_control, Int *px, Int *py); 126

127 Chapter 20 - Image Display Functions Table 20.13: CIMGLOW_map_image_to_wnd Function s win_control px py Window form control object Pointer to an integer of an X coordinate to convert Pointer to an integer of a Y coordinate to convert the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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 CIMG_set_croprect_scroll () to display an area of the image and enable scrolling. See CIMG_set_croprect_scroll() for more information. int SNBDAPI CIMGLOW_map_wnd_to_image(Control *win_control, int *px, int *py); Table 20.14: CIMGLOW_map_wnd_to_image Function s win_control px py Window form control object Pointer to an integer of an X coordinate to convert Pointer to an integer of a Y coordinate to convert the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. double calcaspectzoom() This function allows you to retrieve the ASPECT_ZOOM value for each of the aspect type properties. 127

128 Chapter 20 - Image Display Functions double calcaspectzoom(cimg_rect *view, double zoom, int type); Table 20.15: double calcaspectzoom s view double zoom type The display area of interest Zoom factor: 0 = fit to window if type = aspect default 100 = display pixels one to one if type = aspect default the zoom value of the particular tag. the zoom value as an ASPECT_ZOOM. Example 20.2 double calcaspectzoom snowpanel1.type = ZOOM_TYPE.ASPECT_DEFAULT; snowpanel1.zoom = 0; CIMG_display_bitmap_aspect(?,?,?,?,?,snowPanel1.Zoom,snowPanel1.Type); EQUALS: CIMG_RECT view = new CIMG_RECT(snowPanel1.Left,snowPanel1.Top,snowPanel1.Right,snowPanel1. Bottom); double aspectzoom = snowpanel1.calcaspectzoom(view,snowpanel1.zoom,snowpanel1.type); CIMG_display_bitmap_aspect(?,?,?,?,?,aspectzoom,ZOOM_ TYPE.ASPECT_ZOOM) the ASPECT_ZOOM value. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. removescrollbars() This function removes scrollbars from the given control. 128

129 Chapter 20 - Image Display Functions int SNBDAPI RemoveScrollbars(Control *panel); Table 20.16: RemoveScrollbars s panel Standard.NET control the standard.net control. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 129

130 Chapter 21 - Image Display Option Functions Chapter 21 - Image Display Option Functions This chapter describes the RasterMaster.NET image display option functions. CIMG_animate() This function draws all frames of the animated GIF file passed in as bm_name once. Call this function repetitively 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.NET Evaluation\Net\Samples. This function is used in the Animate sample. int SNBDAPI CIMG_animate(Graphics *g, String *bm_name, int xs, int ys, int xsize, int ysize); Table 21.1: CIMG_animate Function s g bm_name xs ys xsize ysize Graphics object Animated GIF filename to use Starting x position to draw Starting y position to draw X size of image drawing rectangle Y size of image drawing rectangle the status of the animate operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_bitmap_palette() This function loads the palette from the image 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. 130

131 Chapter 21 - Image Display Option Functions For a 24-bit image displaying on a 256-color adapter, it 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. int SNBDAPI CIMG_bitmap_palette(Graphics *g); Table 21.2: CIMG_bitmap_palette Function g Graphics object the status of the bitmap palette operation. Any value less than zero is a Snowbound error code. See Appendix H - Error Codes for a list of error codes. CIMG_display_ddb_effect() This function displays the image with the desired effect. These display effects are also referred to as wipes. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DDB Effect sample. int SNBDAPI CIMG_display_ddb_effect(Graphics *g, int xpos, int ypos, int width, int height, int effect); Table 21.3: CIMG_display_ddb_effect Function s g xpos ypos width height effect Graphics object Starting X coordinate for display of image Starting Y coordinate for display of image Width of desired image to display Height of desired image to display Display the following effect: 1 - (Default) Displays image with no image effects 2 - Displays image from the bottom to the top of the Win- 131

132 Chapter 21 - Image Display Option Functions dow 3 - Displays image in the Window from the right to the left side in vertical lines 4 - Displays image in the Window from the left to the right side using vertical lines 5 - Displays image in the Window in a window horizontal blind fashion 6 - Displays image in the Window as staggered blocks 7 - Displays image in the Window as blocks from the center of the Window 8 - Displays image in the Window in a window vertical blind fashion 9 - Displays image in the Window as small blocks from the center of the Window 10 - Displays image in the Window as blocks in a zigzag pattern the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. int SNBDAPI CIMG_set_gamma(int gamma); Table 21.4: CIMG_set_gamma Function gamma Integer ranging from 0 to 200 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 H, Snowbound Error Codes for a list of 132

133 Chapter 21 - Image Display Option Functions error codes. CIMG_set_lut() 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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Contrast sample. int SNBDAPI CIMG_set_lut(int contrast, int brightness); Table 21.5: CIMG_set_lut Function s contrast Integer value from -127 to 127 brightness Integer value from -127 to 127 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 H, Snowbound Error Codes for a list of error codes. CIMG_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 the 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 leveling. 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 leveling 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. int SNBDAPI CIMG_window_level(int min_gray_value, int max_gray_ value, int on_off); 133

134 Chapter 21 - Image Display Option Functions Table 21.6: CIMG_window_level Function s min_gray_value max_gray_value on_off Starting pixel gray value Ending pixel gray value Turn Windows leveling on or off 0 = Off 1 = On 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_autocolor() This global function displays multiple palette images at the same time. A single rainbow palette created by the library is realized when CIMG_bitmap_palette() is called for any palette image. See CIMG_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. int SNBDAPI CIMGLOW_autocolor(int color); Table 21.7: CIMGLOW_autocolor Function color Background color to set the multiple palette images. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 134

135 Chapter 21 - Image Display Option Functions CIMGLOW_set_alias() 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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Page Thumbnail Web Image Viewer Component int SNBDAPI CIMGLOW_set_alias(int alias); Table 21.8: CIMGLOW_set_alias_img Function alias Sets the aliasing factor. Choose from: 0 = No aliasing 1 = Use the preserve black algorithm 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 the status of the aliasing factor. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_alias_quality() This function sets the effectiveness of scale to gray and preserve black algorithms. This function works when using CIMGLOW_set_alias(). A value of 100 ensures that no black pixels will be discarded when displaying the image. See CIMGLOW_set_alias() for more information. int SNBDAPI CIMGLOW_set_alias_quality(int alias_quality); 135

136 Chapter 21 - Image Display Option Functions Table 21.9: CIMGLOW_set_alias_quality Function alias_quality Alias Quality; 0 to = Discard black pixels 100 = Do not discard any black pixels the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_dithermode() This global 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. int SNBDAPI CIMGLOW_set_dithermode(int mode); Table 21.10: CIMGLOW_set_dithermode Function mode Use the above values to decide how or how not to dither. The default is -1. 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 H, Snowbound Error Codes for a list of error codes. Screen Display Dither Mode Constants Example 21.1 CIMGLOW_set_dithermode DITHER_NONE 0 /* Allows for Windows to do the color reduction. This is not recommended, but available. */ 136

137 Chapter 21 - Image Display Option Functions DITHER_BAYER 1 /* Uses the Bayer dithering algorithm for color reduction. */ DITHER_DIFFUSION 2 /* Use error diffusion for color reduction. */ ** GLOBAL FUNCTION** CIMGLOW_set_imnet_page_size() This function allows you to set the document size for the IMNET format. Note: The default value is 200 for the DPI and 0 for the width and height. int SNBDAPI CIMGLOW_imnet_page_size(int iwidth, int iheight, int idpi); Table 21.11: CIMGLOW_set_imnet_page_size Function s iwidth iheight idpi Sets the document s width Sets the document s height Sets the document in dots per inch (DPI) 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_rop() This function allows images to be displayed on the screen using ANDing, ORing or any other legal Windows opcode. int SNBDAPI CIMGLOW_set_rop(int raster_operation); 137

138 Chapter 21 - Image Display Option Functions Table 21.12: CIMGLOW_set_rop Function s Boolean opcode to use when displaying the image. See the list below for the available opcodes or consult your Windows SDK manual. SRCCOPY = Copies the source bitmap to the destination bitmap. SRCPAINT = Combines pixels of the destination and source bitmaps using the Boolean OR operator. SRCAND = Combines pixels of the destination and source bitmaps using the Boolean AND operator. SRCINVERT = Combines pixels of the destination and source bitmaps using the Boolean XOR operator. SRCERASE = Inverts the destination bitmap and combines the result with the source bitmap using the Boolean AND operator. NOTSRCCOPY = Copies the inverted source bitmap to the destination. raster_operation NOTSRCERASE = Inverts the result of combining the destination and source bitmaps using the Boolean OR operator. MERGECOPY = Combines the pattern and the source bitmap using the Boolean AND operator. MERGEPAINT = Combines the inverted source bitmap with the destination bitmap using the Boolean OR operator. PATCOPY = Copies the pattern to the destination bitmap. PATPAINT = Combines the inverted source bitmap with the pattern using the Boolean XOR operator. Combines the result of this operation with the destination bitmap using the Boolean OR operator. PATINVERT = Combines the destination bitmap with the pattern using the Boolean XOR operator.combines the destination bitmap with the pattern using the Boolean XOR operator. DSTINVERT - Inverts the destination bitmap. BLACKNESS - Turns all output black. WHITENESS - Turns all output white. 138

139 Chapter 21 - Image Display Option Functions the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_transp_color() This function sets the transparent color for GIF images. int SNBDAPI CIMGLOW_set_transp_color(int color); Table 21.13: CIMGLOW_set_transp_color Function color Background color to set the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_wipedelay() This function is used with CIMG_display_ddb_effect() to speed up or slow down the speed that the image is drawn on the screen. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DDB Effect sample. int SNBDAPI CIMGLOW_set_wipedelay(int wipe_delay); Table 21.14: CIMGLOW_set_wipedelay Function wipe_delay Delay time in seconds 139

140 Chapter 21 - Image Display Option Functions the delay time. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 140

141 Chapter 22 - Information Query Functions Chapter 22 - Information Query Functions This chapter describes the RasterMaster.NET information query functions. CIMG_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 contains a header BITMAPINFOHEADER, palette RGBQUAD, and the raw DIB data. See Chapter 33 - 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.NET Evaluation\Net\Samples. This function is used in the following samples: Animate Annaction Annotation ASP Conversion ASP Image View ASP Memory Copy ASP Multiple Pages Batch_XPS_Convert Contrast Convert_Doc DocClean DDB Effect Image Processing FileMem 141

142 Chapter 22 - Information Query Functions Panning Scan Text Search Thumbnail WPFAnnotation_CSHARP WPFConversion_CSHARP WPF Image WPFScanning_CSHARP VectorConvertMem_CSHARP XPSMem_CSHARP LPDIB_HEADER SNBDAPI CIMG_bitmap_info(CDIB_HEADER *dib header); Table 22.1: CIMG_bitmap_info Function dib_header Pointer to a CDIB_HEADER structure in which to fill. For more information, see public class CDIB_HEADER. a memory handle for the DIB. a pointer to an image in memory. CIMG_get_bitmap_palette() This function returns the palette of the image specified in HPALETTE format. The developer is responsible for releasing HPALETTE when finished with it. HPALETTE SNBDAPI CIMG_get_bitmap_palette(void); the palette as an HPALETTE format of the image. 142

143 Chapter 22 - Information Query Functions CIMG_get_croprect() This function returns the current crop rectangle. After decompression, the default cropping rectangle is the height and width of the image. int SNBDAPI CIMG_get_croprect(CIMG_RECT *rect); Table 22.2: CIMG_get_croprect Function rect Rectangle to hold new size of object. For more information, see public class CIMG_RECT. the current crop rectangle for the image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_get_display_rect() This function returns the coordinates of the last displayed rectangle. int SNBDAPI CIMG_get_display_rect(int *xs, int *ys, int *xsize, int *ysize); Table 22.3: CIMG_get_display_rect Function s xs ys xsize ysize Starting x position (left) Starting y position (top) Height of display Width of display the coordinates of the last displayed rectangle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 143

144 Chapter 22 - Information Query Functions CIMG_get_version(int, int, int, int) This function returns version information for your RasterMaster.NET. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Conversion sample. int SNBDAPI CIMG_get_version(int *major, int *minor, int *update, int*fix); Table 22.4: CIMG_get_version Function major minor update fix the major number of the library version. the minor number of the library version. the address update number of the library version. the fix address number of the library version. Example 22.1 CIMG_get_version int major=0, minor=0, update=0, fix=0; status = simage.cimg_get_version(ref major, ref minor, ref update, ref fix); version information. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_get_version(String) This function returns version information for your RasterMaster.NET. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Conversion sample. int SNBDAPI CIMG_get_version(String **version); 144

145 Chapter 22 - Information Query Functions Table 22.5: CIMG_get_version Function version a string with "major.minor.update.fix". For example, " " Example 22.2 CIMG_get_version ToolStripStatusLabel lblstatus; this.lblstatus = new System.Windows.Forms.ToolStripStatusLabel (); [... add status to form] String strversion = null; status = simage.cimg_get_version(ref strversion); if (status >= 0) { lblstatus.text = ".NET library " + strversion; } else { lblstatus.text = "Error getting RasterMaster.NET library version: " + simage.toerrormessage(status); } version information. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_ifl_version() This function returns version information for your RasterMaster.NET. int SNBDAPI CIMG_ifl_version(int *major, int *minor); Table 22.6: CIMG_ifl_version Function 145

146 Chapter 22 - Information Query Functions major minor Pointer to 8 bytes of memory to receive the major version number Pointer to 8 bytes of memory to receive the minor version number version information. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_delete_page() This function deletes a page from a file. int CIMGLOW_delete_page(String filename, int pageindex, Byte[] resultbuffer); Table 22.7: CIMGLOW_delete_page Function s filename pageindex resultbuffer The path of file name Page index number. The deleted page result buffer. It's the buffer after delete the page. If there is only one page, the result buffer is empty. The last page will not be deleted. a deleted page. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_delete_page_mem() This function is used to delete a PDF page from the memory buffer. int CIMGLOW_delete_page_mem(Ref Byte[] databuffer, int pageindex); Table 22.8: CIMGLOW_delete_page_mem Function s databuffer Reference data buffer. Input buffer is the original image buffer. Output is the result data buffer with image deleted. The last page will not be deleted so result buffer will be empty. 146

147 Chapter 22 - Information Query Functions pageindex Page index number. a PDF page from the memory buffer. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. int SNBDAPI CIMGLOW_get_anim_delay(String *filename); Table 22.9: CIMGLOW_get_anim_delay Function filename Path/filename of the file to return animation delay time 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_auto_detect() This global function returns the current RasterMaster.NET auto-detection for the specified file type on the current file. int SNBDAPI CIMGLOW_get_auto_detect(int format); Table 22.10: CIMGLOW_get_auto_detect Function format Image format type from the defined list in imglib.h 147

148 Chapter 22 - Information Query Functions 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 H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_get_bitmap_header() This function fills in the CDIB_HEADER structure for the image. It is used to get height, width, bits_pix and other information. bits_pix and other information. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Merge Image sample. int SNBDAPI CIMGLOW_get_bitmap_header(CDIB_HEADER *dib_header); Table 22.11: CIMGLOW_get_bitmap_header Function s dib_header Pointer to a CDIB_HEADER structure in which to fill. For more information, see public class CDIB_HEADER. the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. int SNBDAPI CIMGLOW_get_bitmap_name(String *strname, String *strdate); Table 22.12: CIMGLOW_get_bitmap_name Function s 148

149 Chapter 22 - Information Query Functions StrName StrDate Pointer to a string to receive the name or author from the last image decompressed Pointer to a string to receive the date from the last image decompressed the text string from the image. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 22.3 CIMGLOW_get_bitmap_name C#:simage.CIMGLOW_get_bitmap_name(ref strbmname, ref strdateinfo); CIMGLOW_get_custstring() This function returns a string stored in RasterMaster.NET. The name of the corporation licensed to use this product is embedded in RasterMaster.NET by Snowbound Software. This allows detection of the DLL or OCX to ensure that the user has the correct version. int SNBDAPI CIMGLOW_get_custstring(String *custstring); Table 22.13: CIMGLOW_get_custstring Function custstring Pointer to string in which to store custom string data the string stored in RasterMaster.NET. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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). 149

150 Chapter 22 - Information Query Functions int SNBDAPI CIMGLOW_get_fileinfo(String *filename, CDIB_HEADER *dib_header); Table 22.14: CIMGLOW_get_fileinfo Function s filename dib_header Any valid existing image on the disk Pointer to a CDIB_HEADER structure. For more information, see public class CDIB_HEADER. the image information. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_fileinfo_fd() This function reads and returns the file header information from the image file and specific page number passed in. It fills in the DIB_HEADER structure with width, height, dpi and bits per pixel. int SNBDAPI CIMGLOW_get_fileinfo_fd_(FileStream *filestream, CDIBHEADER *dib_header); Table 22.15: CIMGLOW_get_fileinfo_fd Function s filestream dib_header Pointer to FileStream object Pointer to a CDIB_HEADER structure in which to fill. For more information, see public class CDIB_HEADER. the status of the file header information operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 150

151 Chapter 22 - Information Query Functions CIMGLOW_get_fileinfo_page() This function reads and returns the file header information from the image file and specific page number passed in. It fills in the DIB_HEADER structure with width, height, dpi and bits per pixel. int SNBDAPI CIMGLOW_get_fileinfo_page(String *filename, CDIBHEADER *dib_header, int page); Table 22.16: CIMGLOW_get_fileinfo_page Function s filename Image path and file name dib_header Pointer to a CDIB_HEADER structure in which to fill. For more information, see public class CDIB_HEADER. page Page number starts at 0 the file information. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_filetype() This function returns the filetype as defined in imglib.h. int SNBDAPI CIMGLOW_get_filetype(String *filename); Table 22.17: CIMGLOW_get_filetype Function filename Path/filename of image to return file type the filetype 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 B, Supported File Formats. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 151

152 Chapter 22 - Information Query Functions CIMGLOW_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 CIMG_ decompress bitmap_ fd to open the content at the current position without rewinding to the beginning of the file. int SNBDAPI CIMGLOW_get_filetype_fd(FileStream *filestream); Table 22.18: CIMGLOW_get_filetype_fd Function filestream File handle obtained from OpenFile() or _lopen() Windows call the filetype 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, pleasesee Appendix B, Supported File Formats. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_filetype_mem() This function gets the file type number of the image stored in memory at the location pointed to by the filename pointer. int SNBDAPI CIMGLOW_get_filetype_mem(Array *data); Table 22.19: CIMGLOW_get_filetype_mem Function data Pointer to image in memory 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 B, Supported File Formats. Any 152

153 Chapter 22 - Information Query Functions value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_filetype_url() This function gets the file type number of the image stored in the given Uniform Resource Locator (URL) address. int SNBDAPI CIMGLOW_get_filetype_url(String *strurl); Table 22.20: CIMGLOW_get_filetype_url Function strurl The URL address to point to the image the file type number of the image stored in the given URL address. For example, a Word file would return the file type number 86. For a list of file type numbers, please see Appendix B, Supported File Formats. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_image_orientation_page() This function returns the rotation angle for the filename and page specified. It is used to get the orientation of images in multi-page file formats. It returns the same values as CIMGLOW_get_ image_orientation(). int SNBDAPI CIMGLOW_get_image_orientation_page(String *filename, int page); Table 22.21: CIMGLOW_get_image_orientation_page Function s filename page Path/filename of image to return orientation information Page number to return orientation 153

154 Chapter 22 - Information Query Functions the rotation angle for the filename and page specified. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. It supports unicode file name input. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: ASP Multiple Pages Convert_Doc Page Scan Split to Multiple Pages Text Search Thumbnail WPFAnnotation_CSHARP WPFConversion_CSHARP WPFScanning_CSHARP int SNBDAPI CIMGLOW_get_pages(String *filename); Table 22.22: CIMGLOW_get_pages Function filename Path/filename of image to return page information 154

155 Chapter 22 - Information Query Functions 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. int SNBDAPI CIMGLOW_get_pages_fd(FileStream *filestream); Table 22.23: CIMGLOW_get_pages_fd Function filestream Handle returned from a Windows OpenFile() call the number of pages for a multi-page file. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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 CIMGLOW_get_pages() but is used for the image stored in a memory pointer. int SNBDAPI CIMGLOW_get_pages_mem(Array *data); Table 22.24: CIMGLOW_get_pages_mem Function 32 Pointer to image in memory 155

156 Chapter 22 - Information Query Functions 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_pages_url() This function returns the number of pages from an image stored in the given Uniform Resource Locator (URL) address. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Web Image Viewer Component sample. int SNBDAPI CIMGLOW_get_pages_url(String *strurl); Table 22.25: CIMGLOW_get_pages_url Function strurl The URL address to point to the image. Example 22.4 CIMGLOW_get_pages_url status = simage.cimglowlow_get_pages_url (" status = simage.cimglowlow_get_pages_url(" localhost/images/test.pdf"); the number of pages from an image stored in the given URL address. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 156

157 Chapter 22 - Information Query Functions CIMGLOW_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Tiff Tag sample. int SNBDAPI CIMGLOW_get_tiff_tag(int tag, int max_bytes, int *ptr_ value, String *strfilename, String *strbuff); Table 22.26: CIMGLOW_get_tiff_tag Function s tag max_bytes ptr_value strfilename strbuff TIFF tag number to return Maximum bytes to read for string tags Pointer to tag value returned Filename to read tags from String buffer for returning string tags a string or a non-string value. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. You can use the TIFF tag to get the colorspace type by specifying tag #262. Value is what is returned. For this tag you will not need the bytearray. Example 22.5 CIMGLOW_get_tiff_tag int tag_no = 262; int max_bytes = 0; int[] value = new int[1]; byte[] data = null; myframe.simage.cimglow_get_tiff_tag(tag_no, max_bytes, value, st, data, page); /* PHOTOMETRIC INTERPRETATION */ #define TIFF_PHOTO_WHITE_IS0 0 #define TIFF_PHOTO_WHITE_IS1 1 #define TIFF_PHOTO_RGB 2 157

158 Chapter 22 - Information Query Functions #define TIFF_PHOTO_PALETTE 3 #define TIFF_PHOTO_TRANSP 4 #define TIFF_PHOTO_CMYK 5 #define TIFF_PHOTO_YCC 6 #define TIFF_PHOTO_CIELAB 8 CIMGLOW_get_tiff_tag_page() This function reads a TIFF tag from the file specified by filename and the 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 values. int SNBDAPI CIMGLOW_get_tiff_tag_page(String *filename, int page, CTIFF_TAG *tag); Table 22.27: CIMGLOW_get_tiff_tag_page Function s filename page tag Path/filename of image to return orientation information Page number from which to read tags TIFF tag number to return. For more information, see public class CTIFF_TAG a string or a non-string value. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_tiff_tag_page_fd() This function reads a TIFF tag from the file specified by filestream 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 values. 158

159 Chapter 22 - Information Query Functions int SNBDAPI CIMGLOW_get_tiff_tag_page_fd(Filestream *filestream, int page, CTIFF_TAG *tag); Table 22.28: CIMGLOW_get_tiff_tag_page_fd Function s filestream page tag Handle returned from a Windows OpenFile() call Page number from which to read tags TIF tag number to return. For more information, see public class CTIFF_TAG. a string or a non-string value. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_tiff_tag_page_mem() This function reads a TIFF tag from the image buffer. The tag may be either a string returned in buff or a long, int, or char returned in value. int SNBDAPI CIMGLOW_get_tiff_tag_page_mem(Array *data, int page, CTIFF_TAG *tag); Table 22.29: CIMGLOW_get_tiff_tag_page_mem Function s data page tag Memory Pointer to image data Page number from which to read tags TIF tag number to return. For more information, see public class CTIFF_TAG. a string or a non-string value. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 22.6 CIMGLOW_get_tiff_tag_page_mem() 159

160 Chapter 22 - Information Query Functions CTIFF_TAG tiftag = new CTIFF_TAG(); tiftag.tag = 315; tiftag.tagvalue = 0; tiftag.buff_max_bytes = 255; tiftag.buff = new byte[255]; status = simage.cimglow_get_tiff_tag_page_mem(arrimagedata, 0, tiftag); UTF8Encoding utf8encoder = new UTF8Encoding(); String tagstring = utf8encoder.getstring(tiftag.buff); int tagvalue = tiftag.tagvalue; CIMGLOW_get_tile_info() This function fills in the tile structure information on width, height, tile width, and tile height. int SNBDAPI CIMGLOW_get_tile_info(String *filename, CSNBDTILESTRUCT *tile, int page); Table 22.30: CIMGLOW_get_tile_info Function s filename tile page Path/filename of tiled image for which to return information Pointer to the tile information structure to return. For more information, see public class CSNBDTILESTRUCT. Page number of the tile information structure to return Example 22.7 CIMGLOW_get_tile_info typedef struct tagsnbdtilestruct { Long width; Long height; Long tile_width Long tile_height Long num_tiles; SNBDTILESTRUCT 160

161 Chapter 22 - Information Query Functions the file name of a tiled image. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_transp_color() This function gets the transparent color for GIF images. int SNBDAPI CIMGLOW_get_transp_color(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. int SNBDAPI CIMGLOW_is_tiled_image(String *filename); Table 22.31: CIMGLOW_is_tiled_image Function filename Path/filename of the file to return animation delay time the value of the tiled image. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_read_pixel() This function reads and returns a pixel value from the image. The xpos and ypos specify the location in the image from which to read. See CIMG_runs_to_dib() for more information. int SNBDAPI CIMGLOW_read_pixel(int xpos, int ypos); 161

162 Chapter 22 - Information Query Functions Table 22.32: CIMGLOW_read_pixel Function s xpos ypos X coordinate of pixel to read Y coordinate of pixel to read 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_redact_text() This function redacts text string from extracted text buffer. int SNBDAPI CIMGLOW_redact_text(Byte[] arrbuff, out Byte[] textbuffer, String redacttext, int casesense, int redactcolor, Boolean isunicode); Table 22.33: CIMGLOW_redact_text Function s arrbuff textbuffer String casesense redactcolor isunicode Input, extracted text buffer from a document page. Output text buffer with the text string redacted. Text string to redact. If it is not 0, case sensitive, otherwise not. The color value of the redacted rectangle. True if it is Unicode string otherwise, ascii string. a value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_redact_rects() This function redacts text with a group of areas. 162

163 Chapter 22 - Information Query Functions int SNBDAPI CIMGLOW_redact_rects(Byte[] arrbuff, out Byte[] textbuffer, CSNBD_SEARCH_RESULT[] snbdrclist, int redactcolo; Table 22.34: CIMGLOW_redact_rects Function s arrbuff textbuffer CSNBD_SEARCH_RESULT casesense redactcolor Extracted text buffer from a document page.. Output redacted text buffer. Text string to redact. Array of redacted areas. The color value of the redacted area. a value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_rotate_page_mem() This function rotates a PDF page in PDF buffer and returns the rotated page buffer. Only works for PDF. It requires itextsharp.dl. int CIMGLOW_rotate_page_mem(Byte[] arrimage, out Byte[] arrbuffer, int rotateangle, int pageindex); Table 22.35: CIMGLOW_rotate_page_mem Function s arrimage arrbuffer rotateangle pageindex Input PDF document buffer. Output rotated page buffer. Input the angle for a page to rotate. For example 90, 180, 270. Input the page index number to rotate. 163

164 Chapter 22 - Information Query Functions the error code of the function executed. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_bitmap_header() This function fills in the CDIB_HEADER structure for the image. It is used to set height, width, bits_pix, DPI, and other information. int SNBDAPI CIMGLOW_set_bitmap_header(CDIB_HEADER, *dib_header); Table 22.36: CIMGLOW_set_bitmap_header Function s dib_header Pointer to a CDIB_HEADER structure in which to fill. For more information, see public class CDIB_HEADER. the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. You can use the CIMGLOW_set_bitmap_header and the CIMG_resize_bitmap functions to change the resolution (DPI) of your output document as shown in the example below: Example 22.8 CIMG_decompress_bitmap status = simage.cimg_decompress_bitmap(filename.tif); sdibheader = new CDIB_HEADER(); status = simage.cimg_bitmap_info(sdibheader); sdibheader.bixpelspermeter = 200; sdibheader.biypelspermeter = 200; //resize image to what you want //status = simage.cimg_resize_bitmap(newimagewidth, newimageheight); status = simage.cimglow_set_bitmap_header(sdibheader); 164

165 Chapter 22 - Information Query Functions CIMGLOW_set_document() This function sets the format parameter is an integer to represent an image type. int SNBDAPI CIMGLOW_set_document(int dpi, int bits, int format); Table 22.37: CIMGLOW_set_document Function s dpi bits format Sets the document in dots per inch. Sets the bits per pixel. 1 = black and white documents 24 = color images Sets the format parameter. the status of the document. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_document_input(int, int) This function sets the level of color and resolution quality when reading in documents for most document formats. It is used for the PDF, Word, Excel, PCL, and AFP formats. This function should be called before the input document is read in using CIMG_decompress_bitmap(). You can override RasterMaster.NET s default bits-per-pixel and DPI settings using this method. You may want to process just black and white documents. Use this method to set the input bits-per-pixel to 1 for black and white input without the extra overhead and performance costs of processing color images. You can use this function to do the following: Read in color or grayscale documents by setting a higher bits-per-pixel. Please see Appendix B, Supported File Formats for details on what bits per pixel are supported for each format. Increase your output image quality by increasing the input document DPI. Enhance your performance by decreasing the document DPI or bits per pixel. 165

166 Chapter 22 - Information Query Functions This method does not affect the Office formats. Please see CIMGLOW_set_document_input(int, int, int) to set the input quality for a specific format, including Office 2007 formats. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Web Image Viewer Component sample. 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. int SNBDAPI CIMGLOW_set_document_input(int dpi, int bits_pix); Table 22.38: CIMGLOW_set_document_input Function s dpi bits_pix Sets the input resolution in dots per inch. A higher dpi yields a higher quality document that takes longer to process and takes up more memory and storage space. Sets the bits per pixel. 1 = black and white documents 24 = color images See Appendix B, Supported File Formats for information on these and other pixel depths supported by each format. the status of the document input. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_document_input(int, int, int) 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 CIMG_decompress_bitmap(). You can override RasterMaster.NET s default bits-per-pixel and DPI settings for the specified format using this function. You can use this function to do the following: 166

167 Chapter 22 - Information Query Functions 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. Read in color or grayscale documents by setting a higher bits-per-pixel. Please see Appendix B, Supported File Formats for details on what bits per pixel are supported for each format. Increase your output image quality by increasing the input document DPI. 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. int SNBDAPI CIMGLOW_set_document_input(int dpi, int bits_pix, int format); Table 22.39: CIMGLOW_set_document_input Function dpi bits_pix format Sets the input resolution in dots per inch. A higher dpi yields a higher quality document that takes longer to process and takes up more memory and storage space. Sets the bits per pixel. 1 = black and white documents 24 = color images See Appendix B, Suported File Formats for information on these and other pixel depths supported by each format. Sets the format parameter. A file format number as specified in Appendix B, Supported File Formats i.e. Word (DOC) is 86. the status of the document input. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_document_page_size(int, int, int) This function sets the document's page size. 167

168 Chapter 22 - Information Query Functions Note: Currently this method only supports.xls and.xlsx files. int SNBDAPI CIMGLOW_set_document_page_size(double width, double height, int format); Table 22.40: CIMGLOW_set_document_page_size Function width height format Sets the page size width. Using unit inches. Sets the page size height. Using unit inches. Sets the format parameter. Currently, the only supported file format is Excel. A file format number as specified in Appendix B, Supported File Format i.e. Excel(XLS) is 84. Example 22.9 CIMGLOW_set_document_page_size status = simage.cimglow_set_document_page_size(20.0, 20.0, (int)cimg_image_type.xls); the status of the document page size. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 168

169 Chapter 23 - Text Search Functions Chapter 23 - Text Search Functions This chapter describes the RasterMaster.NET text search functions. CIMG_save_document() This function takes a buffer passed in with text, graphics, and position information to create the document file output. The output file contains searchable text. Normally, the CIMG_save_bitmap() function only creates a bitmap file. This method supports PDF and SVG as an output file. When saving to PDF, if the same file name exists, the saved output will be appended. int SNBDAPI CIMG_save_document(String *strname, char *buff, int filetype); s Table 23.1: CIMG_save_document Function s *strname Name of the output PDF file buff Buffer of extracted text, graphics, and bitmaps filetype Currently only supports PDF - file type 59 the document file output. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 23.1 Data Format for Extracted Text Buffer for both Windows and Java The coordinates system is originated at the upper left. X - Represents a floating point argument. As in , all of these arguments are in points of 1/72 of an inch. Text - Represents an ASCII string argument. STREAM COMMANDS and format of extracted file %%SOF- Start of file /PageNumber=XPage number being extracted. 169

170 Chapter 23 - Text Search Functions /PageWidth=XWidth of page in points. (1/72 of an inch) /PageHeight=XHeight of page in points. (1/72 of an inch) %%EOFMarks the end of this file. No more data to process. /FontStart of font data and attributes. /FontName=TextStandard font face name. /FontHeight=XFont height in points (1/72 of an inch). /FontBold=XSet to 1 for bold font otherwise 0. /FontItalic=XSet to 1 for Italic font otherwise 0. /Xpos=XX starting coordinate of text string. /Ypos=XY starting coordinate of text string. %%SOTStart of a text string after the carriage return. Text Data here %%EOTEnds a text string. /ImageStart of image data and attributes. /ImageWidth=XWidth in pixels of the image data. /ImageHeight=XHeight in pixels of the image data. /Bitsperpixel=XNumber of bits per pixel. /Compression=TextCompression type used. CCITT_G4, JPEG, or NONE. /Length=XLength of binary image data. %%SOIStarts the binary image data. Binary data here %%EOIEnds the binary image data. /DrawImage Xs Ys Width HeightDraws the last defined image at the location specified by the arguments. /Moveto XS YSMoves current graphics drawing position. /LineXS YSDraws a line from current graphics drawing position to a location specified by the arguments. /Rectangle XS YS WIDTH HEIGHT Draws a rectangle at the specified coordinates. /Curve X1 Y1 X2 Y2 X3 Y3Draws a curve from the current graphics drawing position to the end coordinates using the first 4 arguments as guide points. 170

171 Chapter 23 - Text Search Functions CIMG_save_mem() This function saves the current snowbound object to a image buffer. It calculates the size of the memory buffer and grows it appropriately. int SNBDAPI CIMG_save_mem(Array* arrbuffer, int initial_size, int buff_inc, int format, Int32* buff_size); Table 23.2: arrbuffer initial_size buff_inc format buff_size CIMG_save_mem Function s Byte array buffer image save in. Initial size of the image buffer to allocate. Amount to grow the buffer if more space is needed to save. Format code to save as. Saved image buffer size. the memory buffer. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_save_mem_page() This function saves the current page and appends it to the current image buffer. It calculates the size of the memory buffer and grows it appropriately. int SNBDAPI CIMG_save_mem_page(Array* arrbuffer, int buff_inc, int format, Int32* buff_size); Table 23.3: arrbuffer buff_inc format buff_size CIMG_save_mem_page Function s Byte array buffer image save in. Amount to grow the buffer if more space is needed to save. Format code to save as. Saved image buffer size. 171

172 Chapter 23 - Text Search Functions the memory buffer. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_append_page() This function extract pages from image file and append them to image buffer. Currently only works for PDF formatt. int SNBDAPI CIMGLOW_append_page(String *strfilename, Array* arrbuffer); s Table 23.4: CIMGLOW_append_page Function s strfilename *arrbuffer Input document name. Image buffer to save /in the image buffer. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_extract_text() This function extracts text from PTOCA, PCL, PDF, MS Word, AFP, and MS Excel files. 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.NET Evaluation\Net\Samples. This function is used in the following samples: Convert_Doc Text Search int SNBDAPI CIMGLOW_extract_text(String *strfilename, Byte *arrbuffer, int *ptrlength, int page); 172

173 Chapter 23 - Text Search Functions s Table 23.5: CIMGLOW_extract_text Function s *strfilename *arrbuffer *ptrlength page Name of file from which to extract text Buffer from which to receive extracted text Pointer to an integer to return the length of the extracted buffer Page number of file from which to extract text the buffer of extracted text in ASCII format. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 23.2 CIMGLOW_extract_text %%SOF /Page=0 /Width=1700 /Height=2200 /FontName=TimesRoman /FontHeight=44 /FontBold=1 /FontItalic=0 /Xpos=1300 /Ypos=240 %%SOT Devadas %%EOT /Xpos=1243 /Ypos=240 %%SOT S. %%EOT %%EOF %%SOI %%EOI Table 23.6: Extracted Text s 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. %%SOF %%EOF Page Signals the start of the buffer Marks the end of extracted text Specified once at the beginning of the file to indicate the 173

174 Chapter 23 - Text Search Functions Width Height Font Name FontHeight FontBold FontItalic Xpos Ypos %%SOT %%EOT %%SOI %%EOI %%SOTU %%EOTU page number Specified once at the beginning of the file to indicate page width in pixels Specified once at the beginning of the file to indicate page height in pixels Name of font Font height in pixels Font to be drawn plain or in bold 1 = bold 0 = plain Font to be drawn in normal or italic 1 = italic 0 = normal X pos in pixels Y pos in pixels Start of text block End of text block Start of image End of image Start of Text Unicode/UTF. End of Text Unicode/UTF. CIMGLOW_extract_text_mem_pointer() This function extracts text from memory. It returns the buffer pointer of extracted text in ASCII format. This function runs faster than CIMG_extract_text_mem. It is only supported by C++ and C#. int SNBDAPI CIMGLOW_extract_text_mem_pointer(Array *arrimage, Byte *arrbuffer, int *ptrlength, int page); s Table 23.7: CIMGLOW_extract_text_mem_pointer Function s *arrimage *arrbuffer *ptrlength Memory array to image data Pointer of buffer from which to receive extracted text Pointer to an integer to return the length of the extracted buffer 174

175 Chapter 23 - Text Search Functions page Page number of file from which to extract text the buffer of extracted text in ASCII format. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_extract_page() This function extracts a page from document and save to image buffer. Currently only works for PDF format. int SNBDAPI CIMGLOW_extract_page(String *strfilename, Array* arrbuffer, int page); s Table 23.8: CIMGLOW_extract_page Function s strfilename *arrbuffer page Input document name. Image buffer to save /in Page number of file from which to extract text the image buffer. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_extract_page_mem() This function extracts a page from memory and save to image buffer. Currently only works for PDF format. int SNBDAPI CIMGLOW_extract_page_mem(Array *arrimage, Array* arrbuffer, int page); s Table 23.9: CIMGLOW_extract_page_mem Function s 175

176 Chapter 23 - Text Search Functions arrimage *arrbuffer page Input image buffer. Image buffer to save /in Page number of file from which to extract text the image buffer. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_search_text() This 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.NET Evaluation\Net\Samples. This function is used in the Text Search sample. int SNBDAPI CIMGLOW_search_text(CIMG_SEARCH_RESULT[] sbdrclist, Array *txtbuffer, String *strsearch, int case_sense, int *ptrerror, int *precnum); Table 23.10: CIMGLOW_search_text Function s Array of CIMG_SEARCH_RESULT specifying the location sbdrclist of the string found. For more information, see public class CIMG_SEARCH_RESULT. txtbuffer Character buffer to search. Returned from a call to CIMGLOW_extract_text(). strsearch Search string instance Occurance of search string to find, start from 0 Is search case sensitive. case_sense 0 = Not case sensitive 1 = case sensitive ptrerror Error code precnum Number of items in search result array. 176

177 Chapter 23 - Text Search Functions 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_document_input() This function sets the level of color and resolution quality when reading in documents for the specified document format. int SNBDAPI CIMGLOW_set_document_input(int dpi,int bitsperpixel, int format, double width, double height); Table 23.11: dpi bitsperpixel format width height CIMGLOW_set_document_input Function s Input resolution in dots per inch. Bits per pixel. Format code number. Page width. Units in inches. Page width. Units in inches. the status of the document input. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 177

178 Chapter 24 - AFP Font Mapping Functions Chapter 24 - AFP Font Mapping Functions This chapter describes the snbd_map.fnt file and the functions used for AFP font mapping. The chapter contains the following topics: AFP Font Mapping Format of Font Mapping Data Color Documents Rendered as Black and White CIMGLOW_set_fontmap_path() CIMGLOW_set_fontmap() AFP Font Mapping AFP files can use specific fonts to achieve a particular look. If you find that the fidelity of the output for your AFP documents is lacking, particularly in regards to text size and spacing or barcodes, then you can customize RasterMaster.NET to use particular fonts when processing your AFP files. RasterMaster.NET is easy to customize to improve the look of your AFP documents. Snowbound Software allows you to map the fonts in your AFP/MODCA document to fonts on your system using a mapping file named snbd_map.fnt. The snbd_map.fnt file is custom crafted to specify the fonts used in your AFP files and on your system. If you provide a representative sample AFP document to Snowbound Software by entering a support issue at we will provide you with a custom snbd_map.fnt file usually in a few business days that will improve the display and print quality of your AFP documents. RasterMaster.NET automatically loads the snbd_map.fnt file if it is found in one of the following directories: The directory into which images are being read. For example: C:\\AFP\\fontmap The directory where your application exists as long as you are not changing directories with a dialog box The following functions allow you to set font mapping: 1. The CIMGLOW_set_fontmap_path() function sets the path of the font mapping file. See CIMGLOW_set_fontmap_path() for more information. 2. The CIMGLOW_set_fontmap() function programmatically sets the font mapping. See CIMGLOW_set_fontmap() for more information. Format of Font Mapping Data Any AFP font name can now be mapped to the following: 178

179 Chapter 24 - AFP Font Mapping Functions face name point size bold attributes 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 C0CGT12S,Times New Roman,14,0,1 Table 24.1: of a sample entry in the snbd_map.fnt file C0BC25I3 Font resource name in the AFP file. Courier New face name to map to. 10 New size in points or 1/72 of an inch. 0 Bold attribute, 0 - off, 1 - on. 0 Italic attribute 0 - off, 1 - on. Color Documents Rendered as Black and White AFP (MO:DCA), Word, Excel, and PowerPoint format documents are all read in as black and white 1-bit per pixel by default to enhance performance. If you would like to preserve the color in these documents, you may use CIMGLOW_set_document_input(300,24) before calling CIMG_decompress_bitmap() to read in the documents. Preserving the 24-bit color information and using a relatively high resolution of 300 DPI will considerably increase the memory required to process the document, increase the size of the output document and decrease performance. 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 CIMGLOW_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 B, Supported File Format for details on which formats support color information at different bitdepths. CIMGLOW_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.NET looks for it in the current directory. The current directory is whatever folder the program is currently in, usually wherever the file being decompressed is located. int SNBDAPI CIMGLOW_set_fontmap_path(String *strpath); 179

180 Chapter 24 - AFP Font Mapping Functions s Table 24.2: CIMGLOW_set_fontmap_path Function s strpath A string pointer to the path to look for the snbd_map.fnt file. The snbd_map.fnt file will be appended to the path name. CIMGLOW_set_fontmap_path("c:\\temp"); This variable is limited to 50 bytes. Therefore, the path must be below 50 characters. Example 24.1 CIMGLOW_set_fontmap_path status = simage.cimglow_set_fontmap_path ("C:\\Snowbnd\\FontMap"); the status of the path of the font mapping file. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_fontmap() This function programmatically sets font mapping. int SNBDAPI CIMGLOW_set_fontmap(String *strfontmap, int maplength); s Table 24.3: CIMGLOW_set_fontmap Function s strfontmap 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. The following are some examples of the data in this variable: C0H400xx90,PrecisionID Postnet L DEMO,12,0,0 C0BPOSBX,CCodePostnet,10,0,0 180

181 Chapter 24 - AFP Font Mapping Functions maplength The integer length of font mapping data Example 24.2 CIMGLOW_set_fontmap status = simage.cimglow_set_fontmap ("C0BC25I3,Courier,10,0,0\nC0CGT12S,Arial,14,0,1\n",46); the status of the font mapping data. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_pdf_flags() This function programmatically sets PDF flags. int SNBDAPI CIMGLOW_set_pdf_flags(int flags); s Table 24.4: CIMGLOW_set_pdf_flags Function s flags New flags for PDF. the status of the PDF flags. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_pdf_fontpath() This function ]sets the PDF font path. int SNBDAPI CIMGLOW_set_pdf_fontpath(String* fontpath); s Table 24.5: CIMGLOW_set_pdf_fontpath Function s 181

182 Chapter 24 - AFP Font Mapping Functions fontpath The source path of PDF font locatio. the status of the font mapping data. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_pdfa_fontpath() This function sets the PDF/A font location. int SNBDAPI CIMGLOW_set_pdfa_fontpath(String* fontpath); s Table 24.6: CIMGLOW_set_pdfa_fontpath Function s fontpath PDF/A font location. the status of the font mapping data. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_pdfa_fontmap() This function sets PDF/A font mapping.. int SNBDAPI CIMGLOW_set_pdfa_fontmap(String* mapdata, int len); s Table 24.7: CIMGLOW_set_pdfa_fontmap Function s mapdata Len Font mapping data string. Length of font mapping string. 182

183 Chapter 24 - AFP Font Mapping Functions the status of the font mapping data. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 183

184 Chapter 25 - Housekeeping Functions Chapter 25 - Housekeeping Functions This chapter describes the RasterMaster.NET housekeeping functions. CIMG_delete_bitmap() This function removes the image from memory when you are finished with it or when terminating 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.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation DocClean Thumbnail WPF Image Note: Each call to acquire an image by decompressing or scanning will delete any previous image memory as long as you are using the same Snowbound object. When you are finished with an object and are no longer using it you must call the IMG_delete_bitmap () function to free up memory associated with the image header and data. int SNBDAPI CIMG_delete_bitmap(void); 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 H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 184

185 Chapter 25 - Housekeeping Functions CIMG_delete_bitmap_keep() This function can be used in conjunction with CIMG_create_handle_keep() to delete all internal library structures and data. It will not delete the pointer passed to CIMG_create_ handle_keep(). See CIMG_create_handle_keep() for more information. int SNBDAPI CIMG_delete_bitmap_keep(void); This function returns a DDB or old-style Windows bitmap (HBITMAP or Device Dependent Bitmap). The original image is not altered. CIMG_unload_plugins() This global function unloads all RasterMaster.NET plugins from memory. These plugins include snbdpl1.dll (the LZW plugin), pdfplug.dll (the PDF plugin), abic32.dll (the ABIC plugin), and more. int SNBDAPI CIMG_unload_plugins(void); the unloaded RasterMaster.NET plugins from memory. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_set_bitmap_name() This function sets a text string such as image name or author for the image, if the format supports it. Each buffer should be at least 200 bytes. int SNBDAPI CIMGLOW_set_bitmap_name(String *strname, String *strdate); Table 25.1: CIMGLOW_set_bitmap_name Function s 185

186 Chapter 25 - Housekeeping Functions strname strdate String to set name or author for any subsequent images to be saved String to set date for any subsequent images to be saved the pointer to memory. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** Example 25.1 CIMGLOW_set_bitmap_name C#:status = simage.cimglow_set_bitmap_name(strbmname, strdateinfo); CIMGLOW_set_tiff_indexing() CIMGLOW_set_tiff_indexing() This function sets the TIFF indexing page. int SNBDAPI CIMGLOW_set_tiff_indexing(int pages); Table 25.2: CIMGLOW_set_tiff_indexing Function s pages The indexing page to set the status of TIFF indexing page. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 186

187 Chapter 26 - DocClean Functions Chapter 26 - DocClean Functions This chapter describes the RasterMaster.NET DocClean functions. DocClean is an optional extension of RasterMaster.NET that provides a group of functions that are useful for cleaning up scanned color, grayscale and black and white images. CIMG_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 CIMG_rotate_bitmap(). See CIMG_rotate_bitmap() for more information. int SNBDAPI CIMG_auto_orient(int32 *p_angle); Table 26.1: CIMG_auto_orient Function s p_angle Angle returned as the current orientation. Number of pixels to add to the autocrop rectangle. Either 90 or 0 is returned. 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 H, Snowbound Error Codes for a list of error codes. CIMG_deskew_bitmap() When a page is scanned in it may be skewed to some degree. This function uses the angle returned from CIMG_get_deskew_angle() to do the rotation. An angle of 0 means there is no skew. If the angle is not zero, you can provide the deskew angle returned from CIMG_deskew_ bitmap to rotate the page so it no longer appears skewed. Note: When a call is made to CIMG_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. int SNBDAPI CIMG_deskew_bitmap(int angle); 187

188 Chapter 26 - DocClean Functions Table 26.2: CIMG_deskew_bitmap Function angle Angle value set. Snowbound Error Code. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 26.1 CIMG_deskew_bitmap nres = snbdobj.cimg_deskew_bitmap(nangle); CIMG_despeckle_bitmap() This function performs a function on the image to remove small specks or noise. Note: When a call is made to CIMG_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. int SNBDAPI CIMG_despeckle_bitmap(int quality); Table 26.3: CIMG_despeckle_bitmap Function quality Sets the coarseness of the amount of data to be filtered or removed. Quality factor = Remove only single pixels 100 = Removes large black areas the status of the despeckle operation. May return a FORMAT_NOT_ALLOWED error message for 4 or 8-bit color palette images.a value of 0 indicates success. Any value less than 188

189 Chapter 26 - DocClean Functions zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 26.2 CIMG_despeckel_bitmap nres = snbdobj.cimg_despeckel_bitmap(quality); CIMGLOW_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DocClean sample. int SNBDAPI CIMGLOW_auto_invert(int red, int green, int blue, int colourtolerance, double mismatchtolerance); Table 26.4: CIMGLOW_auto_invert Function s red green blue colourtolerance mismatchtolerance 24-bpp: Red component of the detection color or the full background color for 1, 4 and 8-bit per pixel images. May have the value of [0-255]. 1-bpp/4-bpp/8- bpp: Index value of the detection color. May have the value of [0-1], [0-127], and [0-255], respectively. Green component of the detection color. Ignored for non-24-bpp images. May have the value of [0-255]. Blue component of the detection color. Ignored for non-24-bpp images.may have the value of [0-255]. Per color-channel pixel-value match tolerance linear distance value. Mismatch tolerance percentage. If negative, it will default to 75. An example of a valid value is If the percentage of background pixels on the page is less than the mismatch tolerance, the image will not be inverted. 189

190 Chapter 26 - DocClean Functions 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DocClean sample. double SNBDAPI CIMGLOW_detect_blank_page(int autodetect, int red, int green, int blue, int tolerance, int islowquality, int islowmemory, Double* pctmismatch); Table 26.5: CIMGLOW_detect_blank_page Function s autodetect red green blue tolerance islowquality islowmemory Auto-detect the background color (0: no; 1: yes). 1 will force the 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 color. May have the value of [0-1], [0-127], and [0-255], respectively. Green component of the detection color. Ignored for non- 24-bpp images. May have the value of [0-255]. Blue component of the detection color. Ignored for non- 24-bpp images.may have the value of [0-255]. Per color-channel pixel-value match tolerance linear distance value. Use this value in comparing background pixels. This number is in the range [0-255]. Execute the low-quality version of the autodetect algorithm (0: no; 1: yes). The low-quality version will not guarantee the global maximum, but it will execute much faster. The tolerance level is not taken into consideration. Execute the low-memory version of the autodetect 190

191 Chapter 26 - DocClean Functions pctmismatch algorithm (0: no; 1: yes). The low-memory version will not guarantee the global maximum. The tolerance level is not taken into consideration. This setting is only for 24-bpp images. The percentage of pixels on the page that is not equal to the background color. If the percentage is zero or near zero, the page is blank. Note: The percentage is a floating point number. For example, a return value of means 50.26% of the page is non-blank. 1 if the function returns no error. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_image_dilation() This function performs image dilation on the specified image. This function will thicken the content of an image making lines and text thicker. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DocClean sample. int SNBDAPI CIMGLOW_image_dilation(int coarseness); Table 26.6: CIMGLOW_image_dilation Function coarseness The coarseness or amount of dilation. the status of the image dilation operation. A value greater or equal to 0 indicates success and represents the number of blobs removed. Any value less than zero is an error code. See Appendix H, Snowbound Error Codes for a list of error codes. 191

192 Chapter 26 - DocClean Functions CIMGLOW_image_erosion() This function performs image erosion on the specified image. This function will thin the content of an image making lines and text thinner. This can be used to remove artifacts introduced by scanning. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DocClean sample. int SNBDAPI CIMGLOW_image_erosion(int quality); Table 26.7: CIMGLOW_image_erosion Function quality The coarseness or amount of erosion. the status of the image erosion operation. A value greater or equal to 0 indicates success and represents the number of blobs removed. Any value less than zero is an error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_remove_halftone() This function removes small blobs from images. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DocClean sample. int SNBDAPI CIMGLOW_remove_halftone(int minsize, int maxsize); Table 26.8: CIMGLOW_remove_halftone Function s minsize maxsize Minimum diameter of a blob. (This value should be at least 1.) Maximum diameter of a blob. (This value should be kept very small.) 192

193 Chapter 26 - DocClean Functions the status of the halftone removal operation. A value greater or equal to 0 indicates success and represents the number of blobs removed. Any value less than zero is an error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_remove_lines() This function horizontal and/or vertical lines from an image. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DocClean sample. int SNBDAPI CIMGLOW_remove_lines(int horizontal, int vertical, int min_value); Table 26.9: CIMGLOW_remove_lines Function s horizontal vertical min_value If set to 1, removes horizontal lines. If set to 1, removes vertical lines. The smallest possible value to be considered a line. the status of the line removal operation. A value greater or equal to 0 indicates success and represents the number of blobs removed. Any value less than zero is an error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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. 193

194 Chapter 26 - DocClean Functions You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the DocClean sample. Note: This will not work with alpha-channel enabled images. int SNBDAPI CIMGLOW_remove_holepunch(int autodetectfillcolour, int red, int green, int blue, int autofindholes, CIMG_RECT* holes[], int holenum, CIMG_RECT* ROIs[], int ROIsNum, int minholediameter, int maxholediameter); Table 26.10: CIMGLOW_remove_holepunch Function s autodetectfillcolour red green blue autofindholes holes holenum ROIs Auto-detect the fill colour (0: no; 1: yes). 1 will force the system to ignore the passed fill color. 24-bpp: Red component of the detection color or the full background color for 1, 4 and 8-bit per pixel images. May have the value of [0-255]. 1-bpp/4-bpp/8-bpp: Index value of the detection color. May have the value of [0-1], [0-127], and [0-255], respectively. Green component of the detection color for 24-bit images. Ignored for non-24-bpp images. May have the value of [0-255]. Blue component of the detection color for 24-bit images. 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 system to ignore the passed holes. Array of hole punch spans to fill. If there are regions-ofinterest (ROI), then all holes which do not completely lie within an ROI are ignored. Simiarly, holes which span several ROIs but not a single ROI will be ignored. May be NULL when autofindholes is 1. Number of elements in the holes array. May be 0 when 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 automatically 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. 194

195 Chapter 26 - DocClean Functions ROIsNum minholediameter maxholediameter Number of elements in the ROIs array. May be 0 when ROIs is NULL. Minimum diameter in pixels of any holes. This is only used when holes are automatically found. Maximum diameter in pixels of any holes. This is only used when holes are automatically found. the number of holes found. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 195

196 Chapter 27 - Image Processing Functions Chapter 27 - Image Processing Functions This chapter describes the RasterMaster.NET image-processing functions. CIMG_antique_effect() This function converts color images to look as though they are antique photos. It replaces colors with sepia tones, which are reddish brown monochrome tints. When applied to a photo, they give the picture a warm, antique feeling. Note: This method only works with 24-bit color images. int CIMG_antique_effect(void); CIMG_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. int SNBDAPI CIMG_apply_profile(String **strinputprofile,string **stroutputprofile, int mode); s Table 27.1: CIMG_apply_profile Function s strinputprofile stroutputprofile mode String buffer containing the input profile. String buffer containing the output buffer. For mode choices, see below. Table 27.2: CIMG_apply_profile Modes Mode 0 Apply permanently to the image data. 1 Apply only at display time.* 2 Apply only at print time.* 196

197 Chapter 27 - Image Processing Functions Mode 3 Apply at display and print time.* * Mode settings do not change the original image data. the status of the apply profile operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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 CIMG_rotate_bitmap(). See CIMG_rotate_bitmap() for more information. int SNBDAPI CIMG_auto_orient(int32 *p_angle); Table 27.3: CIMG_auto_orient Function p_angle Angle returned as the current orientation. Number of pixels to add to the autocrop rectangle. Either 90 or 0 is returned. the status of the auto orient operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_autocrop_bitmap() This function finds and clips any white border around the image on every side. The border is discarded and the image is resized to the new cropped rectangle plus the margin. The margin may be a value of 0. 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 H, Snowbound Error Codes for a list of error codes. 197

198 Chapter 27 - Image Processing Functions int SNBDAPI CIMG_autocrop_bitmap(int margin_numofpixels); Table 27.4: CIMG_autocrop_bitmap Function margin_numofpixels Number of pixels to add to the autocrop rectangle the status of the autocrop bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_create_thumbnail() This function creates a thumbnail with the correct pixel depth and automatically selects the correct resize function for the image. See CIMG_resize_bitmap() and CIMG_resize_bitmap_bicubic() for more information. To zoom larger, use CIMG_resize_bitmap(). To zoom to a smaller size, use CIMG_create_ thumbnail(). 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. If you experience diminished quality when resizing, try calling CIMG_create_thumbnail to look at neighboring pixels when resizing for better quality. Use CIMG_create_thumbnail to preserve aspect ratio when converting to a thumbnail. This will create a gray scale aliased bitmap that must be saved with TIFF_LZW or TIFF_JPEG. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Thumbnail sample. int SNBDAPI CIMG_create_thumbnail(int width, int height); Table 27.5: CIMG_create_thumbnail Function s width height New width of image in pixels New height of image in pixels 198

199 Chapter 27 - Image Processing Functions the status of the create thumbnail operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_deskew_bitmap() This function uses the angle returned from CIMG_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 rotation is needed. See CIMG_get_deskew_angle() for more information. Note: When a call is made to CIMG_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. int SNBDAPI CIMG_deskew_bitmap(int angle); Table 27.6: CIMG_deskew_bitmap Function angle Angle in degrees by which to rotate image the status of the deskew bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_despeckle_bitmap() This function is a noise removal algorithm. Note: When a call is made to CIMG_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. int SNBDAPI CIMG_despeckle_bitmap(int value); 199

200 Chapter 27 - Image Processing Functions Table 27.7: CIMG_despeckle_bitmap Function value Quality factor = Remove only single pixels 100 = Removes large black areas the status of the despeckle bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_dib_to_ddb() This function returns a DDB or old-style Windows bitmap (HBITMAP or Device Dependent Bitmap). The original image is not altered. DDB SNBDAPI CIMG_dib_to_ddb(int width, int height); Table 27.8: CIMG_dib_to_ddb Function s width height Width of desired DDB Height of desired DDB DDB or old-style Windows bitmap (HBITMAP or Device Dependent bitmap). Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 27.1 CIMG_dib_To_ddb C#:IntPtr HBmp = simage.cimg_dib_to_ddb(panimage.width, panimage.height); 200

201 Chapter 27 - Image Processing Functions CIMG_dib_to_runs() This function converts the internal library image format from Windows DIB format to a Snowbound runs format. This only works for 1-bit bi-level images. int SNBDAPI CIMG_dib_to_runs(void); the status of the Snowbound runs format. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. int SNBDAPI CIMG_erase_rect(int x, int y, int width, int height, int color, int in_outflag); Table 27.9: CIMG_erase_rect Function s x y width height color in_outflag X start of rectangle in pixels Y start of rectangle in pixels width of the rectangle in pixels height of the rectangle in pixels Color to draw 1 = Draw inside rectangle 0 = Draw outside rectangle the status of the erase rectangle operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_flip_bitmapx() This function swaps horizontal pixels to produce a mirror image of the original image. It permanently changes the image in memory. 201

202 Chapter 27 - Image Processing Functions You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Web Image Viewer Component sample. int SNBDAPI CIMG_flip_bitmapx(void); the status of the flip bitmapx operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_flip_bitmapy() This function swaps vertical pixels to produce a mirror image of the original image. It permanently changes the image in memory. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Web Image Viewer Component sample. int SNBDAPI CIMG_flip_bitmapy(void); the status of the flip bitmapy operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. int SNBDAPI CIMG_get_deskew_angle(int *angle, int start_degree, int end_degree); Table 27.10: CIMG_get_deskew_angle Function s 202

203 Chapter 27 - Image Processing Functions angle start_degree end_degree Pointer to integer to receive deskew angle Starting angle for which to check Ending angle for which to check the status of the get deskew angle operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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 values can be printed or displayed. Supported file formats include: TIFF, JPEG, PICT, PDF, GIF and PNG. These formats can contain an embedded color profile. char * SNBDAPI CIMG_get_profile(String *strfile, String **strbuffer, int page, Int32 *ptrlength); s Table 27.11: CIMG_get_profile Function s strfile strbuffer page ptrlength File name for the image to be read in from the profile. String buffer of the profile. Page number to be read in from the profile. Length of the buffer. the character buffer. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. int SNBDAPI CIMG_histogram_equalize(void); 203

204 Chapter 27 - Image Processing Functions the status of the histogram equalize operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_invert_bitmap() This function changes each bit in the image from 0 to 1 or from 1 to 0. This works well for inverting documents which have a black background. This permanently changes the image in memory. int SNBDAPI CIMG_invert_bitmap(void); the status of the invert bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_merge_annotation() This function merges a current annotation to an image object. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFAnnotation_CSHARP sample. int SNBDAPI CIMG_merge_annotation(int iwidth, int iheight); Table 27.12: CIMG_merge_annotation Function s iwidth iheight Image width. Image height. the status of the merge annotations operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 204

205 Chapter 27 - Image Processing Functions CIMG_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Merge Image sample. int SNBDAPI CIMG_merge_bitmap(String *filename, int raster_operation, int x, int y); Table 27.13: CIMG_merge_bitmap Function s filename Path/filename of disk image to merge onto the image in memory specified by the filename. ROP opcode obtained from the list below or the Windows SDK manual. 0 or SRCCOPY = Copies the source bitmap to the destination bitmap. 1 or SRCPAINT = Combines pixels of the destination and source bitmaps using the Boolean OR operator. 2 or SRCAND = Combines pixels of the destination and source bitmaps using the Boolean AND operator. raster_operation 3 or SRCINVERT = Combines pixels of the destination and source bitmaps using the Boolean XOR operator. 4 or SRCERASE = Inverts the destination bitmap and combines the result with the source bitmap using the Boolean AND operator. 5 or NOTSRCCOPY = Copies the inverted source bitmap to the destination. 6 or NOTSRCERASE = Inverts the result of combining the destination and source bitmaps using the Boolean OR operator. 7 or MERGECOPY = Combines the pattern and the source bitmap using the Boolean AND operator. Note: These codes will not work in Unix. The valid Unix 205

206 Chapter 27 - Image Processing Functions OP Codes are: GXclear CXand GXandReverse GXcopy GXandInverted GXnoop GXxor GXor GXequiv GXinvert GXorReverse GXcopyInverted GXorInverted GXand 8 or MERGEPAINT = Combines the inverted source bitmap with the destination bitmap using the Boolean OR operator. 9 or PATCOPY = Copies the pattern to the destination bitmap. 10 or PATPAINT = - Combines the inverted source bitmap with the pattern using the Boolean XOR operator. Combines the result of this operation with the destination bitmap using the Boolean OR operator. 11 or PATINVERT = Combines the destination bitmap with the pattern using the Boolean XOR operator. 12 or DSTINVERT = Inverts the destination bitmap. 13 or BLACKNESS = Turns all output black. x y 14 or WHITENESS = Turns all output white. Pointer to integer to receive the starting x coordinate. Pointer to integer to receive the starting y coordinate. the status of the merge bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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 206

207 Chapter 27 - Image Processing Functions over the current image. int SNBDAPI CIMG_merge_bitmap(Snowbnd *src, int raster_operation, int x, int y); Table 27.14: CIMG_merge_bitmap Function s src Merges the source Snowbnd object image into the calling Snowbnd object at x and y with the specified raster operation ROP opcode obtained from the list below or the Windows SDK manual. 0 or SRCCOPY = Copies the source bitmap to the destination bitmap. 1 or SRCPAINT = Combines pixels of the destination and source bitmaps using the Boolean OR operator. 2 or SRCAND = Combines pixels of the destination and source bitmaps using the Boolean AND operator. 3 or SRCINVERT = Combines pixels of the destination and source bitmaps using the Boolean XOR operator. raster_operation 4 or SRCERASE = Inverts the destination bitmap and combines the result with the source bitmap using the Boolean AND operator. 5 or NOTSRCCOPY = Copies the inverted source bitmap to the destination. 6 or NOTSRCERASE = Inverts the result of combining the destination and source bitmaps using the Boolean OR operator. 7 or MERGECOPY = Combines the pattern and the source bitmap using the Boolean AND operator. Note: These codes will not work in Unix. The valid Unix OP Codes are: GXclear CXand GXandReverse GXcopy GXandInverted 207

208 Chapter 27 - Image Processing Functions GXnoop GXxor GXor GXequiv GXinvert GXorReverse GXcopyInverted GXorInverted GXand 8 or MERGEPAINT = Combines the inverted source bitmap with the destination bitmap using the Boolean OR operator. 9 or PATCOPY = Copies the pattern to the destination bitmap. 10 or PATPAINT = - Combines the inverted source bitmap with the pattern using the Boolean XOR operator. Combines the result of this operation with the destination bitmap using the Boolean OR operator. 11 or PATINVERT = Combines the destination bitmap with the pattern using the Boolean XOR operator. 12 or DSTINVERT = Inverts the destination bitmap. 13 or BLACKNESS = Turns all output black. x y 14 or WHITENESS = Turns all output white. Pointer to integer to receive the starting x coordinate. Pointer to integer to receive the starting y coordinate. the status of the merge bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_merge_bitmap_alpha() This function merges a 32-bit alpha channel image onto a normal 24-bit DIB using the transparency channel. int SNBDAPI CIMG_merge_bitmap_alpha(Snowbnd *src, CDIB_HEADER, *dib_header, int xpos, int ypos, int opaque); 208

209 Chapter 27 - Image Processing Functions Table 27.15: CIMG_merge_bitmap_alpha Function s src dib_header xpos ypos opaque Standard for snowbnd object 32-bit alpha channel image to merge Pointer to a CDIB_HEADER structure contains the image header. For more information, see public class CDIB_ HEADER. Starting x coordinate for which to merge image Starting y coordinate for which to merge image 1 = use transparency channel information to blend images 0 = do not draw any pixels with transparency channel information pixels set the status of the merge bitmap alpha channel image operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_process_bitmap() This function is used to perform the image processing function. A simple 3 x 3 matrix is applied to the image for 8 and 24-bit images. If the value for the matrix pointer is not NULL, it assumes that it contains values to be applied to the image. This function is a Sobel image processing function. It can be used as a relatively inexpensive edge detection function or to enhance the image. The method parameter allows you to specify which method to use to enhance the image. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Image Processing sample. int SNBDAPI CIMG_process_bitmap(int type, Array* matrix); Table 27.16: CIMG_process_bitmap Function s type Specify the type of filter to be performed 0 = User defined 3 * 3 matrix 209

210 Chapter 27 - Image Processing Functions matrix 1 = Isolate points 2 = Edge detection 3 = Horizontal edge detection 4 = Vertical edge detection 5 = 45 degree edge detection 6 = -45 degree edge detection 7 = Laplacian 8 = Dialation 9 = Roberts Cross Array that contains the operator value to apply to the image if it is not NULL, otherwise it returns the operator array. the status of the process bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. For best results, refine the search area. Works only with 24-bit color images. int SNBDAPI CIMG_remove_red_eye(int x, int y, int width, int height); s Table 27.17: CIMG_remove_red_eye Function s x y width height Starting top left area for x coordinate Starting top left area for y coordinate Width of area to search Height of area to search 210

211 Chapter 27 - Image Processing Functions the remove red eye operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. To zoom larger, use CIMG_resize_bitmap(). To zoom to a smaller size, use CIMG_create_thumbnail(). To preserve aspect ratio: hres is the destination width. vres the destination height. Set the width and height to the original width and height of the image after decompress as shown in the following example: Example 27.2 Preserving Aspect Ratio vres = (int)((long)height * hres / width); CIMG_resize_bitmap(hres,vres); 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. int SNBDAPI CIMG_resize_bitmap(int width, int height); Table 27.18: CIMG_resize_bitmap Function s width height New width of image New height of image the resize bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 211

212 Chapter 27 - Image Processing Functions CIMG_resize_bitmap_bicubic() This function uses a bicubic interpolation algorithm to scale down images. This is good for creating high-resolution thumbnails of color images. If this function returns an error such as PIXEL_DEPTH_UNSUPPORTED or PALETTE_ IMAGES_NOT_ALLOWED, then try using CIMG_create_thumbnail() function because that will take a wider variety of input bit-depths than CIMG_resize_bitmap_bicubic function. int SNBDAPI CIMG_resize_bitmap_bicubic(int width, int height); Table 27.19: CIMG_resize_bitmap_bicubic Function s width height Width of image in pixels Height of image in pixels the resize bitmap bicubic interpolation algorithm operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_resize_bitmap_interp() This function scales the image up or down to the new height and width. The interp averages neighboring pixels for scaling down all image types. This permanently changes the height and width of the image. int SNBDAPI CIMG_resize_bitmap_interp(int width, int height); Table 27.20: CIMG_resize_bitmap_interp Function s width height New width of image New height of image 212

213 Chapter 27 - Image Processing Functions a FORMAT_NOT_ALLOWED error message for images with a bit-depth of 4. a PALETTE_IMAGES_NOT_ALLOWED error message for color 8-bit images. May return a OUT_OF_MEMORY error message. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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 You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Alpha ASP Image View 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.NET flips from portrait to landscape (or vice-versa) and preserves the page content. If the image is rotated by something other than 90 degrees, RasterMaster.NET shrinks the page so that all the content is preserved. RasterMaster.NET does not crop the edges during the rotation. int SNBDAPI CIMG_rotate_bitmap(int angle); Table 27.21: CIMG_rotate_bitmap Function angle Rotation in hundredths of degrees the rotate bitmap operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 213

214 Chapter 27 - Image Processing Functions CIMG_runs_to_dib() The RasterMaster.NET 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 function only works for 1-bit images. int SNBDAPI CIMG_runs_to_dib(void); the stored raw uncompressed data operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_set_display_angle() This function rotates the angle of the image at display time when calling CIMG_display_bitmap_aspect(). The original image data is not affected. See CIMG_display_bitmap_aspect() for more information. To save the image as rotated, use CIMG_rotate_bitmap(). The image is permanently rotated in memory. See CIMG_rotate_bitmap() for more information. Use this function on all image types for fast rotation. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Alpha sample. int SNBDAPI CIMG_set_display_angle(int rotate_angle); Table 27.22: CIMG_set_display_angle Function rotate_angle Rotates image by 0, 90, 280 or 270 the set display angle operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 214

215 Chapter 27 - Image Processing Functions CIMG_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. int SNBDAPI CIMG_sharpen_bitmap(int sharpness); Table 27.23: CIMG_sharpen_bitmap Function sharpness Integer value from -127 to 127 the sharpen bitmap operation. A value of 0 indicates success. a FORMAT_ NOT_ALLOWED error message for 1-bit (black and white) images and for 4-bit or 8-bit color images. 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 H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_palette() This function returns the palette entries of the specified image into an array of RGBQUAD structures. 1-bit images = 2 entries 4-bit images = 16 entries 8/24-bit images = 256 entries 24-bit images have no palettes but the autocolor or rainbow palette is returned. int SNBDAPI CIMGLOW_get_palette(Array *arrrgbquad); Table 27.24: CIMGLOW_get_palette Function s arrrgbquad Array of RGBQUAD structures 215

216 Chapter 27 - Image Processing Functions the get palette operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_raster() This function gets a line of raw data from the line number specified by ypos. int SNBDAPI CIMGLOW_get_raster(Array *data, int ypos, int bytes); Table 27.25: CIMGLOW_get_raster Function s data ypos bytes Buffer to receive a line of raw raster data. Line number of raster to get. no more than this number of bytes. If set to -1, it calculates the number of bytes in one line and returns that amount. no more than the number of bytes specified. If set to -1, the number of bytes in one line are calculated and returned. CIMGLOW_put_palette() This function sets the palette entries of the specified image from an array of RGBQUAD structures. 1-bit images = 2 entries 4-bit images = 16 entries 8/24-bit images = 256 entries int SNBDAPI CIMGLOW_put_palette(IMG_RGBQUAD *input_prgb); Table 27.26: CIMGLOW_put_palette Function s 216

217 Chapter 27 - Image Processing Functions input_prgb Pointer to array of RGBQUAD structures the put palette operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_put_raster() This function puts a line of raw data into the DIB specified by data at the ypos line number. int SNBDAPI CIMGLOW_put_raster(Array *data, int ypos, int bytes); Table 27.27: CIMGLOW_put_raster Function s data ypos bytes Buffer of raw to data to put into DIB Line number in which to put data Replaces no more than this number of bytes the put raster operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_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 functions, 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. int SNBDAPI CIMGLOW_set_fast_convert(int off_on, int format); 217

218 Chapter 27 - Image Processing Functions Table 27.28: CIMGLOW_set_fast_convert Function s off_on format 0 = Off 1 = On Sets the format the set fast conversion operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 218

219 Chapter 28 - Document Conversion and Text Extraction Functions Chapter 28 - Document Conversion and Text Extraction Functions This chapter describes the functions used for document conversion and text extraction. Document Conversion and Text Extraction The document conversion DLL extracts and converts vector or document file formats such as AFP/MO:DCA, PCL, and MS Word to vector PDF format. The PDF file will be in a true vector format, meaning that it will not be in a bitmap format. The PDF file will retain the original text and graphics commands. Font information such as the font typeface, font height, and bold/italic attributes will remain the same. This allows the output PDF file to be created as text searchable. The PDF file created can be searched for words or phrases with the use of a text searching application. 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 CIMGLOW_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 CIMGLOW_extract_text() for more information. 2. The CIMG_save_document() function takes a buffer passed in with text, graphics, and position information to create the document file output. The output file contains searchable text. Normally, the CIMG_save_bitmap() functions only create a bitmap file. This only supports the PDF file as an output file. See CIMG_save_document() for more information. CIMGLOW_extract_text() This function extracts text from PTOCA, PCL, PDF, MS Word, AFP, and MS Excel files. 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.NET Evaluation\Net\Samples. This function is used in the following samples: Convert_Doc Text Search 219

220 Chapter 28 - Document Conversion and Text Extraction Functions int SNBDAPI CIMGLOW_extract_text(String *strfilename, Byte *arrbuffer, int *ptrlength, int page); Table 28.1: CIMGLOW_extract_text Function s *strfilename *arrbuffer *ptrlength page Name of file from which to extract text Buffer from which to receive extracted text Pointer to an integer to return the length of the extracted buffer Page number of file from which to extract text the buffer of extracted text in ASCII format. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 28.1 CIMGLOW_extract_text %%SOF /Page=0 /Width=1700 /Height=2200 /FontName=TimesRoman /FontHeight=44 /FontBold=1 /FontItalic=0 /Xpos=1290 /Ypos=240 %%SOT Devadas %%EOT /Xpos=1253 /Ypos=240 %%SOT S. %%EOT %%EOF %%SOI %%EOI Table 28.2: Extracted Text 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. 220

221 Chapter 28 - Document Conversion and Text Extraction Functions %%SOF %%EOF Page Width Height Font Name FontHeight FontBold FontItalic Xpos Ypos %%SOT %%EOT %%SOI %%EOI %%SOTU %%EOTU Signals the start of the buffer Marks the end of extracted text Specified once at the beginning of the file to indicate the page number Specified once at the beginning of the file to indicate page width in pixels Specified once at the beginning of the file to indicate page height in pixels Name of font Font height in pixels Font to be drawn plain or in bold 1 = bold 0 = plain Font to be drawn in normal or italic 1 = italic 0 = normal X pos in pixels Y pos in pixels Start of text block End of text block Start of image End of image Start of Text Unicode/UTF. End of Text Unicode/UTF. CIMGLOW_extract_text_mem() This function extracts text from memory. It returns the buffer of extracted text in ASCII format. int SNBDAPI CIMGLOW_extract_text_mem(Array *arrimage, Byte *arrbuffer, int *ptrlength, int page); s Table 28.3: CIMGLOW_extract_text_mem Function s *arrimage *arrbuffer *ptrlength page Memory array to image data Buffer from which to receive extracted text Pointer to an integer to return the length of the extracted buffer Page number of file from which to extract text Table 28.4: Extracted Text 221

222 Chapter 28 - Document Conversion and Text Extraction Functions Ypos Xpos Width Page Height FontItalic FontHeight FontBold Font Name %%SOT %%SOF %%EOT %%EOF Y pos in pixels X pos in pixels Specified once at the beginning of the file to indicate page width in pixels Specified once at the beginning of the file to indicate the page number Specified once at the beginning of the file to indicate page height in pixels Font to be drawn in normal or italic 1 = italic 0 = normal Font height in pixels Font to be drawn plain or in bold 1 = bold 0 = plain Name of font Start of text block Signals the start of the buffer End of text block Marks the end of extracted text the buffer of extracted text in ASCII format. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_save_document() This function takes a buffer passed in with text, graphics, and position information to create the document file output. The output file contains searchable text. Normally, the CIMG_save_bitmap() function only creates a bitmap file. This method supports PDF and SVG 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.NET Evaluation\Net\Samples. This function is used in the Convert_Doc sample. int SNBDAPI CIMG_save_document(String *strname, char *buff, int filetype); 222

223 Chapter 28 - Document Conversion and Text Extraction Functions s Table 28.5: CIMG_save_document Function s *strname Name of the output PDF file buff Buffer of extracted text, graphics, and bitmaps filetype Currently only supports PDF - file type 59 the document file output. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 28.2 Data Format for Extracted Text Buffer for both Windows and Java The coordinates system is originated at the upper left. X - Represents a floating point argument. As in , all of these arguments are in points of 1/72 of an inch. Text - Represents an ASCII string argument. STREAM COMMANDS and format of extracted file %%SOF- Start of file /PageNumber=XPage number being extracted. /PageWidth=XWidth of page in points. (1/72 of an inch) /PageHeight=XHeight of page in points. (1/72 of an inch) %%EOFMarks the end of this file. No more data to process. /FontStart of font data and attributes. /FontName=TextStandard font face name. /FontHeight=XFont height in points (1/72 of an inch). /FontBold=XSet to 1 for bold font otherwise 0. /FontItalic=XSet to 1 for Italic font otherwise 0. /Xpos=XX starting coordinate of text string. /Ypos=XY starting coordinate of text string. %%SOTStart of a text string after the carriage return. Text Data here %%EOTEnds a text string. /ImageStart of image data and attributes. /ImageWidth=XWidth in pixels of the image data. /ImageHeight=XHeight in pixels of the image data. /Bitsperpixel=XNumber of bits per pixel. /Compression=TextCompression type used. CCITT_G4, JPEG, or NONE. /Length=XLength of binary image data. %%SOIStarts the binary image data. Binary data here 223

224 Chapter 28 - Document Conversion and Text Extraction Functions %%EOIEnds the binary image data. /DrawImage Xs Ys Width HeightDraws the last defined image at the location specified by the arguments. /Moveto XS YSMoves current graphics drawing position. /LineXS YSDraws a line from current graphics drawing position to a location specified by the arguments. /Rectangle XS YS WIDTH HEIGHT Draws a rectangle at the specified coordinates. /Curve X1 Y1 X2 Y2 X3 Y3Draws a curve from the current graphics drawing position to the end coordinates using the first 4 arguments as guide points. CIMG_save_document_mem() This function takes a buffer passed in with text, graphics, and position information obtained from CIMGLOW_extract_text_mem() to save the document file output to memory. The output file contains searchable text. This method supports PDF and SVG 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.NET Evaluation\Net\Samples. This function is used in the Convert_Doc sample. int SNBDAPI CIMG_save_document_mem(Array *imgarray, Array *buffarray, int filetype)); s Table 28.6: CIMG_save_document_mem Function s *imgarray Memory array already allocated buffarray Buffer of extracted text, graphics, and bitmaps filetype Currently only supports PDF - file type

225 Chapter 28 - Document Conversion and Text Extraction Functions the exact document size saved in memory. a 0 or positive value on success in RasterMaster.NET version or earlier. the number of bytes saved in Raster- Master.NET version or later. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_close_pdf_reader() This is a PDF specific method that closes private member PDF reader opened with a call to CIMGLOW_set_pdf_reader(). int CIMGLOW_close_pdf_reader() none. A value of 0 or 1 indicates success. Any value less than zero is a Snowbound error code. See Snowbound Error Codes for a list of error codes. CIMGLOW_get_pdf_text() This is a PDF specific method used to get all text from a specified page of a PDF document previously opened by calling CIMGLOW_set_pdf_reader(). It uses private member variable mpdfreader. int CIMGLOW_get_pdf_text(array<Byte>^% arrbuffer, int page) Table 28.7: IMGLOW_get_pdf_text(array, int) Method s arrbuffer page Byte array to hold returned text. Page number from which to get text. a byte array containing all text on the specified page. A value of 0 or 1 indicates success. Any value less than zero is a Snowbound error code. See Snowbound Error Codes for a list of error codes. 225

226 Chapter 28 - Document Conversion and Text Extraction Functions CIMGLOW_set_pdf_reader() This is a PDF specific method that associates a private member variable with the contents of the byte array passed in. int CIMGLOW_set_pdf_reader(array<Byte>^ data) Table 28.8: CIMGLOW_set_pdf_reader(array<Byte>^ data) Method s data Byte array containing PDF document contents. none. A value of 0 or 1 indicates success. Any value less than zero is a Snowbound error code. See Snowbound Error Codes for a list of error codes. 226

227 Chapter 29 - Color Promotion Functions Chapter 29 - Color Promotion Functions This chapter describes the RasterMaster.NET color promotion functions. Generally adding more color depth to an image will use significantly more space and the larger image will take more time to process. However, there are circumstances when a black and white or grayscale image needs to be promoted to color, or a color space needs to be changed in order to make an image consistent with other pages in a document. AFP (MO:DCA), Word, Excel, and PowerPoint format documents are all read in as black and white 1-bit per pixel by default to enhance performance. If you would like to preserve the color in these documents, you may use CIMGLOW_set_document_input(300,24) before calling CIMG_decompress_bitmap() to read in the documents. Preserving the 24-bit color information and using a relatively high resolution of 300 DPI will considerably increase the memory required to process the document, increase the size of the output document and decrease performance. 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 CIMGLOW_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 B, Supported File Formats for details on which formats support color information at different bitdepths. This chapter lists the functions from the functions that save images with less color (smaller size) to more color (largest output depth): CIMG_promote_8() CIMG_promote_24() CIMG_promote_32() This chapter also lists the following functions that change color spaces: CIMG_rgb_to_cmyk() CIMG_cmyk_to_rgb() CIMG_color_combine() CIMG_color_separate() CIMGLOW_get_tiff_tag() CIMG_promote_8() This function permanently converts a 1 or 4-bit image to an 8-bit image in the current DIB. int SNBDAPI CIMG_promote_8(void); 227

228 Chapter 29 - Color Promotion Functions the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_promote_24() This function permanently converts a 1, 4, or 8-bit image to a 24-bit image in the current DIB. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Merge Image sample. int SNBDAPI CIMG_promote_24(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H - Error Codes for a list of error codes. CIMG_promote_32() This function converts a 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. int SNBDAPI CIMG_promote_32(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Changing Color Spaces Functions CIMG_rgb_to_cmyk() This function converts 24-bit RGB data to 32-bit CMYK data. RasterMaster.NET products support full 32-bit CMYK data as an internal 32-bit DIB format. The black plane is created. int SNBDAPI CIMG_rgb_to_cmyk(void); 228

229 Chapter 29 - Color Promotion Functions 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 H, Snowbound Error Codes for a list of error codes. CIMG_cmyk_to_rgb() This function converts the 32-bit CMYK data to 24-bit RGB data. RasterMaster.NET supports full 32-bit CMYK data as an internal 32-bit DIB format. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. int SNBDAPI CIMG_cmyk_to_rgb(void); 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 H, Snowbound Error Codes for a list of error codes. CIMG_color_combine() This function combines 3 or 4 planes into a new 24 or 32-bit 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. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. int SNBDAPI CIMG_color_combine(Snowbnd *dest, Snowbnd *blue_handle, Snowbnd *green_handle, Snowbnd *red_handle, Snowbnd *k_handle, int planes_num); Table 29.1: CIMG_color_combine Function s 229

230 Chapter 29 - Color Promotion Functions blue_handle green_handle red_handle k_handle planes_num Standard for 8-bit gray-scale image which represents the blue plane (cyan). Standard for 8-bit gray-scale image which represents the green plane (magenta). Standard for 8-bit gray-scale image which represents the red plane (yellow). Standard for 8-bit gray-scale image which represents the black plane (black). If negative, creates a 24-bit RGB image. Number of planes for resulting image. the status of the color combine operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_color_separate() This function gets an individual plane of color data and returns a new RasterMaster.NET handle. The new color plane is an 8-bit gray scale image. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. int SNBDAPI CIMG_color_separate(Snowbnd *dest, int plane); Table 29.2: CIMG_color_separate Function s plane The plane can be one of the following: For 32 bitcmyk planes are: 0 = cyan 1 = magenta 2 = yellow 3 = black For 24-bit rgb planes are: 0 = blue 1 = green 2 = red 230

231 Chapter 29 - Color Promotion Functions the status of the color separate operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_tiff_tag() CIMGLOW_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. You can use the TIFF tag to get the colorspace type by specifying tag #262. int SNBDAPI CIMGLOW_get_tiff_tag(int tag, int max_bytes, int *ptr_ value, String *strfilename, String *strbuff); Table 29.3: CIMGLOW_get_tiff_tag Function s tag max_bytes ptr_value strfilename strbuff TIFF tag number to return Maximum bytes to read for string tags Pointer to tag value returned Filename to read tags from String buffer for returning string tags a string or a non-string value. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 29.1 CIMGLOW_get_tiff_tag Value is what is returned. For this tag you will not need the bytearray. int tag_no = 262; int max_bytes = 0; int[] value = new int[1]; byte[] data = null; myframe.simage.cimglow_get_tiff_tag(tag_no, max_bytes, value, 231

232 Chapter 29 - Color Promotion Functions st, data, page); /* PHOTOMETRIC INTERPRETATION */ #define TIFF_PHOTO_WHITE_IS0 0 #define TIFF_PHOTO_WHITE_IS1 1 #define TIFF_PHOTO_RGB 2 #define TIFF_PHOTO_PALETTE 3 #define TIFF_PHOTO_TRANSP 4 #define TIFF_PHOTO_CMYK 5 #define TIFF_PHOTO_YCC 6 #define TIFF_PHOTO_CIELAB 8 232

233 Chapter 30 - Color Reduction Functions Chapter 30 - Color Reduction Functions This chapter describes the RasterMaster.NET color reduction functions. The quality of the conversion is determined by the input and output dots per inch resolution and the output compression type. Use color reduction functions to create a lower image quality that is smaller in size and is speedier to process. If you go from a higher to a lower resolution or a lossy compression type, then the quality of the image will degrade. This chapter lists the functions that save images with more color (largest output depth) to less color (smaller size). CIMG_color_gray() This function permanently converts a 4, 8, or 24-bit image to an 8-bit gray scale image. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_color_gray(void); the status of the grayscale image operation. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_resize_to_gray() This function resizes down a 1-bit image to an 8-bit grayscale image using the scale to gray anti-aliasing algorithm. This converts a 1-bit image to an 8-bit suitable image for saving as a JPEG file format. This function is excellent for creating small thumbnails for large documents or 1-bit images. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. 233

234 Chapter 30 - Color Reduction Functions int SNBDAPI CIMG_resize_to_gray(int width, int height); Table 30.1: CIMG_resize_to_gray Function s width height Destination width of image to resize Destination height of image to resize the status of the resize to gray operation. A value of 0 indicates success. 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. 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 H, Snowbound Error Codes for a list of error codes. CIMG_popularity_color() This function permanently converts a 24-bit image to an 8-bit per pixel image using the popularity algorithm. The popularity algorithm chooses 256 of the most populous colors from the image. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_popularity_color(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 234

235 Chapter 30 - Color Reduction Functions CIMG_mediancut_color() This function permanently converts a 24-bit image to an 8-bit per pixel image using a combination of the popularity algorithm and error diffusion. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_mediancut_color(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_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. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_octree_color(int bits_per_pixel, IMG_RGBQUAD *input_prgb, int entries); Table 30.2: CIMG_octree_color Function s bits_per_pixel Pixel depth to convert to: 4 or 8 235

236 Chapter 30 - Color Reduction Functions input_prgb entries Pointer to array of RGBQUAD structures Number of colors to reduce 1-16 for 4-bit images for 8-bit images the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Example 30.1 CIMG_octree_color C#:status = simage.cimg_octree_color(4, null, 16) CIMG_bayer_color() This function permanently converts an 8 or 24-bit image to a 4-bit per pixel image using a 16 by 16 Bayer matrix dither. Note: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_bayer_color(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_bayer_mono() This function permanently converts a 4, 8, or 24-bit image to a 1-bit per pixel image using a Bayer fixed matrix dithering technique. Note: The quality of the conversion to black and white or grayscale can be enhanced by 236

237 Chapter 30 - Color Reduction Functions specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_bayer_mono(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_diffusion_mono() This function permanently converts a 4, 8, or 24-bit image to a 1-bit per pixel using the Stucky error diffusion technique. Notes: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. CIMG_decompress_bitmap must be called before CIMG_diffusion_mono. It is designed for use on rasterized pages. It cannot be used on pages with vector content created by CIMGLOW_extract_text. int SNBDAPI CIMG_diffusion_mono(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_thresh_mono() This function permanently converts a 4, 8, or 24-bit image to a 1-bit per pixel image using a threshold passed as the second argument. Note: The quality of the conversion to black and white or grayscale can be enhanced by 237

238 Chapter 30 - Color Reduction Functions specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_thresh_mono(int threshhold); Table 30.3: CIMG_thresh_mono Function threshhold Threshold value to use. The range is from the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_halftone_mono() This function permanently converts a 4, 8, or 24-bit image to a 1-bit per pixel image using a fixed halftone matrix dithering technique. Notes: The quality of the conversion to black and white or grayscale can be enhanced by specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int SNBDAPI CIMG_halftone_mono(void); the standard library image handle. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_detect_color() 238

239 Chapter 30 - Color Reduction Functions CIMGLOW_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 output document size by ensuring the black and white pages are saved as 1-bit per pixel (monochrome) 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 CIMG_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 specifying the alias and alias quality. We highly recommend the JPEG compression format as the best compression available in our library for photo type images. int CIMGLOW_detect_color(int); 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 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 H, Snowbound Error Codes for a list of error codes. Example 30.2 CIMGLOW_get_pages page_count = CIMGLOW_get_pages("file.pdf"); for (x = 0; x < page_count; x++) { status = CIMG_decompress_bitmap_page("file.pdf",x); bitspix = CIMGLOW_detect_color(); if (bitspix == 24) status = CIMG_save_bitmap(imghandle,"c:\\temp\\mixed.tif",TIFF_JPEG); else { if (bitspix == 8) CIMG_thresh_mono(128); status = CIMG_save_bitmap("c:\\temp\\mixed.tif",TIFF_G4_FAX); 239

240 Chapter 30 - Color Reduction Functions } CIMG_delete_bitmap(); 240

241 Chapter 31 - ASCII Formats and Functions Chapter 31 - ASCII Formats and Functions This chapter describes the structure for defining Snowbound s available ASCII attributes 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 CIMGLOW_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: CIMGLOW_set_auto_detect(38) This chapter contains the following topics: ASCII Attribute Structure CIMG_import_ascii() CIMGLOW_get_ascii_attributes() CIMGLOW_get_ascii_page_width() CIMGLOW_set_ascii_attributes() ASCII Attribute Structure Below is the structure for defining Snowbound ASCII attributes. 241

242 Chapter 31 - ASCII Formats and Functions Example 31.1 ASCII Attributes public class CASCIITEXTATTR { public: int asciiflags; int asciixdpi; int asciiydpi; CIMG_RECT *asciimargin; int asciitabstop; int asciipagewidth; int asciipageheight; int asciipointsize; int asciicharsperline; int asciilinesperpage; int asciiweight; int asciiitalic; String *asciitypeface; CASCIITEXTATTR(); void reset(); }; Table 31.1: public class CASCIITEXTATTR s Default int asciiflags 0 Determines which fields to use int asciixdpi 200 Horizontal dots per inch int asciiydpi 200 Vertical dots per inch if (asciimargin == 0) asciimargin = new CIMG_RECT(); asciimargin->left CIMG_RECT *asciimargin = 1000; asciimargin->right = Margins in 1/1000 inches 1000; asciimargin- >top = 750; asciimargin->bottom = 750; int asciitabstop 8 Number of characters between tab stops int asciipagewidth 8500 Width of page in 1/1000 inches 242

243 Chapter 31 - ASCII Formats and Functions Default int asciipageheight Height of page in 1/1000 inches int asciipointsize -1 Point size of the font int asciicharsperline 80 Number of characters per line int asciilinesperpage 60 Number of lines per page int asciiweight 0 Normal=0 Bold=1 int asciiitalic 0 Normal=0 Italic=1 String *asciitypeface Courier New Name of the font to use Table 31.2: ASCIITEXTATTR Function Flags 1L << means shift a binary bit to the left by 1 position. Essentially this is 2 to the power of however 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 ASCIIXDPI (1L<<0) = 1 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 Before you call CIMGLOW_set_ascii_attributes, you need to set attr.asciiflags to indicate which field to update. Please refer to Table 32-2 and the following example code to set attr.asciiflags to indicate which field to update: Example 31.2 attr.asciiflags attr.asciiflags = 0xa40; attr.asciiweight = 1; attr.asciipointsize = 48; attr.asciitypeface = "Arial"; attr.asciixdpi = maxresolution; 243

244 Chapter 31 - ASCII Formats and Functions attr.asciiydpi = maxresolution; status = simage.cimglow_set_ascii_attributes(attr); Table 31.3: Standard Page Sizes ASCIIXSIZELETTER 8500L /* 8 1/2" */ ASCIIYSIZELETTER 11000L /* 11" */ ASCIIXSIZELEGAL 8500L /* 8 1/2" */ ASCIIYSIZELEGAL 14000L /* 14" */ ASCIIXSIZEEXECUTIVE 7250L /* 7 1/4" */ ASCIIYSIZEEXECUTIVE 10500L /* 10 1/2" */ ASCIIXSIZEENVELOPE 4125L /* 4 1/8" */ ASCIIYSIZEENVELOPE 9500L /* 9 1/2" */ To get the page count for ASCII files, use IMGLOW_set_auto_detect(38) before getting the page count or decompressing. Note: To get the page count for ASCII files, use CIMGLOW_set_auto_detect(38) before getting the page count or decompressing. Please see CIMGLOW_set_auto_detect for more information, Please refer to Table 32-3 and the following example code to set standard page sizes: Example 31.3CIMGLOW_set_auto_detect simage.cimglow_set_auto_detect(38); asciiattr = new CASCIITEXTATTR(); status = simage.cimglow_get_ascii_attributes(asciiattr); asciiattr.asciiflags = 0x1c3; asciiattr.asciipagewidth = 11000; asciiattr.asciipageheight = 8300; asciiattr.asciilinesperpage = 60; asciiattr.asciipointsize = 14; asciiattr.asciixdpi = 200; asciiattr.asciiydpi = 200; status = simage.cimglow_set_ascii_attributes(asciiattr); status = simage.cimg_decompress_bitmap(filename); 244

245 Chapter 31 - ASCII Formats and Functions CIMG_import_ascii() CIMG_import_ascii() This function reads and converts ASCII data into a bitmap image. To use this function, you must turn on ASCII decompression using the CIMGLOW_set_auto_detect() function. 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 CIMGLOW_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: CIMGLOW_set_auto_detect(38) int SNBDAPI CIMG_import_ascii(String *filename, int page); Table 31.4: CIMG_import_ascii Function s filename page Path/filename of the ASCII file to convert Page number to start at the standard library image handle. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_get_ascii_attributes() This global function gets the current parameters for CIMG_import_ascii(). It allows you to get the font margins and other parameters when converting the ASCII data to a bitmap. See CIMG_import_ascii() for more information. int SNBDAPI CIMGLOW_get_ascii_attributes(CASCIITEXTATTR *ascii); Table 31.5: CIMGLOW_get_ascii_attributes Function ascii Pointer to CASCIITEXTATTR structure 245

246 Chapter 31 - ASCII Formats and Functions the pointer to ASCIITEXTATTR structure. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** CIMGLOW_get_ascii_page_width() This function calculates the minimum page width required to make a bitmap image from the given ASCII file. long SNBDAPI CIMGLOW_get_ascii_page_width(String *filename); Table 31.6: CIMGLOW_get_ascii_page_width Function filename Path/filename of the ASCII file to convert the path/filename of the ASCII file to convert. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMGLOW_set_ascii_attributes() This global function sets the current parameters for CIMG_import_ascii(). It allows setting the font, margins, and other parameters when converting the ASCII data to a bitmap. See CIMG_import_ascii() for more information. Note: Please note that this method is not thread safe. int SNBDAP CIMGLOW_set_ascii_attributes(CASCIITEXTATTR *ascii); Table 31.7: CIMGLOW_set_ascii_attributes Function 246

247 Chapter 31 - ASCII Formats and Functions ascii Pointer to CASCIITEXTATTR structure. For more information, see public class CASCIITEXTATTR. the pointer to ASCIITEXTATTR structure. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. ** GLOBAL FUNCTION** 247

248 Chapter 32 - Format For Decompressed Images Chapter 32 - Format For Decompressed Images This chapter describes the formats for decompressed images. All high-level and low-level functions which decompress or import images convert the data and store it in memory as the MS- Windows DIB format (Device Independent Bitmap). The chapter contains the following topics: Overview of Data Formats All high-level and low-level functions that decompress or import images convert the data and store it in memory as the MS_Windows DIB (Device Independent Bitmap) format, which consists of the following: Header (DIB_Head) Palette Image data 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. RasterMaster Plus Options For the 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. Example 32.1 RasterMaster Plus Options For a raster of width 100. WORD 0-12 Total byte count. WORD 1-5 White until pixel 5. WORD 2-10 Black from pixel 5 to pixel 10. WORD White to end of raster. 248

249 Chapter 32 - Format For Decompressed Images WORD WORD MS_Windows DIB Header Format All images stored in memory start with the following header. Example 32.2 MS_Windows DIB Header Format typedef struct tagbitmapinfoheader{ public int bisize; Size of this structure, always 40. public int biwidth; Width of the image in pixels. public int biheight; Height of the image in pixels. public short biplanes; Always 1. (as per Microsoft) public short bibitcount; Bits per pixel 1,4,8 or 24. public int bicompression; 0 or 99 for 1 bit runs images. public int bisizeimage; Height of the image X size of a raster in bytes. public int bixpelspermeter; Use this field to store dots per inch. public int biypelspermeter; Use this field to store dots per inch. public int biclrused; Always set to 0. public int biclrimportant; Always set to 0. } BITMAPINFOHEADER; Note: In RasterMaster.NET V17.6, the pelspermeter attribute queries return the actual value contained 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.NET was returning the default value or the actual value that was set. Beginning with RasterMaster.NET 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. MS_Windows DIB Palette Format All images stored in memory except for 24-bit images have a series of the following RGBQUAD structures. An RGBQUAD structure exists for each possible color. 249

250 Chapter 32 - Format For Decompressed Images Table 32.1: MS_Windows DIB Palette Format Image Size RGBQUAD Entries 1-bit 2 4 bit 16 8 bit bit No Entries All images stored in memory have the following palette format: Example 32.3 RGBQUAD Entries public class RGBQUAD { public byte rgbblue; public byte rgbgreen; public byte rgbred; public byte rgbreserved; { MS_Windows DIB Image Data Format 1, 4, 8, and 24-bit images are stored as packed uncompressed raster data. Table 32.2: MS_Windows DIB Image Data Format Image Size Byte Size 1-bit 8 pixels 4-bit 2 pixels 8- bit 1 pixel 24-bit 3 bytes equals 1 pixel, starting with the blue, green, then red values All rasters must end on a long or a multiple of 4 bytes. Extra bytes are added to rasters not meeting this criterion. They are stored with upside down or the last raster first up to the first or line

251 Chapter 33 - Annotation and Redlining Toolkit Chapter 33 - Annotation and Redlining Toolkit This chapter describes the annotation and redlining toolkit and library. 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.NET product or any other application or tool that displays images. You can use annotations to create watermarks or redactions. public class CANN_GRAPHIC_STRUCT Structure This structure represents an annotation object stored in its internal format within the Raster- Master.NET Annotation SDK. Structure Below is the structure for the CANN_GRAPHIC_STRUCT function. Example 33.1 CANN_GRAPHIC_STRUCT public gc class CANN_GRAPHIC_STRUCT { public CIMG_rect *rc; String *text; int data_size; String *font_name; int italic; int bold; int font_height; int fred; int fgreen; int fblue; int bred; int bgreen; int bblue; int width; int height; int bits_pix; int transp; int graphic_id; int line_width; 251

252 Chapter 33 - Annotation and Redlining Toolkit int line_style; String* create_date; String* create_user; } s Table 33.1: CANN_GRAPHIC_STRUCT Class s CIMG_RECT rc String text Int data_size String font_name int italic int bold int font_height int fred int fblue int fgreen int bred int bblue int bgreen int width int height int bits_pix int transp int graphic_id int line_width int line_style String* create_date String* create_user Rectangle Byte array of text Size of data in bytes Name of font Indicates italicized font Indicates bold font Font height Red plane of foreground color Blue plane of foreground color Green plane of foreground Red plane of background color Blue plane of background color Green plane of background color Width of annotation object Height of annotation object Bits per pixel of image Indicates transparency Annotation object type Line width Line style The annotation object created date. The user name which created the annotation object. CSANN_activate_all_objects() This function is used on CSANN_EDIT and CSANN_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. 252

253 Chapter 33 - Annotation and Redlining Toolkit Notes: In this mode you cannot move or delete the object. You must call the CSANN_deactivate_object first. int SNBDAPI CSANN_activate_all_objects(); CSANN_activate_object() This function is currently used on CSANN_EDIT and CSANN_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 CSANN_deactivate_object first. int SNBDAPI CSANN_activate_object(int graphic_num); Table 33.2: CSANN_activate_objectFunction s graphic_num The object to activate CSANN_add_object() This function adds a new object to the current annotation. Use data size, data for text, and freehand annotations to point to the text of array of points for freehand annotations. The size must be in image coordinates. Use CSANN_map_wnd_to_image to convert from screen to image coordinates. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_add_object(int graphic_id, CIMG_RECT *imgrect, Array *data, int data_size); 253

254 Chapter 33 - Annotation and Redlining Toolkit Table 33.3: CSANN_add_object Function s graphic_id imgrect data data_size A unique number for each graphic object Pointer to rectangle defining outline of points for most graphics functions in the current images coordinates Data for text, freehand annotations, and edits The size in bytes for text, freehand, or edits CSANN_choose_color() This function displays a dialog box suitable for selecting a color with which to draw. It returns the selected color in 3 bytes of red, green, and blue. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation int SNBDAPI CSANN_choose_color(int icolor); Table 33.4: CSANN_choose_color Function icolor The selected color returned in 3 bytes order, red, green, and blue. CSANN_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: 254

255 Chapter 33 - Annotation and Redlining Toolkit Annaction Annotation int SNBDAPI CSANN_choose_font(); CSANN_choose_line_style() This function displays a dialog box for selecting and setting the current line style in the annotations. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation int SNBDAPI CSANN_choose_line_style(int *ilinestyle); Table 33.5: CSANN_choose_line_style Function ilinestyle Line style returned. CSANN_choose_line_width() This function displays a dialog box for selecting and setting the current line width in the annotations. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation 255

256 Chapter 33 - Annotation and Redlining Toolkit int SNBDAPI CSANN_choose_line_width(int *ilinewidth); Table 33.6: CSANN_choose_line_width Function ilinewidth Line width returned. CSANN_create_ann() This function creates a new annotation handle if it is not reading an annotation from a file. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation int SNBDAPI CSANN_create_ann(Control *win_control, int width, int height); Table 33.7: CSANN_create_ann Function s win_control width height Window form control object Width in pixels of image to annotate Height in pixels of image to annotate CSANN_deactivate_all_objects() This function is used on CSANN_EDIT and CSANN_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. 256

257 Chapter 33 - Annotation and Redlining Toolkit Notes: In this mode you can move or delete the object. You must call the CSANN_activate_object to edit the text. int SNBDAPI CSANN_deactivate_all_objects(); CSANN_deactivate_object() This function is used on CSANN_EDIT and CSANN_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. Note: You must call the CSANN_activate_object to edit the text. int SNBDAPI CSANN_deactivate_object(int graphic_num); Table 33.8: CSANN_deactivate_object Function s graphic_num Specify the object to deactivate CSANN_delete_all_objects() This function deletes all graphics and memory associated with the annotations. int SNBDAPI CSANN_delete_all_objects(); CSANN_delete_non_text_objects() This function remove no-text annotation objects. 257

258 Chapter 33 - Annotation and Redlining Toolkit int SNBDAPI CSANN_delete_non_text_objects(); CSANN_delete_object() This function deletes a graphic from the current list. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_delete_object(int graphic_num); Table 33.9: CSANN_delete_object Function s graphic_num This is an internal number for each graphic returned by CSANN_get_object_num. It is the number in a linked list of graphics. Use this number after the call to CSANN_ get_object_number as CSANN_delete_object. This may change the number of existing graphics. CSANN_delete_text_objects() This function remove no-text annotation objects. int SNBDAPI CSANN_delete_text_objects(); CSANN_display_annotations() This function displays the current annotation to the device context pointed by graphics. This function always assumes that the image is aspect ratio corrected into the coordinates xs, ys, xz, and yz. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: 258

259 Chapter 33 - Annotation and Redlining Toolkit Annaction Annotation Note: Before calling you may want to call CSANN_set_croprect to allow for zooming and scrolling. int SNBDAPI CSANN_display_annotations(Graphics *g, int xs, int ys, int xz, int yz); Table 33.10: CSANN_display_annotations Function s g xs ys xz yz Graphics object Starting X position Starting Y position X size of window Y size of window CSANN_draw_object() This function draws the object (graphic_num) at the coordinates passed that are image coordinates. int SNBDAPI CSANN_draw_object(Graphics *g, int graphic_num, int xs, int ys, int xz, int yz); Table 33.11: CSANN_draw_object Function s g graphic_num xs ys xz yz Graphics object Specify the object to draw X position to start drawing Y position to start drawing X size to draw object Y size to draw object 259

260 Chapter 33 - Annotation and Redlining Toolkit CSANN_FlipX() This function flips the current annotation objects horizontally. int SNBDAPI CSANN_FlipX(); CSANN_FlipY() This function flips the current annotation objects vertically. int SNBDAPI CSANN_FlipY(); CSANN_get_croprect() This function returns the annotations cropping area, which should be the same as the annotated images. int SNBDAPI CSANN_get_croprect(int *xs, int *ys, int *xsize, int *ysize); Table 33.12: CSANN_get_croprect Function s xs ys xsize ysize X starting coordinate to be returned Y starting coordinate to be returned X crop rectangle size to be returned Y crop rectangle size to be returned CSANN_get_disprect() This function gets the annotation display rectangle in a client window. By default, the rectangle is the whole window area. int SNBDAPI CSANN_get_disprect(int *xs, int *ys, int *xe, int *ye); 260

261 Chapter 33 - Annotation and Redlining Toolkit Table 33.13: CSANN_get_disprect Function s xs ys xe ye Pointer of the left coordinate of display rectangle Pointer of the top coordinate of display rectangle Pointer of the right coordinate of display rectangle Pointer of the bottom coordinate of display rectangle CSANN_get_object_bounds() This function returns the bounding box of the object (graphic_num) in image pixel coordinates. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_get_object_bounds(int graphic_num, CIMG_RECT *objrect); Table 33.14: CSANN_get_object_bounds Function s graphic_num objrect Specify the object to return the bounding box Rectangle of bounding box CSANN_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 CSANN_EDIT and CSANN_ POSTIT to return the text input into the object. int SNBDAPI CSANN_get_object_data(int graphic_num, String *datastring); Table 33.15: CSANN_get_object_dataFunction s 261

262 Chapter 33 - Annotation and Redlining Toolkit graphic_num datastring Specify the object from which to return data String in which to put data CSANN_get_object_info() This function returns as instance of the CANN_GRAPHIC_STRUCT class, which is the internal wrapper for the object number passed in. This has information about the size, color, and object attributes. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. ANN_GRAPHIC_STRUCT CSANN_get_object_info(int graphic_num, CANN_ GRAPHIC_STRUCT* canngraphic); Table 33.16: CSANN_get_object_info Function s graphic_num canngraphic Specify the object for which to return a structure pointer The graphic class pointer used to get the information CSANN_get_object_num() This function tries to find a graphic whose bounding box surrounds the points xpos and ypos. If the graphic is found, this function returns the graphic number usable by CSANN_delete_ object and other functions. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_get_object_num(int Control *win_control, int xpos, int ypos, int* igid); Table 33.17: CSANN_get_object_num Function s 262

263 Chapter 33 - Annotation and Redlining Toolkit win_control xpos ypos igid Window form control object X coordinate in the windows coordinates Y coordinate in the windows coordinates The Graphic ID returned CSANN_highlight_object() This function highlights the bound box of the graphic specified by graphic_num. This number is found by CSANN_get_object_num. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_highlight_object(Control *win_control, int graphic_num); Table 33.18: CSANN_highlight_object Function s win_control graphic_num Window form control object Graphic to highlight CSANN_map_image_to_wnd() This function converts the internal graphics coordinates relative to the image coordinates relative to the current window. int SNBDAPI CSANN_map_image_to_wnd(CIMG_RECT *imgrect, int *xs, int *ys); Table 33.19: CSANN_map_image_to_wnd Function s imgrect xs ys Displays current rectangle Set the X coordinate to convert Set the Y coordinate to convert 263

264 Chapter 33 - Annotation and Redlining Toolkit CSANN_map_wnd_to_image() This function converts the window coordinates to the current annotated image coordinates. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_map_wnd_to_image(CIMG_RECT *imgrect, int *xpos, int *ypos); Table 33.20: CSANN_map_wnd_to_image Function s imgrect xpos ypos Displays current rectangle Set the X coordinate to convert Set the Y coordinate to convert CSANN_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 messaging handling loop. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annaction sample. Notes: Not necessary to call. You may do your own user interface with all of the above calls. int SNBDAPI CSANN_mouse(Control *win_control, Graphics *g, ing msg, int wparam, int lparam, int *graphic_id, String *strbuffer); Table 33.21: CSANN_mouse Function s 264

265 Chapter 33 - Annotation and Redlining Toolkit win_control g msg wparam lparam graphic_id strbuffer Window form control object Graphics object Window handling function message parameter Window handling function wparam parameter Window handling function lparam parameter Current graphic id to add Extra data to add to EDIT or POSTIT objects or name of bitmap to import CSANN_move_object() This function moves or resizes the object graphic_num. Use the rectangle passed in as objrect. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_move_object(IMG_RECT *objrect, int graphic_num); Table 33.22: Table 34-22: CSANN_move_object Function s objrect graphic_num Rectangle for new object position and size Specify the object to move CSANN_print_annotations() This function prints the current annotation to the device context pointed by the graphics object. It always assumes that the image is aspect ratio corrected into the coordinates xs, ys, xz, and yz. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_print_annotations(Graphics *g, int xs, int ys, int xz, int yz); 265

266 Chapter 33 - Annotation and Redlining Toolkit s Table 33.23: CSANN_print_annotations Function s g xs ys xz yz Graphics object Starting X position Starting Y position X size of window Y size of window CSANN_read_ann() This function reads an annotation file from disk and returns a handle to it. You do not need to call CSANN_create_ann if you call this function. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation int SNBDAPI CSANN_read_ann(Control *win_control, String *filename); Table 33.24: CSANN_read_ann Function s win_control filename Window form control object Refers to the name of the file in which to read CSANN_read_ann_FlexSnap() This function reads the annotation from Snowbound s FlexSnap server. int SNBDAPI CSANN_read_ann_FlexSnap(Array *data, String *strserver, String *StrFileName); 266

267 Chapter 33 - Annotation and Redlining Toolkit Table 33.25: CSANN_read_ann_FlexSnap Function s data strserver strfilename Memory pointer to return annotation data FlexSnap server URL address Image file name the annotation is associated with CSANN_read_ann_mem() This function reads the first page of an annotation from memory and returns a handle to it. int SNBDAPI CSANN_read_ann_mem(Control *win_control, Array *data); Table 33.26: CSANN_read_ann_mem Function s win_control data Window form control object Memory pointer to compress image data CSANN_read_ann_mem_page() This function reads the first page of an annotation from memory and returns a handle to it. int SNBDAPI CSANN_read_ann_mem_page(Control *win_control, Array *data, int page); Table 33.27: CSANN_read_ann_mem_page Function s win_control data page Window form control object Memory pointer to compress image data Desired page number starting at zero 267

268 Chapter 33 - Annotation and Redlining Toolkit CSANN_read_ann_page() This function reads an annotation file from disk and returns a handle to it. int SNBDAPI CSANN_read_ann_page(Control *win_control, String *filename, int page); Table 33.28: CSANN_read_ann_page Function s win_control filename page Window form control object Refers to the name of the file in which to read Desired page number starting at zero CSANN_resize_object() This function resizes an annotation object specified by the ID. The new size is specified in the CIMG_RECT class. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_resize_object(CIMG_RECT *objrect, int graphic_ num); Table 33.29: CSANN_resize_object Function s objrect graphic_num Rectangle for new object position to resize The ID of the object to resize CSANN_rotate() This function rotates all annotations in the current handle by the specified angle: 90, 180, or 270 degrees. 268

269 Chapter 33 - Annotation and Redlining Toolkit You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the Annotation sample. int SNBDAPI CSANN_rotate(int angle); Table 33.30: CSANN_rotate Function s angle Angle by which to rotate the annotation CSANN_set_bcolor() This function sets the current background drawing color for all graphics. Currently only used by the text graphic. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation int SNBDAPI CSANN_set_bcolor(int ired, int igreen, int iblue); Table 33.31: CSANN_set_bcolor Function s ired Red value igreen Green value iblue Blue value CSANN_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. 269

270 Chapter 33 - Annotation and Redlining Toolkit int SNBDAPI CSANN_set_croprect(int xs, int ys, int xsize, int ysize); s Table 33.32: CSANN_set_croprect Function s xs ys xsize ysize Set the X starting coordinate Set the Y starting coordinate Set the X crop rectangle size Set the Y crop rectangle size CSANN_set_disprect() This function sets the annotation display rectangle in a client window. By default, the rectangle is the whole window area. This function is used by CSANN_mouse to get the correct image display area. int SNBDAPI CSANN_set_disprect(int xs, int ys, int xe, int ye); s Table 33.33: CSANN_set_disprect Function s xs ys xe ye Left coordinate of display rectangle Top coordinate of display rectangle Right coordinate of display rectangle Bottom coordinate of display rectangle CSANN_set_fcolor() This function sets the current foreground drawing color for all graphics. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation 270

271 Chapter 33 - Annotation and Redlining Toolkit int SNBDAPI CSANN_set_fcolor(int ired, int igreen, int iblue); Table 33.34: CSANN_set_fcolor Function s ired Red value igreen Green value iblue Blue value CSANN_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. int SNBDAPI CSANN_set_font(String *fontname, int italic, int bold, int font_height); Table 33.35: CSANN_set_font Function s fontname italic bold font_height Name of font to use Use an italic font Use a bold font Size of the font to use CSANN_set_line_style() CSANN_set_line_style() This function sets current line style for lines, ellipses, rectangles, and freehand drawings. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation 271

272 Chapter 33 - Annotation and Redlining Toolkit int SNBDAPI CSANN_set_line_style(int style); Table 33.36: CSANN_set_line_style Function s style Line drawing style. Currently, the RasterNote Snowbound Annotation Toolkit supports the following line styles: PS_DASH 1 PS_DASHDOT 3 PS_DASHDOTDOT 4 PS_DOT 2 PS_SOLID 0 CSANN_set_line_width() This function sets current line width for lines, ellipses, rectangles, and freehand drawings. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation int SNBDAPI CSANN_set_line_width(int width); Table 33.37: CSANN_set_line_width Function s width Width of lines in pixels CSANN_set_size() This function sets the height and width of the current image being annotated. The internal format for Snowbound annotations contains this information. 272

273 Chapter 33 - Annotation and Redlining Toolkit 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. int SNBDAPI CSANN_set_size(int width, int height); Table 33.38: CSANN_set_size Function s width height Width of current image being annotated Height of current image being annotated CSANN_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. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Annaction Annotation WPFAnnotation_CSHARP int SNBDAPI CSANN_write_ann(String *filename, int extra_size, Array *extra_data); Table 33.39: CSANN_write_ann Function s filename extra_size extra_data Pathname or file to write Size of extra data to write after the first header Pointer to extra data to write 273

274 Chapter 33 - Annotation and Redlining Toolkit CSANN_write_ann_FlexSnap() This function writes out annotations to Snowbound s FlexSnap server. 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 annotation. int SNBDAPI CSANN_write_ann_FlexSnap(Array *arranndata, int ianndatalen, String *strserver, String *strfilename); Table 33.40: CSANN_write_ann_FlexSnap Function s stranndata ianndatalen strserver strfilename Memory pointer to annotation data Size of annotation data FlexSnap server URL address Image file name CSANN_write_ann_mem() This function writes out current annotations to memory. 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 annotation. int SNBDAPI CSANN_write_ann_mem(Array *data, int extra_size, Array *extra_data); Table 33.41: CSANN_write_ann_mem Function s Array *data extra_data extra_size Pathname or file to write Pointer to extra data to write Size of extra data to write after the first header CSANN_write_ann_mem_page() This function writes out a page of 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 274

275 Chapter 33 - Annotation and Redlining Toolkit elements one would like to put into the file. int SNBDAPI CSANN_write_ann_mem_page(Array *data, int extra_size, Array *extra_data, int page); Table 33.42: CSANN_write_ann_mem_page Function s data extra_size extra_data page Memory pointer to annotation data Size of extra data to write after the first header Pointer to extra data to write Page number starting at zero CSANN_write_ann_page() 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. int SNBDAPI CSANN_write_ann_page(String *filename, int extra_size, Array *extra_data, int page); Table 33.43: CSANN_write_ann_page Function s filename extra_size extra_data page Pathname or file to write Size of extra data to write after the first header Pointer to extra data to write Page number starting at zero Annotation Constants Table 33.44: Annotation Constants The annotation and redlining toolkit also comes with pre-determined annotation constants. They are as follows: 275

276 Chapter 33 - Annotation and Redlining Toolkit Annotation CSANN_FILLED_RECT 1 CSANN_HIGHLIGHTED_RECT 2 CSANN_RECTANGLE 3 CSANN_LINE 4 CSANN_ELLIPSE 5 CSANN_FILLED_ELLIPSE 6 CSANN_FREEHAND 7 CSANN_BITMAP 8 CSANN_POSTIT 9 CSANN_POLYGON 10 CSANN_FILLED_POLYGON 11 CSANN_ARROW 12 CSANN_EDIT 13 Constant 276

277 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions This chapter describes the RasterMaster.NET WPF and Microsoft.NET Framework 4.0 supported functions. Microsoft s.net Framework 4.0 provides the Windows Presentation Foundation (WPF) controls and tools. Microsoft.NET also provides support for XML Paper Specification (XPS) documents. RasterMaster.NET provides functions and samples to enable you to use RasterMaster.NET s powerful features with: WPF System::Windows::Media::Visual control - the hub of all drawing related activity in WPF. BitmapSource to use RasterMaster.NET images in an Image control. XPS documents in memory or in a file. Note: You will need to use the.net 4.0 build of the SbdNetAnn library in order to use the methods and samples described in this chapter. The.NET 4.0 build is included with the RasterMaster.NET SDK. The Samples directory in RasterMaster.NET has a WPF subdirectory that includes the following samples: Document and Image Conversion with WPF controls Annotation with WPF controls Scanning in images with WPF controls WPF image XPS document in memory XPS document batch conversion This chapter contains the following topics: Working with.net Bitmapsource for the WPF Image Control Annotating with.net WPF controls Working with XML Paper Specification (XPS) Documents 277

278 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions Working with.net Bitmapsource for the WPF Image Control CIMG_create_bitmapsource_class() This function converts the Snowbound object to the BitmapSource object. It is used to support WPF. BitmapSource* CIMG_create_bitmapsource_class(int width, int height); Table 34.1: CIMG_create_bitmapsource_class Function width height Image width of the created object. Image height of the created object. the BitmapSource object. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_create_bitmapsource_class() This function converts the Snowbound object to the BitmapSource object. It is used to support WPF. BitmapSource* CIMG_create_bitmapsource_class(int width, int height, int dpi); Table 34.2: CIMG_create_bitmapsource_class Function width height dpi Image width of the created object. Image height of the created object. DPI of the created object. 278

279 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions the BitmapSource object. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_create_bitmapsource_annotation() This function creates the BitmapSource WPF object from the current Snowbound object and annotation. It is used to support WPF. BitmapSource* CIMG_create_bitmapsource_annotation(int width, int height); Table 34.3: CIMG_create_bitmapsource_annotation Function s width height Image width of the created object. Image height of the created object. the BitmapSource object. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_acquire_WPF() This TWAIN scanning routine scans a single page image from a scanner. It is used to support WPF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFScanning_CSHARP sample. int SNBDAPI CIMG_scan_acquire_WPF(System::Windows::Media::Visual *visual, int ishowui); Table 34.4: CIMG_scan_acquire_WPF Function s visual ishowui WPF rendering class System::Windows::Media::Visual object. On/Off display of the Twain UI Dialog box. 279

280 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_acquire_feeder_WPF() This TWAIN scanning routine allows scanning from a scanner with an automatic document feeder. It is used to support WPF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFScanning_CSHARP sample. int SNBDAPI CIMG_scan_acquire_feeder_WPF(::Windows::Media::Visual *visual, int ishowui); Table 34.5: CIMG_scan_acquire_feeder_WPF Function s visual ishowui WPF rendering class System::Windows::Media::Visual object. On/Off display of the Twain UI Dialog box. 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_acquire_feeder_fast_WPF() This TWAIN scanning routine allows for new fast memory transfer scanning. A parameter can also be set to duplex scanning if your scanner supports it. It is used to support WPF. int SNBDAPI CIMG_scan_acquire_feeder fast_wpf(system::windows::media::visual *visual, int ishowui, int iduplex); 280

281 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions Table 34.6: CIMG_scan_acquire_feeder_fast_WPF Function s visual ishowui iduplex WPF rendering class System::Windows::Media::Visual object. On/Off display of the Twain UI Dialog box. 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box Sets duplex scanning mode. 1 = set duplex scanning mode. the status of the operation.. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_open_source_WPF() This TWAIN scanning routine displays a dialog box for selecting the available Twain drivers. It is used to support WPF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFScanning_CSHARP sample. int SNBDAPI CIMG_scan_open_source_WPF(System::Windows::Media::Visual *visual); Table 34.7: CIMG_scan_open_source_WPF Function visual System::Windows::Media::Visual class for WPF rendering. the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_pages_fast_WPF() This function allows for new fast memory transfer scanning. A parameter can also be set to allow duplex scanning if your scanner driver supports it. It is used to support WPF. 281

282 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions int SNBDAPI CIMG_scan_pages_fast_WPF(System::Windows::Media::Visual *visual, String *strfilename, int ifiletype, int ishowui, int iduplex); Table 34.8: CIMG_scan_pages_fast_WPF Function visual strfilename ifiletype ishowui iduplex WPF rendering support System::Windows::Media::Visual class. The output file name to create as a scanned image. Saves the file type. See Appendix B, Supported File Formats for file type formats in which to save compressed images. On/Off display of the Twain UI Dialog box. 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box Sets duplex scanning mode. 1 = set duplex scanning mode. the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_pages_WPF() This TWAIN scanning routine scans all pages from the currently selected scanner or TWAIN drivers and saves them to the path/filename specified by the filename in the image format file type. It is used to support WPF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFScanning_CSHARP sample. int SNBDAPI CIMG_scan_pages_WPF(System::Windows::Media::Visual *visual, String *strfilename, int ifiletype, int ishowui); Table 34.9: CIMG_scan_pages_WPF Function s visual WPF rendering support System::Windows::Media::Visual 282

283 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions strfilename ifiletype ishowui class. The output file name to create as a scanned image. Saves the file type.see Appendix B, Supported File Format for file type formats in which to save compressed images. On/Off display of the Twain UI Dialog box. 0 = Do not display TWAIN dialog box 1 = Display TWAIN dialog box the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_get_cap_WPF() This function TWAIN scanning routine returns the value of the current specified TWAIN capability. It is used to support WPF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFScanning_CSHARP sample. int SNBDAPI CIMG_scan_get_cap_WPF(System::Windows::Media::Visual *visual, int cap, int value); Table 34.10: CIMG_scan_get_cap_WPF Function s visual cap WPF rendering support System::Windows::Media::Visual class. The current TWAIN capability to retrieve. the TWAIN capability value. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_scan_set_cap_WPF() This function TWAIN scanning routine sets the value of the specified TWAIN capability. It is used to support WPF. 283

284 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFScanning_CSHARP sample. int SNBDAPI CIMG_scan_set_cap_WPF(System::Windows::Media::Visual *visual, int cap, int value); Table 34.11: CIMG_scan_set_cap_WPF Function s visual cap value WPF rendering support System::Windows::Media::Visual class. The current TWAIN capability to set. New setting for TWAIN capability. the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H - Error Codes for a list of error codes. CIMG_scan_setup_WPF() 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 scanning occurs unless one of the other scan acquiring functions are called. It is used to support WPF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the WPFScanning_CSHARP sample. int SNBDAPI CIMG_scan_setup_WPF(System::Windows::Media::Visual *visual); CIMG_scan_setup_WPF Function visual WPF rendering support System::Windows::Media::Visual class. 284

285 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Annotating with.net WPF controls CSANN_create_ann_WPF() This function creates a new annotation handle if it is not reading an annotation from a file. It is used to support WPF. int SNBDAPI CSANN_create_ann_WPF(System::Windows::Media::Visual *visual, int width, int height); Table 34.12: CSANN_create_ann_WPF Function s visual width height WPF rendering support System::Windows::Media::Visual class. Width in pixels of image to annotate Height in pixels of image to annotate. the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CSANN_get_object_num_WPF() This function tries to find a graphic whose bounding box surrounds the points xpos and ypos. If the graphic is found, this function returns the graphic id usable by CSANN_delete_object() and other functions. It is used to support WPF. int SNBDAPI CSANN_get_object_num_WPF(System::Windows::Media::Visual *visual, int xpos, int ypos, Int32* igid); Table 34.13: CSANN_get_object_num_WPF Function s visual WPF rendering support System::Windows::Media::Visual 285

286 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions xpos ypos igid class. X coordinate in the windows coordinates. Y coordinate in the windows coordinates. The Graphic ID returned the graphic id. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CSANN_highlight_object_WPF() This function highlights the bound box of the graphic specified by graphic_num. This graphic id number is found by CIMG_decompress_bitmap_xps_mem(). It is used to support WPF. int SNBDAPI CSANN_highlight_object_WPF(System::Windows::Media::Visual *visual, int graphic_num); Table 34.14: CSANN_highlight_object_WPF Function s visual graphic_num WPF rendering support System::Windows::Media::Visual class. Graphic object id to highlight the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CSANN_read_ann_WPF() This function reads an annotation file from disk and returns a handle to it. You do not need to call CIMG_decompress_bitmap_xps_mem() if you call this function. It is used to support WPF. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: WPFAnnotation_CSHARP WPFScanning_CSHARP 286

287 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions int SNBDAPI CSANN_read_ann_WPF(System::Windows::Media::Visual *visual, String *filename); Table 34.15: CSANN_read_ann_WPF Function s visual filename WPF rendering support System::Windows::Media::Visual class. Refers to the name of the file in which to read. the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CSANN_read_ann_page_WPF() This function reads an annotation file from disk and returns a handle to it. It is used to support WPF. int SNBDAPI CSANN_read_ann_page_WPF(System::Windows::Media::Visual *visual, String *filename, int page); Table 34.16: CSANN_read_ann_page_WPF Function s visual filename page WPF rendering support System::Windows::Media::Visual class. Refers to the name of the file in which to read. Desired page number starting at zero the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CSANN_read_ann_mem_page_WPF() This function reads the first page of an annotation from memory and returns a handle to it. It is used to support WPF. 287

288 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions int SNBDAPI CSANN_read_ann_mem_page_WPF(System::Windows::Media::Visual *visual, Array *data, int page); Table 34.17: CSANN_read_ann_mem_page_WPF Function s visual data page WPF rendering support System::Windows::Media::Visual class. Memory pointer to compress image data. Desired page number starting at zero. the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CSANN_read_ann_mem_WPF() This function reads the first page of an annotation from memory and returns a handle to it. It is used to support WPF. int SNBDAPI CSANN_read_ann_mem_WPF(System::Windows::Media::Visual *visual, Array *data); Table 34.18: CSANN_read_ann_mem_WPF Function s visual data WPF rendering support System::Windows::Media::Visual class. Memory pointer to compress image data. the status of the operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. Working with XML Paper Specification (XPS) Documents CIMG_get_pages_xps() This function returns the number of pages for the XPS file format. 288

289 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions int SNBDAPI CIMG_get_pages_xps(String *strdocname); Table 34.19: CIMG_get_pages_xps Function strdocname The path/filename of the image to return page information. the number of pages for the XPS file format. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_get_pages_xps_mem() This function returns the number of pages in the pointer passed as the first argument for the XPS file format. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Batch_XPS_Convert VectorConvertMem_CSHARP XPSMem_CSHARP int SNBDAPI CIMG_get_pages_xps_mem(Array* data); Table 34.20: CIMG_get_pages_xps_mem Function data Pointer to image in memory. the number of pages from an XPS document stored in the pointer passed as the first argument. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 289

290 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions CIMG_decompress_bitmap_xps() The function decompresses and loads an XPS file. int SNBDAPI CIMG_decompress_bitmap_xps(String *strdocname, int ipage); Table 34.21: CIMG_decompress_bitmap_xps Function s strdocname ipage The path/filename of the XPS file. The page index of the XPS document to render. the status of the decompress bitmap XPS operation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. CIMG_decompress_bitmap_xps_mem() The function decompresses and loads an XPS file from memory. You can find the samples for using this function in the following directory C:\Program Files\Snowbound Software\RasterMaster.NET Evaluation\Net\Samples. This function is used in the following samples: Batch_XPS_Convert VectorConvertMem_CSHARP XPSMem_CSHARP int SNBDAPI CIMG_decompress_bitmap_xps_mem(Array *data, int ipage); Table 34.22: CIMG_decompress_bitmap_xps_mem Function s data ipage Pointer to image in memory. The page index of the XPS document to render. starting from

291 Chapter 34 - WPF and Microsoft.NET Framework 4.0 Support Functions the status of the decompress XPS document stored in the pointer passed as the first argument. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix H, Snowbound Error Codes for a list of error codes. 291

292 Chapter 35 - Working with PDF and Other Document File Formats Chapter 35 - Working with PDF and Other Document File Formats This chapter describes how to work with PDF and other document file formats in Snowbound Software s RasterMaster.NET. The chapter contains the following topics: Working with Document File Formats Snowbound Software supports many document file formats in most of its viewing, converting, and RasterMaster.NET. The supported file formats include: PDF - Adobe portable file PCL - Hewlett Packard printer format DOC - Microsoft Word processor format XLS - Microsoft Excel spreadsheet format PPT - Microsoft PowerPoint presentation format RTF - Rich text file format: Please note that RTF does not do any vector conversions in RasterMaster.NET such as SVG, PDFA, or vector PDF. AFP and MODCA - IBM advanced printing format These like any other file formats supported by Snowbound Software s products are read in using a call such as CIMG_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 do not even need a specific extension. These formats contain graphics commands such as line and text drawing. This differs from bitmap formats that are a 2-dimensional array of bytes forming a picture. Normally, documents are drawn or rendered to a bitmap in RasterMaster.NET, but RasterMaster.NET can also produce searchable text documents. The rendering size for the bitmap can be set by the following call to our library: CIMGLOW_set_document(int dpi, int bits_pix, int format); Table 35.1: CIMGLOW_set_document Function s dpi bits_pix Sets the document in dots per inch. Sets the bits per pixel. 1 = black and white documents 292

293 Chapter 35 - Working with PDF and Other Document File Formats format 24 = color images 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 bitmap or searchable text. You can specify the output size with PDF using the following call: CIMGLOW_set_pdf_output(int width, int height); Table 35.2: CIMGLOW_set_pdf_output Function s width height Width of image in points Height of image in points Reading and Writing Support for PDF File Formats Reading and writing support for PDF formats is included in the following RasterMaster Imaging SDK products: RasterMaster Imaging SDK for Windows DLL RasterMaster Imaging SDK for ActiveX RasterMaster Imaging SDK for.net RasterMaster Imaging SDK for the Java Platform 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 ActiveX,.NET library, or RasterMaster DLL. You can also include the file in the following directory: \Windows\system. Reading or Decompressing a PDF Document To read in or decompress a PDF document, use any of the decompression calls such as CIMG_decompress_bitmap(). For ActiveX, use the Image property. All RasterMaster Ima- 293

294 Chapter 35 - Working with PDF and Other Document File Formats ging SDK products automatically detect the file format and do not use the extension on the file name. 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 CIMGLOW_set_pdf_input(dpi,- dots_per_inch) function. For RasterMaster Imaging SDK for ActiveX, call the PdfDpi and PdfBitsPerPixel properties. Saving to a PDF Document All RasterMaster Imaging SDK products support writing PDF files. There are two types of PDF files; raster and vector PDF. Both types of files use the same file format id. The type of file that is saved depends on the RasterMaster methods used to create the output document. Raster PDF contains a snapshot image of each page. The input resolution (DPI) from CIMGLOW_set_document affects the quality of the page image. To create a raster PDF read the input document in using CIMG_decompress_bitmap. This supports reading in almost all document formats. Save to PDF using CIMG_save_bitmap with a format id of 59 (or using the more descriptive CIMG_FORMAT_HASH.getFormatCode("PDF")). The Conversion_ CSHARP sample can be used to create a raster PDF document from almost any supported input document. Vector PDF contains searchable text, graphics and images on each page. This type of PDF does not have a resolution DPI so the document can be zoomed and remain high quality. The input document must contain searchable text in order for the output document to contain searchable text. To create a vector PDF, read the input document in using CIMGLOW_extract_text, then save the document using CIMG_save_document with the file format set to 59. Working with Black and White Images 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. Working with Color Images For color bitmaps, a PDF will be created with JPEG compression. Changing Output Page Size The default page size is set to 8.5 x 11. The bitmap image saved is centered at this page. To alter the output page size use the call CIMGLOW_set_pdf_output. For RasterMaster Imaging SDK for ActiveX, use the PdfXPageSize and PdfYPageSize properties. The xsize and ysize parameters are the page size in points or 1/72 of an inch. 294

295 Chapter 35 - Working with PDF and Other Document File Formats 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 document formats. 295

296 Appendix A - Classes and Support Values Appendix A - Classes and Support Values This appendix describes the classes and support values for RasterMaster.NET. The chapter contains the following topics: Type Property Define Values General Error Define Values Retrieved from Status Property public class CIMG_RECT public class CIMG_SEARCH_RESULT public class CASCIITEXTATTR public class CSEARCH_TEXT public class CDIB_HEADER public class CTIFF_TAG public class CSNBDTILESTRUCT Type Property Define Values Table A.1: Type Property Define Values Value ZOOM_ASPECT.ASPECT_DEFAULT = 0 ZOOM_ASPECT.ASPECT_PRESERVE = 1 ZOOM_ASPECT.ASPECT_FIT_TO_WIDTH = 2 ZOOM_ASPECT.ASPECT_FIT_TO_HEIGHT = 3 ZOOM_ASPECT.ASPECT_ONE_TO_ONE = 4 ZOOM_ASPECT.ASPECT_ZOOM = 5 Zoom value will preserve aspect and every unit will increase or decrease image by that amount (1-1)% Preserves aspect ratio regardless of zoom value Fit image to width regardless of zoom value Fit image to height regardless of zoom value Fit one pixel to one pixel regardless of zoom value 0 is equal to one to one. 100 is equal to 100% zoom or 1 pixel will be displaying in the view area. Use calcaspectzoom (view,zoom, ASPECT_..PRESERVE/FIT_ TO_ WIDTH) to return the zoom value of that particular tag and 296

297 Appendix A - Classes and Support Values Value to pass to display with the ASPECT_ZOOM type. General Error Define Values Retrieved from Status Property Note: Older error define values are retrieved from the StatusDetails Property. Table A.2: General Error Define Values Retrieved from Status Property Value GENERAL_STATUS.SYSTEM_CRASH = -100 GENERAL_STATUS.DELETE_ERROR = -101 GENERAL_STATUS.DEFAULT = -102 GENERAL_STATUS.SNOWBND_OK = 1 GENERAL_STATUS.SNOWBND_ERROR = -1 GENERAL_STATUS.IMAGE_NOT_AVAILABLE = -103 GENERAL_STATUS.SNOWBND_API_NOT_ AVAILABLE = -104 GENERAL_STATUS.NOT_VALID = -105 GENERAL_STATUS.DISPLAY_ERROR = -106 If an internal exception is thrown, this is the resulting value. Image data of the object failed What the internal values are initially set to Operation completed successfully Operation failed. See StatusDetails property. Internal image data available when trying to complete an operation API is not implemented Parameter is not valid General error display 297

298 Appendix A - Classes and Support Values public class CIMG_RECT public class CIMG_RECT { public: CIMG_RECT(){}; CIMG_RECT(double inleft, double intop, double inright,double inbottom); double left; double top; double right; double bottom; }; Table A.3: public class CIMG_RECT s double left double top double right double bottom Left most position Top most position Width=right-left Height=bottomtop public class CIMG_SEARCH_RESULT public gc class CIMG_SEARCH_RESULT { public: CIMG_SEARCH_RESULT() { iinstance = 0; psnbdrect = 0; }; String *before; String *after; int iinstance; CIMG_RECT* psnbdrect; }; 298

299 Appendix A - Classes and Support Values Table A.4: public class CIMG_SEARCH_RESULT s before after iinstance psnbdrect Desription String. Reserved, not used now. String. Reserved, not used now. Occurrence of search string to find, start from 0. Rectangle point to the text string position found. public class CASCIITEXTATTR public class CASCIITEXTATTR { public: int asciiflags; int asciixdpi; int asciiydpi; CIMG_RECT *asciimargin; int asciitabstop; int asciipagewidth; int asciipageheight; int asciipointsize; int asciicharsperline; int asciilinesperpage; int asciiweight; int asciiitalic; String *asciitypeface; 299

300 Appendix A - Classes and Support Values }; CASCIITEXTATTR(); void reset(); Table A.5: public class CASCIITEXTATTR s int asciiflags int asciixdpi int asciiydpi CIMG_RECT *asciimargin int asciitabstop int asciipagewidth int asciipageheight int asciipointsize int asciicharsperline int asciilinesperpage int asciiweight int asciiitalic String *asciitypeface Determines which fields to use Horizontal dots per inch Vertical dots per inch Margins in 1/1000 inches Number of characters between tab stops Width of page in 1/1000 inches Height of page in 1/1000 inches Point size of the font Number of characters per line Number of lines per page Normal=0, Bold=1 Normal=0, Italic=1 Name of the font to use 300

301 Appendix A - Classes and Support Values public class CSEARCH_TEXT public class CSEARCH_TEXT { public: String *search_string; bool populate_location_rect; int count; CIMG_RECT *location_rect; }; public class CDIB_HEADER public class CDIB_HEADER { public: int bisize; int biwidth; int biheight; signed short biplanes; signed short bibitcount; int bicompression; int SizeImage; int bixpelspermeter; int biypelspermeter; int biclrused; int biclrimportant; }; Note: If an image s resolution is not explicitly set, the resolution is now specified as 0 dots per inch (DPI). In older versions, it was set as 100 DPI. To avoid errors or unexpected behavior, set the resolution of the image explicitly when saving in the bixpelspermeter and biypelspermeter properties. public class CTIFF_TAG public class CTIFF_TAG { 301

302 Appendix A - Classes and Support Values public: int tag; int tagvalue; Byte buff[]; int buff_max_bytes; }; Table A.6: public class CTIFF_TAG s int tag int tagvalue Byte buff[] int buff_max_bytes TIFF tag number to return or to write Tag value to write or to read String buffer for returning string tags Maximum bytes of the buffer to write and to read public class CSNBDTILESTRUCT public class CSNBDTILESTRUCT { public: long width; long height; long tile_width; long tile_height; long num_tiles; }; 302

303 Appendix B - Supported File Formats Appendix B - Supported File Formats This appendix describes the file type number and read/write capabilities of all supported file formats. RasterMaster.NET 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 (bitdepth) 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, RasterMaster.NET 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 processing. You can open a document in almost any supported input format by using CIMG_decompress_ bitmap(). 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 CIMG_save_bitmap(). You pass the format type number from the chart below to indicate the format you want. Please see Chapter 8, File Format Conversion for more details. Table B.1: File Format Key File Format 1-bit 4-bit, 8-bit, 16-bit 8-bit, 16-bit,24-bit, 32-bit Black and white or monochrome images Grayscale images, that may appear to be black and white, but contain much more information, and are much larger than 1-bit Full color images When saving to a format, if the error returned is PIXEL_DEPTH_UNSUPPORTED (-21), the output format does not support the current bits per pixel of the image you are trying to save. The chart below will help you identify formats with compatible bit depths. 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 suffer 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 documents 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 s of Supported File Formats The data type CIMG_IMAGE_TYPE in.net library includes all current image types defined in library. 303

304 Appendix B - Supported File Formats When using the.net library, instead of giving the format number such as 59, use CIMG_ IMAGE_TYPE.pdf. For example: status = simage.cimglow_set_auto_detect((int)cimg_image_type.ascii); You can find out the format of any file by calling CIMGLOW_get_filetype(). It will return a file type number which you can look up in Table B-2. You can find the bit depth/bits per pixel of your image by calling CIMG_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 available for UNIX. ABIC File Format (reading) AFP (MO:DCA) ASCII BMP_ COMPRESSED IBM image compression for scanned checks. Note: Not yet supported with RasterMaster.NET x64 or RasterMaster DLL x64. Advanced Function Presentation. IBM format which uses CCITT G3, G4, 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. 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 CIMGLOW_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 supports 1, 4, 8, and 24-bit images. Originated by Microsoft, BMP_ BMP supports 1, 4, 8, and 24-bit UNCOMPRESSED images. File Type Number Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search O - No 74 1, 24 1, 24.afp O O Yes 38 1 No.txt B - Yes 12 4, 8 4, 8.bmp B - No 1 1, 4, 8, 16, 24 1, 4, 8, 16, 24.bmp B B No BROOK_TROUT Brooktrout FAX format brk B B No CALS Government specified format cal B B No CCITT_G3 Group 3 compression tif B B No 304

305 Appendix B - Supported File Formats File Format CCITT_G3_FO CCITT_G4 CCITT_G4_FO CFF CIFF CIMS (ABIC) for bitonal (1-bit) image data. Group 3 compression for bitonal (1-bit) image data. Group 4 compression for bitonal (1-bit) image data. Group 4 compression 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 operators with multiple arguments, various pre-defined default values, more efficient allotment of encoding values and shared subroutines within a FontSet (family of fonts). Camera Image File Format is a raw image format designed by Canon. Check Image Management System. Developed by Carreker. Same as ABIC. Note: Not yet supported with RasterMaster.NET x64 or RasterMaster DLL x64. File Type Number CLIP Microsoft Windows clipboard format. 27 Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search tif B B No tif B B No tif B B No 83 1, 8, , 8, 24 1, 8, 24 1, 8, 24.cif O - No.cif O - No 80 1 No - O - No 1, 4, 1, 4, 8, 8, 24 24, 32.cip B B No COD Liberty IMS black and white format No.cod B B No CSV CUT DCS DCX DIB Comma separated value list, a text spreadsheet. Cut images are only 8 bits per pixel and the palette is stored in a separate file. Originated by Media Cybernetics. The DCS format is a standard Quark Express Format. Each plane is stored as an EPS record. Intel created this format as a multi-page.pcx format. Each page is a.pcx file in whole which can be 1, 4, 8, and 24-bit. Standard Windows Device Independent Bitmap. Supports 1, 4, 8 and 24-bits. 99 1,24 No.csv O - No 31 8 No.cut B - No dcs B B No , 4, 1, 4, 8, 8, , 4, 8, 1, 4, 16, 24, 8, dcx B B No.dib B B No 305

306 Appendix B - Supported File Formats DICOM DOC DOCM DOCX DWG DXF File Format This is a multi-page file format. Medical image format supporting 1, 12, 16, and 24 pixel images. Limited support. Microsoft Word format. Supports Microsoft Word 97, 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 and shading, 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. DOCM is an MS Open Office XML format with macros enabled The.docx format is part of a family of open office XML-based formats developed by Microsoft. It is the default document format for saving applications in Microsoft Word starting with Office It is based on XML rather than Microsoft s.doc format. Reading support only. This is a multi-page file format. Autodesk AutoCAD format. Used for computer aided design (CAD) data and metadata. The DWG format can be read in the VirtualViewer.NET Content Server. File Type Number Input Bit Depth 8, 16, 24 1, 8, 24, 32 1, 8, 24, 32 1, 8, 24, 32 Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search No.dcm B - No No.doc O - Yes No.docm O - Yes No.docx O - Yes dwg O - No Autodesk AutoCAD format. Used for computer aided design dxf O - No 306

307 Appendix B - Supported File Formats File Format EPS (preview) EPS_BITMAP EPS_BITMAP_G4 EPS_BITMAP_ LZW FileNet FLASHPIX GIF GIF_INTERLACED GX2 (CAD) data and metadata. See the following, for the ful l specification : com/adsk/servlet/ item?siteid=123112&id= The DWG format can be read in the VirtualViewer.NET Content Server. message created with MS Outlook. Encapsulated Postscript originated by Adobe. Postscript is an interpreted language. Snowbound does not suppor t full Postscript but will extract an embedded. TIF file in the image. Sometimes called a bitmap representation file. EPS Compressed bitmap format. It is an Adobe encapsulated Postscript file with either G4 or JPEG data embedded. EPS Compressed bitmap format. It is an Adobe encapsulated Postscript file with either G4 or JPEG data embedded. EPS Compressed bitmap format. It is an Adobe encapsulated Postscript file with either G4 or JPEG data embedded. Image format developed by FileNET Corporation for viewing documents. 24-bit tiled JPEG format that includes multiple resolution images. Created by CompuServe for compressing 2, 3, 4, 5, 6, 7, and 8- bit palette images. Uses the LZW algorithm. Same as GIF except stores the raster data in an interlaced order. Originated by Brightbill Roberts for ShowPartner DOS applications. Supports 4 and 8-bit images. File Type Number Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search msg O - No , 4, 8, 24 8, 24, No 69 No 1, 8, 24, 32 1, 8, 24, 32 1, 8, 24, 32 1, 8, 24, 32.eps B B No.eps B B No.eps - B No.eps - B No B - No 54 8, 24 No.fpx B - No , 3, 4, 5, 6, 7, 8 1, 2, 3, 4, 5, 6, 7, 8 4, 8.gif B B No 4, 8.gif B B No 22 4, 8 No.gx2 B - No 307

308 Appendix B - Supported File Formats HTML File Format ICONTYPE IFF_ILBM IMG Simple run length encoding technique. Hyperlink Text Markup Language (HTML) is a tag-based language used to create documents for the Web. HTML forms are often used to capture information from web sites. Full HTML, Javascript and CSS support. Microsoft icon format. Contains a standard device independent bitmap. Supports 1 and 4 bits uncompressed. Used on the Commodore Amiga computers for native bitmap format. Uses a run length format for 1, 4, and 8-bit palette images. Originated by Digital Research for storing 1-bit images. File Type Number Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search.htm,.html - O * Yes 25 1, 4 No.ico B - No 26 1, 4, 1, 4, 8, 8, iff B B No 28 1 No.img B - No IMNET IMNET G4 compressed format No - B - No IOCA (MO:DCA) * JBIG JBIG2 JEDMICS Image Object Content Architecture. IBM format which uses CCITT G3, G4, and IBM MMR formats. 1-bit only. This is a multi-page file format. Joint bi-level Image Experts Group. This is a highly compressed format which is stored in a 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. Snowbound's viewers and 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 Government documents and drawings. Supports 1-bit per pixel. 24 1, 24 1.ico O O No (with plugin) 1 (with plugin).jbg B - No.jbg B B No jed B B No 308

309 Appendix B - Supported File Formats JPEG File Format JPEG2000 Joint Photographics Experts Group. This was a group spearheaded by Kodak for 24, 32, and 8-bit gray scale lossy compression. Lossless JPEG not supported. JPEG 2000 specification. This is similar to JPEG but produces much better compression with better quality. It is supported as a separate plugin. An option exists to set the compression level for saving. File Type Number 13 Input Bit Depth 8, 24, 32 Output Bit Depth 8, 24, 32 Common Supports Win Win File Text Read Write Ext. Search.jpg B B No 70 8, 24 8, 24.jpg2 O O No KOFAX Kofax Format No - B - No LASER_DATA LINE_DATA MACPAINT Compression for documents originated by LaserData Corp. 1-bit images only. Presents data for each variable on a single line. Original Apple bitmap file format. All MacPaint images are 720 x 576 pixels 1 bit No - B - No B - No 21 1 No No MAG Mag Format No.mag B - No MO:DCA MSP NCR ODF ODP ODS Mixed Object: Document Content Architecture. IBM format which uses 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. Uses a type of RLE compression found also in compressed.bmp files. A simple header with CCITT group 4 data. Open Document Format is an XML-based file format for representing electronic documents such as spreadsheets, charts, presentations and word processing documents. Open Document Format for presentations. Open Document Format for spreadsheets. 49 1, 24 1.mca O O Yes 30 1 No.msp B - No 65 1 No.ncr B - No 98 No No.odf O - No 101 No No.odp O - Yes 97 1, 24 No.ods O - Yes ODT Open Document Format 96 1, 24 No.odt O - Yes 309

310 Appendix B - Supported File Formats OOXML PCL_1 File Format (with plugin) PCL_1 (without plugin) PCL_5 PCX PDF (with plugin) 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 developed by Microsoft for 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 file format. Support for color and grayscale output. Supported as a separate plugin. This is a multi-page file format. Hewlett Packard printer file format. Support for color and grayscale output. Supported as a separate plugin. This is a multi-page file format. Hewlett Packard printer file format. Support for color and grayscale output. This is a multi-page file format. Zsoft bitmap file format. Similar to pack bits compression. 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-1b Level B (basic) conformance specification and conforms to PDF v1.7. File Type Number 94 Input Bit Depth 1, 8, 24 Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search No - O - Yes 57 1, 24 1.pcl O B Yes 57 No 1.pcl O B Yes 76 No 1.pcl O B Yes , 4, 1, 4, 8, 8, , 2, 4, 8, 16, 24, 32.pcx B B No 1, 24.pdf O B Yes Does not currently support 310

311 Appendix B - Supported File Formats File Format PDF (without plugin) PDF_15 JPEG2000 in PDF for Java. Supports some types of Adobe specified PDF annotations, however does not support XFA annotations. 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-1b Level B (basic) conformance specification and conforms to PDF v1.7. Does not currently support JPEG2000 in PDF for Java. Supports some types of Adobe specified PDF annotations, however does not support XFA annotations. 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. File Type Number Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search 59 No 1, 24.pdf O B Yes 79 No 1, 24.pdf O B Yes 311

312 Appendix B - Supported File Formats File Format Compatible with the PDF/A-1b Level B (basic) conformance specification and conforms to PDF v1.7. Does not currently support JPEG2000 in PDF for Java. Supports some types of Adobe specified PDF annotations, however does not support XFA annotations. 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. File Type Number Input Bit Depth Output Bit Depth Common File Ext. Supports Win Win Text Read Write Search PDF_16 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-1b Level B (basic) conformance specification and conforms to PDF v1.7. Does not currently support JPEG2000 in PDF for Java. Supports some types of Adobe specified PDF annotations, however does not support XFA annotations. 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. 92 No 1, 24.pdf O B Yes 312

313 Appendix B - Supported File Formats File Format PDF_LZW PHOTOCD 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-1b Level B (basic) conformance specification and conforms to PDF v1.7. Does not currently support JPEG2000 in PDF for Java. Supports some types of Adobe specified PDF annotations, however does not support XFA annotations. 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 x 512 Page x 256 Page x 128 Page x 1024 Page x 2048 Images are uncompressed until the 1536 x 1024 images or greater. All images are stored as File Type Number Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search 88 No 1, 24.pdf O B Yes No.pcd B - No 313

314 Appendix B - Supported File Formats File Format PHOTOSHOP PICT PNG (optional) PPT PPTX 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. Can be compressed or 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. Only the bitmap portion of data is decompressed. Uses pack bits compression. Supports 1, 2, 3, 4, 8, 16, 24, and 32-bit images. Originated by CompuServe to replace the.gif file format. Uses the Huffman encoding variant. Supports 1, 4, 8, 15, 16, 24, and 32-bit images. Also supports interlaced and transparency. Microsoft PowerPoint Binary File Format which is the binary file format used by Microsoft PowerPoint 97, Microsoft PowerPoint 2000, Microsoft PowerPoint 2002, and Microsoft Office PowerPoint 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 in Microsoft PowerPoint starting with Office 2007 File Type Number Input Bit Depth 1, 4, 8, 24, 32 1, 2, 4, 8, 16, 24, 32 1, 4, 8, 16, 24, 32 1, 8, 24, 32 1, 8, 24, 32 Output Bit Depth 1, 8, 24, 32 1, 4, 8, 24 1, 4, 8, 16, 24, 32 Common Supports Win Win File Text Read Write Ext. Search.psd B B No.pct B B No.png B B No No.ppt O - Yes No.pptx O - Yes 314

315 Appendix B - Supported File Formats File Format RAST RTF SCITEX SEARCHABLE_ PDF SVG TARGA TARGA16 TIFF_2D. 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. Supports 1, 8, 24, and 32-bits. Run length encoded format. The Rich Text Format is a method of encoding formatted text and graphics for easy transfer between applications. Please note that RTF does not do any vector conversions in RasterMaster.NET such as SVG, PDFA, or vector PDF. The SCITEX format is a proprietary format originated from SCITEX Corporation. Gray scale color and CMYK color images. Usually compressed. Searchable PDF, also known as "vector PDF" is a regular PDF file that contains searchable text content vs rasterized text. Scalable Vector Graphics is an XMLbased vector image format for twodimensional graphics with support for interactivity and animation. SVG allows three types of graphic objects: vector graphics, raster graphics, and text. The SCITEX format is a proprietary format originated from SCITEX Corporation. The SCITEX format is a proprietary format 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, planes and several compression algorithms. The byte order may be Intel or Motorola format. The bytes may also be File Type Number Input Bit Depth 1, 8, 24 1, 8, 24, 32 24, 32 Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search 1, 8, 24.ras B B No No.rft O - Yes 24, 32.sct B B No 59 No No.pdf O B Yes 102 No 24.svg B No , 32.tga B B No , 32.tga B B No 17 1 No.tif B - No 315

316 Appendix B - Supported File Formats File Format TIFF_ABIC TIFF_ABIC_BW TIFF_G3_FAX TIFF_G4_FAX TIFF_G4_FAX_FO TIFF_G4_ FAX_STRIP TIFF_HUFFMAN TIFF_JBIG 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. This is a multi-page file format. TIFF file with Arithmetic Binary encoding. Requires a special ABIC version of our tools. Very popular for check imaging. BW is used for 1-bit bi-level 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. Very popular for check imaging. BW is used f or 1-bit bi-level 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 embedded in a TIFF. This is a multi-page file format. ANSI baseline Group 3 or Group 4 compression embedded in a TIFF. This is a multi-page file format. ANSI baseline Group 3 or Group 4 compression embedded in a TIFF. This is a multi-page file format. ANSI baseline Group 3 or Group 4 compression embedded in a TIFF. This is a multi-page file format. TIFF file compressed using the Huffman compression algorithm. This is a multi-page file format. Standard ANSI baseline JBIG compression embedded in a TIFF. File Type Number Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search 46 4, 8 No.tif O - No 47 1 No.tif O - No tif B B No tif B B No tif B B No 67 No 1.tif B B No tif B B No tif B B No 316

317 Appendix B - Supported File Formats File Format TIFF_JPEG If you have issues viewing, please see Appendix I, Troubleshooting. TIFF_JPEG7 TIFF_LZW TIFF_PACK This is a multi-page file format. Standard ansi baseline JBIG compression embedded in a TIFF. This is a multi-page file format. Black and white gray scale format. This is a multi-page file format. TIFF file compressed using the LZW compression algorithm. The LZW algorithm includes the look-up table of codes as part of the compressed file. This is a multi-page file format. Simple run length encoding algorithm. This is a multi-page file format. TIFF Uncompressed raw binary data UNCOMPRESSED. This is a multi-page file format. UTF-8 UTF-16 WBMP WINFAX WMF WPG UTF-8 is a text format.it is a variable width encoding for the Unicode character 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 character set.it may start with the Byte Order Mark of 0xFE FF. Windows file format for wireless devices. A simple header with 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 windows 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 File Type Number Input Bit Depth 40 8, 24 Output Bit Depth 8, 24, 32 Common Supports Win Win File Text Read Write Ext. Search.tif B B No 73 1, 8 1, 8.tif B B No , 4, 8, 24, 32 1, 4, 8, 16, 24, 32 1, 2, 4, 8, 16, 24, 32 1, 4, 8, 16, 24, 32.tif B B No 1, 8.tif B B No 1, 4, 8, 16, 24, 32.tif B B No 38 1 No.txt B - No 87 1, 8, 24, 32 No.txt B - No wbmp B B No 58 1 No - B - No 6 5 1, 4, 8, 1, 4, 16, 24, 8, , 4, 8, 24.wmf B B No 1, 4, 8.wpg B B No 317

318 Appendix B - Supported File Formats XBM File Format vector information. Supports 1, 4, 8, and 24-bit images. Only the bitmap data is extracted. Xwindows file format which encodes each pixel as an ASCII byte. Only supports 8-bits per pixel. File Type Number Input Bit Depth Output Bit Depth Common Supports Win Win File Text Read Write Ext. Search xbm B B No Xerox_EPS Encapsulated Postscript for Xerox No - B B No XFA XLSX XLSX XPM XML Forms Architecture. XFA is an extension to PDF 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. 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. Microsoft Excel Spreadsheet format for structuring and analyzing data. This is the binary file format used by Microsoft Excel 97, Microsoft Excel 2000, Microsoft Excel 2002, and Microsoft Office Excel 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 applications in Microsoft Excel starting with Office It is based on XML rather than Microsoft's.xls format. Reading support only. This is a multi-page file format. Xwindows bitmap file format stored as ASCII data. Each pixel is stored as an ASCII byte , 2, 4, 8, 16, 24, 32 1, 8, 24, 32 1, 8, 24, 32 1, 4, 8 1, 24.pdf O - Yes No.xls O - Yes No.xlsx O -- Yes 8.xpm B B No XWD UNIX XWD Raster format. 36 1, 4, 1, 8,.xwd B B No 318

319 Appendix B - Supported File Formats File Format Each pixel is stored as an ASCII byte. File Type Number Input Bit Depth Output Bit Depth 8 24, 32 Common File Ext. Supports Win Win Text Read Write Search * = 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. File Type Constants Listed by File Type Number Table B.2: File Type Constants listed by File Type Number File Type Number File Type Name 0 TIFF_UNCOMPRESSED 1 BMP_UNCOMPRESSED 2 PCX 3 TARGA 4 GIF 5 WPG 6 WMF 7 TIFF_HUFFMAN 8 TIFF_G3_FAX 9 TIFF_LZW 10 TIFF_G4_FAX 11 DCX 12 BMP_COMPRESSED 13 JPEG 14 EPS 15 PICT 16 TIFF_PACK 17 TIFF_2D 18 CALS 19 LASER_DATA 20 XBM 21 MACPAINT 22 GX2 23 KOFAX 24 IOCA 25 ICONTYPE 26 IFF_ILBM 27 CLIP 28 IMG 29 BROOK_TROUT 30 MSP 31 CUT 32 TARGA16 319

320 Appendix B - Supported File Formats File Type Number File Type Name 33 CCITT_G3 34 CCITT_G4 35 XPM 36 XWD 82 HTML 37 RAST 38 ASCII 39 PHOTOCD 40 TIFF_JPEG 41 PHOTOSHOP 42 IMNET 43 PNG 44 GIF_INTERLACED 45 Xerox_EPS 46 TIFF_ABIC 47 TIFF_ABIC_BW 48 DIB 49 MO:DCA_IOCA 51 TIFF_G4_FAX_FO 52 CCITT_G4_FO 53 CCITT_G3_FO 54 FLASHPIX 55 DICOM 56 JEDMICS 57 PCL_1 58 WINFAX 59 PDF 60 SCITEX 61 MAG 62 DCS 63 EPS_BITMAP 64 EPS_BITMAP_G4 65 NCR 66 TIFF_JBIG 67 TIFF_G4_FAX_STRIP 68 WBMP 69 EPS_BITMAP_LZW 70 JPEG JBIG 72 COD 73 TIFF_JPEG7 74 AFP 75 LINE_DATA 76 PCL_5 320

321 Appendix B - Supported File Formats File Type Number File Type Name 77 JBIG2 78 FILENET 79 PDF_15 80 CIMS 81 CIFF 82 HTML 83 CFF 84 EXCEL 85 POWER_POINT 86 DOC 87 RTF 88 PDF_LZW 89 MSG 90 DWG 91 DXF 92 PDF_16 93 DOCX 94 OOXML 95 XLSX 96 ODT 97 ODS 98 ODF 100 PPTX 101 ODP 102 SVG 103 MIME 104 PDF_A 321

322 Appendix C - Software Installation Appendix C - Software Installation This appendix describes how to install the evaluation or full copy of RasterMaster.NET. The appendix contains the following topics: Overview of the Installation Process Installing the Software Directory Structure Installed Files Overview of the Installation Process RasterMaster.NET is easy to install as an evaluation, developer, or run-time version. The evaluation copy is delivered as a.zip archive that can be manually extracted to an installation directory chosen by the user. You can get an evaluation by contacting a member of our sales team at sales@snowbound.com or The evaluation copy expires at the end of each month. Both the developer and runtime version of the RasterMaster.NET ship as fully serialized builds which are very easy to install. This product is fully enabled as either a developer or runtime product. RasterMaster.NET is delivered as a.zip archive that can be manually extracted to an installation directory chosen by the user. For example: C:\Program Files\Snowbound\RMNET Note: For RasterMaster.NET, Snowbound requests that you place all Snowbound components in a non-common directory within Windows. They should NOT be placed in the \windows or \windows\system directory or other such common area. 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. When a distribution license is purchased, all banners disappear. Notes: You are running an evaluation version of the software if an evaluation banner appears on the screen. Contact support at (support@snowbound.com) for help with these issues. 322

323 Appendix C - Software Installation 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. Redistributing Snowbound Files Your application will link to one or more Snowbound dlls, including SbdNetAnn.dll and plugin.dlls. When your application is deployed, the Snowbound files should be placed in either the same directory 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. Note: If you are upgrading from the RasterMaster base library to the new RasterMaster 18.0 library, you will need to replace references to sbdnet.dll with SbdNetAnn.dll. What to Expect When Installing an Evaluation Version Your evaluation is a full version of the product with the following limitations: 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. You will see large thin Xs across each page after the first 50 pages or thumbnails. 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. What to Expect in a Production Version When you purchase the RasterMaster DLL Imaging SDK, you will receive a set of fully licensed binary files. The files will include snbd*.dll and.lib and.dlls for each purchased option. Please see Installed Files for a list of the files installed with RasterMaster.NET. Installing the Production Version of RasterMaster.NET Install and configure the evaluation version of the product on your target production system. Ensure it is working as you intended. Extract the binary files from the production version package and use those to replace the same files in the evaluation version that you have installed. Once the production files are in place you will no longer see banners or Xs. You will only see expiration messages if you try to view a document of a type that you did not purchase, for example MS Office or AFP/MO:DCA. 323

324 Appendix C - Software Installation Installing the Software To install RasterMaster.NET: 1. Double-click on the downloaded executable. In this example, double-click on rmdotnet17.exe to display the Welcome dialog. 2. After reading the dialog, click Next to display the License Agreement dialog. 324

325 Appendix C - Software Installation 3. Read the license agreement. If you agree with the license agreement, select I accept the license agreement and click Next to display the Readme Information dialog (Figure C-4). If you do not agree with the license agreement, you cannot proceed with the installation. 325

326 Appendix C - Software Installation 4. Accept the default destination folder and click Next to display the Ready to Install dialog. 326

327 Appendix C - Software Installation 5. Click Next to begin the installation. Installation begins. This may take a few seconds. 6. You will see a warning message if you do not have the Visual C Redistibutable 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 Redistributable prerequisite file and continue the RasterMaster DLL installation. 327

328 Appendix C - Software Installation 7. Once installation is complete, the Successful Installation dialog displays. 328

329 Appendix C - Software Installation 8. Click Finish to complete the installation.. Directory Structure The installation of the.net Imaging SDK creates a new directory called C:\Program Files\Snowbound\RM<version><type><product>. The example below is a version 18.NET directory. RM18Net Docs Images Marketing Sample-Documents Samples Installed Files This section describes the files that are installed during the.net Imaging SDK installation. The main installation directory is RM<Version><Product>Net. For example, if you install the version 17.NET, the directory will be RM17Net. There is also a Docs, Marketing, and Samples subdirectory. 329

330 Appendix C - Software Installation Main Directory Files The files installed into the main directory are defined in Table C-1. Table C.1: RasterMaster.NET Default Directory File File XLSX library file PPTX library fill Snowbound.RasterMasterSharp.Office.dll DOCX library file docplug.dll dwgplg.dll htmlplug.dll jb2plug.dll jp2plug.dll ooxmlplug.dll pclplug.dll pdfplug.dll SbdNetAnn.dll SnowboundDllLocations.exe Cells library file. slides library file. product license. Words library file. MS Word plugin file. DWG plugin file. HTML plugin file. The HTML plugin option requires.net 4.0 JBIG2 plugin file. JPEG2 plugin file. Open Office XML (OOXML) plugin file. PCL plugin file containing the PCL plugin. PDF plugin file containing the PDF plugin. Main Snowbound file. Helps to locate installed DLL files. Strong Name Support The.NET library is assigned a cryptographic signature, called a strong name. The strong name can be uniquely identified and installed to the Global Assembly Cache (GAC) to allow multiple applications to reference and use it. Locate the strong name tool, sn.exe, on your computer. For example: C:\Program Files\Microsoft Visual Studio.NET 2003\SDK\v1.1\Bin\sn.exe The following are some commands to use when working with the strong name: To verify the strong name: sn -v sbdnetann.dll To display the public key information: sn -Tp sbdnetann.dll To skip strong name verification: sn -Vr sbdnetann.dll 330

331 Appendix C - Software Installation For more information about using a strong name, please refer to the following Microsoft.net document: Note: If you are upgrading from the RasterMaster base library to the new RasterMaster 18.0 library, you will need to replace references to sbdnet.dll with SbdNetAnn.dll. XFA Support Files RasterMaster.NET with the XFA option includes the itextkey.xml license key at the same directory level with the other DLL files. The XFA file format is an optional file format available with an additional charge. The following DLLs are needed for XFA file format support: Antlr3.Runtime.dll itextsharp.licensekey.dll itextsharp.xfaworker.dll itextsharp.xmlworker.dll Jint.dll log4net.dll Docs Directory Files Table C.2: RasterMaster.NET Docs Directory Files File ^^Open Source Software Components used in Snowbound products.pdf RMDotNETProgrammersGuide.pdf RMDotNETProgrammersGuide.pdf Open source sofware license agreement bundled with Snowbound Software products. Complete.NET programmers guide. NET Release Notes. Marketing Directory Files Table C-3.RasterMaster.NET Marketing Directory Files File Snowbound Corporate Overview.pdf Provides an overview of 331

332 Appendix C - Software Installation File Snowbound Software RasterMaster Overview.pdf Snowbound Software VirtualViewer Overview.pdf Snowbound Software including company facts, products, and formats. Provides an overview of Snowbound Software s RasterMaster products. Provides an overview of Snowbound Software s VirtualViewer products. Sample Directory Files The samples directory contains the.net Imaging SDK samples that are described in Table C- 4. All of the.net samples include C#.NET and VB.NET source code. For more information about each sample, see Appendix F,.NET Samples. Table C.3: RasterMaster.NET Samples Directory Sample Alpha_csharp Alpha_VB Animate_CSHARP Animate_VB annaction_csharp annaction_vb Annotation_CSHARP Annotation_VB ASCIIConversion_CSHARP ASCIIConversion_VB Sample for using the.net library in C# to load, display the image, and use basic operations like zoom and rotate to manipulate the image. See Alpha for more information. Sample for using the.net library in Visual Basic to load, display the image, and use basic operations like zoom and rotate to manipulate the image. See Alpha for more information. Sample for displaying an animated GIF image in C#. See Animate for more information. Sample for displaying an animated GIF image in Visual Basic. See Animate for more information. Sample for using the.net library in C# mouse handler to add an annotation. See Annaction for more information. Sample for using the.net library in Visual Basic mouse handler to add an annotation. See Annaction for more information. Sample for using the.net library in C# to add an annotation. See Annotation for more information. Sample for using the.net library in Visual Basic to add an annotation. See Annotation for more information. Sample for demonstrating ASCII conversion in C#. Sample for demonstrating ASCII conversion in Visual Basic. 332

333 Appendix C - Software Installation Sample ASPConversion_CSHARP ASPConversion_VB ASPImageView_CSHARP ASPImageView_VB ASPMemCopy_CSHARP ASPMemCopy_VB ASPMultiPage_CSHARP ASPMultiPage_VB Contrast_CSHARP Contrast_VB Conversion_CSHARP Conversion_VB ddbeffect_csharp ddbeffect_vb Sample for demonstrating a simple conversion in C#. See ASP Conversion for more information. Sample for demonstrating a simple conversion in Visual Basic. See ASP Conversion for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in C# to load, display the image, and use basic operations like zoom and rotate to manipulate the image. See ASP Image View for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in Visual Basic to load, display the image, and use basic operations like zoom and rotate to manipulate the image. See ASP Image View for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in C# for saving and reading the image from memory. See ASP Memory Copy for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in Visual Basic for saving and reading the image from memory. See ASP Memory Copy for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in C# to browse multiple page images. See ASP Multiple Pages for more information. Sample for demonstrating how to use the ASP.NET and Snowbound.NET libraries in Visual Basic to browse multiple page images. See ASP Multiple Pages for more information. Sample for comparing an image that had the brightness and contrast changed with the original/unmodified image in C#. See Contrast for more information. Sample for comparing an image that had the brightness and contrast changed with the original/unmodified image in Visual Basic. See Contrast for more information. Sample for demonstrating a simple conversion in C#. See Conversion for more information. Sample for demonstrating a simple conversion in Visual Basic. See Conversion for more information. Sample for showing how to get the DDB display effect from an image in C#. See DDB Effect for more information. Sample for showing how to get the DDB display effect 333

334 Appendix C - Software Installation Sample Encrypt_csharp Encrypt_VB ImageProcessing_CSHARP ImageProcessing_VB memcopy_csharp Memcopy_VB mergeimage_csharp page_csharp Page_VB panning_csharp panning_vb Print_CSHARP Print_VB Scan_CSHARP Scan_VB SimpleMultiPages_CSHARP from an image in Visual Basic. See DDB Effect for more information. Sample demonstrating how to use the Snowbound.Net library in C# to transparently decompress and display images. See Encryption for more information. Sample demonstrating how to use the Snowbound.Net library in Visual Basic to transparently decompress and display images. See Encryption for more information. Sample showing how to apply the image processing operator in C#. See Image Processing for more information. Sample showing how to apply the image processing operator in Visual Basic. See Image Processing for more information. Sample demonstrating how to use the Snowbound.NET library in C# for saving and reading the image from memory. See Memory Copy for more information. Sample demonstrating how to use the Snowbound.NET library in Visual Basic for saving and reading the image from memory. See Memory Copy for more information. Sample demonstrating how to merge two images. See Merge Image for more information. Sample for displaying any page and using anti-aliasing if desired in C#. See Page for more information. Sample for displaying any page and using anti-aliasing if desired in Visual Basic. See Page for more information. Sample demonstrating panning in C#. See Panning for more information. Sample demonstrating panning in Visual Basic. See Panning for more information. Sample demonstrating printing and previewing in C# using the Snowbound product. See Print for more information. Sample demonstrating printing and previewing in Visual Basic using the Snowbound product. See Print for more information. Sample demonstrating how to use the Snowbound.NET library in C# for scanning functions. See Scan for more information. Sample demonstrating how to use the Snowbound.NET library in Visual Basic for scanning functions. See Scan for more information. Sample demonstrating how to split multiple pages in C#. See Split to Multiple Pages for more information. 334

335 Appendix C - Software Installation Sample SimpleMultiPages_VB textsearch_csharp textsearch_vb TIFFTag_CSHARP TIFFTag_VB Sample demonstrating how to split multiple pages in Visual Basic. See Split to Multiple Pages for more information. Sample showing how to search text in the image in C#. See Text Search for more information. Sample showing how to search text in the image in Visual Basic. See Text Search for more information. Sample demonstrating how to use the Snowbound.NET library in C# for reading.tif tags. See Tiff Tag for more information. Sample demonstrating how to use the Snowbound.NET library in Visual Basic for reading.tif tags. See Tiff Tag for more information. 335

336 Chapter D - Set Up for ASP.NET Samples Chapter D - Set Up for ASP.NET Samples This appendix describes how to set up your system to work with ASP.NET samples. The appendix contains the following topics: Overview of the Set Up Process Setting Up the Environment to Run Web Applications Setting Up Samples on a Web Server Running ASP.NET Samples Overview of the Set Up Process ASP.NET web applications can be integrated with the Microsoft server, programming, data access, and security tools. Under the Microsoft Visual Studio.NET development environment, it is easier to create, debug, and deploy web applications. The purpose of the ASP.NET samples is to demonstrate how to use the Snowbound.NET library within Microsoft Visual Studio.NET projects for web applications development. All of the ASP.NET samples are web form based projects and have to be deployed on an IIS web server. Web applications can provide image manipulation from a web server to client machines over the internet. Users can upload images to a web server, view all kinds of the images through a web browser, process images, and download converted images back to their local computers. To view images through the internet, all of these samples convert images to a standard web browser supported image format, such as JPEG, bitmap, or PNG. No special software needs to be installed on the client site. The ASP.NET samples use the Snowbound standard.net library dll. No special component installation is needed. Since the.net library is not a web component, it can be used by either Windows applications or web applications. No web control is displayed on the toolbar within these sample projects. Currently, Snowbound Software provides VB.Net and C#.Net sample source code. You can simply copy the source code to your own web application project or setup and run the samples on your web server and modify them to your own applications. See Appendix F,.NET Samples for more information. All of Snowbound Software s samples were written under Visual Studio.NET. When you use Visual Studio to open a sample project file, Visual Studio will prompt you to convert the project to the new version. If you have more questions about installing or running these samples, please contact Snowbound Software s technical support at 336

337 Chapter D - Set Up for ASP.NET Samples Setting Up the Environment to Run Web Applications The following environments are required to debug and run the web applications projects: IIS 5.1 or later.net Framework 4.0 to 4.6 ASP.NET 2.0 Visual Studio.NET Visual Studio If you can use Visual Studio.NET to create your own web applications, you are already able to run the samples on your environment and you can skip this step. Otherwise, install the above software first. To check that IIS is installed on your system, select the Control Panel > Administrative Tools. If the window displays the icon for Internet Information Services, your system already has IIS installed. Another way to check that you have IIS installed on your system is to select the Control Panel > Administrative Tools > Services and check the system to see if IIS services is started. To register ASP.NET on IIS, select the Windows Directory and locate where your.net framework is installed. For example: C:\WINDOWS\Microsoft.NET\Framework\v Run the command: aspnet_regiis /i (Figure D-1). Figure D-1. Running the aspnet_regiis /i Command Note: Refer to Microsoft s website, for more information about software installation and troubleshooting. 337

338 Chapter D - Set Up for ASP.NET Samples Setting Up Samples on a Web Server To set up samples on a web server, follow the steps below: 1. Copy all of the samples to your local computer. For example: C:\ASPSample. 2. Setup a virtual directory for the samples. Select the Control Panel > Administrative Tools and open Internet Information Service. (Figure D-2) Figure D-2. Internet Information Service Icon 3. Right click on the default website. 4. Select New > Virtual Directory. (Figure D-3) 338

339 Chapter D - Set Up for ASP.NET Samples Figure D-3. Selecting the Virtual Directory 5. In the Alias field, enter ASPSample as the alias name, and click Next. (Figure D-4) Figure D-4. Entering the Alias Name 6. Browse and locate the local directory that contains your ASP.NET samples. Click Next. (Figure D-5) 339

340 Chapter D - Set Up for ASP.NET Samples Figure D-5. Locating the Directory 7. Click the check box and select Execute, Write Permissions, and Finish. 8. Create the ASPSample application on IIS. After you create the ASPSample virtual directory, the system should display ASPSample under the default web site in Internet Information Service. Click ASPSample to see the samples directories. Right click on a sample name. For example: ASPConversion_CSHARP. Select Properties. In the Execute Permissions field, select Script and Executables and click the Create button. (Figure D-6) 340

341 Chapter D - Set Up for ASP.NET Samples Figure D-6. Creating an ASPSample Application on IIS 9. Create all ASPSample applications on IIS. Follow step 3 to create applications on IIS for all ASP.NET Samples and close Internet Information Service. 10. Add the.net library DLL reference to projects. Use Microsoft Visual Studio.Net to open a sample project. Under the Solution Explorer, right click Reference. 11. Select Add Reference and the browser directory to locate the.net library dll on your computer. Click OK. (Figure D-7, Figure D-8) Figure D-7. Add Reference 341

342 Chapter D - Set Up for ASP.NET Samples Figure D-8. Selecting.NET library dll Build and run your sample application. Running ASP.NET Samples If you are running the samples with the evaluation version of the.net dll and the page freezes the first time that you try to connect, select the web server site and click OK for the evaluation message box. To see the correct image using Internet Explorer, you will need to adjust the following settings: 1. Select Internet Explorer > Tools > Internet Options. 2. In the Temporary Internet Files section, click Settings. 3. In the check for newer version of stored pages section, choose Every visit to the page. When running these.net samples, you might encounter a problem when loading large file size images to the web server. The default allowed size is 4MB. To check your web server setting, follow the steps below: 1. Under the.net framework directory, open the machine.config file. 2. Search for the httpruntime attribute. 3. Set the maxlength to the maximum file size you need. (Figure D-9) 342

343 Chapter D - Set Up for ASP.NET Samples Figure D-9. Adjusting the File Size 343

VirtualViewer Documentum D2 Integration Deployment Guide

VirtualViewer Documentum D2 Integration Deployment Guide VirtualViewer Documentum D2 Integration Deployment Guide DOC-0200-01 Copyright Information While Snowbound Software believes the information included in this publication is correct as of the publication

More information

VirtualViewer V1.0 Java FileNet for P8 Connector Installation Guide

VirtualViewer V1.0 Java FileNet for P8 Connector Installation Guide VirtualViewer V1.0 Java FileNet for P8 Connector Installation Guide N O T E An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version

More information

VirtualViewer Documentum Connector Integration Guide

VirtualViewer Documentum Connector Integration Guide VirtualViewer Documentum Connector Integration Guide DOC-0200-01 Copyright Information While Snowbound Software believes the information included in this publication is correct as of the publication date,

More information

Batch Image Converter V4.2 Programmer's Reference Guide

Batch Image Converter V4.2 Programmer's Reference Guide SnowBatch Batch Image Converter V4.2 Programmer's Reference Guide Note: An online version of this manual contains information on the latest updates to SnowBatch. To find the most recent version of this

More information

V13.6 Java Content Server Administrator's Guide

V13.6 Java Content Server Administrator's Guide VirtualViewer V13.6 Java Content Server Administrator's Guide Note: An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version of this

More information

VirtualViewer V13.6 Java User's Guide

VirtualViewer V13.6 Java User's Guide VirtualViewer V13.6 Java User's Guide Note: An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version of this manual, please visit the

More information

VirtualViewer V3.2.NET AJAX Administrator s Guide

VirtualViewer V3.2.NET AJAX Administrator s Guide VirtualViewer V3.2.NET AJAX Administrator s Guide Note: An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version of this manual, please

More information

VirtualViewer V4.10 VirtualViewer HTML5 for.net Client Administrator s Guide

VirtualViewer V4.10 VirtualViewer HTML5 for.net Client Administrator s Guide VirtualViewer V4.10 VirtualViewer HTML5 for.net Client Administrator s Guide An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version

More information

Snowbound Software RasterMaster Imaging SDK

Snowbound Software RasterMaster Imaging SDK Snowbound Software RasterMaster Imaging SDK Java v14.9 and.net v19.9 Release Notes These release notes describe the latest additions and improvements to the product. This release focused on correcting

More information

Release Notes for RasterMaster Release 14.11/19.11

Release Notes for RasterMaster Release 14.11/19.11 Release Notes for RasterMaster Release 14.11/19.11 March 6, 2018 Important Notes JRE 1.6 support ended with RM 14.10/19.10 except for special arrangements. RM 14.11/19.11 is built against JRE 1.7. Any

More information

Quick Reference. EMC ApplicationXtender Media Distribution Viewer 5.40 P/N REV A01

Quick Reference. EMC ApplicationXtender Media Distribution Viewer 5.40 P/N REV A01 EMC ApplicationXtender Media Distribution Viewer 5.40 Quick Reference P/N 300-005-645 REV A01 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748-9103 1-508-435-1000 www.emc.com Copyright 1994-2007

More information

VirtualViewer V2.2 Java AJAX Administrator s Guide

VirtualViewer V2.2 Java AJAX Administrator s Guide VirtualViewer V2.2 Java AJAX Administrator s Guide Note: An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version of this manual, please

More information

File Magic 5 Series. The power to share information PRODUCT OVERVIEW. Revised June 2003

File Magic 5 Series. The power to share information PRODUCT OVERVIEW. Revised June 2003 File Magic 5 Series The power to share information PRODUCT OVERVIEW Revised June 2003 Copyrights, Legal Notices, Trademarks and Servicemarks Copyright 2003 Westbrook Technologies Incorporated. All rights

More information

VirtualViewer V2.2.NET AJAX Administrator s Guide

VirtualViewer V2.2.NET AJAX Administrator s Guide VirtualViewer V2.2.NET AJAX Administrator s Guide Note: An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version of this manual, please

More information

ViewONE User Manual !"##$$$

ViewONE User Manual !##$$$ ViewONE User Manual!"##$$$ Contents Introduction 3 Features 4 The User interface 5 Toolbars 6 Menus 19 The Keyboard 29 ViewONE is a Java applet that extends your web browser so that you can view, zoom,

More information

Infoprint Server for iseries V5R2 and Infoprint Designer for iseries V1R1 enhancements extend business communications capabilities

Infoprint Server for iseries V5R2 and Infoprint Designer for iseries V1R1 enhancements extend business communications capabilities Software Announcement August 19, 2003 Infoprint Server for iseries V5R2 and Infoprint Designer for iseries V1R1 enhancements extend business communications capabilities Overview Infoprint Server for iseries

More information

VirtualViewer V4.10 VirtualViewer HTML5 for Java Client Administrator s Guide

VirtualViewer V4.10 VirtualViewer HTML5 for Java Client Administrator s Guide VirtualViewer V4.10 VirtualViewer HTML5 for Java Client Administrator s Guide An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version

More information

VirtualViewer HTML5 ICN Connector Installation Guide

VirtualViewer HTML5 ICN Connector Installation Guide VirtualViewer VirtualViewer HTML5 ICN Connector Installation Guide Note: An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version of

More information

Authorized Send User s Guide Version 4.0

Authorized Send User s Guide Version 4.0 Canon Authorized Send User s Guide Version 4.0 08011-40-UD1-003 This page is intentionally left blank. 2 Authorized Send User s Guide Contents Preface...5 How to Use This Manual... 5 Symbols Used in This

More information

EMC ApplicationXtender Web Access

EMC ApplicationXtender Web Access EMC ApplicationXtender Web Access Version 8.1 User Guide EMC Corporation Corporate Headquarters Hopkinton, MA 01748-9103 1-508-435-1000 www.emc.com Legal Notice Copyright 1994 2016 EMC Corporation. All

More information

Authorized Send User s Guide Version 3.5

Authorized Send User s Guide Version 3.5 Canon Authorized Send User s Guide Version 3.5 08011-35-UD1-004 This page is intentionally left blank. 2 Authorized Send User s Guide Contents Preface...5 How to Use This Manual... 5 Symbols Used in This

More information

Release Notes for RasterMaster Release 14.12/19.12

Release Notes for RasterMaster Release 14.12/19.12 Release Notes for RasterMaster Release 14.12/19.12 June 27, 2018 Table of Contents Important Notes Important Phone Numbers and Links New Features for RM 14.12/19.1 2 Closed/Fixed Issues for RM 14.12/19.1

More information

Disclaimer; No Warranty Copyright Trademarks

Disclaimer; No Warranty Copyright Trademarks Disclaimer; No Warranty THIS INFORMATION AND ALL OTHER DOCUMENTATION (IN PRINTED OR ELECTRONIC FORM) ARE PROVIDED FOR REFERENCE PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY

More information

Infoprint Server for iseries V5R2 and Infoprint Designer for iseries V1R1 enhancements extend business communications capabilities

Infoprint Server for iseries V5R2 and Infoprint Designer for iseries V1R1 enhancements extend business communications capabilities Software Announcement August 19, 2003 Infoprint Server for iseries V5R2 and Infoprint Designer for iseries V1R1 enhancements extend business communications capabilities Overview Infoprint Server for iseries

More information

EMC ApplicationXtender Web Access

EMC ApplicationXtender Web Access EMC ApplicationXtender Web Access Version 8.0 User Guide EMC Corporation Corporate Headquarters Hopkinton, MA 01748-9103 1-508-435-1000 www.emc.com Legal Notice Copyright 1994 2015 EMC Corporation. All

More information

BOXOFT Image to PDF s allow you scans paper documents and automatically s them as PDF attachments using your existing software

BOXOFT Image to PDF s allow you scans paper documents and automatically  s them as PDF attachments using your existing  software Note: This product is distributed on a try-before-you-buy basis. All features described in this documentation are enabled. The registered version does not insert a watermark in your generated pdf documents.

More information

TIFF Image Printer. Version User Guide. PEERNET Inc.

TIFF Image Printer. Version User Guide. PEERNET Inc. Version 11.0 User Guide PEERNET Inc. Copyright 1997-2018 Updated: 3/1/2018 Table of Contents Welcome... to 1... 2 Legal Notices... 3 System Requirements... 4 Typographic Conventions Activating... 5...

More information

Foreword 0. GetActualSize... Method GetPatternData... Method. SaveAsMemory... Method. Orientation Enumeration

Foreword 0. GetActualSize... Method GetPatternData... Method. SaveAsMemory... Method. Orientation Enumeration Contents 1 Table of Contents Foreword 0 Part I Introduction 3 Part II Installation 3 1 Trial Version... 3 2 Full Version... 4 Part III How to Distribute It 5 Part IV Reference Guide 5 1 Properties... 5

More information

VirtualViewer V4.11 VirtualViewer HTML5 for.net Client Administrator s Guide

VirtualViewer V4.11 VirtualViewer HTML5 for.net Client Administrator s Guide VirtualViewer V4.11 VirtualViewer HTML5 for.net Client Administrator s Guide An online version of this manual contains information on the latest updates to VirtualViewer. To find the most recent version

More information

AVS4YOU Programs Help

AVS4YOU Programs Help AVS4YOU Help - AVS Document Converter AVS4YOU Programs Help AVS Document Converter www.avs4you.com Online Media Technologies, Ltd., UK. 2004-2012 All rights reserved AVS4YOU Programs Help Page 2 of 39

More information

Oracle Fusion Middleware

Oracle Fusion Middleware Oracle Fusion Middleware Oracle Outside In Technology Release Notes 8.5.3 Release 8.5.3 E74928-01 April 2016 The major goals of this release are improved rendering fidelity in several key target formats,

More information

Release Notes. Ephesoft Enterprise Version

Release Notes. Ephesoft Enterprise Version Release Notes Ephesoft Enterprise Version 4.0.6.0 July 2016 Copyright 2016 by Ephesoft, Inc. All rights reserved. This publication pertains to Ephesoft and to any subsequent release until otherwise indicated

More information

Authorized Send User s Guide for imagerunner Machines Version 4.1

Authorized Send User s Guide for imagerunner Machines Version 4.1 Canon Authorized Send User s Guide for imagerunner Machines Version 4.1 08011-41-UD1-003 This page is intentionally left blank. 2 Authorized Send User s Guide for imagerunner Machines Contents Preface...5

More information

Endpoint Security webrh

Endpoint Security webrh Endpoint Security webrh 3.0 HFA 3 Release Notes 17 January 2012 Classification: [Protected] 2012 Check Point Software Technologies Ltd. All rights reserved. This product and related documentation are protected

More information

Universal Printer Plug-in

Universal Printer Plug-in Plug-in Manual Universal Printer Plug-in Version 5.0.1.1 August 21, 2007 Xitron Part Number Doc-1015 02/07 Contents Overview... 2 Installing the Universal Printer Plug-in... 3 Setting the Password... 5

More information

Scan November 30, 2011

Scan November 30, 2011 Scan November 30, 2011 2170 Georgina Avenue Santa Monica, CA 90402 800-972-3027 www.rco.com Table of Contents 1 Introduction... 1 2 Document History... 2 3 Install and Uninstall... 3 4 Understanding the

More information

Version Installation and User Guide

Version Installation and User Guide IBM Cognos 8 Business Intelligence Map Manager Version 8.4.1 Installation and User Guide Product Information This document applies to IBM Cognos 8 Version 8.4.1 and may also apply to subsequent releases.

More information

PageScope Box Operator Ver. 3.2 User s Guide

PageScope Box Operator Ver. 3.2 User s Guide PageScope Box Operator Ver. 3.2 User s Guide Box Operator Contents 1 Introduction 1.1 System requirements...1-1 1.2 Restrictions...1-1 2 Installing Box Operator 2.1 Installation procedure...2-1 To install

More information

PrimoPDF. Version 4.0 User Manual. Totally Free PDF Creation because It's everbody's PDF. Brought to you by

PrimoPDF. Version 4.0 User Manual. Totally Free PDF Creation because It's everbody's PDF. Brought to you by PrimoPDF Version 4.0 User Manual Totally Free PDF Creation because It's everbody's PDF Brought to you by NOTICE TO USER: THIS IS A CONTRACT. BY INSTALLING THIS SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS

More information

0WebMaker 3.0 Release Notes

0WebMaker 3.0 Release Notes 0WebMaker 3.0 Release Notes Version 3.0 WebMaker 3.0 provides a number of new features and improvements, including a simplified user interface, HTML 3.2 compatibility, and support for Casccading Style

More information

ecopy Barcode Recognition Service

ecopy Barcode Recognition Service ecopy Barcode Recognition Service Version 4.3 for ShareScan Administrator's Guide Part Number: 73-00401 (3/2009) Licensing, Copyright, and Trademark Information The information in this document is subject

More information

User s Guide to Creating PDFs for the Sony Reader

User s Guide to Creating PDFs for the Sony Reader User s Guide to Creating PDFs for the Sony Reader 1 Table of Contents I. Introduction Portable Document Format PDF Creation Software Sony Reader screen dimensions and specifications Font recommendations

More information

Installing Enterprise Switch Manager

Installing Enterprise Switch Manager Installing Enterprise Switch Manager ATTENTION Clicking on a PDF hyperlink takes you to the appropriate page If necessary, scroll up or down the page to see the beginning of the referenced section NN47300-300

More information

Solstice Backup 4.2 User s Guide

Solstice Backup 4.2 User s Guide Solstice Backup 4.2 User s Guide 2550 Garcia Avenue Mountain View, CA 94043 U.S.A. Part No: 802-6105-10 Revision A, April 1996 A Sun Microsystems, Inc. Business 1996 Sun Microsystems, Inc. 2550 Garcia

More information

Installing Enterprise Switch Manager

Installing Enterprise Switch Manager Installing Enterprise Switch Manager NN47300-300 Document status: Standard Document version: 0401 Document date: 26 March 2008 All Rights Reserved The information in this document is subject to change

More information

PrimoPDF User Guide, Version 5.0

PrimoPDF User Guide, Version 5.0 Table of Contents Getting Started... 3 Installing PrimoPDF... 3 Reference Links... 4 Uninstallation... 5 Creating PDF Documents... 5 PrimoPDF Document Settings... 6 PDF Creation Profiles... 6 Document

More information

Inmagic DB/TextWorks Installation and Upgrade Notes

Inmagic DB/TextWorks Installation and Upgrade Notes Inmagic DB/TextWorks 12.00 Installation and Upgrade Notes This document is intended for new DB/TextWorks installations and sites that are upgrading to version 12.00. DB/TextWorks is a content management

More information

UniPrint User s Guide

UniPrint User s Guide UniPrint User s Guide UniPrint Client Version 4.0 Released: June 2009 Revised: 8 June 2009 11:55 am ii UniPrint Client Version 4.0 Copyright Notice UniPrint, a division of GFI Business Solutions Inc. and

More information

Foreword 0. ServiceClass Property GetActualSize... Method. SaveAsMemory... Method. SetStructuredAppend... Method. Orientation Enumeration

Foreword 0. ServiceClass Property GetActualSize... Method. SaveAsMemory... Method. SetStructuredAppend... Method. Orientation Enumeration Contents 1 Table of Contents Foreword 0 Part I Introduction 2 Part II Installation 2 1 Trial Version... 2 2 Full Version... 3 Part III How to Distribute It 4 Part IV Reference Guide 4 1 Properties... 4

More information

Nimsoft Monitor. proxy Guide. v3.1 series

Nimsoft Monitor. proxy Guide. v3.1 series Nimsoft Monitor proxy Guide v3.1 series Legal Notices Copyright 2012, CA. All rights reserved. Warranty The material contained in this document is provided "as is," and is subject to being changed, without

More information

SimpleView 5.1 MANUAL.

SimpleView 5.1 MANUAL. SimpleView 5.1 MANUAL www.simpleindex.com Revised January, 2013 Table of Contents - 2 - SimpleView Documentation 1 Introduction... 5 1.1 File-Based Document Management with SimpleView... 5 1.2 Image Quality

More information

User guide. PRISMAdirect Order processing

User guide. PRISMAdirect Order processing User guide PRISMAdirect Order processing Copyright 2016, Océ All rights reserved. No part of this work may be reproduced, copied, adapted, or transmitted in any form or by any means without written permission

More information

Release Notes RESOLVED NEW NEW

Release Notes RESOLVED NEW NEW 3.5.92 Resolved a bug where pages in batch review were being saved by how they were selected and not how they appeared in the list. Resolved a bug with large PDF files not saving correctly through Drag

More information

Use in High-Safety Applications

Use in High-Safety Applications ------ ScanSnap Organizer V5.6L20 README File ------ - Contents - 1. Cautions for using environment-dependent characters 2. Cautions Concerning Installation 3. Cautions Concerning the Operation 4. Connecting

More information

Administrating TextMap

Administrating TextMap Administrating TextMap User Guide TextMap, Version 9.1 Managing Case Staff Optimizing Case Files Replicating and Syncrhonizing Managing the Case Index Managing OCR Processing Managing Links to Cases Managing

More information

ivina BulletScan Manager

ivina BulletScan Manager ivina BulletScan Manager User s Manual Aug 2010 Copyright Copyright 2010 ivina Inc. All rights reserved. Information in this document is subject to change without notice. The software described in this

More information

PDFAssistant 7.0 SPrint 7.0

PDFAssistant 7.0 SPrint 7.0 PDFAssistant 7.0 SPrint 7.0 The complete print and PDF web publishing solution for CoCreate OneSpace Designer Drafting/ME10 From Accurate Consulting 2004 Accurate Consulting. All rights reserved. PDFAssistant

More information

Inmagic DB/TextWorks 9.00 Installation and Upgrade Notes

Inmagic DB/TextWorks 9.00 Installation and Upgrade Notes Inmagic DB/TextWorks 9.00 Installation and Upgrade Notes Thank you for purchasing Inmagic DB/TextWorks. This document is for new DB/TextWorks installations and sites that are upgrading to version 9.00.

More information

Check Point Document Security

Check Point Document Security Check Point Document Security 7.4 Release Notes 30 December 2010 2010 Check Point Software Technologies Ltd. All rights reserved. This product and related documentation are protected by copyright and distributed

More information

DjVu Technology Primer

DjVu Technology Primer DjVu Technology Primer NOVEMBER 2004 LIZARDTECH, INC. OVERVIEW LizardTech s Document Express products are powered by DjVu, a technology developed in the late 1990s by a team of researchers at AT&T Labs.

More information

Installation Notes. for Windows. ZONA Technology, Inc. Scottsdale, Arizona

Installation Notes. for Windows. ZONA Technology, Inc. Scottsdale, Arizona 1 of 5 Installation Notes for Windows ZONA Technology, Inc. Scottsdale, Arizona Copyright 2018 ZONA Technology, Inc. All Rights Reserved Worldwide. No part of the ZONAIR software or documentation may be

More information

Inmagic DB/Text WebPublisher PRO Installation and Upgrade Notes

Inmagic DB/Text WebPublisher PRO Installation and Upgrade Notes Inmagic DB/Text WebPublisher PRO 11.00 Installation and Upgrade Notes Thank you for purchasing Inmagic DB/Text WebPublisher PRO. This document is for new WebPublisher PRO installations and for sites that

More information

Purchase PDF Converter 6 Volume License for $87 (normally $199)! Purchase PDF Converter Enterprise 6 in a DVD case for $99.95 (normally $229.95)!

Purchase PDF Converter 6 Volume License for $87 (normally $199)! Purchase PDF Converter Enterprise 6 in a DVD case for $99.95 (normally $229.95)! PDF 6 now available Purchase PDF Converter 6 Volume License for $87 (normally $199)! Purchase PDF Converter Enterprise 6 in a DVD case for $99.95 (normally $229.95)! Only available in Commercial. Purchase

More information

MST Batch Converter.NET

MST Batch Converter.NET .NET A MS Technology Product Digital Imaging and Document Management Solution Version 3.14.11 Licensing and Copyright Information The software described in this guide is furnished under license agreement

More information

Contents. Founder RealDot Viewer. Quick Guide. September Beijing Founder Electronics Co., Ltd.

Contents. Founder RealDot Viewer. Quick Guide. September Beijing Founder Electronics Co., Ltd. Contents Quick Guide September 2014 Beijing Founder Electronics Co., Ltd. The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms

More information

Scan to Digitech v1.0

Scan to Digitech v1.0 Scan to Digitech v1.0 Administrator's Guide June 2009 www.lexmark.com Lexmark and Lexmark with diamond design are trademarks of Lexmark International, Inc., registered in the United States and/or other

More information

Convert to PDF 3.0. User Guide. PEERNET Inc.

Convert to PDF 3.0. User Guide. PEERNET Inc. User Guide PEERNET Inc. Copyright 2005-2013 Updated: 1/9/2013 Table of Contents Welcome... to Convert to PDF 1 Legal... Notices 2 System... Requirements 3 Activating... Convert to PDF 4 Launching the Activation

More information

COGNOS (R) ENTERPRISE BI SERIES COGNOS REPORTNET (TM)

COGNOS (R) ENTERPRISE BI SERIES COGNOS REPORTNET (TM) COGNOS (R) ENTERPRISE BI SERIES COGNOS REPORTNET (TM) GETTING STARTED Cognos ReportNet Getting Started 07-05-2004 Cognos ReportNet 1.1MR1 Type the text for the HTML TOC entry Type the text for the HTML

More information

KIMOTO K I M O S E T T E R R I P. Kimosetter RIP User Guide 1. Revised: February 2015 U SER GUID E (FOR W INDOWS 7 )

KIMOTO K I M O S E T T E R R I P. Kimosetter RIP User Guide 1. Revised: February 2015 U SER GUID E (FOR W INDOWS 7 ) KIMOTO K I M O S E T T E R R I P U SER GUID E (FOR W INDOWS 7 ) Revised: February 2015 Kimosetter RIP User Guide 1 COPYRIGHT AND TRADEMARKS Kimosetter RIP User Guide Copyright Notices for the Software

More information

Release Notes LAW PreDiscovery, Version Enhancements Resolved Issues Current Issues Release Information

Release Notes LAW PreDiscovery, Version Enhancements Resolved Issues Current Issues Release Information Release Notes LAW PreDiscovery, Version 6.12.106 Enhancements Resolved Issues Current Issues Release Information LAW PreDiscovery Release Notes No part of this work may be reproduced or transmitted in

More information

Archive Writer Interface Software. User s Guide. A Part No. 3E9644 CAT No

Archive Writer Interface Software. User s Guide. A Part No. 3E9644 CAT No Archive Writer Interface Software User s Guide A-61056 Part No. 3E9644 CAT No. 881 4832 EASTMAN KODAK COMPANY SOFTWARE LICENSE AGREEMENT Read the following terms and conditions carefully before using this

More information

Drivers & Utilities User Guide. by Alto Imaging Technologies, Inc.

Drivers & Utilities User Guide. by Alto Imaging Technologies, Inc. Drivers & Utilities User Guide by Alto Imaging Technologies, Inc. Drivers & Utilities User Guide All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic,

More information

Replication Server Heterogeneous Edition

Replication Server Heterogeneous Edition Overview Guide Replication Server Heterogeneous Edition 15.2 DOCUMENT ID: DC01055-01-1520-01 LAST REVISED: August 2009 Copyright 2009 by Sybase, Inc. All rights reserved. This publication pertains to Sybase

More information

User and training guides and related documentation from Parametric Technology Corporation and its subsidiary companies (collectively "PTC") are

User and training guides and related documentation from Parametric Technology Corporation and its subsidiary companies (collectively PTC) are Arbortext IsoView Installation Guide Arbortext IsoView 7.3 May 2012 Copyright 2012 Parametric Technology Corporation and/or Its Subsidiary Companies. All Rights Reserved. User and training guides and related

More information

HP OpenView Service Desk

HP OpenView Service Desk HP OpenView Service Desk OpenView Operations Integration Administrator s Guide Software Version: 5.10 For the Windows and UNIX Operating Systems Manufacturing Part Number: None Document Release Date: August

More information

Data Maintenance Tool

Data Maintenance Tool DT700 Series Data Maintenance Tool User's Guide A50-017029-001 Ver. 1.2 June 2009 Notice (1) Information in this guide is subject to change without notice. (2) If you find any unclear or incorrect description

More information

Unified Management Portal

Unified Management Portal Unified Management Portal Unified Management Portal Release Notes 6.2.1 Document Revision History Document Version Date Changes 1.0 12/18/2012 Initial version for UMP 6.2. 1.1 2/4/2013 Updated version

More information

Oracle Communications Performance Intelligence Center

Oracle Communications Performance Intelligence Center Oracle Communications Performance Intelligence Center Browser Export Scheduler Guide Release 10.2 E66874 Revision 1 February 2016 i Oracle Communications Performance Intelligence Center Browser Export

More information

Introduction. You might be interested in the system requirements, the installation, payment and registration procedures.

Introduction. You might be interested in the system requirements, the installation, payment and registration procedures. Introduction Contenta NEF Converter is a simple and powerful tool to convert your NEF photos. It does support a very wide range of Nikon cameras. It is simple to use because of its intuitive interface

More information

Amyuni PDF Converter. User s Manual Updated September 26, 2005

Amyuni PDF Converter. User s Manual Updated September 26, 2005 Amyuni PDF Converter Version 2.50e Version 2.50e Professional For Windows 95, 98, Me, NT4, 2000, XP/2003 32-bits, XP/2003 64-bits User s Manual Updated September 26, 2005 Amyuni Consultants Amyuni Technologies

More information

Inmagic DB/TextWorks Installation and Upgrade Notes

Inmagic DB/TextWorks Installation and Upgrade Notes Inmagic DB/TextWorks 10.00 Installation and Upgrade Notes This document is intended for new DB/TextWorks installations and sites that are upgrading to version 10.00. DB/TextWorks is a content management

More information

QDA Miner. Addendum v2.0

QDA Miner. Addendum v2.0 QDA Miner Addendum v2.0 QDA Miner is an easy-to-use qualitative analysis software for coding, annotating, retrieving and reviewing coded data and documents such as open-ended responses, customer comments,

More information

AMScan Viewer User Guide Version 2.1

AMScan Viewer User Guide Version 2.1 AMScan Viewer User Guide Version 2.1 AMScan Viewer User Guide v2.1 Page 1 Contents Page Introduction 3 Installing AMScan Viewer 4 Getting Started 5 The AMScan Viewer Database 6 Viewing Documents 7 Printing

More information

Operating Instructions

Operating Instructions Operating Instructions Software (Direct Printing System) For Digital Imaging Systems Direct Printing System Setup Using Direct Printing System General Description System Requirements Before using this

More information

This instruction manual may not be copied either in part or in its entirety without the prior permission of Minolta Co., Ltd Minolta Co., Ltd.

This instruction manual may not be copied either in part or in its entirety without the prior permission of Minolta Co., Ltd Minolta Co., Ltd. This instruction manual does not provide instructions for the basic operation of the personal computers, or the basic operation of Windows or Mac OS operating systems. Please refer to the manual that came

More information

Océ Engineering Exec. Advanced Import and Index

Océ Engineering Exec. Advanced Import and Index Océ Engineering Exec Advanced Import and Index Océ-Technologies B.V. Copyright 2004, Océ-Technologies B.V. Venlo, The Netherlands All rights reserved. No part of this work may be reproduced, copied, adapted,

More information

JUSTCROFT INTERNATIONAL PRINTING AND PLOTTING SOLUTIONS. JustCGM 5.0 User Manual

JUSTCROFT INTERNATIONAL PRINTING AND PLOTTING SOLUTIONS. JustCGM 5.0 User Manual JUSTCROFT INTERNATIONAL PRINTING AND PLOTTING SOLUTIONS JustCGM 5.0 User Manual Justcroft International JustCGM 5.0 User Manual Revision: 1.5, March 7, 2012 Copyright 2011-2012 Justcroft International

More information

HP Instant Printing Pro 2.0

HP Instant Printing Pro 2.0 HP Instant Printing Pro 2.0 Frequently Asked Questions Publication Date: July 2013 Edition: 1 2013 Hewlett-Packard Development Company, L.P. Legal notices The information contained in this document is

More information

ICH M8 Expert Working Group. Specification for Submission Formats for ectd v1.1

ICH M8 Expert Working Group. Specification for Submission Formats for ectd v1.1 INTERNATIONAL COUNCIL FOR HARMONISATION OF TECHNICAL REQUIREMENTS FOR PHARMACEUTICALS FOR HUMAN USE ICH M8 Expert Working Group Specification for Submission Formats for ectd v1.1 November 10, 2016 DOCUMENT

More information

User Guide 701P Wide Format Solution Wide Format Scan Service

User Guide 701P Wide Format Solution Wide Format Scan Service User Guide 701P44865 6204 Wide Format Solution Wide Format Scan Service Xerox Corporation Global Knowledge & Language Services 800 Phillips Road Bldg. 845-17S Webster, NY 14580 Copyright 2006 Xerox Corporation.

More information

EView/400i Management for HP BSM. Operations Manager i

EView/400i Management for HP BSM. Operations Manager i EView/400i Management for HP BSM Operations Manager i Concepts Guide Software Version: 7.00 July 2015 Legal Notices Warranty EView Technology makes no warranty of any kind with regard to this document,

More information

Enable, configure, and adapt print data from any host or application. The Data Enabling Solution for Printing and Archiving

Enable, configure, and adapt print data from any host or application. The Data Enabling Solution for Printing and Archiving Enable, configure, and adapt print data from any host or application The Data Enabling Solution for Printing and Archiving Key Features Integrated Print Management Console Enhance printing efficiency and

More information

Oracle is a registered trademark, and Oracle Rdb, Oracle RMU and Oracle SQL/Services are trademark or registered trademarks of Oracle Corporation.

Oracle is a registered trademark, and Oracle Rdb, Oracle RMU and Oracle SQL/Services are trademark or registered trademarks of Oracle Corporation. Oracle Rdb Data Provider for.net Release Notes V7.3 August 2007 Oracle Rdb Data Provider for.net Release Notes, Release 7.3 Copyright 2007 Oracle Corporation. All rights reserved. The Programs (which include

More information

Oracle VueLink for Documentum

Oracle VueLink for Documentum Oracle VueLink 19.3.2 for Documentum User s Manual An Integration between Documentum and AutoVue Client/Server Deployment Copyright 1998, 2012, Oracle and/or its affiliates. All rights reserved. The Programs

More information

ScholarOne Manuscripts. Author File Upload Guide

ScholarOne Manuscripts. Author File Upload Guide ScholarOne Manuscripts Author File Upload Guide 7-August-2017 Clarivate Analytics ScholarOne Manuscripts Author File Upload Guide Page i Table of Contents INTRODUCTION... 1 SUPPORTED FILE TYPES... 1 HOW

More information

ScanSoft, Inc. 9 Centennial Drive Peabody, Massachusetts 01960

ScanSoft, Inc. 9 Centennial Drive Peabody, Massachusetts 01960 C O P Y R I G H T S Copyright 1999 2003 by ScanSoft, Inc. All rights reserved. No part of this publication may be transmitted, transcribed, reproduced, stored in any retrieval system or translated into

More information

Nimsoft Unified Management Portal

Nimsoft Unified Management Portal Nimsoft Unified Management Portal NimsoftMobile Guide 2.0 Document Revision History Document Version Date Changes x.x xx/xx/2012 Initial version for xxxxxxxxxxxx Legal Notices Copyright 2012, Nimsoft Corporation

More information

Attachment Service. Installation and Getting Started Guide

Attachment Service. Installation and Getting Started Guide Attachment Service Installation and Getting Started Guide Attachment Service Installation and Getting Started Guide Last revised: 23 October 2002 Part number: PDF-05356-001 At the time of publication,

More information

Mainframe Adapter for TCP

Mainframe Adapter for TCP BEATuxedo Mainframe Adapter for TCP Release Notes Version 8.1 Document Revised: November 14, 2003 Part Number: 830-001005-009 Copyright Copyright 2003 BEA Systems, Inc. All Rights Reserved. Restricted

More information

Attachment Service. Installation and Getting Started Guide

Attachment Service. Installation and Getting Started Guide Attachment Service Installation and Getting Started Guide Attachment Service Installation and Getting Started Guide Last revised: 23 October 2002 Part number: PDF-05733-001 At the time of publication,

More information