PDF Reader©, Copyright by Foxit Software Company
Total Page:16
File Type:pdf, Size:1020Kb
RasterMaster® SDK Imaging SDK for the .NET Platform V18.1 Programmer’s Reference Guide Note: An online version of this manual contains information on the latest updates to Ras- terMaster. To find the most recent version of this manual, please visit the online version at www.rastermaster.com or download the most recent version from our website at www.snowbound.com/support/manuals.html. DOC-0150-09 Copyright Information While Snowbound Software believes the information included in this publication is correct as of the publication date, information in this document is subject to change without notice. UNLESS EXPRESSLY SET FORTH IN A WRITTEN AGREEMENT SIGNED BY AN AUTHORIZED REP- RESENTATIVE OF SNOWBOUND SOFTWARE CORPORATION MAKES NO WARRANTY OR REP- RESENTATION 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, trans- lated on paper, film, electronic media, or computer-readable form, or otherwise reproduced in any way, without the express written permission of Snowbound Software Corporation. Microsoft, MS, MS-DOS, Windows, Windows NT, and SQL Server are either trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Adobe, the Adobe logo, Acrobat, and the Acrobat logo are trademarks of Adobe Systems Incorporated. Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Foxit PDF Reader©, copyright by Foxit Software Company. All rights reserved. iText, the Initial Developers of the Original Code are Bruno Lowagie and Paolo Soares. Portions created by Bruno Lowagie are Copyright (C) 1999-2009 by Bruno Lowagie. Kakadu JPEG2000©, is copyrighted by Dr. David Taubman, and is proprietary to NewSouth Innovations, Pty. Ltd, Aus- tralia. Aspose™, Aspose.Cells© (copyrighted 2003), Aspose.Words© (copyrighted 2003), and Aspose.Slides© (copy- righted 2004), are all proprietary to Aspose Software, Pty. Ltd, Australia. United States Government Restricted Rights The Software is provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the United States Gov- ernment is subject to restrictions as set forth under subparagraph (c)(1)(ii) of The Rights in Technical Data and Com- puter Software clause of DFARS 252.227 –19 or subparagraphs (c)(i) and (2) of the Commercial Computer Software-Restricted Rights at 48 CFR 52.227 – 19 as applicable. The Manufacturer is Snowbound Software Cor- poration, 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-0150-09 Revision: 09 RasterMaster for the .NET Platform Release Number: 18.1 RasterMaster® SDK Release Number: 18.1 Printing Date: June 2012 Published by Snowbound Software Corporation. 309 Waverley Oaks Road Suite 401 Waltham, MA 02452 USA phone: 617-607-2000 fax: 617-607-2002 ©1996 - 2012 by Snowbound Software Corporation. All rights reserved. Table of Contents Chapter 1 - Additions and Improvements 37 New Features 37 Chapter 2 - 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 Chapter 3 - Saving and Reading Multi-page Images 47 Multi-page Images 47 Supported Multi-page Formats 47 Decompressing a Multi-page Image 47 Determining Multi-page Page Count 47 Saving Multi-page File Formats 47 Multi-page Format Functions 48 Chapter 4 - Printing Images 49 3 Printing Overview 49 Printing Functions 49 Normal Printing 49 Fast Printing 49 CIMG_print_bitmap() 50 CIMG_print_bitmap_fast() 50 Chapter 5 - Aspect Ratio Correction Function 52 Aspect Ratio Correction Function 52 Chapter 6 - Display Quality 53 Achieving the Best Display Quality 53 24-Bit Images Displayed on a 256 Color Adapter 53 Bi-Level and 1-Bit Per Pixel Images 53 Chapter 7 - Image Compression 55 Preferred Formats 55 24-Bit Color Images 55 8-Bit Gray Scale Images 55 1-bit Bi-Level Images 55 Chapter 8 - File Format Conversion 56 Converting File Formats 56 Automatically Detecting File Formats 56 Input Document Quality: Resolution/DPI 57 Input Document Quality: Color/bit-depth/Pixel Depth 57 Making Sure Input is Compatible with Output 57 Getting a Pixel_Depth_Unsupported Error 57 4 Adjusting Low Output Quality 57 Chapter 9 - Class Snow.Snowbnd Methods 59 Snowbnd() 59 Snowbnd(int, int, int) 60 Chapter 10 - SDK Class Specific Methods 62 isValidImage() 62 clearImage() 62 ToErrorMessage() 63 Chapter 11 - SnowPanel Class Specific Methods 64 Properties 64 CustomPaint() 64 OnPaint() 65 OnPaintBackground() 65 OnSizeChanged() 66 Chapter 12 - Scanning Functions 67 Scanning Constants 67 CIMG_scan_acquire() 68 CIMG_scan_acquire_feeder() 68 CIMG_scan_acquire_feeder_fast() 69 CIMG_scan_feeder_close() 70 CIMG_scan_get_cap() 70 CIMG_scan_open_source() 71 CIMG_scan_pages() 71 CIMG_scan_pages_fast() 72 5 CIMG_scan_set_cap() 73 CIMG_scan_set_caps() 74 CIMG_scan_setup() 74 Chapter 13 - Scrollbar Default Functions 76 Properties 76 SnowbndCNet_HScrollBar() 76 SnowbndCNet_VScrollBar() 77 Chapter 14 - 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() 83 CIMG_decompress_bitmap_xps() 84 CIMG_decompress_fax() 85 CIMG_decompress_fax_mem() 85 CIMG_decompress_tiled_bitmap() 86 Chapter 15 - Image Decompression Option Functions 88 CIMGLOW_set_auto_detect() 88 CIMGLOW_set_decomp_rect() 89 CIMGLOW_set_decomp_reduction() 89 CIMGLOW_set_decompsize() 90 6 CIMGLOW_set_jpeg_decompression 90 CIMGLOW_set_overlay_path() 91 CIMGLOW_set_pdf_input() 92 CIMGLOW_set_pdf_password() 92 CIMGLOW_unset_auto_detect() 93 Chapter 16 - Image Creation Functions 94 CIMG_create_bitmap_class() 94 CIMG_create_handle() 94 CIMG_create_handle_ddb() 95 CIMG_create_handle_keep() 95 Chapter 17 - HTML Functions 97 CIMGLOW_set_html_capabilities() 97 CIMGLOW_set_html_home_dir() 98 CIMGLOW_set_html_image_capability() 99 CIMGLOW_set_html_input() 99 CIMGLOW_set_html_javascript_capability() 100 CIMGLOW_set_html_page_size() 100 CIMGLOW_set_html_page_size_ratio() 101 CIMGLOW_set_html_page_size_ratio_capability() 101 CIMGLOW_set_html_screen_dpi() 102 CIMGLOW_set_html_use_page_breaks_exclusively() 102 CIMGLOW_set_html_utf_bom() 103 Chapter 18 - Open Office 2007 XML (OOXML) Functions 106 CIMGLOW_set_ooxml_license() 106 7 Chapter 19 - Image Saving Functions 107 CIMG_save_bitmap() 107 CIMG_save_bitmap_fd() 108 CIMG_save_bitmap_mem() 109 CIMGLOW_write_tiff_stream() 109 Chapter 20 - Image Saving Option Functions 111 CIMG_set_encrypt() 111 CIMGLOW_set_comp_quality() 112 CIMGLOW_set_image_orientation() 112 CIMGLOW_set_jpeg2000_comp_ratio() 113 CIMGLOW_set_jpg_interleave() 113 CIMGLOW_set_pdf_output() 114 CIMGLOW_set_tiff_save_strips 114 CIMGLOW_set_tiff_tag() 115 Chapter 21 - Image Display Functions 117 bool repaintBackground() 117 CIMG_display_bitmap() 118 CIMG_display_bitmap_aspect() 119 CIMG_display_bitmap_transp() 120 CIMG_display_ddb() 121 CIMG_display_fit_to_height() 121 CIMG_display_fit_to_width() 122 CIMG_set_croprect() 123 CIMG_set_croprect_scroll() 123 8 CIMG_zoom_bitmap() 124 CIMG_zoom_bitmap_1_to_1() 125 CIMG_zoom_bitmap_rect() 125 CIMGLOW_map_image_to_wnd() 126 CIMGLOW_map_wnd_to_image() 126 double calcAspectZoom() 127 removeScrollbars() 128 Chapter 22 - Image Display Option Functions 129 CIMG_animate() 129 CIMG_bitmap_palette() 130 CIMG_display_ddb_effect() 130 CIMG_set_gamma() 132 CIMG_set_lut() 132 CIMG_window_level() 133 CIMGLOW_autocolor() 133 CIMGLOW_set_alias() 134 CIMGLOW_set_alias_quality() 135 CIMGLOW_set_dithermode() 135 CIMGLOW_set_imnet_page_size() 136 CIMGLOW_set_rop() 137 CIMGLOW_set_transp_color() 138 CIMGLOW_set_wipedelay() 139 Chapter 23 - Information Query Functions 140 CIMG_bitmap_info() 141 9 CIMG_get_bitmap_palette() 142 CIMG_get_croprect() 142 CIMG_get_display_rect() 143 CIMG_ifl_version() 143 CIMGLOW_get_anim_delay() 144 CIMGLOW_get_auto_detect() 144 CIMGLOW_get_bitmap_header() 145 CIMGLOW_get_bitmap_name() 145 CIMGLOW_get_custstring() 146 CIMGLOW_get_fileinfo() 146 CIMGLOW_get_fileinfo_fd() 147 CIMGLOW_get_fileinfo_page() 148 CIMGLOW_get_fileinfo_fd() 148 CIMGLOW_get_filetype() 149 CIMGLOW_get_filetype_fd() 149 CIMGLOW_get_filetype_mem() 150 CIMGLOW_get_filetype_url() 150 CIMGLOW_get_image_orientation_page() 151 CIMGLOW_get_pages() 151 CIMGLOW_get_pages_fd() 152 CIMGLOW_get_pages_mem() 153 CIMGLOW_get_pages_url()