RasterMaster® SDK RasterMaster ActiveX V18.3 Programmer’s Reference Guide

Note: An online version of this manual contains information on the latest updates to RasterMaster. 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-0121-07 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) 1999-2009 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 252.227 –19 or subparagraphs (c)(i) and (2) of the Commercial Computer Software-Restricted Rights at 48 CFR 52.227 – 19 as applicable. The Manufacturer is Snowbound Software Corporation, 309 Waverley Oaks Rd., Suite 401, Waltham, MA 02452, USA. All other trademarks and registered trademarks are the property of their respective holders. Manual Title: Snowbound RasterMaster® for ActiveX Platform Programmer’s Reference Guide Part Number:DOC-0121-07 Revision: 7 RasterMaster for the ActiveX Platform Release Number: 18.3 RasterMaster® SDK Release Number: 18.3 Printing Date: January 2014 Published by Snowbound Software Corporation. 309 Waverley Oaks Road Suite 401 Waltham, MA 02452 USA phone: 617-607-2000 fax: 617-607-2002 ©1996 - 2014 by Snowbound Software Corporation. All rights reserved. Table of Contents

Chapter 1 - Additions and Improvements 24

Version 18.3 Additions and Improvements 24

New Features 24

Chapter 2 - Quick Start 25

Getting Started 25

Quickly Getting Started with the Format Conversion Sample 25

Viewing Samples Packaged with the Library 26

Sample Directory 26

Image Property 28

System Overview 29

Determining System Requirements 29

Determining Memory Requirements 31

Chapter 3 - Custom Control Properties 33

Properties Overview 39

About Property 39

ActiveImage Property 40

ActivePage Property 40

Alias Property 41

AnimateImage Property 42

AsciiBold Property 42

AsciiCharsPerLine Property 43

AsciiFont Property 44

iii AsciiItalic Property 44

AsciiLinesPerPage Property 45

AsciiMarginBottom, AsciiMarginTop Property 46

AsciiMarginLeft, AsciiMarginRight Property 47

AsciiPageHeight, AsciiPageWidth Property 47

AsciiPointSize Property 48

AsciiTab Property 49

AsciiXdpi, AsciiYdpi Property 49

AspectRatio Property 50

AutoColor Property 51

AutoCrop Property 52

AutoOrient Property 52

AutoRedraw Property 53

AutoReduce Property 54

AutoResizeX, AutoResizeY Property 54

AutoSize Property 55

BackColor Property 56

BayerColor Property 57

BayerMono Property 57

BlankControl Property 58

BorderStyle Property 58

Brightness Property 59

ClearImage Property 60

CmykToRGB Property 61

iv Contrast Property 61

Copy Property 62

CropXpos, CropYpos Property 63

CropXsize, CropYsize Property 64

DecompressScreen Property 65

DelImage Property 66

Deskew Property 66

Despeckle Property 67

Dialation Property 68

DibToRuns Property 68

DiffusionColor Property 69

DiffusionMono Property 69

DitherMode Property 70

DragIcon Property 70

DragMode Property 71

DrawMode Property 72

EdgeDetect Property 73

Effect Property 74

Encrypt Property 75

ErrorStr Property 75

ExtractBuff Property 76

ExtractText Property 76

Fax Property 77

FaxOffset Property 78

v FaxType Property 78

FaxXsize, FaxYsize Property 78

FileType Property 79

FileTypeName Property 79

FileTypeStr Property 80

FillColor Property 80

FillOrder Property 81

FitToHeight Property 81

FitToWidth Property 82

Filter Property 82

FlipX Property 83

FlipY Property 83

Gamma Property 84

GetBuffer Property 85

GetBytes Property 85

GetFileInfo Property 85

GetYpos Property 86

Gray Property 86

HalftoneMono Property 87

Height, Width Property 87

HelpContextID Property 87

HistoGramEqualize Property 88

HorzEdgeDetect Property 88

Image Property 89

vi ImageAccel Property 90

ImageAccelRot Property 91

ImageBitspix Property 91

ImageDate Property 92

ImageDib Property 92

ImageError Property 93

ImageHeight, ImageWidth Property 93

ImageName Property 94

ImagePosX, ImagePosY Property 94

ImageXdpi, ImageYdpi Property 95

Index Property 96

Interp Property 96

Invert Property 97

IsolatePoints Property 97

JpegInterleave Property 98

Laplacian Property 99

Left Property 100

MedianCut Property 100

MemLoad Property 100

MemSave Property 101

MergeMem Property 101

Mergename Property 102

MergeXpos, MergeYpos Property 103

MergeXsize, MergeYsize Property 104

vii Name Property 104

Neg45EdgeDetect Property 104

OctreeBpp Property 105

OctreeColors Property 106

OctreePal Property 107

OctreeStart Property 108

Orientation Property 109

Overlay Property 109

Page Property 110

Pages Property 110

Palette Property 111

PanWindow Property 112

Paste Property 112

PDFBitsPerPixel Property 113

PdfDpi Property 113

PdfXPageSize Property 113

PdfYPageSize Property 114

Picture Property 114

PixelValue Property 115

PixelXpos/PixelYpos Property 115

Popularity Property 116

Pos45EdgeDetect Property 116

PrintFast Property 117

PrintImage Property 118

viii PrintSize Property 119

PrintXs, PrintYs Property 120

PrintXsize, PrintYsize Property 120

Promote24, Promote8 Property 121

PutBuffer Property 122

PutBytes Property 122

PutYpos Property 122

Redraw Property 123

Resize Property 124

ResizeHeight, ResizeWidth Property 124

RGBToCmyk Property 125

RobertsCross Property 125

Rotate Property 126

RotateScreen Property 127

RunsToDib Property 128

Save Property 128

SaveFormat Property 129

SaveQuality Property 129

ScanAcquire Property 130

ScanAcquireFeeder Property 130

ScanBits Property 131

ScanBottom, ScanLeft, ScanRight, ScanTop Property 132

ScanCap Property 132

ScanCapGet Property 132

ix ScanCapValue Property 133

ScanCloseFeeder Property 133

ScanDuplex Property 134

ScanFast Property 134

ScanHres, ScanVres Property 135

ScanOpenSource Property 135

ScanPages Property 136

ScanSetup Property 136

ScrollBars Property 137

Select Property - VBXSelectflag Property - ActiveX 138

SetFormat Property 139

Sharpness Property 139

Showui Property 140

SizeControl Property 141

Status Property 142

TabIndex Property 142

TabStop Property 142

TagString/TagValue Property 143

Tag Property 143

TagtoRead Property 143

Thresh Property 144

TiledImage Property 144

Top Property 144

TranspColor Property 145

x TSCase Property 145

TSEnable Property 145

TSstring Property 146

UnSetFormat Property 146

UseDDBs Property 147

UseHdib Property 148

Version Property 148

VertEdgeDetect Property 148

Visible Property 149

WindowLevel Property 150

WhatsThisHelpID Property 150

WipeDelay Property 151

Zoom Property 151

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property 153

Chapter 4 - AFP Font Mapping Property 154

AFP Font Mapping 154

Format of Font Mapping Data 154

FontMapPath Property 155

Chapter 5 - Properties by Category 156

Importing, Loading, Displaying and Saving Images Properties 156

ASCII Import Properties 157

Color Reduction Properties 157

Image Processing and Manipulation Function Properties 157

Sobel Image Processing Properties 158

xi Status And Informational Properties 158

Printing Properties 158

Gray Scale Images 159

PrintFast 159

PrintImage for Printing Bitmaps 159

Printing Large Documents 159

Scanning Properties 160

Steps for Scanning 160

Chapter 6 - Saving and Reading Multi-page Images 162

Multi-page Images 162

Supported Multi-page Formats 162

Decompressing a Multi-page Image 162

Determining Multi-page Page Count 162

Saving Multi-page File Formats 163

Multi-page Format Properties 163

Chapter 7 - Conversion 164

Converting File Formats 164

Automatically Detecting File Formats 164

Supported Pixel Depths 164

Converting Up 8 or 24-bit Pixel Depths 164

Converting from 24 or 8-bit 165

File Format Conversion Error Messages 165

Chapter 8 - Image Compression 166

Preferred Formats 166

xii 24-Bit Color Images 166

8-Bit Gray Scale Images 166

1-bit Bi-Level Images 166

Chapter 9 - Display Quality 167

24-Bit Images 167

24-Bit Images Displayed on 256 Color Adapters 167

Best Quality For 24-Bit Images 167

Bi-Level and 1-Bit Pixel Images 167

Using the Alias Property 168

Large Images 168

Scale to Gray 168

Preserve To Black 168

Chapter 10 - Installing and Distributing an ActiveX 169

ActiveX Overview 169

Installing an ActiveX for Visual Basic 169

ActiveX Distribution Problems 169

Problems Using ActiveX 170

Dependency Walker 170

Chapter 11 - OCX/VBX Properties 171

AnnActivate Property 172

AnnAddBitmap Property 172

AnnAddObject Property 172

AnnAddText Property 173

AnnChooseColor Property 173

xiii AnnChooseFont Property 173

AnnChooseLineStyle Property 174

AnnChooseLineWidth Property 174

AnnCreate Property 175

AnnFontItalic Property 175

AnnGetText Property 175

AnnLoadBitmap Property 175

AnnMerge Property 176

AnnMergeFile Property 176

AnnMode Property 176

AnnObject Property 177

AnnObjectNum Property 177

AnnPrint Property 177

AnnRead Property 178

AnnSetBcolor Property 178

AnnSetFcolor Property 178

AnnSetFontHeight Property 178

AnnSetFontName Property 179

AnnSetFontWeight Property 179

AnnSetLineStyle Property 179

AnnSetLineWidth Property 179

AnnSetObjectNum Property 180

AnnWrite Property 180

Annotation Constants 180

xiv Chapter 12 - Working with PDF and Other Document File Formats 181

Working with Document File Formats 181

Saving 181

Reading and Writing Support for PDF File Formats 182

Reading or Decompressing a PDF Document 182

Saving to a PDF Document 183

Working with Black and White Images 183

Working with Color Images 183

Changing Output Page Size 183

Performance 183

Appendix A - Supported File Formats 184

Descriptions of Supported File Formats 184

File Type Constants Listed by File Type Number 200

Appendix B - Software Installation 203

Overview of the Installation Process 203

Minimum Requirements 204

What to Expect When Installing an Evaluation Version 204

What to Expect in a Production Version 204

Installing the Production Version of RasterMaster ActiveX 205

Installing the Software 205

Directory Structure 211

Installed Files 211

Main Directory Files 212

Docs Directory 212

xv Marketing Directory Files 212

Sample Directory 213

Appendix C - Samples Using Visual Basic V4.0 216

Animate 217

Annotate 217

BritCnst 218

Copying 219

Events 220

File Info 221

ImageView 222

LoadFile 224

LoadText 225

Merge 226

Multiple 226

Octree 227

Pan 228

Picture 229

Print 229

Resize 230

Rotate 230

SaveMem 230

Scan 232

Zoom 233

Appendix D - Samples Using Visual Basic V5.0 235

xvi Annotation 235

BatchConvert 237

ImageView 238

Multi-page 240

Pan 241

SaveMem 241

Scan 243

Thumbnail 244

Appendix E - Samples Using Visual Basic V6.0 246

Format Conversion 246

Text Search and Extract 246

Appendix F - Using RasterMaster ActiveX with Visual Basic .NET 248

Setting Up .NET 248

Creating a New Project 248

Adding the Snowbound Control to the Toolbox 249

Adding the Control to the Form 250

Appendix G - Using RasterMaster ActiveX with Visual C# .NET 252

Setting Up .NET 252

Creating a New Project 252

Adding the Snowbound Control to the Toolbox 255

Adding the Control to the Form 257

Building Your Application for Distribution 260

Appendix H - TIFF Tags 262

Sources for Tag Specifications 262

xvii Descriptions of Tags in Numerical Order 263

Appendix I - Snowbound Error Codes 290

Detailed Status/Error Codes 290

General Error Define Values Retrieved from Status Property 293

General Status/Error Codes 293

Appendix J - Troubleshooting 295

Receiving an Error Code When Loading, Saving or Converting a Document 295

Output Document Differs from Original Document 295

Output Document Displays Incorrect or Missing Characters 295

Identifying an Unknown File Format 295

Scanning Error 296

Color Annotations Appear Black and White or Not at All 296

Receiving a -3 Corrupted File Error code 296

Overlay Resources Not Pulled into APF or MODCA Document 296

Searching for Text in a Snowbound Software Generated PDF 296

Some TIFF_JPEG Files Produced By RasterMaster ActiveX Do Not Open In Third Party Image Viewers 296

xviii List of Tables

Table 2.1: RasterMaster ActiveX Samples Directory 26

Table 2.2: Memory Requirements Based on Image Size 31

Table 3.1: About Property Settings 39

Table 3.2: Alias Property Settings 41

Table 3.3: AsciiBold Property Settings 42

Table 3.4: AsciiItalic Property Settings 44

Table 3.5: AspectRatio Property Settings 51

Table 3.6: AutoColor Property Settings 51

Table 3.7: AutoRedraw Property Settings 53

Table 3.8: AutoReduce Property Settings 54

Table 3.9: AutoSize Property Settings 55

Table 3.10: BayerColor Property Settings 57

Table 3.11: BayerMono Property Settings 57

Table 3.12: BlankControl Property Settings 58

Table 3.13: BorderStyle Property Settings 59

Table 3.14: Brightness Property Settings 59

Table 3.15: ClearImage Property Settings 60

Table 3.16: CmykToRGB Settings 61

Table 3.17: Contrast Property Settings 61

Table 3.18: Copy Property Settings 62

Table 3.19: DelImage Property Settings 66

Table 3.20: Deskew Property Setting 67

Table 3.21: Despeckle Property Settings 67

xix Table 3.22: Dialation Property Settings 68

Table 3.23: DiffusionColor Property Settings 69

Table 3.24: DiffusionMono Property Settings 69

Table 3.25: DitherMode Property Settings 70

Table 3.26: Draglcon Property Settings 71

Table 3.27: DragMode Property Settings 71

Table 3.28: DrawMode Property Settings 72

Table 3.29: EdgeDetect Property Settings 73

Table 3.30: Effect Property Settings 74

Table 3.31: FaxType Property Settings 78

Table 3.32: FillOrder Property Settings 81

Table 3.33: Filter Property Settings 82

Table 3.34: FlipX Property Settings 83

Table 3.35: FlipY Property Settings 84

Table 3.36: Gamma Property Settings 84

Table 3.37: Gray Property Settings 86

Table 3.38: HalftoneMono Property Settings 87

Table 3.39: HelpContextID Property 88

Table 3.40: HorzEdgeDetect Property Settings 88

Table 3.41: ImageAccel Property Settings 91

Table 3.42: Interp Property Settings 96

Table 3.43: Invert Property Settings 97

Table 3.44: IsolatePoints Property Settings 97

Table 3.45: JpegInterleave Property Settings 98

xx Table 3.46: Laplacian Property Settings 99

Table 3.47: MedianCut Property Settings 100

Table 3.48: Neg45EdgeDetect Property Settings 105

Table 3.49: OctreeStart Property Settings 108

Table 3.50: Palette Property Settings 111

Table 3.51: Paste Property Settings 112

Table 3.52: PdfXPageSize Property Setting 113

Table 3.53: PdfYPageSize Property Settings 114

Table 3.54: Popularity Property Settings 116

Table 3.55: Pos45EdgeDetect Property Settings 116

Table 3.56: PrintSize Property Settings 119

Table 3.57: PrintXs, PrintYs Property Settings 120

Table 3.58: PrintXsize, PrintYsize Property Settings 121

Table 3.59: Promote24, Promote8 Property Settings 121

Table 3.60: Redraw Property Settings 123

Table 3.61: Resize Property Settings 124

Table 3.62: RobertsCross Property Settings 125

Table 3.63: RunsToDib Property Settings 128

Table 3.64: ScanAcquire Property Settings 130

Table 3.65: ScanAcquireFeeder Property Settings 130

Table 3.66: ScanCloseFeeder Property Settings 133

Table 3.67: ScanOpenSource Property Settings 135

Table 3.68: ScrollBars Property Settings 137

Table 3.69: Sharpness Property Settings 139

xxi Table 3.70: Showui Property Settings 140

Table 3.71: SizeControl Property Settings 141

Table 3.72: Status Property Settings 142

Table 3.73: TSCase Property Settings 145

Table 3.74: TSEnable Property Setting 146

Table 3.75: UseDDBs Property Settings 147

Table 3.76: VertEdgeDetect Property 149

Table 3.77: Visible Property Settings 149

Table 3.78: WindowLevel Property Settings 150

Table 3.79: Zoom Property Settings 152

Table 4.1: Description of the sample entry in the snbd_map.fnt file 155

Table 5.1: Importing, Loading, Displaying, and Saving Image Properties 156

Table 5.2: Importing ASCII File Properties 157

Table 5.3: Permanently Reducing Image Bit Pixel Properties 157

Table 5.4: Changing Image Data Directory Properties 157

Table 5.5: Sobel Image Processing Properties 158

Table 5.6: Image Status and Informational Information Properties 158

Table 5.7: Printing and Page Size Properties 158

Table 5.8: Scanning Properties 160

Table 6.1: Supported Multi-page Properties 163

Table 11.1: AnnChooseColor Property Settings 173

Table 11.2: AnnChooseFont Property Settings 174

Table 11.3: AnnChooseLineStyle Property Settings 174

Table 11.4: AnnChooseLineWidth Property Settings 174

xxii Table 11.5: AnnFontItalic Property Settings 175

Table 11.6: AnnMerge Property Settings 176

Table 11.7: AnnMode Property Settings 176

Table 11.8: AnnPrint Property Settings 177

Table 11.9: AnnSetLineStyle Property Settings 179

Table 11.10: Annotation Constants 180

Table 12.1: PdfXPageSize Property Setting 182

Table 12.2: PdfYPageSize Property Settings 182

Table A.1: File Format Key 184

Table A.2: Supported File Format Descriptions 184

Table A.3: File Type Constants listed by File Type Number 200

Table B.1: RasterMaster ActiveX Default Directory Files 212

Table B.2: RasterMaster ActiveX Product Documentation Directory Files 212

Table B.3: RasterMaster ActiveX Marketing Directory Files 212

Table B.4: RasterMaster ActiveX Samples Directory 213

Table H.1: TIFF Tags in Numerical Order1 263

Table I.1: Error Codes 290

Table I.2: General Error Define Values Retrieved from Status Property 293

Table I.3: General Status/Error Codes 293

xxiii Chapter 1 - Additions and Improvements

Chapter 1 - Additions and Improvements

This chapter describes the latest additions and improvements to the software.

Version 18.3 Additions and Improvements

The following are the new features and formats added to Version 18.3 of the RasterMaster ActiveX Imaging SDK and Library.

New Features

The following are the new features added to Version 18.3 of the product.

l Multiple enhancements and bug fixes to the Word file format.

l Multiple enhancements and bug fixes to the PDF file format.

l Multiple enhancements and bug fixes to the PCL file format.

l Multiple enhancements and bug fixes to the AFP file format.

24 Chapter 2 - Quick Start

Chapter 2 - Quick Start

This chapter describes how to quickly get a new user started with RasterMaster ActiveX.

If you do not find the information that you are looking for in this manual, please open a support ticket at http://support.snowbound.com to request a specific sample, for clarification of a method description or to help you find the information they need. We are dedicated to helping our customers succeed and we are constantly enhancing our products based on feedback from customers like you.

Getting Started

This section describes how to get started with RasterMaster ActiveX. To decompress and display images using RasterMaster ActiveX:

1. Double-click the Snowbound Icon in the Toolbox. This places the image control onto the current open form. The control appears small at first.

Note: If the Snowbound custom control is not in the toolbox, see Custom Controls for information on how to add a custom control to the toolbox.

2. Select a handle of the control to enlarge the image control window to the size you want.

3. Set the properties for your specific applications’ needs. You may also set the properties of the control programmatically at run-time.

Setting only one property decompresses and displays the image to the Snowbound image control.

Quickly Getting Started with the Format Conversion Sample

The fastest way to get started is to run the Format Conversion sample that is included with this product. You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples. The Format Conversion sample will convert any supported document type into the file format you request and then display it. For more information, please see Appendix E, Samples Using Visual Basic V6.0 on how to find and run the Format Conversion sample.

The Format Conversion sample uses three routines that are at the heart of RasterMaster:

25 Chapter 2 - Quick Start

1. Image Property - decompresses and displays the image to the current control.

2. SaveFormat Property - saves an image to disk when used with the Save property.

3. Save Property - saves an image by passing in the name of the image to save.

The properties 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 6, 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.

3. How to extract text and search for text in documents. 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 RasterMaster in conjunction with OCR tools from other companies if you need to extract text from scanned document images.

We include a lot of code samples to help you get started. These samples are listed in Appendix C, Samples Using Visual Basic V4.0, Appendix D, Samples Using Visual Basic V5.0 and Appendix E, Samples Using Visual Basic V6.0. 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 http://support.snowbound.com.

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

Table 2.1: RasterMaster ActiveX Samples Directory

Sample Description Allows you to decompress and play a supported Animate_VB4 animation image file. See Animate for more information. Shows you the use of most annotation methods. In this sample, you can create an annotation Annotate_VB4 object such as 'Fill Rectangle' and/or 'Highlight Rectangle' as well as many others. See Annotate for more information. Shows you the use of most annotation methods. Annotate_VB5 In this sample, you can create an annotation

26 Chapter 2 - Quick Start

Sample Description object such as 'Fill Rectangle' and/or 'Highlight Rectangle' as well as many others. See Annotation for more information. Loops through the specified source directory and converts files, based on the selected source file BatchConvert_VB5 format and places them into the destination directory. See BatchConvert for more information. Compares an image that had brightness and contrast changes made with the BritCnst_VB4 original/unmodified image. See BritCnst for more information. Demonstrates how to create a copy of an image Copying_VB4 file decompressed into a Snowbound Object. See Copying for more information. Demonstrates how to use the Snowbound Events_VB4 ActiveX events to retrieve and set properties and data. See Events for more information. Demonstrates two ways of gathering an image FileInfo_VB4 file information. See File Info for more information. Demonstrates two ways of loading and viewing ImageView_VB5 an image file. See ImageView for more information. Demonstrates the loading and displaying of Loadfile_VB4 ASCII (multi-page) text files. See LoadFile for more information. Demonstrates the loading and displaying of Loadtext_VB4 ASCII (multi-page) text files. See LoadText for more information. Allows displaying of images with XORing and Merge_VB4 ANDing Boolean operations. See Merge for more information. Displays multiple images through a Snowbound Multiple_VB4 Object Array. See Multiple for more information. Demonstrates the Octree Color Reduction Octree_VB4 algorithm. See Octree for more information. Demonstrates how to create a view panel that Pan_VB4 magnifies the image at the selected mouse position. See Pan for more information. Demonstrates how to create a view panel that Pan_VB5 magnifies the image at the selected mouse position. See Pan for more information. Demonstrates how to copy an image from a Picture_VB4 Visual Basic PictureBox control to a Snowbound Object. See Picture for more

27 Chapter 2 - Quick Start

Sample Description information. Demonstrates how to quickly print ¼, ½, ¾, or Print_VB4 the full page of an image. See Print or more information. Demonstrates a simple way to create a Resize_VB4 thumbnail. See Resize for more information. Demonstrates the quickest way to rotate an Rotate_VB4 image on screen to 0, 90, 180, or 270 degrees. See Rotate or more information. Shows the properties associated with saving and SaveMem_V54 loading an image from a memory pointer. See SaveMem for more information. Demonstrates how to select the scanner device. Scan_VB4 See Scan for more information. Demonstrates how to select the scanner. See Scan_VB5 Scan for more information. Demonstrates how to decompress and save an SetPDFOutputSizePerPage_VB6 image into another format. It uses an input file, save format type, and output filename. Demonstrates how to decompress and save an image into another format. It uses an input file, SimpleConversionDM_VB6 save format type, and output filename. See Format Conversion for more information. Demonstrates how to split a given multi-page file into single page files and/or saves all images from SimpleMultipageSavingSplittingSM_VB6 a directory into one multi-page file. See Multi- page for more information. Demonstrates how to search for a given text Text_Search_Extract_VB6 string and extract that text from a given file. See Text Search and Extract for more information. Shows the methods associated with saving and Thumbnail_VB5 loading an image from a memory pointer. See Thumbnail for more information. Shows the methods associated with resizing WatermarkOCXSample watermark images and throws an exception if it fails. Demonstrates several types of zooming properties as well as how they react when Zooming_VB4 rotating. See Zoom for more information.

Image Property

This property is used to decompress and display the image to the current control.

28 Chapter 2 - Quick Start

Syntax

[form.]Snowbound.Image[ = String$]

Example 2.1:Image Property

Dim filename As String

>Set the Image to Display. filename = "C:\IMAGES\SIMON.JPG"

>Display the image in the Snowbound control. Snowbound.Image = filename

>Check For Display Error. A Negative Value. If Snowbound.ImageError < 0 Then

‘ If Error - Display to Status Box. ErrorStat.Text = Snowbound.ErrorStr

>Display message to the user depending on >error. Select Case ImageError ... End Select End If

The input filename is a standard string pointing to the image filename. Display for the ActiveX is automatic when Redraw is set to True. See Redraw Property for more information.

You may also set Drive/Directory/File list boxes which lead the user to the desired images to display.

The image is deleted when the control is terminated by the application. You may have as many instances of the Snowbound ActiveX control as desired.

Please refer to Image Property and Redraw Property for detailed property explanations. See Custom Control Properties for full descriptions of all system properties.

System Overview

RasterMaster ActiveX includes the technical specifications described below..

Determining System Requirements

System requirements to run RasterMaster ActiveX include:

29 Chapter 2 - Quick Start

l Supported Operating Systems:

l Microsoft Windows 7 (32 and 64 bit)

l Microsoft Windows XP (32 and 64 bit)

l Microsoft Windows Server 2003

l Microsoft Windows Server 2008

l Supported Platforms:

l Intel x86

l Intel x64

l AMD

l AMD 64

l Development Environments:

l MSVC ++

l MFC

l Visual Studio

l Visual Basic

l Powersoft Powerbuilder

l Borland Delphi

l Minimum memory requirements are related to image size and necessary buffers. Buffers may require multiple megabytes if images are large. For more information, please see Determining Memory Requirements.

l Native Language of Library

l 32-bit code for all operating systems

l 64-bit code for 64 bit Windows OS

30 Chapter 2 - Quick Start

The amount of memory required to view documents varies depending on the size of the documents you are processing and the number of documents you are processing at any one time. The amount of memory needed increases as:

l You go from small index card size images to large blueprint size images (number of pixels increases).

l You go from compressed to uncompressed document formats (lossy compression to raw image data).

l You go from low resolution to high resolution documents (dots per inch / quality increases).

l You go from small index card size images to large blueprint size images (number of pixels increases).

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--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:

l Decrease the quality of the images requested by decreasing bits per pixel, the resolution, or the size.

l Decrease the number of documents you have open at any one time.

To calculate the amount of memory required for an image, you will need to know the size of the image in pixels and the number of bits per pixel in the image (black and white=1, grayscale=8, color=24). If you do not know the height or width in pixels, but you do know the size in inches and the dpi (dots per inch) of the image, then you can calculate the size in pixels as (width_in_inches*dots_per_inch) = width_in_pixels.

To calculate the amount of memory (in bytes), multiply the height, width and number of bits per pixel. Then, divide by 8 to convert from bits to bytes. See the following example:

(height_in_pixels * width_in_pixels * bits_per_pixel)/ 8 = image_size_in_bytes

Table 2.2: Memory Requirements Based on Image Size

31 Chapter 2 - Quick Start

Image Size Required Memory 24-bit per pixel, 640 x 480 image 640 * 480 * (24 / 8) = 921600 bytes 1-bit per pixel, 8.5" x 11" image, at 2550 * 3300 * (1 / 8) = 1051875 bytes 300 dpi (2550 pixels by 3300 pixels) 24-bit per pixel, 8.5" x 11" image, at 2550 * 3300 * (24 / 8) = 25245000 bytes (25 300 dpi (2550 pixels by 3300 pixels) megabytes)

32 Chapter 3 - Custom Control Properties

Chapter 3 - Custom Control Properties

This chapter describes the properties within the RasterMaster ActiveX custom control. This chapter contains the following topics:

Properties Overview

About Property

ActiveImage Property

ActivePage Property

Alias Property

AnimateImage Property

AsciiBold Property

AsciiCharsPerLine Property

AsciiFont Property

AsciiItalic Property

AsciiLinesPerPage Property

AsciiMarginBottom, AsciiMarginTop Property

AsciiMarginLeft, AsciiMarginRight Property

AsciiPageHeight, AsciiPageWidth Property

AsciiPointSize Property

AsciiTab Property

AsciiXdpi, AsciiYdpi Property

AspectRatio Property

AutoColor Property

AutoCrop Property

AutoOrient Property

AutoRedraw Property

AutoReduce Property

AutoResizeX, AutoResizeY Property

AutoSize Property

BackColor Property

33 Chapter 3 - Custom Control Properties

BayerColor Property

BayerMono Property

BlankControl Property

BorderStyle Property

Brightness Property

ClearImage Property

CmykToRGB Property

Contrast Property

Copy Property

CropXpos, CropYpos Property

CropXsize, CropYsize Property

DecompressScreen Property

DelImage Property

Deskew Property

Despeckle Property

Dialation Property

DibToRuns Property

DiffusionColor Property

DiffusionMono Property

DitherMode Property

DragIcon Property

DragMode Property

DrawMode Property

EdgeDetect Property

Effect Property

Encrypt Property

ErrorStr Property

ExtractBuff Property

ExtractText Property

Fax Property

34 Chapter 3 - Custom Control Properties

FaxOffset Property

FaxType Property

FaxXsize, FaxYsize Property

FileType Property

FileTypeName Property

FileTypeStr Property

FillColor Property

FillOrder Property

FitToHeight Property

FitToWidth Property

Filter Property

FlipX Property

FlipY Property

Gamma Property

GetBuffer Property

GetBytes Property

GetFileInfo Property

GetYpos Property

Gray Property

HalftoneMono Property

Height, Width Property

HelpContextID Property

HistoGramEqualize Property

HorzEdgeDetect Property

Image Property

ImageAccel Property

ImageAccelRot Property

ImageBitspix Property

ImageDate Property

ImageDib Property

35 Chapter 3 - Custom Control Properties

ImageError Property

ImageHeight, ImageWidth Property

ImageName Property

ImagePosX, ImagePosY Property

ImageXdpi, ImageYdpi Property

Index Property

Interp Property

Invert Property

IsolatePoints Property

JpegInterleave Property

Laplacian Property

Left Property

MedianCut Property

MemLoad Property

MemSave Property

MergeMem Property

Mergename Property

MergeXpos, MergeYpos Property

MergeXsize, MergeYsize Property

Name Property

Neg45EdgeDetect Property

OctreeBpp Property

OctreeColors Property

OctreePal Property

OctreeStart Property

Orientation Property

Overlay Property

Page Property

Pages Property

Palette Property

36 Chapter 3 - Custom Control Properties

PanWindow Property

Paste Property

PdfBitsPerPixel Property

PdfDpi Property

PdfXPageSize Property

PdfYPageSize Property

Picture Property

PixelValue Property

PixelXpos/PixelYpos Property

Popularity Property

Pos45EdgeDetect Property

PrintFast Property

PrintImage Property

PrintSize Property

PrintXs, PrintYs Property

PrintXsize, PrintYsize Property

Promote24, Promote8 Property

PutBuffer Property

PutBytes Property

PutYpos Property

Redraw Property

Resize Property

ResizeHeight, ResizeWidth Property

RGBToCmyk Property

RobertsCross Property

Rotate Property

RotateScreen Property

RunsToDib Property

Save Property

SaveFormat Property

37 Chapter 3 - Custom Control Properties

SaveQuality Property

ScanAcquire Property

ScanAcquireFeeder Property

ScanBits Property

ScanBottom, ScanLeft, ScanRight, ScanTop Property

ScanCap Property

ScanCapGet Property

ScanCapValue Property

ScanCloseFeeder Property

ScanDuplex Property

ScanFast Property

ScanHres, ScanVres Property

ScanOpenSource Property

ScanPages Property

ScanSetup Property

ScrollBars Property

Select Property - VBX Selectflag Property - ActiveX

SetFormat Property

Sharpness Property

Showui Property

SizeControl Property

Status Property

TabIndex Property

TabStop Property

TagString/TagValue Property

Tag Property

TagtoRead Property

Thresh Property

TiledImage Property

Top Property

38 Chapter 3 - Custom Control Properties

TranspColor Property

TSCase Property

TSEnable Property

TSstring Property

UnSetFormat Property

UseHdib Property

Version Property

VertEdgeDetect Property

Visible Property

WindowLevel Property

WhatsThisHelpID Property

WipeDelay Property

Zoom Property

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property

Properties Overview

All of the Snowbound properties are listed in alphabetical order. The standard Microsoft Visual Basic properties that are found in the Snowbound custom control are discussed briefly in this manual.

Please refer to the Microsoft Visual Basic manuals for a full description of the properties and their use.

About Property

This property displays a small message box in the center of the control.

Syntax

[form.]Snowbound1.About[ = {True|False}]

Remarks

Table 3.1: About Property Settings

Setting Description True Displays a small message box. Design time only. False (Default) Does not display a message box.

39 Chapter 3 - Custom Control Properties

Data Type

Integer (Boolean)

Please refer to the Snowbound ImageView sample for examples of how to use this property.

ActiveImage Property

This property sets the MODCA:PTOCA or PDF image name from which to extract data. Used along with ActivePage, ExtractBuff, and ExtractText. See ActivePage Property, ExtractBuff Property, and ExtractText Property for more information.

Syntax

String$ = [form.]Snowbound1.ActiveImage

Data Type

String

Example 3.1:ActiveImage Property Extracting Text

Snbdocx.ActiveImage = “image.” Snbdocx.ActivePage = 0 Snbdocx.ExtractText = 1

‘Text is in the ExtractText property buffer.

ActivePage Property

This property sets the page number of the MODCA:PTOCA or PDF image from which to extract text. Used along with ActiveImage, ExtractBuff, and ExtractText. See ActiveImage Property, ExtractBuff Property, and ExtractText Property for more information.

Note: 0 is the the first page.

Syntax

Integer% = [form.]Snowbound1.ActivePage

Data Type

Returns the status of the active page. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I - Snowbound Error Codes for a list of error codes.

40 Chapter 3 - Custom Control Properties

Example 3.2:ActivePage Property Extracted Text

Snbdocx.ActiveImage = “image.pdf” Snbdocx.ActivePage = 0 Snbdocx.ExtractText = 1

‘Text is in the ExtractText property buffer.

Alias Property

This property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

Preserve Black (1) checks neighboring pixels for any adjacent black values and literally interpolates (inserts) black pixels so that any small black lines or objects are not lost when scaling a large black and white image. This aliasing property is recommended for large schematics and engineering drawings.

Scale to Gray (2) converts a black and white image to gray scale upon display when zooming out on a large drawing or document. It is recommended for use with documents or other images that contain text.

Scale to Color (3) is used when scaling down color images and prevents loss of visual data, creating a smoother rendering of text and lines.

Alias All (4) is the default setting and turns Scale to Gray and Scale to Color on at display time.

Syntax

[form.]Snowbound1.Alias[ = Setting%]

Remarks

Table 3.2: Alias Property Settings

Setting Description 0 Does no aliasing. 1 Uses the preserve black algorithm. 2 Uses the scale to gray algorithm. 3 Uses the scale to color algorithm. 4 (Default) Alias All. Uses scale to gray and scale to color.

Data Type

Returns the status of the alias property. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

41 Chapter 3 - Custom Control Properties

Please refer to the following Snowbound sample for examples of how to use this property:

l ImageView

l Pan

l SaveMem

AnimateImage Property

This property decompresses and plays all frames of a supported animated image in the current control.

Syntax

[form.]Snowbound1.AnimateImage[ = Setting%]

Data Type

Returns the status of the animated image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Animate Snowbound sample for examples of how to use this property.

AsciiBold Property

This property sets the bold font style for the imported ASCII text.

Syntax

[form.]Snowbound1.AsciiBold[ = {True|False}]

Remarks

Table 3.3: AsciiBold Property Settings

Setting Description True Sets the bold font style for the imported ASCII text. False (Default) Turns off the bold font of the import ASCII text.

Data Type

Returns the ASCII bold font style. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l ImageView

l LoadText

42 Chapter 3 - Custom Control Properties

Example 3.3: AsciiBold Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38 SnbdActiveX1.page = 0 ' Change the imported font property to Bold. SnbdActiveX1.AsciiBold = True SnbdActiveX1.Image = file1.filename

End Sub

AsciiCharsPerLine Property

This property sets the number of characters per line for the imported ASCII text.

Syntax

[form.]Snowbound1.AsciiCharsPerLine[ = Setting%]

Data Type

Returns the number of characters per line for ASCII text. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Example 3.4:AsciiCharsPerLine Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

SnbdActiveX1.AutoSize = 3 SnbdActiveX1.ScrollBars = False pagenum = 0 ' Use to set the number of characters you want to

' import per line.

SnbdActiveX1.AsciiCharsPerLine = 34

SnbdActiveX1.Image = file1.filename label2.Caption = SnbdActiveX1.Pages

43 Chapter 3 - Custom Control Properties

End Sub

AsciiFont Property

This property sets the font style name for the imported ASCII text.

Syntax

[form.]Snowbound1.AsciiFont[ = String$]

Data Type

Returns the ASCII font style name. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I - Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l ImageView

l LoadText

Example 3.5:AsciiFont Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

' Change the font of the imported ASCII file. SnbdActiveX1.AsciiFont = "Times New Roman"

SnbdActiveX1.Image = file1.filename

End Sub

AsciiItalic Property

This property sets the Italic font style for the imported ASCII text.

Syntax

[form.]Snowbound1.AsciiItalic [ = {True|False}]

Remarks

Table 3.4: AsciiItalic Property Settings

44 Chapter 3 - Custom Control Properties

Settings Description True Sets the font style to Italic. False (Default) Does not affect the imported ASCII text.

Data Type

Returns the ASCII Italic font style. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l ImageView

l LoadText

Example 3.6: AsciiItalic Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

' Set the Imported Font to Italic. Boolean Value. SnbdActiveX1.AsciiItalic = True

SnbdActiveX1.Image = file1.filename

End Sub

AsciiLinesPerPage Property

This property sets the number of lines per page for the imported ASCII text.

Syntax

[form.]Snowbound1.AsciiLinesPerPage[ = Setting%]

Data Type

Returns the ASCII lines per page. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound LoadText sample for examples of how to use this property.

Example 3.7:AsciiLinesPerPage Property

Private Sub File1_DblClick()

45 Chapter 3 - Custom Control Properties

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

' Set the maximum number of lines to import from ' the file.

SnbdActiveX1.AsciiLinesPerPage = 20

SnbdActiveX1.Image = file1.filename

End Sub

AsciiMarginBottom, AsciiMarginTop Property

These properties set the bottom and top margins for the page for the imported ASCII text. The units are in 1/1000 of an inch.

Syntax

[form.]Snowbound1.AsciiMarginBottom[ = Setting%]

[form.]Snowbound1.AsciiMarginTop[ = Setting%]

Data Type

Returns the ASCII top and bottom margins. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound LoadText sample for examples of how to use this property.

Example 3.8: AsciiMarginTop AsciiMarginBottom Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

' Set the top page margin to 1/2 inch. SnbdActiveX1.AsciiMarginTop = 500

' Set the Bottom page margin to 1 inch. SnbdActiveX1.AsciiMarginBottom = 1000

SnbdActiveX1.Image = file1.filename

46 Chapter 3 - Custom Control Properties

End Sub

AsciiMarginLeft, AsciiMarginRight Property

These properties specify the left and right margins for the imported ASCII text. The units are in 1/1000 of an inch.

Syntax

[form.]Snowbound1.AsciiMarginLeft[ = Setting%]

[form.]Snowbound1.AsciiMarginRight[ = Setting%]

Data Type

Returns the ASCII left and right margins. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound LoadText sample for examples of how to use this property.

Example 3.9: AsciiMarginLeft AsciiMarginRight Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

' Set the Left side page margin to 1/2 inch. SnbdActiveX1.AsciiMarginLeft = 500

' Set the Right side page margin to 1 inch. SnbdActiveX1.AsciiMarginRight = 1000

SnbdActiveX1.Image = file1.filename

End Sub

AsciiPageHeight, AsciiPageWidth Property

These properties set the page height and width for the imported ASCII text. The units are in 1/1000 of an inch.

47 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.AsciiPageHeight[ = Setting%]

[form.]Snowbound1.AsciiPageWidth[ = Setting%]

Data Type

Returns the ASCII page height and width. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound LoadText sample for examples of how to use this property.

Example 3.10:AsciiPageHeight AsciiPageWidth Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

' Set the Page Height to 11 inches. SnbdActiveX1.AsciiPageHeight = 11000

' Set the Page Width to 8-1/2 inch. SnbdActiveX1.AsciiPageWidth = 8500

SnbdActiveX1.Image = file1.filename

End Sub

AsciiPointSize Property

This property sets the text point size for the imported ASCII text. The units are in points.

Syntax

[form.]Snowbound1.AsciiPointSize[ = Setting%]

Data Type

Returns the ASCII text point size. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l ImageView

l LoadText

48 Chapter 3 - Custom Control Properties

Example 3.11: AsciiPointSize Property

Private Sub File1_DblClick()

' Set AUTO-DETECT to ASCII SnbdActiveX1.SetFormat = 38

' Change the Font Size to 10 Point. SnbdActiveX1.AsciiPointSize = 10

SnbdActiveX1.Image = file1.filename

End Sub

AsciiTab Property

This property sets the tab size for the imported ASCII text.

Syntax

[form.]Snowbound1.AsciiTab[ = Setting%]

Data Type

Returns the tab size. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I,Snowbound Error Codes for a list of error codes.

Example 3.12:AsciiTab Property

Private Sub File1_DblClick()

' Set AUTO-DETECT to ASCII SnbdActiveX1.SetFormat = 38

' Change the TAB spaces to 4. SnbdActiveX1.AsciiTab = 4

SnbdActiveX1.Image = file1.filename

End Sub

AsciiXdpi, AsciiYdpi Property

These properties set the X and Y dots per inch (DPI) for the imported ASCII text.

49 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.AsciiXdpi[ = Setting%]

[form.]Snowbound1.AsciiYdpi[ = Setting%]

Data Type

Returns the X and Y DPI for the imported text. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound LoadText sample for examples of how to use this property.

Example 3.13: AsciiXdpi AsciiYdpi Property

Private Sub File1_DblClick()

' SET AUTO-DETECT TO ASCII SnbdActiveX1.SetFormat = 38

' Sets the X and Y dots per inch (DPI) ' for the imported text. SnbdActiveX1.AsciiXdpi = 129 SnbdActiveX1.AsciiYdpi = 345

SnbdActiveX1.Image = file1.filename

End Sub

AspectRatio Property

This property sets the aspect ratio of the displayed image. Aspect Ratio preserves the native size of the image regardless of the size of the image control window. For example, if the image is 2 inches wide and the control is 4 inches wide, setting Aspect Ratio to True retains the proper size of the image. Setting Aspect Ratio to False forces the Snowbound control to fill the entire control window with the image. This may warp the appearance of the image.

If the image is not the same aspect ratio as the window, it is centered about the vertical or horizontal direction.

Note: It is recommended that this value be set to True.

Syntax

[form.]Snowbound1.AspectRatio[ = {True|False}]

50 Chapter 3 - Custom Control Properties

Remarks

Table 3.5: AspectRatio Property Settings

Setting Description (Default) Preserves the aspect ratio of the image when True drawn in the control. Centers the image in the window. Does not preserve the aspect ratio of the image in the False control. Fits the image to the image control.

Data Type

Returns the aspect ratio of the displayed image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Resize

l Zoom

AutoColor Property

This property is used when displaying multiple palette images. All images are dithered to a fixed palette for better quality display.

Note: Do not use this property when displaying one image at a time.

Syntax

[form.]Snowbound1.AutoColor[ = {True|False}]

Remarks

Table 3.6: AutoColor Property Settings

Setting Description True Utilizes AutoColor to display multiple palette images False (Default) Uses default image display

Data Type

Returns multiple palette images. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Multiple sample for examples of how to use this property.

51 Chapter 3 - Custom Control Properties

Example 3.14:AutoColor Property

Private Sub File1_DblClick()

... ' All images are dithered to a fixed palette for ' better quality display. ' Do Not Use When Displaying A Single Image. SnbdActiveX1(imgindex).AutoColor = True

' Load Memory First Or Directly To Screen? SnbdActiveX1(imgindex).DecompressScreen = file1.filename

End Sub

AutoCrop Property

This property automatically crops the current image. The borders are scanned until the first black pixels are found on the top, bottom, right, and left sides of the image.

The input value is a margin of the amount of white pixels to pad the image with on the top, bottom, right, and left sides.

Note: This property only works with 1-bit images. If you use this property with an image that is not a 1-bit image, you will get a PIXEL_DEPTH_UNSUPPORTED (-21) error message. See Appendix I, Snowbound Error Codes for a list of error codes.

Syntax

[form.]Snowbound1.AutoCrop[ = Setting%]

Data Type

Returns the status of the cropped image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

AutoOrient Property

This property detects and fixes the orientation of images for landscape or portrait mode. This is essentially a deskew for the case of 0 or 90 rotated images.

AutoOrient can be set with a 1. It is not turned on or off. It is just performed on the image once set to 1.

52 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.AutoOrient[ = Setting%]

Data Type

Returns the status of the automatic orientation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

AutoRedraw Property

This property automatically forces a redraw after most imaging operations such as rotate, flip, brightness, contrast, and others. This happens so changes are reflected in the displayed image.

Syntax

[form.]Snowbound1.AutoRedraw[ = {True|False}]

Remarks

Table 3.7: AutoRedraw Property Settings

Setting Description (Default) Automatically redraws the imported image in the True control window Does not redraw the imported image automatically upon False display

Data Type

Returns the status of the automatic redraw. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Example 3.15:AutoRedraw Property

Private Sub File1_DblClick() ...

' Sets The AutoRedraw To True SnbdActiveX1.AutoRedraw = True

' Display the image during decompression. SnbdActiveX1.DecompressScreen = file1.filename

End Sub

Please refer to the Snowbound ImageView sample for examples of how to use this property.

53 Chapter 3 - Custom Control Properties

AutoReduce Property

This property automatically scales images to the size specified by changing the bits per pixel of the image to the value passed into this property.

l Possible values are 1, 4, or 8.

l This property is used for displaying thumbnail images or when small images are desired.

Syntax

[form.]Snowbound1.AutoReduce[ = Setting%]

Remarks

Table 3.8: AutoReduce Property Settings

Settings Description 0 (Default) Does not affect the image bit depth Automatically reduces the bit depth on image load to the 1, 4, or 8 specified depth

Data Type

Returns the status of the automatic reduction. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

AutoResizeX, AutoResizeY Property

These properties scale the image to the size specified. This occurs at decompress time so minimal memory is used.

l To turn on, set to the destination size desired.

l To turn off, set both properties to 0.

Notes: Excellent for creating thumbnail images. The image is resized before being displayed.

Syntax

[form.]Snowbound1.AutoResizeX[ = Setting%]

[form.]Snowbound1.AutoResizeY[ = Setting%]

54 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the automatic resize. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Resize sample for examples of how to use this property.

Example 3.16:AutoResizeX AutoResizeY Property

Private Sub File1_DblClick()

' Don't Allow The Control To Resize. SnbdActiveX1.AutoSize = 1

' Set The Image Properties. SnbdActiveX1.AutoResizeX = hscroll1.Value SnbdActiveX1.AutoResizeY = hscroll2.Value

' Decompress And Display It. SnbdActiveX1.Image = file1.filename7

End Sub

AutoSize Property

This property sets the desired display method as it pertains to the current image control.

Syntax

[form.]Snowbound1.AutoSize[ = Setting%]

Remarks

Table 3.9: AutoSize Property Settings

Setting Description (Default) Fills the control window with the image fully 0 displayed 1 Displays the image with a 1-to-1 pixel correspondence Displays the image in the control window with a 1-to-1 2 pixel correspondence and centers the image in the control Displays the image with a 1-to-1 pixel correspondence 3 and resizes the window if the image is smaller than the control

55 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the automatic size. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Animate

l BritCnst

l Copying

l Events

l File Info

l LoadText

l Multiple

l Resize

l Zoom

Example 3.17: AutoSize Property

Private Sub File1_DblClick()

... ' Don't Allow The Control To Resize. SnbdActiveX1.AutoSize = 1 ' Decompress And Display It. SnbdActiveX1.Image = file1.filename

End Sub

BackColor Property

This property sets the background color of the current image control window. This is a standard property provided by Microsoft.

Use ClearImage to clear the image to the background color. See the ClearImage Property for more information.

Note: The default value is the system windows background color.

56 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.BackColor[ = Setting%]

Data Type

Returns the status of the background color. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

BayerColor Property

This property reduces the image to 4-bits using the Bayer dithering algorithm, which is a simple matrix dithering. It reduces 8, 24, or 32-bit images to 4-bit color.

Syntax

[form.]Snowbound1.BayerColor[ = {True|False}]

Remarks

Table 3.10: BayerColor Property Settings

Settings Description Reduces the image to 4 bits using the Bayer dithering True algorithm False (Default) Does not reduce the image

Data Type

Returns the status of the bayer color. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

BayerMono Property

This property reduces the image to 1-bit using the Bayer dithering algorithm, which is a simple matrix dithering. It reduces 4, 8, 24, and 32-bit images to a 1-bit color image.

Syntax

[form.]Snowbound1.BayerMono[ = {True|False}]

Remarks

Table 3.11: BayerMono Property Settings

Settings Description Reduces the image to 1-bit using the Bayer dithering True algorithm

57 Chapter 3 - Custom Control Properties

Settings Description False (Default) Does not reduce image

Data Type

Returns the status of the bayer dithering algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

BlankControl Property

This property clears the background of the image control before displaying the image in the current image control window. It is used to draw one image on top of the other.

If turned off, the background is not cleared to the current background color.

Syntax

[form.]Snowbound1.BlankControl[ = {True|False}]

Remarks

Table 3.12: BlankControl Property Settings

Settings Description Does not clear the current image control window. If the image is smaller than the last image displayed, the False underlying image shows in areas not covered by the new image. (Default) Clears the background before displaying the True image in the control window.

Data Type

Returns the status of the cleared background. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l Multiple

l Pan

BorderStyle Property

This property sets the current image controls border style. This is a stock ActiveX property. We do not handle the code internally. It is handled by Visual Basic or the development environment.

58 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.BorderStyle[ = Setting%]

Remarks

Table 3.13: BorderStyle Property Settings

Settings Description 0 No border is displayed Displays the image control window with a fixed single 1 border Displays the image control window with a fixed double 2 border

Data Type

Returns the status of the border style. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes,

Please refer to the Picture sample for examples of how to use this property.

Brightness Property

This property sets the image’s luminous intensity in the current image control window. Values are -127 to +127. The Save property saves the image with the current brightness value. See Save Property for more information.

Syntax

[form.]Snowbound1.Brightness[ = Setting%]

Remarks

Table 3.14: Brightness Property Settings

Settings Description Sets the image brightness to the lowest setting. The -127 image appears with the greatest darkness. 0 Default setting. The image retains its native brightness. Sets the image’s brightness to the highest setting. The +127 image appears with the greatest amount of brightness.

Data Type

Returns the status of the brightness value. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

59 Chapter 3 - Custom Control Properties

Please refer to the following Snowbound sample for examples of how to use this property:

l BritCnst

l ImageView

Example 3.18: Brightness Property

Private Sub Bright_Change()

' Values are -127 to 127. SnbdActiveX2.Brightness = Bright.Caption

End Sub

ClearImage Property

This property clears the image from the background of the control. This does not delete the current image.

To set the background color of the control use BackColor. See BackColor Property for more information.

Syntax

[form.]Snowbound1.ClearImage[ = {True|False}]

Remarks

Table 3.15: ClearImage Property Settings

Settings Description Clears the image from the current image control True background False Does not clear the current image control background

Data Type

Returns the status of the image cleared from the background of the control. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the SaveMem sample for examples of how to use this property.

60 Chapter 3 - Custom Control Properties

CmykToRGB Property

This property converts a 32-bit CMYK image already decompressed to a 24-bit RGB image. This property converts the data into internal 24-bit RGB data.

Syntax

[form.]Snowbound1.CmykToRGB[ = Setting%]

Remarks

Table 3.16: CmykToRGB Settings

Settings Description True Converts image to RGB. Image is permanently modified. False (Default) Does not convert image to RGB.

Data Type

Returns the status of the image converted to RGB. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Contrast Property

This property represents the relative difference between the black and white values. The range of values are -127 to +127.

The Save property saves the image with current contrast value. See the Save Property for more information.

Syntax

[form.]Snowbound1.Contrast[ = Setting%]

Remarks

Table 3.17: Contrast Property Settings

Settings Description Displays the image with the least amount of contrast -127 between the black and white colors of the image. 0 Retains the image’s native contrast. Maximum setting. Causes the whites to be whiter and +127 blacks to be blacker.

61 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the contrast. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l BritCnst

l ImageView

Example 3.19:Contrast Property

Private Sub Contrast_Change()

MousePointer = 11 ' Values are -127 to 127.

SnbdActiveX2.Contrast = Contrast.Caption MousePointer = 0

End Sub

Copy Property

This property copies the image in the current image control to the Windows clipboard as a bitmap. It uses the current cropping rectangle when copying the image to the clipboard and copies the current image as a Windows DIB format to the clipboard.

The cropping rectangle is set by the following properties:

Zoom Property

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property

CropXpos, CropYpos Property

Syntax

[form.]Snowbound1.Copy[ = {True|False}]

Remarks

Table 3.18: Copy Property Settings

Settings Description Copies the current image to the Windows clipboard as a True bitmap

62 Chapter 3 - Custom Control Properties

Settings Description (Default) Does not copy the image to the Windows False clipboard

Data Type

Returns the status of the copied image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Copying sample for examples of how to use this property.

CropXpos, CropYpos Property

These properties set the crop start position of a cropping rectangle and are used for zooming or sectioning the image. The current crop rectangle is saved during a save operation.

Notes: Always set CropYsize last. See CropXsize, CropYsize Property for more information. Do not use these properties for scrolling. See the ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property for scrolling information.

Syntax

[form.]Snowbound1.CropXpos[ = Setting%]

[form.]Snowbound1.CropYpos[ = Setting%]

Data Type

Returns the status of the position of the cropping rectangle. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l Events

l Pan

Example 3.20: CropXpos CropYpos Property

Private Sub SnbdActiveX1_Repaint()

label11.Caption = SnbdActiveX1.CropXpos label12.Caption = SnbdActiveX1.CropYpos label13.Caption = SnbdActiveX1.CropXsize label14.Caption = SnbdActiveX1.CropYsize

63 Chapter 3 - Custom Control Properties

End Sub

CropXsize, CropYsize Property

These properties set the height and width of the image to crop, and are used with CropXpos and CropYpos. See CropXpos, CropYpos Property for more information.

Notes: Set CropYsize last. This sets all the cropping properties on the image at once. Do not use these properties for scrolling. See ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property for scrolling.

Syntax

[form.]Snowbound1.CropXsize[ = Setting%]

[form.]Snowbound1.CropYsize[ = Setting%]

Data Type

Returns the status of the height and width of the image to crop. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l Events

l Pan

Example 3.21: CropXsize CropYsize Property

Private Sub SnbdActiveX1_Repaint()

label11.Caption = SnbdActiveX1.CropXpos label12.Caption = SnbdActiveX1.CropYpos label13.Caption = SnbdActiveX1.CropXsize label14.Caption = SnbdActiveX1.CropYsize

End Sub

64 Chapter 3 - Custom Control Properties

DecompressScreen Property

This property imports images from disk. This property displays the image as it is being decompressed.

Note: This property is not recommended for 1-bit images such as TIFF G3 or G4. The decompress is highly optimized for speed and this slows down the decompress time.

Syntax

[form.]Snowbound1.DecompressScreen[ = filename$]

Data Type

String

Please refer to the following Snowbound samples for examples of how to use this property:

l LoadFile

l Multiple

l Zoom

Example 3.22: DecompressScreen Property

Private Sub File1_DblClick()

...

' How Does The User Want To Display The Image? If check1.Value = False Then SnbdActiveX1(imgindex).Image = file1.filename Else > Display Image Data As It Is Being Decompressed. SnbdActiveX1(imgindex).DecompressScreen = file1.filename End If

...

End Sub

65 Chapter 3 - Custom Control Properties

DelImage Property

This property deletes the image from the image control and frees the memory associated with that image. The images in the control are no longer valid or usable.

When another image is loaded to the control, the existing image is automatically deleted.

Note: This property is most useful when displaying multiple images in different controls.

Syntax

[form.]Snowbound1.DelImage[ = {True|False}]

Remarks

Table 3.19: DelImage Property Settings

Setting Description True Deletes the current image in the control (Default) Does not delete the current image in the image False control

Data Type

Returns the status of the image deleted from the image control. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the SaveMem sample for examples of how to use this property.

Deskew Property

This property fixes skewed or rotated images in the control. It calculates the skew angle of the images, if there is any, then automatically rotates the images to the correct angle.

Notes: When a call is made to the Deskew property, 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. This property only works on 1-bit images.

Syntax

[form.]Snowbound1.Deskew[ = {True|False}]

66 Chapter 3 - Custom Control Properties

Remarks

Table 3.20: Deskew Property Setting

Setting Description True Corrects images rotated plus or minus 20 degrees False (Default) Does not correct skewed or rotated images

Data Type

Returns the status of the skewed image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

Despeckle Property

This property removes noise from a 1-bit bi-level image. The input value ranges are 1-100. The larger the value, the less noise in the image.

The control looks at neighboring pixels to determine if they are noise or part of some object. The value passed in is used as the threshold to decide how many pixels need to be considered a valid object and not removed.

Note: When a call is made to the Despeckle property, the internal Snowbound image object is stored in memory for viewing. The function needs to be saved to the library for the change to be permanent.

Syntax

[form.]Snowbound1.Despeckle[ = Setting%]

Remarks

Table 3.21: Despeckle Property Settings

Setting Description 0 Does nothing to the image 1 Removes the least noise from the image 100 Removes the most noise from the image

Data Type

Returns the status of the removed noise. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error

67 Chapter 3 - Custom Control Properties

codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

Dialation Property

This property increases the features of the image. The property utilizes Sobel image processing.

Syntax

[form.]Snowbound1.Dialation[ = {True|False}]

Remarks

Table 3.22: Dialation Property Settings

Setting Description True Increases the features of the image False (Default) Does not affect the image quality

Data Type

Returns the status of the dialation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

DibToRuns Property

This property converts the format from a DIB to a runs format. All RasterMaster products store 1-bit images as a series of runs and not flat uncompressed data.

If developers need to manipulate pixels, call RunsToDib to store the data as uncompressed. After processing the data, call DibToRuns to convert it back to runs format.

Note: Many properties do not work if the data is not stored as runs.

Syntax

[form.]Snowbound1.DibToRuns[ = Setting%]

Data Type

Returns the status of the run format. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

68 Chapter 3 - Custom Control Properties

DiffusionColor Property

This property converts the image to 4-bits per pixel using the Stucky error diffusing algorithm.

Syntax

[form.]Snowbound1.DiffusionColor[ = {True|False}]

Remarks

Table 3.23: DiffusionColor Property Settings

Setting Descripiton True Converts the image to a 4-bit per pixel image. False (Default) Does not convert the image.

Data Type

Returns the status of the difussion color. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

DiffusionMono Property

This property converts the image to 1-bit per pixel (black and white) using a Stucky error diffusing algorithm.

Syntax

[form.]Snowbound1.DiffusionMono[ = {True|False}]

Remarks

Table 3.24: DiffusionMono Property Settings

Setting Description True Converts the image to black and white False (Default) Leaves the image as is

Data Type

Returns the status of the black and white image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

69 Chapter 3 - Custom Control Properties

DitherMode Property

This property controls color reduction of the image when the image needs to be reduced as a result of the display adapter.

All RasterMaster products convert 8, 24, and 32-bit images to the pixel depth of the display adapter.

Note: This process occurs at display time and does not change the internal format of the data.

Syntax

[form.]Snowbound1.DitherMode[ = Setting%]

Remarks

Table 3.25: DitherMode Property Settings

Setting Description 0 Uses Windows to control the color reduction 1 (Default) Uses Bayer dithering for the color reduction 2 Uses diffusion for the color reduction

Data Type

Returns the status of the dither mode. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Multiple sample for examples of how to use this property.

Example 3.23:DitherMode Property

Private Sub File1_DblClick()

... ' Use Bayer dithering for the reduction of color. SnbdActiveX1(imgindex).DitherMode = 1

End Sub

DragIcon Property

This property sets the icon that is displayed while the control is being dragged. This is a standard property provided by Microsoft.

70 Chapter 3 - Custom Control Properties

Note: The file must have an ICO file extension.

Syntax

[form.]Snowbound1.DragIcon[= filename$]

Remarks

Table 3.26: Draglcon Property Settings

Setting Description Filename The mouse pointer is the loaded ICO file (Default) The mouse pointer is the Windows Default arrow (None) setting

Data Type

Returns the status of the dragged icon. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

DragMode Property

This property determines whether manual or automatic drag mode is used for a drag-and-drop operation. This is a standard property provided by Microsoft.

Syntax

[form.]Snowbound1.DragMode[ = {True|False}]

Remarks

Table 3.27: DragMode Property Settings

Setting Description (Default) Manual. Requires using the drag method to False initiate a drag-and-drop operation on the source control. Automatic. Clicking the source control automatically True initiates a drag-and-drop operation.

Data Type

Returns the status of the drag mode. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

71 Chapter 3 - Custom Control Properties

DrawMode Property

This property draws one image on top of another. It is a ternary raster operation for image display and allows displaying of images with XORing and ANDing Boolean operations. Please refer to the Windows SDK for the exact truth table of the following definitions.

Syntax

[form.]Snowbound1.DrawMode[ = Setting%]

Remarks

Table 3.28: DrawMode Property Settings

Setting Description SRCCOPY. Copies the source bitmap to the destination 0 bitmap. SRCPAINT. Combines pixels of the destination and 1 source bitmaps using the Boolean OR operator. SRCAND. Combines pixels of the destination and source 2 bitmaps using the Boolean AND operator. SRCINVERT. Combines pixels of the destination and 3 source bitmaps using the Boolean XOR operator. SRCERASE. Inverts the destination bitmap and 4 combines the result with the source bitmap using the Boolean AND operator. NOTSRCCOPY. Copies the inverted source bitmap to 5 the destination. NOTSRCERASE. Inverts the result by combining the 6 destination and source bitmaps using the Boolean OR operator. MERGECOPY. Combines the pattern and the source 7 bitmap using the Boolean AND operator. MERGEPAINT. Combines the inverted source bitmap 8 with the destination bitmap using the Boolean OR operator. 9 PATCOPY. Copies the pattern to the destination bitmap. PATPAINT. Combines the inverted source bitmap with the pattern using the Boolean XOR operator. Combines 10 the result of this operation with the destination bitmap using the Boolean OR operator. PATINVERT. Combines the destination bitmap with the 11 pattern using the Boolean XOR operator. 12 DSTINVERT. Inverts the destination bitmap. 13 BLACKNESS. Turns all output black. 14 WHITENESS. Turns all output white.

72 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the draw mode. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound sample for examples of how to use this property:

l ImageView

l Merge

Example 3.24:DrawMode Property

If check1.Value = False Then ' No merge - fresh image.

SnbdActiveX1.DrawMode = 0

Else ' Merging images.

SnbdActiveX1.DrawMode = hscroll1.Value

End If

EdgeDetect Property

This property enhances the edges of all lines of the image. This control uses simple Sobel image processing.

Syntax

[form.]Snowbound1.EdgeDetect[ = {True|False}]

Remarks

Table 3.29: EdgeDetect Property Settings

Setting Description True Enhances line edges False (Default) Does not enhance line edges

Data Type

Returns the status of the edge detection mode. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Sobel sample for examples of how to use this property.

73 Chapter 3 - Custom Control Properties

Example 3.25:EdgeDetect Property

Private Sub Option1_Click(Index As Integer)

Select Case Index ... Case 3 ' Roberts Cross. Edge detect lines in an image SnbdActiveX1.RobertsCross = True Case 4 ' Edge Detect. Enhances the edges of all lines in ' an image. SnbdActiveX1.EdgeDetect = True ...

End Select

End Sub

Effect Property

This property displays the image with special effects or wipes. This adds a visually appealing effect as the image is displaying.

Set the delay time for the effect to take by setting WipeDelay in seconds. See WipeDelay Property for more information.

Syntax

[form.]Snowbound1.Effect[ = Setting%]

Remarks

Table 3.30: Effect Property Settings

Setting Description 0 (Default) Displays image with no image effects 1 Displays image from bottom to top 2 Displays image from right to left using vertical lines 3 Displays image from left to right using vertical lines 4 Displays image in a window horizontal blind fashion 5 Displays image as staggered blocks 6 Displays image as blocks from the center of the control 7 Displays image in a vertical blind fashion Displays image as small blocks from the center of the 8 control

74 Chapter 3 - Custom Control Properties

Setting Description 9 Displays image as zigzag blocks

Data Type

Returns the status of the special effects or wipes. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

Encrypt Property

This property allows encryption of a supported image. A non-zero value passed in is used as a starting key for reading and writing of an encrypted image. A zero turns encryption off.

Notes: To decompress an encrypted image, you must set the key to be the same value as when the image was saved. The programmer is responsible for remembering the encrypt value for all images.

Syntax

[form.]Snowbound1.Encrypt[ = Setting%]

Data Type

Returns the status of the encrypted image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

ErrorStr Property

This property returns an error string for the last called property. Process this string to gain insight into an error which has occurred.

Note: See Appendix I, Snowbound Error Codes for a list of error codes.

Syntax

[form.]ErrDisplayWin.Caption = [form.]Snowbound1.ErrorStr

Please refer to the Snowbound ImageView sample for examples of how to use this property.

75 Chapter 3 - Custom Control Properties

ExtractBuff Property

This property returns the memory pointer to the buffer of extracted text from MODCA:PTOCA and the PDF image. It is used in conjunction with the ActiveImage, ActivePage, and ExtractText properties. See ActiveImage Property, ActivePage Property, and ExtractText Property for more information.

Syntax

[form.]Snowbound1.ExtractBuff[ = setting%]

Data Type

Returns the status of the extraced buffer. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Example 3.26:ExtractBuff Property

Snbdocx.ActiveImage = “image.pdf” Snbdocx.ActivePage = 0 Snbdocx.ExtractText = 1

‘Text is in the ExtractText property buffer.

ExtractText Property

This property activates the extraction of text from MODCA:PTOCA and PDF image. It is used in conjunction with the ActiveImage, ActivePage, and ExtractBuff properties. See ActiveImage Property, ActivePage Property, and ExtractBuff Property for more information.

Syntax

Integer% = [form.]Snowbound1.ExtractText

Data Type

Returns the status of the extraced text. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Example 3.27: ExtractText Property

Snbdocx.ActiveImage = “image.pdf” Snbdocx.ActivePage = 0 Snbdocx.ExtractText = 1

76 Chapter 3 - Custom Control Properties

‘Text is in the ExtractText property buffer.

Example 3.28:Extracted Text Output

%%SOF /Page=0 /Width=1700 /Height=2200 /FontName=TimesRoman /FontHeight=44 /FontBold=1 /FontItalic=0 /Xpos=1300 /Ypos=240 %%SOT Devadas %%EOT /Xpos=1253 /Ypos=240 %%SOT S. %%EOT %%EOF

Fax Property

This property imports raw CCITT G4, G3, and G3-2D compressed images from within a larger file, typically with header data of some kind. Very often, proprietary file formats use this method to add special information such as page numbers or orientation values to standard G4 compressed images. The Snowbound control imports and decompresses proprietary format images of this format if G3 or G4 type standard compression is used.

If you know the offset value from the beginning of the file to the beginning of the compressed data within a proprietary image, then you can use this property to skip to the proprietary data and then decompress the real image data.

Note: FaxOffset, FaxType, FaxXsize and FaxYsize must be set before setting this property. See FaxOffset Property, FaxType Property, and FaxXsize, FaxYsize Property for more information.

Syntax

[form.]Snowbound1.Fax[ = filename$]

77 Chapter 3 - Custom Control Properties

Data Type

String

FaxOffset Property

This property tells the control where in the image the compressed data stream starts. This gives the control the size of the header. The header is information contained in the image at the beginning of the file. See Fax Property, FaxType Property, and FaxXsize, FaxYsize Property for more information.

Syntax

[form.]Snowbound1.FaxOffset[ = Setting%]

Data Type

Returns the status of the fax offset. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Code for a list of error codes.

FaxType Property

This property specifies the type of fax image to be affected. This control is used with Fax. See Fax Property, FaxOffset Property, and FaxXsize, FaxYsize Property for more information.

Syntax

[form.]Snowbound1.FaxType[ = Setting%]

Remarks

Table 3.31: FaxType Property Settings

Setting Description 2 Declares the fax to be a G3-2d fax image 3 Declares the fax to be a G3 fax image 4 Declares the fax to be a G4 fax image

Data Type

Returns the status of the fax type. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

FaxXsize, FaxYsize Property

These properties specify the width and height of the fax image to decompress. See Fax Property, FaxOffset Property, and FaxType Property for more information.

78 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.FaxXsize[ = Setting%]

[form.]Snowbound1.FaxYsize[ = Setting%]

Data Type

Returns the status of the fax size. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

FileType Property

This property returns the current image filetype number displayed in the control. It is used with FileTypeName. See FileTypeName Property for more information.

Note: See Appendix A, Supported File Formats for all internal file formats and settings.

Syntax

Setting% = [form.]Snowbound1.FileType

Data Type

Returns the status of the file type. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l BritCnst

l Copying

l ImageView

FileTypeName Property

This property specifies the image name from which to retrieve file type information.

Note: Set this property to the name of the image whose information FileType and FileTypeStr return. See FileType Property and FileTypeStr Property for more information.

Syntax

[form.]Snowbound1.FileTypeName[= filename$]

79 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the file type name. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

FileTypeStr Property

This property returns the FileType name from the current image. It is used with FileTypeName. See FileType Property and FileTypeName Property for more information.

Syntax

String$ = [form.]Snowbound1.FileTypeStr

Data Type

String

Please refer to the Snowbound ImageView sample for examples of how to use this property.

FillColor Property

This property sets a color to fill the current image inside the current cropping rectangle.

Note: For 24-bit images, use a packed bgr chunky: i.e., a byte each of blue, green and red packed into one long.

Syntax

String$ = [form.]Snowbound1.FillColor

Data Type

String

Example 3.29:FillColor Property

Snbdocx1.FillColor=&H000000FF& ‘Make fill color red

80 Chapter 3 - Custom Control Properties

FillOrder Property

This property specifies the placement of the Most Significant Bit (MSB). It is used with the Fax property to determine in which fill order the compressed G3 or G4 image is stored. See Fax Property for more information.

Syntax

[form.]Snowbound1.FillOrder[ = Setting%]

Remarks

Table 3.32: FillOrder Property Settings

Setting Description 0 MSB is on the left (Intel byte order/Little Endian) 2 MSB is on the right (Motorola byte order/Big Endian)

Data Type

Returns the status of the fill order. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

FitToHeight Property

This property forces the image display to fit the image to the height of the current control and allow for scrolling of the height.

Note: For this function to work correctly, you must set Zoom to 0. See Zoom Property for more information.

Syntax

[form.]Snowbound1.FitToHeight[ = Setting%]

Data Type

Returns the status of fit-to-height. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Animate

l ImageView

81 Chapter 3 - Custom Control Properties

FitToWidth Property

This property forces the image display to fit the image to the width of the current control and allow for scrolling of the width.

Note: For this function to work correctly, you must set Zoom to 0. See Zoom Property for more information.

Syntax

[form.]Snowbound1.FitToWidth[ = Setting%]

Data Type

Returns the status of fit-to-width. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Animate

l ImageView

Filter Property

This property sets the aliasing quality factor. It is used with the Alias property when set to 1 or 2 to determine how many neighboring pixels to look at when scaling the images down to a smaller display size on the screen. See Alias Property for more information.

The values range from 0 to 100.

Syntax

[form.]Snowbound1.Filter[ = Setting%]

Remarks

Table 3.33: Filter Property Settings

Setting Description 0 Black pixels in the image may be skipped 100 No black pixels are skipped in the aliasing of the image

Data Type

Returns the status of the aliasing quality factor. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error

82 Chapter 3 - Custom Control Properties codes.

Please refer to the LoadText sample for examples of how to use this property.

FlipX Property

This property, when set to True, flips the image in the control horizontally or swaps pixels along the X axis around the center of the image.

Note: The internal image data is permanently changed.

Syntax

[form.]Snowbound1.FlipX[ = {True|False}]

Remarks

Table 3.34: FlipX Property Settings

Setting Description True Flips the displayed image horizontally False (Default) Does not flip image

Data Type

Returns the status of flipX. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l SaveMem

FlipY Property

This property, when set to True, flips the image in the control vertically or swaps pixels along the Y axis around the center of the image.

Note: The internal image data is permanently changed.

Syntax

[form.]Snowbound1.FlipY[ = {True|False}]

83 Chapter 3 - Custom Control Properties

Remarks

Table 3.35: FlipY Property Settings

Setting Description True Flips the displayed image vertically False (Default) Does not flip image

Data Type

Returns the status of flipY. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l SaveMem

Gamma Property

This property compensates for the response curve of the monitor and video card. For most displays, the lower values of the curve (0-100) appear blacker than they actually should. Gamma displays the lower level values a little brighter and the high clauses a little darker for better contrast on 8-bit grayscale and color images.

Note: This property should only be used if you have a technical understanding of the display characteristics of the monitor and video display adapter.

Syntax

[form.]Snowbound1.Gamma[ = Setting%]

Remarks

Table 3.36: Gamma Property Settings

Setting Description 0 Does not apply Gamma correction 150 (Default) Applies standard Gamma correction 200 Applies maximum Gamma correction

Data Type

Returns the status of the gamma correction. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error

84 Chapter 3 - Custom Control Properties codes.

GetBuffer Property

This property receives a pointer to a buffer to fill with data when calling GetYpos. The control then fills the buffer with the data from that line. See GetYpos Property for more information.

Syntax

[form.]Snowbound1.GetBuffer[ = Setting%]

Data Type

Returns the status of the buffer. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

GetBytes Property

This property specifies the number of bytes to retrieve from a line when calling GetYpos. The control then fills the buffer specified by GetBuffer with the data from that line. See GetYpos Property and GetBuffer Property for more information.

Syntax

[form.]Snowbound1.GetBytes[ = Setting%]

Data Type

Returns the status of the bytes to retrieve. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

GetFileInfo Property

This property fills in ImageWidth, ImageHeight, ImageBitsPix, ImageXdpi, ImageYdpi, and Orientation by interrogating the image for which you are getting information.

See ImageHeight, ImageWidth Property, ImageBitspix Property, ImageXdpi, ImageYdpi Property, and Orientation Property for more information.

Note: The image does not have to be decompressed to get this information.

Syntax

[form.]Snowbound1.GetFileInfo[ = filename$]

85 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the file information. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l File Info

l ImageView

GetYpos Property

This property moves data from the current Y position (line) passed in to a buffer specified by GetBuffer. See GetBuffer Property for more information.

Syntax

[form.]Snowbound1.GetYpos[ = Setting%]

Data Type

Returns the status of the current Y position. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Gray Property

This property converts 8, 24, and 32-bit color images to 8-bit grayscale.

Syntax

[form.]Snowbound1.Gray[ = {True|False}]

Remarks

Table 3.37: Gray Property Settings

Setting Description True Converts current image to 8-bit gray scale False (Default) Does not convert the image

Data Type

Returns the status of grayscale. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

86 Chapter 3 - Custom Control Properties

HalftoneMono Property

This property converts a color image to a 1-bit black and white image using a halftoning image filter. It converts a bi-level 1-bit image into a series of small circles, as in a newspaper photo.

Syntax

[form.]Snowbound1.HalftoneMono[ = {True|False}]

Remarks

Table 3.38: HalftoneMono Property Settings

Setting Description Converts a color image to black and white using a True halftoning image filter False (Default) Does not covert the image

Data Type

Returns the status of the halftoning image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Height, Width Property

These properties set the height and width of the Snowbound control window. They are standard properties provided by Microsoft.

Syntax

[form.]Snowbound1.Height[ = Setting%]

[form.]Snowbound1.Width[= Setting%]

Data Type

Returns the status of the height and width. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Pan sample for examples of how to use this property.

HelpContextID Property

This property provides context-sensitive help for your application. This is a standard property provided by Microsoft.

87 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.HelpContextID[ = Setting%]

Remarks

Table 3.39: HelpContextID Property

Setting Description 0 (Default) No help context >0 Associated number to the help ID for the matching object

Data Type

Returns the status of the context sensitive help. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

HistoGramEqualize Property

This property performs histogram equalization on 8 and 16-bit gray scale images.

Syntax

[form.]Snowbound1.HistoGramEqualize[ = {True|False}]

Data Type

Returns the status of the histogram equalization. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

HorzEdgeDetect Property

This property applies a Sobel image processing algorithm to enhance all horizontal lines of the image.

Syntax

[form.]Snowbound1.HorzEdgeDetect[ = {True|False}]

Remarks

Table 3.40: HorzEdgeDetect Property Settings

Setting Description True Enhances horizontal lines of the image False (Default) Does not modify the image

88 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the Sobel image processing algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Sobel sample examples of how to use this property.

Example 3.30:HorzEdgeDetect Property

Private Sub Option1_Click(Index As Integer)

Select Case Index ... Case 3 ' Roberts Cross. Edge detect lines in an image SnbdActiveX1.RobertsCross = True Case 5 ' Horz. Edge Detect. Enhances the Horizontal ' lines in an image. SnbdActiveX1.HorzEdgeDetect = True ... End Select

End Sub

Image Property

This property decompresses and displays the image to the current control.

Notes: The file extension is not necessary The control automatically detects the file type. The image automatically displays in the control if Redraw is set to true. See Redraw Property for more information.

Syntax

[form.]Snowbound1.Image[= filename$]

Data Type

String

Please refer to the following Snowbound samples for examples of how to use this property:

89 Chapter 3 - Custom Control Properties

l Animate

l Annotate

l BritCnst

l Copying

l Events

l File Info

l ImageView

l LoadFile

l LoadText

l Merge

l Multiple

l Octree

l Pan

l Print

l Resize

l SaveMem

l Zoom

Example 3.31: Image Property

Private Sub File1_DblClick() ... ' Displays The Image Once The Entire Image Has ' Been Decompressed. If check1.Value = False Then SnbdActiveX1(imgindex).Image = file1.filename Else ' Displays The Image Data During ' Decompression. SnbdActiveX1(imgindex).DecompressScreen = file1.filename End If ... End Sub

ImageAccel Property

This property supports the Cornerstone Image Accel display adapter.

90 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.ImageAccel[ = {True|False}]

Remarks

Table 3.41: ImageAccel Property Settings

Setting Description True Supports the Cornerstone Image Accel display adapter (Default) Does not support the Cornerstone Image Accel False display adapter

Data Type

Returns the status of the Cornerston Image Accel display adapter. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

ImageAccelRot Property

This property accepts rotation values of 0, 90, 180, and 270 when used with the Cornerstone Image Accel display adapter.

Syntax

[form.]Snowbound1.ImageAccelRot[ = Setting%]

Data Type

Returns the status of the rotation values. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

ImageBitspix Property

This property returns the bits per pixel of the image in the current image control.

Syntax

Integer% = [form.]Snowbound1.ImageBitspix

Data Type

Returns the bits per pixel. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

91 Chapter 3 - Custom Control Properties

l BritCnst

l Copying

l File Info

l ImageView

ImageDate Property

This property returns or sets the date stored in a .TIF image date tag. It is used to set the Date tag in TIF images.

Syntax

Date# = [form.]Snowbound1.ImageDate

Data Type

String

ImageDib Property

This property returns a pointer to the image data stored in memory as a Windows DIB (Device Independent Bitmap). See UseHdib Property for more information.

Note: All RasterMaster products store image formats as a Windows DIB format. You may change the palette or the pixel data, but cannot change the header, width, height, or bits per pixel.

See Appendix A, Supported File Formats for a list of supported internal formats.

Syntax

Integer% = [form.]Snowbound1.ImageDib

Data Type

Returns the status of the Windows Device Independent Bitmap (DIB). A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Copying

l ImageView

l SaveMem

92 Chapter 3 - Custom Control Properties

Example 3.32:ImageDib Property

Private Sub Command1_Click()

SnbdActiveX2.UseHdib = SnbdActiveX1.ImageDib

End Sub

ImageError Property

This property returns an integer corresponding to the image error. It checks the success of internal functions such as the Image property.

Any positive or zero value means the operation completed successfully. Negative values are always considered an error in the last operation.

Syntax

Integer% = [form.]Snowbound1.ImageError

Data Type

Returns the status of the image error. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Events

l ImageView

Example 3.33: ImageError Property

Private Sub SnbdActiveX1_Error(imageerror As Integer) ' Set the screen label to show the error. ' Could also post this to a MessageBox or Log file. Label6.Caption = SnbdActiveX1.ImageError

End Sub

ImageHeight, ImageWidth Property

These properties return the height and width of the image displayed in the control, which represents the size of the image data in pixels. Use these properties to resize the image window.

93 Chapter 3 - Custom Control Properties

Syntax

Integer% = [form.]Snowbound1.ImageHeight

Integer% = [form.]Snowbound1.ImageWidth

Data Type

Returns the status of the height and width. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l BritCnst

l Copying

l File Info

l ImageView

l Pan

ImageName Property

This property returns or sets the image author name stored in a TIFF image and is used to set the Author tag. See ImageDate Property for more information.

Syntax

String$ = [form.]Snowbound1.ImageName

Data Type

String

ImagePosX, ImagePosY Property

These properties return the image pixel X and Y screen position while the mouse is over the image control.

Note: The coordinates are relative to the actual image, not the screen coordinates.

Syntax

Integer% = [form.]Snowbound1.ImagePosX

Integer% = [form.]Snowbound1.ImagePosY

94 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the image pixel X and Y screen position. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Events

l Merge

l ImageView

l Pan

Example 3.34: ImagePosY Image PosX Property

Private Sub SnbdActiveX1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

' Set the Screen Labels. label3.Caption = X label4.Caption = Y ' Set The Screen Labels from ImagePosX/Y label17.Caption = SnbdActiveX1.ImagePosX label18.Caption = SnbdActiveX1.ImagePosY

End Sub

ImageXdpi, ImageYdpi Property

These properties return or set the horizontal and vertical dots per inch (DPI) of the current image located in the image control. To set the horizontal and vertical DPI, make the change before saving.

Syntax

Integer% = [form.]Snowbound1.ImageXdpi

Integer% = [form.]Snowbound1.ImageYdpi

Data Type

Integer

Please refer to the following Snowbound samples for examples of how to use this property:

95 Chapter 3 - Custom Control Properties

l BritCnst

l Copying

l File Info

l ImageView

Index Property

This property returns or sets the number that identifies a control in a control array. It is available only if the control is part of a control array. This is a standard property supplied by Microsoft.

Syntax

Integer% = [form.]Snowbound1.Index

Data Type

Returns the status of the number that identifies a control in a control array. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Interp Property

This property uses interpolation algorithms for resizing images with the Resize property. See Resize Property for more information.

Notes: For scaling down 1-bit images, the algorithm preserves black pixels. For scaling down 8 and 24-bit images, the algorithm uses image averaging. For scaling up 8-bit images, the algorithm uses a bilinear interpolation technique.

Syntax

[form.]Snowbound1.Interp[ = {True|False}]

Remarks

Table 3.42: Interp Property Settings

Setting Description False (Default) Does not affect the scaling of the image True Starts the resize operation

96 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the interpolation algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Invert Property

This property inverts all pixels of the image. It turns all white pixels to black and all black pixels to white. For color images, the byte of each color component in a given gamut is reversed by XORing the byte with 0xFF (255). For instance, red (0xFF0000) becomes light blue (0x00FFFF).

Syntax

[form.]Snowbound1.Invert[ = {True|False}]

Remarks

Table 3.43: Invert Property Settings

Setting Description True Inverts the image False (Default) Does not affect the image

Data Type

Returns the status of the inverted image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l SaveMem

IsolatePoints Property

This property uses a Sobel image processing technique to isolate and remove pixels that do not result in a point.

Syntax

[form.]Snowbound1.IsolatePoints[ = {True|False}]

Remarks

Table 3.44: IsolatePoints Property Settings

97 Chapter 3 - Custom Control Properties

Setting Description Uses Sobel image processing to isolate points and re- True display the image False (Default) Does not affect the image

Data Type

Returns the status of the isolated points. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Sobel sample for examples of how to use this property.

Example 3.35:IsolatePoints Property

Private Sub Option1_Click(Index As Integer)

Select Case Index Case 1 ' Isolate Points. - Convert the Image and Reload ' in the current control. SnbdActiveX1.IsolatePoints = True ...

End Sub

JpegInterleave Property

This property allows setting the JPEG interleave factor for writing JPEG images. This is the factor for decimating the blue and red chroma planes when writing out a JPEG image. This function specifies how many pixels to skip in the X and Y direction when compressing the image.

Note: 0 is the best quality; it does not skip any chroma data.

Syntax

[form.]Snowbound1.JpegInterleave = Integer%

Remarks

Table 3.45: JpegInterleave Property Settings

98 Chapter 3 - Custom Control Properties

Setting Description 0 1,1 Skips 1 horizontal pixel and 1 vertical pixel 1 2,1 Skips 2 horizontal pixels and 1 vertical pixel 2 4,1 Skips 4 horizontal pixels and 1 vertical pixel 3 2,2 Skips 2 horizontal pixels and 2 vertical pixels 4 4,4 Skips 4 horizontal pixels and 4 vertical pixels

Data Type

String

Laplacian Property

This property is a Sobel image processing technique that sharpens the appearance of the image in the current control.

Syntax

[form.]Snowbound1.Laplacian[ = {True|False}]

Remarks

Table 3.46: Laplacian Property Settings

Setting Description True Uses Sobel image processing to sharpen the image False (Default) Does not affect the image

Data Type

Returns the status of the Sobel iamge processing technique. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes..

Please refer to the Snowbound Sobel sample for examples of how to use this property.

Example 3.36:Lapacian Property

Private Sub Option1_Click(Index As Integer) Select Case Index Case 1 ' Isolate Points. SnbdActiveX1.IsolatePoints = True Case 2 ' Laplacian. - Sharpens the appearance of an ' image. SnbdActiveX1.Laplacian = True

99 Chapter 3 - Custom Control Properties

Case 3 ... End Sub

Left Property

This property returns the distance from the top left hand corner of the control to the left side of the form. This a standard property supplied by Microsoft.

Syntax

Integer% = [form.]Snowbound1.Left

Data Type

Returns the status of the distance from the top left hand corner of the control. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

MedianCut Property

This property converts 24-bit images to 8-bits per pixel using a combination of dithering and popularity algorithms.

Syntax

[form.]Snowbound1.MedianCut[ = {True|False}]

Remarks

Table 3.47: MedianCut Property Settings

Setting Description False (Default) Does not affect the image

Data Type

Returns the status of the median cut. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

MemLoad Property

This property decompresses and loads the image from a memory pointer. It works the same as the Image property, but does so from a memory pointer. This property is used with ImageDib. See Image Property and ImageDib Property for more information.

100 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.Memload[ = Setting%]

Data Type

Returns the status of the memory pointer. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound SaveMem sample for examples of how to use this property.

MemSave Property

This property is used to save the image from a memory pointer. It returns the size of the image saved in memory, and works the same as Save but does so from a memory pointer. See Save Property for more information.

Note: Requires the use of the Win32 API call GlobalAlloc. Consult the Win32 SDK reference for more information.

Syntax

[form.]Snowbound1.MemSave[ = Setting%]

Data Type

Returns the status of the memory pointer. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l SaveMem

MergeMem Property

This property takes a handle from a DIB in memory and merges the image onto the current existing bitmap in the ActiveX Control. There is a one to one correlation between the images and thus the merging image directly overwrites the relevant data sections.

Notes: This property is preferred for merging images because it does not use Device

101 Chapter 3 - Custom Control Properties

Dependent Bitmaps. This property must be set after setting the MergeXsize, MergeYsize, MergeXpos, and MergeYpos properties. See MergeXsize, MergeYsize Property and MergeXpos, MergeYpos Property for more information. To use this property, you must promote both images to 8 or 24-bits per pixel. Do not promote the image to 8-bits per pixel if you are working with color images.

Syntax

[form.]Snowbound1.MergeMem[= ImageDIB%]

Data Type

Returns the status of the merged image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

Mergename Property

This property allows the merging of one image onto another. It is the file that is to be merged onto the current image in the control. It creates off screen buffers before the images are merged together.

Note: This property must be set after setting the MergeXsize, MergeYsize, MergeXpos, and MergeYpos properties. See MergeXsize, MergeYsize Property and MergeXpos, MergeYpos Property for more information. This property may not work correctly on all machines because it uses Device Dependent Bitmaps.

Syntax

[form.]Snowbound1.Mergename[ = filename$]

Data Type

String

To convert images to multiple page format, you can also do regular saving instead of using the Mergename property. Please see the following example:

Example 3.37:Mergename Property

' Sets the input image name and then saves it to the format you

102 Chapter 3 - Custom Control Properties

want

Sub Page_Initialize Snowbound.Image = "C:\user\sample\winter.jpg" Snowbound.SaveFormat = 9 Snowbound.Save = "C:\user\sample\MergedPages.tif"

' When you set the output file as the same name, the second page will be appended. Snowbound.Image = "C:\user\sample\Waterlilies.jpg" Snowbound.SaveFormat = 9 Snowbound.Save = "C:\user\sample\MergedPages.tif"

' To save image as TIFF_LZW, set SaveFormat = 9. To convert images to one PDF file, set SaveFormat=59. Snowbound.Image = "C:\user\sample\winter.jpg" Snowbound.SaveFormat = 59 Snowbound.Save = "C:\user\sample\MergedPages.pdf" Snowbound.Image = "C:\user\sample\Waterlilies.jpg" Snowbound.SaveFormat = 59 Snowbound.Save = "C:\user\sample\MergedPages.pdf" End Sub

Please refer to the Snowbound Merge sample for examples of how to use this property.

MergeXpos, MergeYpos Property

These properties set the X and Y positions for the image merge to take place.

Note: These properties must be set before calling MergeMem or Mergename. See MergeMem Property, Mergename Property, and MergeXsize, MergeYsize Property for more information.

Syntax

[form.]Snowbound1.MergeXpos[ = Setting%]

[form.]Snowbound1.MergeYpos[ = Setting%]

Data Type

Returns the status of the merged image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

103 Chapter 3 - Custom Control Properties

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l Merge

MergeXsize, MergeYsize Property

These properties set the size of the image to merge.

Note: These properties must be set before calling MergeMem or Mergename. See MergeMem Property, Mergename Property, and MergeXpos, MergeYpos Property for more information.

Syntax

[form.]Snowbound1.MergeXsize[ = Setting%]

[form.]Snowbound1.MergeYsize[ = Setting%]

Data Type

Returns the status of the merged image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

Name Property

This property returns the name of a control, form, or object in an application. This is a standard property provided by Microsoft.

Syntax

String$ = [form.]Snowbound1.Name

Data Type

String

Neg45EdgeDetect Property

This property utilizes a Sobel image processing algorithm to enhance all -45 degree lines of the image.

104 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.Neg45EdgeDetect[ = {True|False}]

Remarks

Table 3.48: Neg45EdgeDetect Property Settings

Setting Description Calls the Sobel Image processing algorithm to enhance all True -45 degree lines of the image False (Default) Does not affect the image

Data Type

Returns the status of the Sobel image processing algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Sobel sample for examples of how to use this property.

Example 3.38: Neg45EdgeDetect Property

Private Sub Option1_Click(Index As Integer)

Select Case Index ... Case 3 ' Roberts Cross. Edge detect lines in an image. SnbdActiveX1.RobertsCross = True Case 6 ‘ Neg 45 Edge Detect. SnbdActiveX1.Neg45EdgeDetect = True ... End Select End Sub

OctreeBpp Property

This property sets the bits per pixel for the Octree image color reduction algorithm. Octree reduces 8 or 24-bit images to 8 or 4-bit images.

Set it to either 4 or 8-bits.

Syntax

[form.]Snowbound1.OctreeBpp[ = Setting%]

105 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the Octree image color reduction algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Octree sample for examples of how to use this property.

Example 3.39:OctreeBpp Property

Private Sub Command2_Click()

' Sets the bits per pixel for the Octree ' image color reduction algorithm. If option1.Value = True Then SnbdActiveX1.OctreeBpp = 4 Else SnbdActiveX1.OctreeBpp = 8 End If

' Sets the number of colors for Octree color reduction. SnbdActiveX1.OctreeColors = hscroll1.Value

' Execute the Octree image color reduction algorithm. SnbdActiveX1.OctreeStart = True

End Sub

OctreeColors Property

This property sets the number of colors for Octree color reduction. Settings are 3 - 255 for 8-bit images and 3 - 15 for 4-bit images.

Note: When reducing to 8-bits, the best quality is obtained by setting it to 236. For 4-bits, set it to 16.

Syntax

[form.]Snowbound1.OctreeColors[ = Setting%]

Data Type

Returns the status of the Octree color reduction. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error

106 Chapter 3 - Custom Control Properties codes.

Please refer to the Snowbound Octree sample for examples of how to use this property.

Example 3.40:OctreeColors Property

Private Sub Command2_Click() ' Sets the number of colors for Octree color reduction. SnbdActiveX1.OctreeColors = hscroll1.Value

' Uses the palette passed as a pointer of RGBQUAD ' structures for octree color reduction. SnbdActiveX1.OctreePal = 0

' Execute the Octree image color reduction algorithm. SnbdActiveX1.OctreeStart = True

' Update the screen. label1.Caption = SnbdActiveX1.OctreeColors End Sub

OctreePal Property

This property uses the palette passed as a pointer of RGBQUAD structures for Octree color reduction.

Note: Set to 0 for optimizing the palette for the image.

Syntax

[form.]Snowbound1.OctreePal[ = Setting%]

Data Type

Returns the status of the Octree color reduction. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Octree sample for examples of how to use this property.

Example 3.41:OctreePal Property

Private Sub Command2_Click()

107 Chapter 3 - Custom Control Properties

' Sets the number of colors for Octree color reduction. SnbdActiveX1.OctreeColors = hscroll1.Value

' Uses the palette passed as a pointer of RGBQUAD ' structures for octree color reduction. SnbdActiveX1.OctreePal = 0

' Execute the Octree image color reduction algorithm. SnbdActiveX1.OctreeStart = True End Sub

OctreeStart Property

This property executes the Octree image color-reduction algorithm when set to true.

Syntax

[form.]Snowbound1.OctreeStart[ = {True|False}]

Remarks

Table 3.49: OctreeStart Property Settings

Setting Description True Start the Octree color reduction False (Default) Does not begin the process

Data Type

Returns the status of the Octree color reduction. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Octree sample for examples of how to use this property.

Example 3.42:OctreeStart Property

Private Sub Command2_Click() ' Sets the number of colors for Octree color reduction. SnbdActiveX1.OctreeColors = hscroll1.Value

' Execute the Octree image color reduction algorithm. SnbdActiveX1.OctreeStart = True

' Update the screen.

108 Chapter 3 - Custom Control Properties label1.Caption = SnbdActiveX1.OctreeColors End Sub

Orientation Property

This property returns image orientation. This value is the amount of rotation in degrees needed to properly display the image. It returns valid values to TIFF, PCD, and CALS images.

Syntax

Setting% = [form.]Snowbound1.Orientation

Data Type

Returns the status of the image orientation. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l BritCnst

l Copying

l File Info

l ImageView

Overlay Property

This property sets the path for overlay files for PT:OCA images. The library searches this path for overlay files required by PT:OCA images. It toggles between the two ways in which the overlay file is decompressed if a NULL parameter is passed.

For example, there is 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.

Syntax

Setting% = [form.]Snowbound1.Overlay

109 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the path for overlay files. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Page Property

This property reads additional pages of a multi-page image after the initial page has been loaded with the Image property. See Image Property for more information.

Note: Page counting begins at zero (0).

Syntax

[form.]Snowbound1.Page[ = Setting%]

Data Type

Returns the status of the additional pages of a multi-page image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l LoadText

Pages Property

This property returns the number of pages that are contained in a multi-page image. Current multi-page file formats include TIFF, DCX, and MODCA:IOCA.

Syntax

Integer% = [form.]Snowbound1.Pages

Data Type

Returns the status of the additional pages of a multi-page image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

110 Chapter 3 - Custom Control Properties

l ImageView

l LoadText

Example 3.43: Pages Property

Private Sub File1_DblClick() MousePointer = 11

SnbdActiveX1.Image = file1.filename

' Display The Number Of Pages. Label2.Caption = SnbdActiveX1.Pages

' Allow the User To View Next Pages If Exist. If SnbdActiveX1.Pages > 1 Then Command1.Enabled = True Command4.Enabled = True Else Command1.Enabled = False Command4.Enabled = False End If

MousePointer = 0 End Sub

Palette Property

This property refers to realizing the image palette. This takes the palette from the image and places it into the video card’s display adapters lut or palette.

This property works best for 8 and 24-bit images. For 24-bit images on a 256 color display adapter, it realizes a rainbow color palette for best quick display.

Note: For even better quality, use the Octree color reduction properties.

Syntax

[form.]Snowbound1.Palette[ = {True|False}]

Remarks

Table 3.50: Palette Property Settings

111 Chapter 3 - Custom Control Properties

Setting Description True Associated palette is realized prior to display False (Default) Does not affect the system palette

Data Type

Returns the status of the image palette. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Multiple sample for examples of how to use this property.

PanWindow Property

This property turns on and off the pan window. It displays the whole image in the main image window along with a mouse selectable rectangle to display what is in the crop rectangle.

Syntax

[form.]Snowbound1.PanWindow[ = {True|False}]

Data Type

Returns the status of the pan window. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

Paste Property

This property pastes the image from the Windows clipboard into the current image control. It can read DIB or DDB clipboard formats but cannot read ASCII or WMF clipboard formats.

Syntax

[form.]Snowbound1.Paste[ = {True|False}]

Remarks

Table 3.51: Paste Property Settings

Setting Description Moves the image from the Windows clipboard to the True current image control False (Default) Does not affect the image

112 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the Windows clipboard. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

PDFBitsPerPixel Property

This property returns or sets the default bits per pixel for imported PDF files.

Syntax

[form.]Snowbound1.PDFBitsPerPixel[ = Setting%]

Data Type

Returns the status of the default bits per pixel for imported PDF files. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

PdfDpi Property

This property returns or sets the default dots per inch (DPI) for imported PDF files.

Syntax

[form.]Snowbound1.PdfDpi[ = Setting%]

Data Type

Returns the status of the default dots per inch (DPI) for imported PDF files. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

PdfXPageSize Property

This property sets the PDF horizontal page size for saving. The values are in points or 1/72 of an inch. This call can be set once before saving to a PDF file or multiple times to set each page to a different size. The default PDF page size is 612 x 792 points or 8.5 x 11 inches.

Syntax

[form.]Snowbound1.PdfXPageSize[ = Setting%]

Remarks

Table 3.52: PdfXPageSize Property Setting

113 Chapter 3 - Custom Control Properties

Setting Description PdfXPageSize Sets the output PDF page xsize in points.

Data Type

Returns the PDF horizontal page size for saving. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

PdfYPageSize Property

This property sets the PDF vertical page size for saving. The values are in points or 1/72 of an inch. This call can be set once before saving to a PDF file or multiple times to set each page to a different size. The default PDF page size is 612 x 792 points or 8.5 x 11 inches.

Syntax

[form.]Snowbound1.PdfYPageSize[ = Setting%]

Remarks

Table 3.53: PdfYPageSize Property Settings

Setting Description PdfYPageSize Sets the output PDF page ysize in points.

Data Type

Returns the PDF vertical page size for saving. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Picture Property

This property copies the image from the Microsoft Visual Basic standard picture control into a Snowbound image control window. It cannot pass a Picture property to the Microsoft picture control.

Syntax

[form.]Snowbound1.Picture[ = String%]

Data Type

Returns the Microsoft Visual Basic standard picture control. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Picture sample for examples of how to use this property.

114 Chapter 3 - Custom Control Properties

Example 3.44:Picture Property

Private Sub btnCopy_Click()

' Copy the image from the ActiveX Picture Control ' into the Snowbound Custom Control. SnbdActiveX1.PICTURE = Picture1.PICTURE

' Enable the Copy Button. btnCopy.Enabled = False

End Sub

PixelValue Property

This property returns the pixel value after setting PixelXpos and the PixelYpos values. See PixelXpos/PixelYpos Property for more information.

This is the actual pixel value from the current image. For 24-bit images it is a blue, green, and red Chunky. For instance, 1 byte for blue, then green, and then red are all packed into a 32-bit integer.

Syntax

[form.]Snowbound1.PixelValue[ = Integer%]

Data Type

String

Please refer to the Snowbound ImageView sample for examples of how to use this property.

PixelXpos/PixelYpos Property

These properties set the X and Y coordinates of the pixel value returned in PixelValue. See PixelValue Property for more information.

Notes: Be sure to set PixelXpos first. For 1-bit images, you must set RunsToDib first for the properties to work.

Syntax

[form.]Snowbound1.PixelXpos[ = Integer%]

[form.]Snowbound1.PixelYpos[ = Integer%]

115 Chapter 3 - Custom Control Properties

Data Type

String

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l Pan

Popularity Property

This property converts a 24-bit image to an 8-bit image by selecting the 256 most popular colors.

Syntax

[form.]Snowbound1.Popularity[ = {True|False}]

Remarks

Table 3.54: Popularity Property Settings

Setting Description Converts image from 24 to 8-bit retaining the 256 most True popular colors False (Default) Does not affect the image

Data Type

Returns the status of the most popular colors. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix J for a list of error codes.

Pos45EdgeDetect Property

This property utilizes a Sobel image processing algorithm to enhance all 45 degree lines of the image.

Syntax

[form.]Snowbound1.Pos45EdgeDetect[ = {True|False}]

Remarks

Table 3.55: Pos45EdgeDetect Property Settings

Setting Description Calls the Sobel Image processing algorithm to enhance True all 45 degree lines of the image

116 Chapter 3 - Custom Control Properties

Setting Description False (Default) Does not affect the image

Data Type

Returns the status of the Sobel image processing algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Sobel sample for examples of how to use this property.

Example 3.45: Pos45EdgeDetect Property

Private Sub Option1_Click(Index As Integer)

Select Case Index Case 3 ' Roberts Cross. Edge detect lines in an image SnbdActiveX1.RobertsCross = True Case 7 ' Pos 45 Edge Detect. SnbdActiveX1.Pos45EdgeDetect = True End Select

End Sub

PrintFast Property

This property starts the printing of the image in the image control. It does not optimize the image for printing. It is useful in printing large 1-bit images and for POSTSCRIPT printers.

You must pass the device context of the current default printer (Printer.hDC).

l If you pass a 0, the control gets the default printer hDC and does a form feed after the image is printed.

l If you pass the hDC yourself, you must cause the form feed yourself by the Printer.EndDoc property.

Note: Printing size is affected by the PrintSize, PrintXs, PrintYs, PrintXsize, and PrintYsize properties. See PrintSize Property, PrintXs, PrintYs Property, and PrintXsize, PrintYsize Property for more information.

117 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.PrintFast[ = Setting%]

Data Type

Returns the status of the image control. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Example 3.46:PrintFast Property

Printer.Print SnbdActiveX.PrintFast = Printer.hDC Printer.EndDoc

PrintImage Property

This property prints the current image in the image control to the default printer. You must pass the device context of the current default printer (Printer.hDC).

l If you pass a 0, the control gets the default printer hDC and does a form feed after the image is printed.

l If you pass the hDC yourself, you must cause the form feed yourself by the Printer.EndDoc property.

Note: Printing size is affected by the PrintSize, PrintXs, PrintYs, PrintXsize, and PrintYsize properties. See PrintSize Property, PrintXs, PrintYs Property, and PrintXsize, PrintYsize Property for more information.

Syntax

[form.]Snowbound1.PrintImage[ = Setting%]

Data Type

Returns the status of the image control. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Annotate

l Print

118 Chapter 3 - Custom Control Properties

Example 3.47:PrintImage Property

Printer.Print SnbdActiveX.PrintImage = Printer.hDC Printer.EndDoc

PrintSize Property

This property sets the image print size. There are six print sizes currently available.

Syntax

[form.]Snowbound1.PrintSize[ = Setting%]

Remarks

Table 3.56: PrintSize Property Settings

Setting Description 0 Prints 1/8 page size. 1 Prints 1/4 page size. 2 Prints 1/2 page size. 3 Prints 3/4 size. 4 Prints Full page size. Uses print coordinates for display size and position. See 5 PrintXs, PrintYs Property and PrintXsize, PrintYsize Property for more information.

Data Type

Returns the status of the image print size. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Annotate

l Print

Example 3.48:PrintSize Property

Private Sub Option3_Click()

SnbdActiveX1.PrintSize = 3

119 Chapter 3 - Custom Control Properties

End Sub

PrintXs, PrintYs Property

These properties set the image’s vertical and horizontal starting position where printing should start. Use these properties with the PrintSize property. See PrintSize Property for more information.

Note: PrintSize must be set to 5 for these values to take effect.

Syntax

[form.]Snowbound1.PrintXs[ = Setting%]

[form.]Snowbound1.PrintYs[ = Setting%]

Remarks

Table 3.57: PrintXs, PrintYs Property Settings

Setting Description -1 (Default) Prints the image as is. Sets the start height or width of the image to be printed >0 from the image control. Does not affect the image currently in the image control window.

Data Type

Returns the status of the image vertical and horizontal print size. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

PrintXsize, PrintYsize Property

These properties set the image’s vertical and horizontal height print size. Use these properties with the PrintSize property. See PrintSize Property for more information.

Note: PrintSize must be set to 5 for these values to take effect.

120 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.PrintXsize[ = Setting%]

[form.]Snowbound1.PrintYsize[ = Setting%]

Remarks

Table 3.58: PrintXsize, PrintYsize Property Settings

Setting Description -1 (Default) Prints the image as is. Sets the start height or width of the image to be printed >0 from the image control. Does not affect the image currently in the image control window.

Data Type

Returns the status of the image vertical and horizontal height print size. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Promote24, Promote8 Property

These properties convert one format to another when pixel depths are different. Promote24 promotes 1, 4, and 8-bit images to 24-bit. Promote8 promotes 1 and 4-bit images to 8-bit.

Note: To convert a TIFF G4 image to JPEG, first call Promote24.

Syntax

[form.]Snowbound1.Promote24[ = {True|False}]

[form.]Snowbound1.Promote8[ = {True|False}]

Remarks

Table 3.59: Promote24, Promote8 Property Settings

Setting Description True Promotes a 1, 4, 8 bit image to 8 or 24-bit image False (Default) Does not affect the image

121 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the pixel depth. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound ImageView sample for examples of how to use this property.

PutBuffer Property

This property is a pointer to the buffer from which PutYpos takes data to put into the image. See PutBytes Property and PutYpos Property for more information.

Syntax

[form.]Snowbound1.PutBuffer[ = Setting%]

Data Type

Returns the pointer to the buffer. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

PutBytes Property

This property indicates the number of bytes to be put into the image by PutYpos. See PutBuffer Property and PutYpos Property for more information.

Syntax

[form.]Snowbound1.PutBytes[ = Setting%]

Data Type

Returns the status of the number of bytes. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

PutYpos Property

This property moves the data from the current PutBuffer memory pointer to a line in the image specified by the property. See PutBuffer Property and PutBytes Property for more information.

Syntax

[form.]Snowbound1.PutYpos[ = Setting%]

122 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the buffer. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Redraw Property

This property redisplays the current image.

Note: This property only needs to be called if AutoRedraw is set to false. See AutoRedraw Property for more information.

Syntax

[form.]Snowbound1.Redraw[ = {True|False}]

Remarks

Table 3.60: Redraw Property Settings

Setting Description True Redisplays the image False (Default) Image is repainted automatically when dirty

Please refer to the following Snowbound samples for examples of how to use this property:

l Multiple

l Rotate

l SaveMem

Example 3.49:Redraw Property

Private Sub File1_DblClick() ...

' Sets The AutoRedraw To False SnbdActiveX1.AutoRedraw= False

SnbdActiveX1.Image = file1.filename

' Redraw the Image in the Control. SnbdActiveX1.Redraw= True

End Sub

123 Chapter 3 - Custom Control Properties

Data Type

Returns status of the redrawn image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Resize Property

This property changes the X and Y size of the actual image data in memory.

Notes: This affects the size of the image for saving and changes the physical dimensions of the image in memory. Do not use this method for zooming, as it changes the image data. Call this property after ResizeHeight and ResizeWidth are set.

Syntax

[form.]Snowbound1.Resize[ = {True|False}]

Remarks

Table 3.61: Resize Property Settings

Setting Description Resizes the image according to the ResizeHeight and True ResizeWidth settings False (Default) Does not affect the image

Data Type

Returns status of the resized image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

ResizeHeight, ResizeWidth Property

These properties set the height and width of the image to be resized. They are used with the Resize property. See Resize Property for more information.

Syntax

[form.]Snowbound1.ResizeHeight[ = Setting%]

[form.]Snowbound1.ResizeWidth[ = Setting%]

124 Chapter 3 - Custom Control Properties

Data Type

Returns status of the resized image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

RGBToCmyk Property

This property converts a 24-bit RGB image to CMYK as 4 separate 8-bit image planes. The black plane is created.

Syntax

[form.]Snowbound1.RGBToCmyk[ = Setting%]

Data Type

Returns status of the color of the image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

RobertsCross Property

This property uses a Sobel image processing algorithm to edge detect lines in an image.

Syntax

[form.]Snowbound1.RobertsCross[ = {True|False}]

Remarks

Table 3.62: RobertsCross Property Settings

Setting Description Starts the RobertsCross algorithm to detect edges in True the image False (Default) Does not affect the image

Data Type

Returns status of the Sobel image processing algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Sobel sample for examples of how to use this property.

Example 3.50:RobertsCross Property

Private Sub Option1_Click(Index As Integer)

125 Chapter 3 - Custom Control Properties

Select Case Index Case 1 ' Isolate Points. SnbdActiveX1.IsolatePoints = True ... Case 3 ' Roberts Cross. - Edge detect lines in an image SnbdActiveX1.RobertsCross = True

End Sub

Rotate Property

This property permanently rotates the image buffer in memory by the specified angle. The value is in hundredths of degrees. For example, for 90 degrees use 9000.

Notes: The actual image data in memory changes. To rotate the image’s data, use this property for saving. Use RotateScreen for fast rotate that rotates at display time only and does not change the image in memory.

Syntax

[form.]Snowbound1.Rotate[ = Setting%]

Data Type

Returns status of the rotated image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l Rotate

l SaveMem

Example 3.51:Rotate Property

Private Sub Command6_Click()

> Rotate the Image by 5 Degrees SnbdActiveX1.Rotate = 5000 OR

126 Chapter 3 - Custom Control Properties

> Rotate the Image to 90 Degrees SnbdActiveX1.Rotate = 90000

End Sub

RotateScreen Property

This property is a fast rotate used to rotate the image on screen at display time only. The image is not altered during saving.

Note: The available rotation ranges are 0, 90, 180, and 270.

Syntax

[form.]Snowbound1.RotateScreen[ = Setting%]

Data Type

Returns status of the rotated image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Rotate

l Zoom

Example 3.52:RotateScreen Property

Private Sub Command6_Click() ' Rotate the Image to 270 Degrees. SnbdActiveX1.RotateScreen = 270 OR ' Rotate the Image to 90 Degrees. SnbdActiveX1.RotateScreen = 90 OR ' Rotate the Image to 180 Degrees SnbdActiveX1.RotateScreen = 180 OR

' Rotate the Image to 0 Degrees. ' Bring It Back To Normal Display. SnbdActiveX1.RotateScreen = 0

127 Chapter 3 - Custom Control Properties

End Sub

RunsToDib Property

This property converts the internal format for 1-bit bi-level images from runs format to a Windows DIB format (uncompressed).

Syntax

[form.]Snowbound1.RunsToDib[ = {True|False}]

Remarks

Table 3.63: RunsToDib Property Settings

Setting Description True Converts 1-bit bi-level image False (Default) Does not affect the image

Data Type

Returns status of the Windows DIB format. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Save Property

This property saves an image by passing in the name of the image to save. The format is determined by the SaveFormat property.

Syntax

[form.]Snowbound1.Save[ = filename$]

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l SaveMem

Example 3.53:Save Property

Private Sub Command1_Click()

SnbdActiveX1.Encrypt = Int(EncryptValue) SnbdActiveX1.Save = file1.filename

128 Chapter 3 - Custom Control Properties

End Sub

Data Type

String

SaveFormat Property

This property saves an image to disk when used with the Save property. See Save Property for more information.

See Appendix A, Supported File Fomat for information on all internal file formats and settings.

Syntax

[form.]Snowbound1.SaveFormat[ = Setting%]

Data Type

Returns status of the saved format. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l Scan

l SaveMem

SaveQuality Property

This property sets the JPEG format compression. The range is 1 to 100.

Note: Lower values yield better compression with limited quality. Higher values yield lower compression with better quality.

Syntax

[form.]Snowbound1.SaveQuality[ = Setting%]

Data Type

Returns status of the JPEG format compression. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of

129 Chapter 3 - Custom Control Properties

error codes.

ScanAcquire Property

This property begins the scanning process of an image.

Syntax

[form.]Snowbound1.ScanAcquire[ = {True|False}]

Remarks

Table 3.64: ScanAcquire Property Settings

Setting Description True Begins scanning an image from the scanner False (Default) Does not scan the image

Data Type

Returns status of the scanning process. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

ScanAcquireFeeder Property

This property is a TWAIN scanning function used to scan an image from a document feeder.

Note: Continue to set this property until the property returns an error code of -28. A -28 return value indicates that all pages have been scanned from the scanner.

Syntax

[form.]Snowbound1.ScanAcquireFeeder[ = {True|False}]

Remarks

Table 3.65: ScanAcquireFeeder Property Settings

Setting Description True Scans the next page from a TWAIN document feeder.

130 Chapter 3 - Custom Control Properties

Setting Description Continue to call until an error of -28 is returned. False (Default) Does not scan documents.

Data Type

Returns status of the scanned image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

Example 3.54: ScanAcquireFeeder Property

Private Sub Command1_Click()

If Check1.Value = False Then SnbdActiveX1.Showui = 0 Else SnbdActiveX1.Showui = 1 End If SnbdActiveX1.ScanAcquireFeeder = 1

End Sub

ScanBits Property

This property sets the custom scan bits per pixel of the scanner.

Syntax

[form.]Snowbound1.ScanBits[ = Setting%]

Data Type

Returns status of the custom scan bits per pixel of the scanner. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

131 Chapter 3 - Custom Control Properties

ScanBottom, ScanLeft, ScanRight, ScanTop Property

These properties set the positions for acquiring an image from the scanner.

Syntax

[form.]Snowbound1.ScanBottom[ = Setting%]

[form.]Snowbound1.ScanLeft[ = Setting%]

[form.]Snowbound1.ScanRight[ = Setting%]

[form.]Snowbound1.ScanTop[ = Setting%]

Data Type

Returns status of the positions for acquiring an image from the scanner. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

ScanCap Property

This property sets or gets the value of a TWAIN scanning ability. The number of TWAIN capabilities are so numerous that you should consult the TWAIN spec to find all capabilities. See ScanCapGet Property and ScanCapValue Property for more information.

Syntax

[form.]Snowbound1.ScanCap[ = Setting%]

Data Type

Returns status of the TWAIN scanning ability. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the SaveMem sample for examples of how to use this property.

ScanCapGet Property

This property returns the value of a TWAIN scanning capability. See ScanCap Property and ScanCapValue Property for more information.

132 Chapter 3 - Custom Control Properties

Syntax

String$=[form1.]Snowbound1.ScanCapGet

Data Type

String

Please refer to the SaveMem sample for examples of how to use this property.

ScanCapValue Property

This property sets the value of a TWAIN scanning ability. See ScanCap Property and ScanCapGet Property for more information.

Note: RasterMaster only supports returning simple integer values or string values. For capabilities where a pointer is returned, the correct value will not be returned by this property.

Syntax

[form.]Snowbound1.ScanCapValue[ = Setting%]

Data Type

Returns status of the TWAIN scanning ability. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the SaveMem sample for examples of how to use this property.

ScanCloseFeeder Property

This property allows TWAIN support for scanning from a document feeder. After receiving error -28 from ScanAcquireFeeder, set this property to true to close the document feeder and scanner.

Syntax

[form.]Snowbound1.ScanCloseFeeder[ = {True|False}]

Remarks

Table 3.66: ScanCloseFeeder Property Settings

Setting Description True Stops scanning, closes document feeder and scanner

133 Chapter 3 - Custom Control Properties

Setting Description interaction False (Default) Does not affect the scanner

Data Type

Returns status of the TWAIN scanning ability. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the SaveMem sample for examples of how to use this property.

ScanDuplex Property

This property turns on duplex scanning when scanning in fast mode.

Note: Duplex is only supported in TWAIN 1.7 or greater drivers.

Syntax

[form.]Snowbound1.ScanDuplex[ = Integer%]

Data Type

Returns status of duplex scanning. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

ScanFast Property

This property turns on fast TWAIN scanning. TWAIN 1.7 supports the fast memory transfer of image data. This must be supported in the TWAIN driver.

Syntax

[form.]Snowbound1.ScanFast[ = Integer%]

Data Type

Returns status of the TWAIN scanning ability. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound SaveMem sample for examples of how to use this property.

134 Chapter 3 - Custom Control Properties

ScanHres, ScanVres Property

These properties set the custom scan horizontal/vertical resolution in dots per inch (DPI).

Syntax

[form.]Snowbound1.ScanHres[ = Setting%]

[form.]Snowbound1.ScanVres[ = Setting%]

Data Type

Returns status of the custom scan horizontal/vertical resolution in dots per inch (DPI). Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

ScanOpenSource Property

This property selects a TWAIN input source if more than one TWAIN device is installed.

Syntax

[form.]Snowbound1.ScanOpenSource[ = {True|False}]

Remarks

Table 3.67: ScanOpenSource Property Settings

Setting Description Displays a dialog box for choosing the TWAIN device if True multiple devices are found False (Default) Select the default TWAIN device

Data Type

Returns status of the TWAIN scanning ability. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

135 Chapter 3 - Custom Control Properties

Example 3.55:ScanOpenSource Property

Private Sub Command3_Click()

SnbdActiveX1.ScanOpenSource = 1

End Sub

ScanPages Property

This property sets the path\filename for multi-page scans from a document feeder. The name is not utilized, but the pages are saved using a 00000000.img naming convention.

Set the format of an image with the SaveFormat property. See Save Property for more information.

Syntax

[form.]Snowbound1.ScanPages[ = filename$]

Data Type

String

Please refer to the Snowbound SaveMem sample for examples of how to use this property.

ScanSetup Property

This property shows the scanner driver’s dialog box for setting the scanning parameters. After closing the dialog box, the settings are saved.

Notes: This property does not scan. You must call one of the scan acquire functions.

Syntax

[form.]Snowbound1.ScanSetup[ = {True|False}]

Data Type

Returns status of the scanning settings. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound SaveMem sample for examples of how to use this property.

136 Chapter 3 - Custom Control Properties

ScrollBars Property

This property enables and disables horizontal and vertical scroll bars that appear on the image control. The property is enabled when an image is zoomed.

Syntax

[form.]Snowbound1.ScrollBars[ = {True|False}]

Remarks

Table 3.68: ScrollBars Property Settings

Setting Description True (Default) Enables scroll bars in the image control False Disables scroll bars in the image control

Please refer to the following Snowbound samples for examples of how to use this property:

l Animate

l Copying

l Events

l File Info

l LoadText

l Merge

l Multiple

l Octree

l Pan

l Resize

l Zoom

Example 3.56:ScollBars Property

Private Sub File1_DblClick()

... ' Enables and Disables horizontal ' and vertical Scroll bars SnbdActiveX1.ScrollBars = False

SnbdActiveX1.DecompressScreen = File1.filename

End Sub

137 Chapter 3 - Custom Control Properties

Data Type

Returns status of the horizontal and vertical scroll bars. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Select Property - VBX

Selectflag Property - ActiveX

This property draws a rectangle on an image which is moved for zooming. Releasing the mouse triggers the zoom to the size of the rectangle. The rectangle is forced to be aspect-ratio corrected to reflect what is displayed.

Notes: To change this behavior, set AspectRatio to 0 and the rectangle directly tracks the mouse. See AspectRatio Property for more information. Reset AspectRatio to 1 before display time or the image will not be aspect ratio corrected and may cause the image to be stretched. See AspectRatio Property for more information.

Syntax

VBX: [form.]Snowbound1.Select[ = Setting%]

ActiveX: [form.]Snowbound1.Selectflag[ = Setting%]

Data Type

Returns status of the size of the rectangle. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Events

l ImageView

l Zoom

Example 3.57:Selectflag Property

Private Sub Command1_Click()

' Draws A Rectangle On The Image ' For Zooming. SnbdActiveX1.Selectflag = True

138 Chapter 3 - Custom Control Properties

End Sub

SetFormat Property

This property is used with UnSetFormat to turn off or on any of the formats supported by the ActiveX for importing into the library with the Image or MemLoad properties. See UnSetFormat Property, Image Property and MemLoad Property for more information.

See Appendix A, Supported File Formats for all internal file formats and settings.

Syntax

[form.]Snowbound1.SetFormat[ = Setting%]

Data Type

Returns status of the size of the supported formats. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l LoadText

Sharpness Property

This property sets the level of sharpness in an image. The range of acceptable values are from - 127 to +127.

The lower the value, the less the sharpness effect. Lower values blur the image and remove the high frequencies. The higher values increase the edges in the image.

Syntax

[form.]Snowbound1.Sharpness[ = Setting%]

Remarks

Table 3.69: Sharpness Property Settings

Setting Description -127 Minimum sharpness. Note: Tends to blur image. 0 (Default) Retains sharpness of native image. +127 Maximum sharpness. Increases edges of the image.

139 Chapter 3 - Custom Control Properties

Data Type

Returns status of the sharpness in an image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the ImageView sample for examples of how to use this property.

Showui Property

This property displays a TWAIN user interface dialog box during scanning.

Syntax

[form.]Snowbound1.Showui[ = {True|False}]

Remarks

Table 3.70: Showui Property Settings

Setting Description Displays TWAIN user interface dialog box during image True scan (Default) Does not display TWAIN dialog box during False image scan

Data Type

Returns status of the TWAIN user interface. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l SaveMem

l Scan

Example 3.58:Showui Property

Private Sub Command1_Click()

If Check1.Value = False Then SnbdActiveX1.Showui = 0 Else SnbdActiveX1.Showui = 1 End If SnbdActiveX1.ScanAcquire = 1

140 Chapter 3 - Custom Control Properties

End Sub

SizeControl Property

This property resizes the image control when the image is resized.

Syntax

[form.]Snowbound1.SizeControl[ = {True|False}]

Remarks

Table 3.71: SizeControl Property Settings

Setting Description Resizes image control to match the size of the image True displayed in the control (Default) Image control remains the same size at design False time regardless of the actual image displayed within control

Data Type

Returns status of the resized image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Events

l Zoom

Example 3.59:SizeControl Property

Private Sub File1_DblClick()

... ' Image control is resized to match size of the image ' displayed. ' in the control. SnbdActiveX1.SizeControl = False SnbdActiveX1.DecompressScreen = File1.filename

End Sub

141 Chapter 3 - Custom Control Properties

Status Property

This property sets the status event flag.

Syntax

[form.]Snowbound1.Status[ = {True|False}]

Remarks

Table 3.72: Status Property Settings

Setting Description True Sets or enables the status event flag False Un-sets or disables the status event flag

Data Type

Returns status event flag. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Events

l ImageView

TabIndex Property

This property returns or sets the tab order of an object within its parent form. This is a standard Visual Basic property provided by Microsoft.

Syntax

[form.]Snowbound1.TabIndex[ = Setting%]

Data Type

Returns the tab order of an object within its parent form. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix J for a list of error code.

TabStop Property

This property returns or sets a value permitting a user to tab to an object. This is a standard Visual Basic property provided by Microsoft.

Syntax

[form.]Snowbound1.TabStop[ = {True|False}]

142 Chapter 3 - Custom Control Properties

Data Type

Returns the tab order of an object within its parent form. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

TagString/TagValue Property

These properties return values from TagtoRead. They are used for reading TIFF tags or Dicom tags from files. Set the file name to read tags from GetFileInfo.

l An integer is returned in TagValue and a string value is returned in TagString.

l For Dicom tags the upper 16-bits are the group and the lower 16 bits are the element number to read.

Syntax

[form.]Snowbound1.TagString[ = String$]

[form.]Snowbound1.TagValue[ = Integer$]

Data Type

String

Tag Property

This property is a stock property supplied by Microsoft. It associates extra data with the control.

Syntax

[form.]Snowbound1.Tag[ = String$]

Data Type

String

TagtoRead Property

This property sets the tag index of the tag to read. The value is returned in TagString (for Text) and TagValue (for integers). Set the file name from which to read tags with FileInfo. This function is used for reading TIFF tags or Dicom tags from files.

Syntax

[form1.] Snowbound1.TagtoRead[ = Integer%]

143 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the tag index of the tag to read. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Thresh Property

This property converts a 24, 8, or 4-bit image to a 1-bit or bi-level image using a threshold algorithm. The threshold algorithm makes a pixel a 1 or 0 depending on whether it is more or less than the threshold value.

Syntax

[form.]Snowbound1.Thresh[ = Setting%]

Data Type

Returns the status of the threshold algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

TiledImage Property

This property decompresses and displays a TIFF (Tagged Image File Format) or JEDMICS tiled image. This is the same as the Image property but it reads tiled images.

Syntax

[form.]Snowbound1.TiledImage[ = Setting%]

Data Type

Returns the status of the TIFF (Tagged Image File Format) or JEDMICS tiled image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the ImageView sample for examples of how to use this property.

Top Property

This property returns the distance between the Snowbound image control and the top edge of the form it is contained within. This is a standard Visual Basic property provided by Microsoft.

Syntax

Integer% = [form.]Snowbound1.Top

144 Chapter 3 - Custom Control Properties

Data Type

Returns the status of the distance between the Snowbound image control and the top edge of the form. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

TranspColor Property

This property gets or sets the current transparent color. It returns the current transparent color from GIF images, or sets the current transparent color for displaying images transparently.

Syntax

Integer% = [form.]Snowbound1.TranspColor

Data Type

Returns the status of the current transparent color. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

TSCase Property

This function turns on case sensitivity when searching for a string from a MODCA:PTOCA or PDF image that has already been decompressed using the Image property. See Image Property for more information.

Syntax

[form.]Snowbound1.TSCase[ = Setting%]

Table 3.73: TSCase Property Settings

Setting Description 0 Turns off case sensitivity when searching 1 Turns on case sensitivity when searching

Data Type

Returns the status of the case sensitive text. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

TSEnable Property

This function enables and starts text searching from a MODCA:PTOCA or PDF image that has already been decompressed using the Image property.

145 Chapter 3 - Custom Control Properties

See Image Property for more information.

Syntax

[form.]Snowbound1.TSEnable[ = Setting%]

Table 3.74: TSEnable Property Setting

Setting Description 1 Enables and starts text searching

Data Type

Returns the status of text searching. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

TSstring Property

This function searches for a string from a MODCA:PTOCA or PDF image that has already been decompressed using the Image property. See Image Property for more information.

Syntax

String$ = [form.]Snowbound1.TSstring

Data Type

String

UnSetFormat Property

This property is used with the SetFormat property to turn off or on any auto-detection for any supported formats.

See Appendix A, Supported File Formats for all internal file formats and settings.

Syntax

[form.]Snowbound1.UnSetFormat[ = Setting%]

Data Type

Returns the status of the supported formats. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

146 Chapter 3 - Custom Control Properties

UseDDBs Property

If set to true, this property converts an image to a DDB when displaying. This quickly blits the image to the screen and appears to display faster for 8 and 24-bit images.

Note: DDBs use the display adapter and may not work correctly on all machines.

Syntax

[form.]Snowbound1.UseDDBs[ = {True|False}]

Remarks

Table 3.75: UseDDBs Property Settings

Setting Description True Converts the image to a DDB for display (Default) Does not convert the image and stays as DIB for False display

Data Type

Returns the status of the DDB for display. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l Multiple

l Pan

l Zoom

Example 3.60:UseDDBs Property

Private Sub File1_DblClick()

... If option2.Value = True Then SnbdActiveX1(imgindex).UseDDBs = False End If End Sub

147 Chapter 3 - Custom Control Properties

UseHdib Property

This property allows for the import of a Windows Device Independent Bitmap (DIB) from memory. It is a standard memory handle to a Windows DIB.

Syntax

[form.]Snowbound1.UseHdib[ = Setting%]

Data Type

Returns the status of the Windows Device Independent Bitmap (DIB). A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Copying sample for examples of how to use this property.

Example 3.61:UseHdib Property

Private Sub Command1_Click()

SnbdActiveX2.UseHdib = SnbdActiveX1.ImageDib

End Sub

Version Property

This property returns the version of the current Snowbound custom control.

Syntax

Integer% = [form.]Snowbound1.Version

Data Type

Returns the status of the version of the current Snowbound custom control. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

VertEdgeDetect Property

This property applies a Sobel image processing algorithm to enhance all vertical lines of the image. See also HorzEdgeDetect Property for more information.

Syntax

[form.]Snowbound1.VertEdgeDetect[ = {True|False}]

148 Chapter 3 - Custom Control Properties

Remarks

Table 3.76: VertEdgeDetect Property

Setting Description True Enhances vertical lines for the image False (Default) Does not modify the image

Data Type

Returns the status of the Sobel image processing algorithm. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the Snowbound Sobel sample for examples of how to use this property.

Example 3.62: VertEdgeDetect Property

Private Sub Option1_Click(Index As Integer)

Select Case Index ... Case 3 ' Roberts Cross. Edge detect lines in an image SnbdActiveX1.RobertsCross = True Case 9 ' Vertical Edge Detect. SnbdActiveX1.VertEdgeDetect = True ... End Select

End Sub

Visible Property

This property sets the visibility of an object on the form. This is a standard Visual Basic property provided by Microsoft.

Syntax

[form.]Snowbound1.Visible[ = {True|False}]

Remarks

Table 3.77: Visible Property Settings

149 Chapter 3 - Custom Control Properties

Setting Description True (Default) Sets object visible False Sets object not visible

Data Type

Returns the status of the object visibility. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

WindowLevel Property

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 so that they use only a portion of the total range of gray values possible. They appear very dark or washed out. The window-leveling function improves the contrast to allow more details to be present in the image at display time.

If the min and max values are set to 0, the function automatically calculates the best values for the min and max. The image data is never changed since the pixel re-mapping is done at display time.

Syntax

[form.]Snowbound1.WindowLevel[ = Setting%]

Remarks

Table 3.78: WindowLevel Property Settings

Setting Description True Turns window leveling on False (Default) No window leveling

Data Type

Returns the status of window-leveling. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

WhatsThisHelpID Property

This property returns or sets an associated context number for an object. It is used to provide context-sensitive help for your application using the What’s This popup in Windows 95 Help. This is a standard Visual Basic property provided by Microsoft.

150 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.WhatsThisHelpID[ = Setting%]

Data Type

Returns the status of the associated context number for an object.. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

WipeDelay Property

This property sets the total time for a Wipe to display an image in seconds and is used with Effect. See Effect Property for more information.

Syntax

[form.]Snowbound1.WipeDelay[ = Integer%]

Please refer to the Animate sample for examples of how to use this property.

Example 3.63:WipeDelay Property

If Myval > 0 Then SnbdActiveX1.WipeDelay = Int(fldWipeDelay.Text) Else MsgBox ("Invalid Integer Value. 1 -10 Please.") fldWipeDelay.Text = "0" End If

Data Type

Returns the status of time for a Wipe to display an image in seconds. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Zoom Property

This property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

Note: The image is automatically cropped if it is too large for the image control.

151 Chapter 3 - Custom Control Properties

Syntax

[form.]Snowbound1.Zoom[ = Setting%]

Remarks

Table 3.79: Zoom Property Settings

Setting Description <100 Zooms image out by x%. 0 Does not zoom image. Image retains size. Displays image with a one to one pixel display. Each pixel 100 of the image is displayed as one pixel on the display window. >100 Zooms image in by x%.

Data Type

Returns the status of the zoomed image. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Example 3.64: Zoom Property

Private Sub Command2_Click()

' Increase The Zoom View By 25. SnbdActiveX1.Zoom = (SnbdActiveX1.Zoom + 25)

End Sub

Please refer to the following Snowbound samples for examples of how to use this property:

l Annotate

l Events

l ImageView

l Merge

l Multiple

l Octree

l Pan

l Print

l Zoom

152 Chapter 3 - Custom Control Properties

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property

These properties set the cropping rectangle to allow scrolling. They set up the scroll bars to work properly.

Notes: ZoomBottom and ZoomRight are the cropping X and Y size. They are not coordinates. Always set ZoomBottom last as this activates the other properties.

Syntax

[form.]Snowbound1.ZoomLeft[ = Setting%] form.]Snowbound1.ZoomRight[ = Setting%]

[form.]Snowbound1.ZoomTop[ = Setting%] [form.]Snowbound1.ZoomBottom[ = Setting%]

Data Type

Returns the status of cropping rectangle to allow scrolling. A value of 0 indicates success. Any value less than zero is a Snowbound error code. See Appendix I, Snowbound Error Codes for a list of error codes.

Please refer to the following Snowbound samples for examples of how to use this property:

l ImageView

l LoadFile

l LoadText

l Zoom

Example 3.65:ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property

Private Sub SnbdActiveX1_Select(x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer)

' Set the Zoom positions. SnbdActiveX1.ZoomLeft= x1 SnbdActiveX1.ZoomTop = y1 SnbdActiveX1.ZoomRight = x2 - x1 SnbdActiveX1.ZoomBottom = y2 - y1 ' Turn off the Select and zoom. SnbdActiveX1.Selectflag = False

End Sub

153 Chapter 4 - AFP Font Mapping Property

Chapter 4 - AFP Font Mapping Property

This chapter describes the snbd_map.fnt file and the property used for AFP font mapping. The chapter contains the following topics:

AFP Font Mapping

Format of Font Mapping Data

FontMapPath Property

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 ActiveX to use particular fonts when processing your AFP files. RasterMaster ActiveX 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 http://support.snowbound.com , 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 ActiveX automatically loads the snbd_map.fnt file if it is found in one of the following directories:

l The directory into which images are being read. For example: C:\\AFP\\fontmap

l The directory where your application exists as long as you are not changing directories with a dialog box

The following property allows you to set font mapping:

The FontMapPath property sets the path of the font mapping file. See the FontMapPath Property for more information.

Format of Font Mapping Data

Any AFP font name can now be mapped to the following:

l face name

l point size

l bold attributes

l italic attributes

154 Chapter 4 - AFP Font Mapping Property

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 4.1: Description of the sample entry in the snbd_map.fnt file

Variable Description Font resource name in the AFP C0BC25I3 file. Courier New face name to map to. New size in points or 1/72 of an 10 inch. 0 Bold attribute, 0 - off , 1 - on. 0 Italic attribute 0 - off, 1 - on.

FontMapPath Property

This property sets the path of the font mapping file.

Syntax

Setting% = [form.]Snowbound1.FontMapPath

Data Type

Integer

155 Chapter 5 - Properties by Category

Chapter 5 - Properties by Category

This chapter describes available properties by their functionality. Refer to Custom Control Properties for each properties’ proper use. The chapter contains the following topics:

Importing, Loading, Displaying and Saving Images Properties

ASCII Import Properties

Color Reduction Properties

Image Processing and Manipulation Function Properties

Sobel Image Processing Properties

Status And Informational Properties

Printing Properties

Scanning Properties

Importing, Loading, Displaying and Saving Images Properties

The properties in Table 5-1 are used for loading/decompressing images, displaying, and saving them to disk for compression.

See Custom Control Properties for detailed property information.

Note: We refer to decompress as loading any image even if technically it is an uncompressed image.

Table 5.1: Importing, Loading, Displaying, and Saving Image Properties

Accel AutoColor AutoRedraw Decompress_ AspectRatio Copy Screen ErrorStr Fax FaxOffset FaxType FaxXSize FaxYSize FillOrder Filter Image ImageAccel ImageAccelRot MemLoad MemSave MergeMem Page Palette Paste Picture Redraw Save SaveFormat SaveQuality UseHdib

156 Chapter 5 - Properties by Category

ASCII Import Properties

The properties in Table 5-2 set parameters for importing ASCII files. ASCII files are imported with the Image property as any other image. Pass the name of the ASCII file to the Image property. The default value is used if none of the parameters are set.

See Custom Control Properties for detailed property information.

Table 5.2: Importing ASCII File Properties

AsciiBold AsciiCharsPerLine AsciiFont AsciiMarginBotto- AsciiItalic AsciiLinesPerPage m AsciiMarginTop AsciiPageHeight AsciiPageWidth AsciiMarginLeft AsciiMarginRight AsciiPointSize AsciiTab AsciiXdpi AsciiYdpi

Color Reduction Properties

Use the properties in Table 5-3 to permanently reduce the number of bits per pixel for an image. This is not necessary for display only for saving images at a new pixel depth.

See Custom Control Properties for detailed property information.

Table 5.3: Permanently Reducing Image Bit Pixel Properties

BayerColor BayerMono DiffusionColor DiffusionMono Gray HalftoneMono MedianCut OctreeBpp OctreeColors OctreePal OctreeStart Promote8 Promote24 Popularity

Image Processing and Manipulation Function Properties

The properties listed in Table 5-4 are designed to allow changing the image data directly. See Custom Control Properties for detailed property information.

Table 5.4: Changing Image Data Directory Properties

AutoReduce AutoResizeX AutoResizeY AutoSize BackColor BlankControl BorderStyle Brightness ClearImage Contrast CropXPos CropXSize CropYPos CropYSize DelImage Deskew DitherMode DrawMode Effect FlipX FlipY Gamma Interp Invert

157 Chapter 5 - Properties by Category

MergeName MergeXPos MergeYPos MergeXSize MergeYSize Resize ResizeHeight ResizeWidth Rotate RotateScreen ScrollBars Select Sharpness Status UseDDBs Zoom

Sobel Image Processing Properties

The following are the Sobel image processing variety. They simply apply a 3 x 3 matrix of values to the 8-bit or 24-bit image. The values of the matrix depend on the filters listed in Table 5-5. Please refer to the property description and sample code for the proper use of the properties.

See Custom Control Properties or detailed property information.

Table 5.5: Sobel Image Processing Properties

Laplacian RobertsCross IsolatePoints EdgeDetect HorzEdgeDetect Neg45EdgeDetect Pos45EdgeDetect VerticalEdgeDetect

Status And Informational Properties

Table 5-6 lists the properties return information or status on the current image. See Custom Control Properties for detailed property information.

Table 5.6: Image Status and Informational Information Properties

FileType FileTypeName FileTypeStr GetFileInfo ImageBitsPix ImageWidth ImageHeight ImageDib ImageName ImageDate ImageXdpi ImageYdpi Pages

Printing Properties

There are two printing properties available; PrintImage and PrintFast. All Snowbound products for MS-Windows print to any device with a valid Windows printer driver installed. Table 5-7 lists the existing printing and page size properties.

See Custom Control Properties for detailed property information.

Table 5.7: Printing and Page Size Properties

PrintImage PrintFast PrintSize PrintXs PrintXsize PrintYs PrintYsize

158 Chapter 5 - Properties by Category

Gray Scale Images

If a color or gray scale image is being printed to a 1-bit or bi-level printer such as HP- LASERJET type printers, the image is dithered or reduced to 1-bit per pixel automatically.

The capabilities of the printer are detected by the Snowbound libraries to tell if the image must be dithered. The technique employed is the Stucky error diffusion. This simulates a gray scale by the placement of dots. The higher the resolution of the printer, the better the effect.

PrintFast

PrintFast 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 pre-processing.

Note: For more complex printers such as POSTSCRIPT, PrintFast prints large images much faster, but is not guaranteed to work with all printers.

See PrintFast Property for more information on this property.

PrintImage for Printing Bitmaps

Printing bitmaps under Windows is very difficult due to printer drivers not supporting DIB’s, bitmap sizes greater than 64k, scaling, and color reduction.

Due to these problems, it is best to the use the PrintImage property. This causes the library to scale, crop, reduce, and band the image to be able to print on any printer.

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.

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.

159 Chapter 5 - Properties by Category

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.

Scanning Properties

The SnowBound control supports all TWAIN scanners. TWAIN is a driver specification for input devices devised by an independent group.

The proper TWAIN and scanner (or input device) driver must be installed. You should have a TWAIN directory in your \WINDOWS directory if installed.

Normally, it is not necessary to do anything but set ScanAcquire to 1 when scanning a single image. See Custom Control Properties for detailed property information.

Table 5.8: Scanning Properties

ScanAcquire ScanBits ScanBottom ScanCap ScanCapGet ScanCapValue ScanCloseFeeder ScanDuplex ScanFast ScanHres ScanLeft ScanOpenSource ScanPages ScanRight ScanSetup ScanShowUI ScanTop ScanVres

Steps for Scanning

1. Select TWAIN source using ScanOpenSource if more than one device is installed.

2. Set scanning parameters using ScanSetup to set up scanner driver.

3. Use ScanCapValue to set the value of the TWAIN scanning ability. To verify the value, use ScanGetCaps or ScanCaps.

4. Select the paper source using ScanAcquireFeeder (document feeder - single or multiple pages), ScanAcquire (scan single image from flatbed area). You can either scan from the flatbed area of the scanner or the document feeder. Typically, the scanner looks at the document feeder first. If there is no paper in the document feeder, it scans from the flatbed area.

5. Determine if you want to see the TWAIN user interface during scanning, using Showui.

6. Scan multi-page documents from the document feeder using ScanPages.

7. Select the scanning capabilities.

160 Chapter 5 - Properties by Category

l Set bits per pixel using ScanBits.

l Set scanning resolution in DPI, is desired, using ScanHres and ScanVres.

l Set position of image to acquire, if desired, using ScanBottom, ScanLeft, ScanRight, and ScanTop.

8. Close the scanner feeder at the end of scanning using ScanCloseFeeder.

161 Chapter 6 - Saving and Reading Multi-page Images

Chapter 6 - Saving and Reading Multi-page Images

This chapter describes how to decompress, determine page counts, save, and convert multi- page images in the RasterMaster ActiveX Imaging SDK.

Multi-page Images

All Snowbound libraries decompress a single page at a time. This section describes the multi- page formats and how to decompress, determine page count, and save multi-page images.

Supported Multi-page Formats

The RasterMaster ActiveX Imaging SDK currently supports the following multi-page formats:

l TIFF

l DCX

l GIF

l MO:DCA/IOCA

l PDF

l MS Word - Reading

l MS Excel - Reading

l PowerPoint - Reading

l RTF - Reading

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.

The first page is decompressed with the Image property. See Image Property for more information.

To decompress any other page, use the Page property to set the current page number to decompress. See Page Property for more information.

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 Pages

162 Chapter 6 - Saving and Reading Multi-page Images

property. See Pages Property 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 same file, you must first delete the page or save each page to a unique file name. See the Multi- page sample Multi-page for more information.

Multi-page Format Properties

Table 6.1: Supported Multi-page Properties

Properties Description Detects the number of pages in a file. See Pages Property Pages for more information. Image Reads pages. See Image Property for more information. Specify the specific page to import. See Page Property for Page more informaton about this property. Saves multi-page images.

For an existing file, new pages are appended.

For new files, new pages with the specified name are Save created as necessary.

Note: Use a unique filename when saving to multi-page formats; otherwise, images are automatically appended to any file with the same name.

163 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

The RasterMaster products support 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 ActiveX 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 A, Supported File Formats for a complete list of supported file formats.

Automatically Detecting File Formats

In most cases, you do not need to know the file format you wish to convert since RasterMaster products automatically detect the file format regardless of the file extension. File extensions are not mandatory.

RasterMaster ActiveX 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 RasterMaster ActiveX, however, the library automatically determines the bits per pixel for the destination format and promotes accordingly.

Supported Pixel Depths

JPEG supports 8, 24, and 32-bits per pixel, black and white images use 1-bit per pixel, while color images usually require 24-bits per pixel. For many of these cases, RasterMaster ActiveX automatically converts the pixel depth to the appropriate value, based on the output format specified.

See Format Conversion to view a sample of decompressing and saving an image to another format.

Converting Up 8 or 24-bit Pixel Depths

To convert any pixel depths up to 8 or 24-bits, use Promote8 or Promote24. See Promote24, Promote8 Property for more information.

164 Chapter 7 - File Format Conversion

Converting from 24 or 8-bit

To convert from 24 or 8-bits to 1-bit, use DiffusionMono, BayerMono or HalftoneMono. Since each uses a different algorithm, the results you get depend on the image type you are using. It is suggested to try all three.

See DiffusionMono Property, BayerMono Property, and HalftoneMono Property for more information.

File Format Conversion Error Messages

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. It is possible to convert the pixel depth of these images using the IMG_promote_8 or IMG_ promote_24 method.

See Appendix A, Supported File Formats for the pixel depths of each supported format.

165 Chapter 8 - Image Compression

Chapter 8 - Image Compression

This chapter describes how to select the best compression for an image using RasterMaster ActiveX.

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 ActiveX for the best conversion results.

8-Bit Gray Scale Images

For 8-bit gray scale images, use the JPEG format in RasterMaster ActiveX for the best conversion results.

1-bit Bi-Level Images

For 1-bit bi-level images, use the TIFF G4 in RasterMaster ActiveX for the best conversion results. JBIG works about twenty percent better than TIFF G4, but it can be much slower.

166 Chapter 9 - Display Quality

Chapter 9 - Display Quality

This chapter describes how to select the best display quality for an image. This chapter contains the following topics:

24-Bit Images

24-Bit Images Displayed on 256 Color Adapters

Best Quality for 24-Bit Image

Bi-Level and 1-Bit Pixel Images

Using the Alias Property

Large Images

Scale to Gray

Preserve to Black

24-Bit Images

The best display quality depends on the type of image being viewed.

24-Bit Images Displayed on 256 Color Adapters

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 using the DitherMode property. However, this takes a little longer to display. See DitherMode Property for more information.

Best Quality For 24-Bit Images

By far the best quality for 24-bit images can be obtained using the OctreeColors call. Use 256 for the number of colors to optimize to. The image contains an optimized palette so you can only display one quality image at a time. See OctreeColors Property for more information.

Note: The OctreeColors call permanently changes the image to an 8-bit image. Only call the function once.

Bi-Level and 1-Bit Pixel Images

The best results for these images is obtained on text type documents.

167 Chapter 9 - Display Quality

Using the Alias Property

For bi-level or 1-bit per pixel images, set Alias to a value of 2 for scale to gray or 1 for preserve black.

When aliasing is turned on, the scaling algorithm looks at neighboring pixels to try and preserve details that might normally be lost. See Alias Property for more information.

Large Images

Large images at 200 dpi or larger must be scaled to fit on a standard resolution monitor. The default scaling skips pixels such that small lines or details may be ignored.

Scale to Gray

The scale to gray converts the neighboring pixels to an 8-bit gray scale value.

Preserve To Black

The preserve black creates a 1-bit pixel based on neighboring pixels. This has been found to work well on large engineering type drawings.

Note: It is suggested to try both the scale to gray and preserve to black to see what yields the best results on the type of images you are using.

168 Chapter 10 - Installing and Distributing an ActiveX

Chapter 10 - Installing and Distributing an ActiveX

This chapter describes how to install and distribute an ActiveX. This chapter contains the following topics:

ActiveX Overview

Installing an ActiveX for Visual Basic

ActiveX Distribution Problems

Problems Using ActiveX

Dependency Walker

ActiveX Overview

An ActiveX is a module based on Microsoft’s Object Linking and Embedding technology. One of the major features of an ActiveX is its ability to be used by a number of development environments.

When first used, an ActiveX must be registered. This can be done in the development environment or by the regsvr32.exe utility. The syntax is: regsvr32 snbd13cm.ocx.

Installing an ActiveX for Visual Basic

To install an ActiveX:

1. Select Tools. 2. Select Custom Controls. 3. Select Browse to find and select RasterMaster ActiveX.

ActiveX Distribution Problems

One of the main problems that arises when trying to distribute a program utilizing an ActiveX is the message “Load library failed or Library not found.” This happens when one or more of the following dll’s are not present in the \Windows\System directory:

l ole32.dll or later

l msvcrt20.dll or later

169 Chapter 10 - Installing and Distributing an ActiveX

l msvcrt40.dll or later

l mfcans32.dll or later

Problems Using ActiveX

When programming the ActiveX, you may get the following message: “Developers version only.” This message appears when the snbdActiveX.lic file is not present in the same directory as the ActiveX. You should not distribute this file with your application.

Dependency Walker

This tool is included in the newer version of Visual Studio. It shows the file names and version numbers that the OCX must have to run successfully.

To determine what files are missing, compare an install that works correctly with one that does not.

170 Chapter 11 - OCX/VBX Properties

Chapter 11 - OCX/VBX Properties

This chapter describes the RasterNote Annotation and Redlining toolkit and library. Snowbound RasterNote is an optional tool for RasterMaster ActiveX. Contact sales for more information.

The library is called from the developer’s application. Annotation objects are created through an interface and then stored in one or more annotation layers; each stored as a separate file. The annotation objects are registered with the underlying image permitting zooming and scrolling of the overall display without losing registration of the annotation information. The display of the underlying image can be managed through the use of Snowbound’s RasterMaster ActiveX product or any other application or tool that displays images.

The chapter contains the following topics:

AnnActivate Property

AnnAddBitmap Property

AnnAddObject Property

AnnAddText Property

AnnChooseColor Property

AnnChooseFont Property

AnnChooseLineStyle Property

AnnChooseLineWidth Property

AnnCreate Property

AnnFontItalic Property

AnnGetText Property

AnnLoadBitmap Property

AnnMerge Property

AnnMergeFile Property

AnnMode Property

AnnObject Property

AnnObjectNum Property

AnnPrint Property

AnnRead Property

AnnSetBcolor Property

AnnSetFcolor Property

171 Chapter 11 - OCX/VBX Properties

AnnSetFontHeight Property

AnnSetFontName Property

AnnSetFontWeight Property

AnnSetLineStyle Property

AnnSetLineWidth Property

AnnSetObjectNum Property

AnnWrite Property

Annotation Constants

AnnActivate Property

This property turns on and allows text editing for EDIT and POSTIT objects. Text cannot be changed for these controls unless they are made active by setting this property to 1.

Syntax

[form.]Snowbound1.AnnActivate[ = Setting%]

AnnAddBitmap Property

This property takes a file string to a bitmap image and displays it on the Snowbound object as an annotation.

Note: The image string this points to can only be a bitmap image.

Syntax

[form.]Snowbound1.AnnAddBitmap[ = Filename$]

AnnAddObject Property

This property allows the programmatic adding of a new annotation object. The argument to the property is the object type number as defined in the annotation objects types. The standard values are from 1 - 14.

The property uses MergeXpos and MergeYpos for the upper top starting coordinates. The x and y size are specified by the MergeXsize and MergeYsize properties.

Note: The annotations must already have been created.

172 Chapter 11 - OCX/VBX Properties

Syntax

[form.]Snowbound1.AnnAddObject[ = Setting%]

AnnAddText Property

This property allows the programmatic adding in of a new annotation text object. The argument to the property is the text string to add. Use MergeXpos and MergeYpos for the upper top starting coordinates. The x and y size are specified by the MergeXsize and MergeYsize properties.

Note: The annotations must already have been created.

Syntax

[form.]Snowbound1.AnnAddText[ = filename$]

AnnChooseColor Property

This property displays a dialog box for selecting a drawing color. It returns a value of a byte each of red, green, and blue concatenated into a 32-bit integer. Use AnnSetFcolor or AnnSetBcolor to set the actual value passed back from AnnChooseColor.

Syntax

[form.]Snowbound1.AnnChooseColor[ = Setting%]

Remarks

Table 11.1: AnnChooseColor Property Settings

Setting Description True Displays the color picker dialog False (Default) Does nothing

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnChooseFont Property

This property displays a dialog box for selecting the current font, font height, font weight, and italic or bold attributes. Unlike the other choose properties, the values are set into the control since there are too many values to return.

Syntax

[form.]Snowbound1.AnnChooseFont[ = Setting%]

173 Chapter 11 - OCX/VBX Properties

Remarks

Table 11.2: AnnChooseFont Property Settings

Setting Description True Displays the font attributes dialog False (Default) Does nothing

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnChooseLineStyle Property

This property is used to display a dialog box for selecting line style. It returns a line style number. Use AnnSetLineStyle to actually set the line drawing style.

Syntax

[form.]Snowbound1.AnnChooseLineStyle[ = Setting%]

Remarks

Table 11.3: AnnChooseLineStyle Property Settings

Setting Description 0 PS_SOLID - Solid line format 1 PS_DASH - Dashed line format 2 PS_DOT - Dotted line format 3 PS_DASHDOT - Dash, Dot, Dash line format 4 PS_DASHDOTDOT - Dash, Dot, Dot line format

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnChooseLineWidth Property

This property displays a dialog box for selecting line width. It returns a line width in pixels. Use AnnSetLineWidth to actually set the line drawing width.

Syntax

[form.]Snowbound1.AnnChooseLineWidth[ = Setting%]

Remarks

Table 11.4: AnnChooseLineWidth Property Settings

Setting Description True Displays line width dialog False (Default) Does nothing

174 Chapter 11 - OCX/VBX Properties

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnCreate Property

This property creates a new annotation. Setting this property to 1 creates a new annotation object.

Syntax

[form.]Snowbound1.AnnCreate[ = Setting%]

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnFontItalic Property

This property allows setting the font attributes to Italic for a text annotation.

Syntax

[form.]Snowbound1.AnnFontItalic[ = Setting%]

Remarks

Table 11.5: AnnFontItalic Property Settings

Setting Description True (Default) Sets annotation text as italic False Does not set annotation text as italic

AnnGetText Property

This property returns a text string for the current object specified by AnnObjectNum. This is only valid for the EDIT and POSTIT properties. See AnnSetObjectNum Property for more information.

Syntax

[String$ = ][form.] Snowbound1.AnnGetText[ = String%]

AnnLoadBitmap Property

This property is used to specify a .BMP file to use as the BITMAP object of the annotation.

Syntax

[form.]Snowbound1.AnnLoadBitmap[ = Setting%]

175 Chapter 11 - OCX/VBX Properties

AnnMerge Property

This property permanently merges annotations with the image data.

Syntax

[form.]Snowbound1.AnnMerge[ = Setting%]

Remarks

Table 11.6: AnnMerge Property Settings

Setting Description 1 Generates a 1-bit black and white image after merging. Generates a color image after merging. This property 24 needs to be set to 24 in order for color annotations to be viewable.

Data Type

Integer

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnMergeFile Property

This property takes a string filename as an argument; an annotation file to be merged with the current annotations currently being displayed.

Syntax

[form.]Snowbound1.AnnMergeFile[ = filename$]

Data Type

Integer

AnnMode Property

This property turns on or off the annotation display or editing.

Syntax

[form.]Snowbound1.AnnMode[ = Setting%]

Remarks

Table 11.7: AnnMode Property Settings

176 Chapter 11 - OCX/VBX Properties

Setting Description 1 (Default) Turn on annotation display, reading, and writing 2 Turn off annotation display, reading, and writing

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnObject Property

This property sets the next object type for the User Interface code to add. Use the mouse and left button down to draw a rectangle and size for the current size and position to add the next object.

Valid objects are indicated by the values listed in the Annotation Constants.

Note: This property must be set each time a new object is to be added.

Syntax

[form.]Snowbound1.AnnObject[ = Setting%]

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnObjectNum Property

This property sets the object number for use with AnnGetText. This specifies which annotation object number the programmer wishes to get the text from. Annotation object numbers increment starting from 0 when created and are added sequentially.

Valid objects are indicated by the values listed in the Annotation Constants.

Syntax

[form.]Snowbound1.AnnObjectNum[ = Setting%]

AnnPrint Property

This property is used to set the annotation print flag internally so annotations will be printed when PrintImage or PrintImageFast is set.

Syntax

[form.]Snowbound1.AnnPrint[ = Setting%]

Remarks

Table 11.8: AnnPrint Property Settings

177 Chapter 11 - OCX/VBX Properties

Setting Description True Makes annotations available for printing False (Default) Does nothing

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnRead Property

This property reads and displays an annotation file. This file is separate and contains the annotation properties.

Note: The original bitmap is not modified.

Syntax

[form.]Snowbound1.AnnRead[ = Filename$]

AnnSetBcolor Property

This property sets the current background drawing color for drawing new objects. It is used as the background for POSIT objects. The color is a packed RGB chunky with a byte each of read, green, and blue.

Syntax

[form.]Snowbound1.AnnSetBcolor[ = Setting%]

AnnSetFcolor Property

This property sets the current foreground drawing color for drawing new objects. The color is a packed RGB chunky with a byte each of read, green, and blue.

Syntax

[form.]Snowbound1.AnnSetFcolor[ = Setting%]

AnnSetFontHeight Property

This property sets the current font height. The font height is in points.

Syntax

[form.]Snowbound1.AnnSetFontHeight[ = Setting%]

178 Chapter 11 - OCX/VBX Properties

AnnSetFontName Property

This property sets the current font name.

Syntax

[form.]Snowbound1.AnnSetFontName[ = Setting%]

AnnSetFontWeight Property

This property sets the current font weight.

Syntax

[form.]Snowbound1.AnnSetFontWeight[ = Setting%]

AnnSetLineStyle Property

This property sets the current line drawing style for lines, ellipses, rectangles, freehand drawing, and arrows. It only takes effect for line widths of 1.

Syntax

[form.]Snowbound1.AnnSetLineStyle[ = Setting%]

Remarks

Table 11.9: AnnSetLineStyle Property Settings

Setting Description 0 PS_SOLID - Solid line format 1 PS_DASH - Dashed line format 2 PS_DOT - Dotted line format 3 PS_DASHDOT - Dash, Dot, Dash line format 4 PS_DASHDOTDOT - Dash, Dot, Dot line format

Please refer to the Annotate Snowbound samples for examples of how to use this property.

AnnSetLineWidth Property

This property sets the current line drawing width for lines, rectangle, ellipses, freehand drawing, and arrows.

Syntax

[form.]Snowbound1.AnnSetLineWidth[ = Setting%]

Please refer to the Annotate Snowbound samples for examples of how to use this property.

179 Chapter 11 - OCX/VBX Properties

AnnSetObjectNum Property

This property sets the current object number for the object to return the text from AnnGetText.

Syntax

[form.]Snowbound1.AnnSetObjectNum[ = Setting%]

AnnWrite Property

This property writes the current annotations displayed to disk as the filename passed in as a string.

Syntax

[form.]Snowbound1.AnnWrite[ = String$]

Please refer to the Annotate Snowbound samples for examples of how to use this property.

Annotation Constants

The annotation and redlining toolkit also comes with pre-determined annotation constants. They are as follows:

Table 11.10: Annotation Constants

Annotation Constant SANN_FILED_RECT 1 SAN_HIGHLIGHTED_RECT 2 SANN_RECTANGLE 3 SANN_LINE 4 SANN_ELLIPSE 5 SANN_FILLED_ELLIPSE 6 SANN_FREEHAND 7 SANN_BITMAP 8 SANN_POSTIT 9 SANN_POLYGON 10 SANN_FILLED_POLYGON 11 SANN_ARROW 12 SANN_EDIT 13 SANN_TRANSPARENT_BITMAP 14

180 Chapter 12 - Working with PDF and Other Document File Formats

Chapter 12 - 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 ActiveX product. The chapter contains the following topics:

Working with Document File Formats

Reading and Writing Support for PDF File Formats

Working with Document File Formats

Snowbound Software supports many document file formats in most of its viewing, converting, and RasterMaster SDK products.

The supported file formats include:

l PDF - Adobe portable file

l PCL - Hewlett Packard printer format

l DOC - Microsoft Word processor format

l XLS - Microsoft Excel spreadsheet format

l PPT - Microsoft PowerPoint presentation format

l RTF - Rich text file format

l 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 IMG_decompress_bitmap(). For ActiveX, use the Image property. Snowbound Software’s products auto-detect the file format so there is no need to specify which format you are reading. You 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, but RasterMaster can also produce searchable text documents.

The following property returns or sets the default dots per inch (DPI) for imported PDF files: PdfDpi

Saving

This property 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.

181 Chapter 12 - Working with PDF and Other Document File Formats

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 properties: PdfXPageSize

Table 12.1: PdfXPageSize Property Setting

Setting Description PdfXPageSize Sets the output PDF page xsize in points.

PdfYPageSize

Table 12.2: PdfYPageSize Property Settings

Setting Description PdfYPageSize Sets the output PDF page ysize 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:

l RasterMaster Imaging SDK for Windows DLL

l RasterMaster Imaging SDK for ActiveX

l RasterMaster Imaging SDK for .NET

l 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 IMG_ decompress_bitmap(). For RasterMaster ActiveXX, use the Image property. All RasterMaster Imaging 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 IMGLOW_set_pdf_input

182 Chapter 12 - Working with PDF and Other Document File Formats

(dpi,dots_per_inch) function. For RasterMaster ActiveX, call the PdfDpi and PdfBitsPerPixel properties.

Saving to a PDF Document

All RasterMaster Imaging SDK products support writing PDF files. To save a file as PDF, use any of the saving calls such as IMG_save_bitmap() with the file format set to PDF or the file type constant number 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 IMGLOW_set_pdf_output. For RasterMaster ActiveX, use the PdfXPageSize and PdfYPageSize properties. The xsize and ysize parameters are the page size in points or 1/72 of an inch.

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.

183 Appendix A - Supported File Formats

Appendix A - Supported File Formats

This appendix describes the file type number and read/write capabilities of all supported file formats.

RasterMaster ActiveX is a powerful conversion tool that can transform your documents and images into many different formats. Some format types are limited in the amount of color (bit- depth) they support in an image. Some file formats read and write only black and white (1-bit deep) and other file formats support only color images (8+ bits deep). For many of these cases, RasterMaster ActiveX 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.

Table A.1: File Format Key

File Format Description 1-bit Black and white or monochrome images Grayscale images, that may appear to be black and white, but 4-bit, 8-bit, 16-bit contain much more information, and are much larger than 1-bit 8-bit, 16-bit,24-bit, 32-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 http://support.snowbound.com .

Descriptions of Supported File Formats

Table A.2: Supported File Format Descriptions

File Type Input Bit Output Bit File Format Description Number Depth Depth IBM image compression for scanned checks. ABIC (reading) * 46 1 1 Note: Not yet supported with RasterMaster .NET

184 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth x64 or RasterMaster DLL x64. See MO:DCA. This is a AFP (MO:DCA) * 74 1, 24 1 multi-page file format. Snowbound reads in ASCII ASCII 38 1 No text files and converts them to a bitmap. Originated by Microsoft, BMP_ 12 4, 8 4, 8 BMP supports 1, 4, 8, and COMPRESSED 24-bit images. Originated by Microsoft, BMP_ 1 1, 4, 8, 16, 24 1, 4, 8, 16, 24 BMP supports 1, 4, 8, and UNCOMPRESSED 24-bit images. BROOK_TROUT 29 1 1 Brooktrout FAX format. Government specified CALS 18 1 1 format. Group 3 compression for CCITT_G3 33 1 1 bitonal (1-bit) image data.

Group 3 compression for CCITT_G3_FO 53 1 1 bitonal (1-bit) image data.

Group 4 compression for CCITT_G4 34 1 1 bitonal (1-bit) image data.

Group 4 compression for CCITT_G4_FO 52 1 1 bitonal (1-bit) image data. Compact Font Format is a lossless compaction of the Type 1 format using Type 2 charstrings. It is designed to use less storage space than Type 1 fonts by using CFF 83 1 , 8, 24 1 , 8, 24 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 CIFF 81 1 , 8, 24 1 , 8, 24 is a designed by Canon.

185 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth Check Image Management CIMS (ABIC) 80 1 No System. Developed by Carreker. Same as ABIC. Microsoft Windows CLIP 27 1, 4, 8, 24 1, 4, 8, 24, 32 clipboard format. Liberty IMS black and white COD 72 1 No format. Cut images are only 8 bits per pixel and the palette is CUT 31 8 No stored in a separate file. Originated by Media Cybernetics. The DCS format is a standard Quark Express DCS 62 32 32 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 DCX 11 1, 4, 8, 24 1, 4, 8, 24 whole which can be 1, 4, 8, and 24-bit. This is a multi- page file format. Standard Windows Device 1, 4, 8, 16, 24, DIB 48 1, 4, 8, 24 Independent Bitmap. 32 Supports 1, 4, 8 and 24-bits. Medical image format DICOM 55 8, 16, 24 No supporting 1, 12, 16, and 24 pixel images. 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 DOC * 86 1, 8, 24, 32 No 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

186 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth OLE objects. Inconsistencies exist between MS Word and the Word plugin with regards to character and line spacing. Reading support only. This is a multi-page file format. The .docx format is part of a family of open office XML- based formats developed by Microsoft. It is the default document format for saving applications in DOCX * 93 1, 8, 24, 32 No Microsoft Word starting with Office 2007. It is based on XML rather than Microsoft’s . format. Reading support only. This is a multi-page file format. Autodesk® AutoCAD® format. Used for computer aided design (CAD) data and metadata. DWG 90 0 24 Note: Not yet supported with RasterMaster .NET x64 or RasterMaster DLL x64. Autodesk® AutoCAD® format. Used for computer aided design (CAD) data and metadata. See the following, for the full DXF 91 0 24 specification: http://usa.autodesk.com/ad- sk/servlet/item? siteID=123112&id=844669- 8

E-mail message created EMAIL * 89 1 1 with MS Outlook.

EPS (preview) 14 1, 4, 8, 24 1, 8, 24, 32 Encapsulated Postscript

187 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth originated by Adobe. Postscript is an interpreted language. Snowbound does not support 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 EPS_BITMAP 63 8, 24, 32 11, 8, 24, 321 encapsulated Postscript file with either G4 or JPEG data embedded. EPS Compressed bitmap format. It is an Adobe EPS_BITMAP_G4 64 No 1, 8, 24, 321 encapsulated Postscript file with either G4 or JPEG data embedded. EPS Compressed bitmap format. It is an Adobe 1, 8, 24, 321, 8, EPS_BITMAP_LZW 69 No encapsulated Postscript file 24, 32 with either G4 or JPEG data embedded. Image format developed by FILENET 78 1 1 FileNet Corporation for viewing documents. 24-bit tiled JPEG format FLASHPIX 54 8, 24 No that includes multiple resolution images. Created by CompuServe for 2, 3, 4, 5, 6, 7, compressing 2, 3, 4, 5, 6, 7, GIF 4 4, 8 8 and 8-bit palette images. Uses the LZW algorithm. Same as GIF except stores 1, 2, 3, 4, 5, 6, GIF_INTERLACED 44 4, 8 the raster data in an 7, 8 interlaced order. Originated by Brightbill Roberts for ShowPartner DOS applications. Supports GX2 22 4, 8 No 4 and 8-bit images. Simple run length encoding technique.

Hyperlink Text Markup HTML * 82 0 24 Language (HTML) is a tag-

188 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth 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 ICONTYPE 25 1, 4 No independent bitmap. Supports 1 and 4 bits uncompressed. Used on the Commodore Amiga computers for native IFF_ILBM 26 1, 4, 8, 24 1, 4, 8, 24 bitmap format. Uses a run length format for 1, 4, and 8- bit palette images. Originated by Digital IMG 28 1 No Research for storing 1-bit images. IMNET G4 compressed IMNET 42 1 No format. Image object content architecture. IBM format which uses CCITT G3, G4, IOCA (MO:DCA) * 24 1, 24 1 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 JBIG * 71 1 1 (with plugin) ** 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 JBIG2 77 1 1 (with plugin) ** dramatic compression results. Snowbound's viewers and conversion programs can be used to directly view JBIG2 documents or convert those

189 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth

documents to a variety of output formats.

Note: Not yet supported with RasterMaster .NET x64 or RasterMaster DLL x64. US Military CCITT G4 tiled image format for storing JEDMICS 56 1 1 Government documents and drawings. Supports 1- bit per pixel. Joint Photographics Experts Group. This was a group spearheaded by Kodak for 24, 32, and 8-bit gray scale lossy JPEG 13 8, 24, 32 8, 24, 32 compression. This is by far the best compression available for these types of images supported in the current Snowbound library. JPEG 2000 specification. This is similar to JPEG but produces much better compression with better JPEG2000 * 70 8, 24 8, 24 quality. It is supported as a separate plugin. An option exists to set the compression level for saving. KOFAX 23 1 No Kofax Format. Compression for documents originated by LASERDATA 19 1 No LaserData Corp. 1-bit images only. Presents data for each LINE_DATA 75 1 1 variable on a single line. Original Apple bitmap file format. All MacPaint MACPAINT 21 1 No images are 720 x 576 pixels 1 bit. MAG 61 1 No Mag Format.

190 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth Image object content architecture. IBM format MODCA_IOCA * 49 1, 24 1 which uses CCITT G3, G4, and IBM MMR formats. 1- bit only. Microsoft Paint program bitmap file format. Supports 1-bit images. Uses a type of MSP 30 1 No RLE compression found also in compressed .BMP files. A simple header with NCR 65 1 No CCITT group 4 data. Open Document Format is an XML-based file format for representing electronic ODF 98 No No documents such as spreadsheets, charts, presentations and word processing documents. Open Document Format for ODP 101 No No presentations. Open Document Format for ODS 97 No No spreadsheets. Open Document Format for ODT 96 No No 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 OOXML * 94 No No 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 PCL_1 (with plugin) * 57 1, 24 1 and grayscale output. Supported as a separate

191 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth

plugin. This is a multi-page file format.

Hewlett Packard printer file format. RasterMaster PCL_1 (without converts all images to a 1- 57 No 1 plugin) * bit raster image. Supported as a separate plugin. This is a multi-page file format. Hewlett Packard printer file format. Support for color PCL_5 * 76 No 1 and grayscale output. This is a multi-page file format. Zsoft bitmap file format. Similar to pack bits PCX 2 1, 4, 8, 24 1, 4, 8, 24 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 specification and conforms 1, 2, 4, 8, 16, PDF(with plugin) * 59 1, 24 to PDF v1.4. Does not 24, 32 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.

192 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth 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 PDF (without plugin) 59 No 1, 24 with the PDF/A specification. 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 PDF_15 79 No 1, 24 with the PDF/A specification and conforms to PDF v1.4. Does not currently support JPEG2000 in PDF for Java. Supports some types of Adobe specified PDF annotations, however does not support XFA annotations. Does not support corrupt PDF

193 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth documents. Snowbound Software requires that the fonts needed be available on the system. This is a multi-page file format. Portable Document Format. File format developed by Adobe to capture formatting information from a variety of desktop publishing applications. It allows the user to send formatted documents and have them appear on the recipient's monitor or printer as they were intended. Compatible with the PDF/A specification and conforms PDF_16 92 No 1, 24 to PDF v1.4. Does not currently support JPEG2000 in PDF for Java. Supports some types of Adobe specified PDF annotations, however does not support XFA 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 least 5 images. Get these images as you would a multi-page file PhotoCD 39 24 No format.

Page 0 - 768 x 512 Page 1 - 384 x 256 Page 2 - 192 x 128 Page 3 - 1536 x 1024 Page 4 - 3072 x 2048

194 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth Images are uncompressed until the 1536 x 1024 images or greater. All images are stored as YCC data which is luminance then blue and red chrominance channels. The large image must be built from the smaller images by interpolation then adding the residual data stored by Huffman encoding. format for storing 1, 4, 8, 16, 24, and 32-bit images. Can be Photoshop 41 1, 4, 8, 24, 32 1, 8, 24, 32 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. 1, 2, 4, 8, 16, Only the bitmap portion of PICT 15 1, 4, 8, 24 24, 32 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 1, 4, 8, 16, 24, 1, 4, 8, 16, 24, encoding variant. Supports PNG 43 32 32 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 PPT * 85 1, 8, 24, 32 No 97, Microsoft PowerPoint 2000, Microsoft PowerPoint 2002, and Microsoft Office PowerPoint 2003. Reading

195 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth 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 document format for saving applications in PPTX * 100 1, 8, 24, 32 No Microsoft PowerPoint starting with Office 2007. It is based on XML rather than Microsoft's .ppt format. Reading support only. This is a multi-page file format. format. Supports RAST 37 1, 8, 24 1, 8, 24 1, 8, 24, and 32-bits. Run length encoded format. The is a method of encoding formatted text and graphics RTF * 87 1, 8, 24, 32 No for easy transfer between applications. This is a multi- page file format. The SCITEX format is a proprietary format originated from SCITEX Corporation. SCITEX 60 24, 32 24, 32 Gray scale color and CMYK color images. Usually compressed. The SCITEX format is a TARGA 3 8, 16, 24, 32 8, 16, 24, 32 proprietary format originated from SCITEX Corporation. The SCITEX format is a TARGA16 32 16 24, 32 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 TIFF_2D 17 1 No number of bits per pixel, planes and several compression algorithms. The byte order may be Intel or Motorola format. The

196 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth bytes may also be filled from right to left or left to right. Compression may be uncompressed, pack bits, LZW, modified Huffman, CCITT G4, CCITT G3, CCITT G3-2D or JPEG. The CCITT G4 file format only saves to black and white. This is a multi-page file format. TIFF file with Arithmetic Binary encoding. Requires a special ABIC version of our tools. Very popular for TIFF_ABIC 46 4, 8 No check imaging. BW is used for 1-bit bi-level and TIFF_ ABIC is for 4-bit gray scale images. TIFF file with Arithmetic Binary encoding. Requires a special ABIC version of our tools. Very popular for TIFF_ABIC_BW 47 1 No 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. ANSI baseline Group 3 or Group 4 compression TIFF_G3_FAX 8 1 1 embedded in a TIFF. This is a multi-page file format. ANSI baseline Group 3 or Group 4 compression TIFF_G4_FAX 10 1 1 embedded in a TIFF. This is a multi-page file format. ANSI baseline Group 3 or Group 4 compression TIFF_G4_FAX_FO 51 1 1 embedded in a TIFF. This is a multi-page file format. ANSI baseline Group 3 or TIFF_G4_FAX_ Group 4 compression 67 No 1 STRIP embedded in a TIFF. This is a multi-page file format. TIFF_HUFFMAN 7 1 1 TIFF file compressed using

197 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth the Huffman compression algorithm. This is a multi- page file format. Standard ANSI baseline JBIG compression TIFF_JBIG 66 1 1 embedded in a TIFF. This is a multi-page file format. TIFF_JPEG Standard ANSI baseline If you have issues JPEG embedded in a TIFF. 40 8, 24 8, 24, 32 viewing, please This is a multi-page file see Appendix J, format. Troubleshooting. Black and white gray scale TIFF_JPEG7 73 1, 8 1, 8 format. This is a multi-page file format. TIFF file compressed using the LZW compression algorithm. The LZW 1, 4, 8, 16, 24, TIFF LZW 9 1, 4, 8, 24, 32 algorithm includes the look- 32 up table of codes as part of the compressed file. This is a multi-page file format. Simple run length encoding 1, 4, 8, 16, 24, TIFF_PACK 16 1, 8 algorithm. This is a multi- 32 page file format. Uncompressed raw binary TIFF 1, 2, 4, 8, 16, 1, 4, 8, 16, 24, 0 data. This is a multi-page UNCOMPRESSED 24, 32 32 file format. Windows file format for WBMP 68 1 1 wireless devices. A simple header with WINFAX 58 1 No CCITT group 3 compression. Microsoft format. These may contain vector information such as lines and circles. Only the bitmap data is extracted. 1, 4, 8, 16, 24, WMF 6 1, 4, 8, 24 This is in the form of a 32 standard windows DIB. May be 1, 4, 8, and 24-bit. The 4 and 8-bit images may be compressed using Microsoft RLE compression

198 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth

as in .BMP files.

WordPerfect’s metafile format. This is similar to the WMF file format in that it may contain vector WPG * 5 1, 4, 8, 24 1, 4, 8 information. Supports 1, 4, 8, and 24-bit images. Only the bitmap data is extracted. Xwindows file format which encodes each pixel as an XBM 20 1 1 ASCII byte. Only supports 8-bits per pixel. Encapsulated Postscript for Xerox_EPS 45 1 No Xerox. Microsoft Excel Spreadsheet format for structuring and analyzing data. This is the binary file format used by Microsoft XLS * 84 1, 8, 24, 32 No Excel 97, Microsoft Excel 2000, Microsoft Excel 2002, and Microsoft Office Excel 2003. Reading support only. This is a multi-page file format. The .xlsx format is part of a family of open office XML- based formats developed by Microsoft. It is the default document format for saving applications in XLSX * 95 1, 8, 24, 32 No Microsoft Excel starting with Office 2007. It is based on XML rather than Microsoft's .xls format. Reading support only. This is a multi-page file format.

199 Appendix A - Supported File Formats

File Type Input Bit Output Bit File Format Description Number Depth Depth Xwindows bitmap file format stored as ASCII XPM 35 1, 4, 8 8 data. Each pixel is stored as an ASCII byte. UNIX Raster format. XWD 36 1, 4, 8 1, 8, 24, 32 Each pixel is stored as an ASCII byte.

* = optional only

File Type Constants Listed by File Type Number

Table A.3: 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

200 Appendix A - Supported File Formats

File Type Number File Type Name 26 IFF_ILBM 27 CLIP 28 IMG 29 BROOK_TROUT 30 MSP 31 CUT 32 TARGA16 33 CCITT_G3 34 CCITT_G4 35 XPM 36 XWD 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 JPEG2000

201 Appendix A - Supported File Formats

File Type Number File Type Name 71 JBIG 72 COD 73 TIFF_JPEG7 74 AFP 75 LINE_DATA 76 PCL_5 77 JBIG2 78 FILENET 79 PDF_15 80 CIMS 81 CIFF 82 HTML 83 CFF 84 XLS 85 PPT 86 DOC 87 RTF 88 PDF_LZW 89 EMAIL 90 DWG 91 DXF 92 PDF_16 93 DOCX 94 OOXML 95 XLSX 96 ODT 97 ODS 98 ODF 100 PPTX 101 ODP

202 Appendix B - Software Installation

Appendix B - Software Installation

This appendix describes how to install the evaluation or full copy of the Snowbound RasterMaster ActiveX Imaging SDK software. The appendix contains the following topics:

Overview of the Installation Process

Minimum Requirements

Installing the Software

Directory Structure

Installed Files

Overview of the Installation Process

RasterMaster ActiveX 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 [email protected] or 1-617-607-2010. The evaluation copy expires at the end of each month.

Both the developer and runtime version of RasterMaster ActiveX ship as fully serialized builds which are very easy to install. This product is fully enabled as either a developer or runtime product.

RasterMaster ActiveX 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\RMActiveX

Notes: For RasterMaster ActiveX, 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.

Starting with version 14, RasterMaster ActiveX’s file naming convention will no longer include the version number in the file name and will follow a generic naming convention. For example, in the previous version, the file named snbd13cm.dll will now be named snbdcm.dll.

203 Appendix B - Software Installation

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.

Note: You are running an evaluation version of the software if an evaluation banner appears on the screen. Contact support at http://support.snowbound.com for help with these issues. If you download an update or received one from Snowbound technical support, please ensure that you obtain a serialized version of the product before you go into distribution.

Minimum Requirements

To install RasterMaster ActiveX, you must meet certain minimum processor speed and RAM requirements.

Minimum Processor Speed RasterMaster ActiveX must be installed on a 100Mhz Pentium processor or greater. When installing the PDF processing version, or when dealing with large images, you should have the fastest possible processor.

Minimum RAM The computer where you are installing RasterMaster ActiveX must have at least 128 MB of RAM. The more RAM, the better.

What to Expect When Installing an Evaluation Version

Your evaluation is a full version of the product with the following limitations:

l You will see a pop up banner when you view or convert your first document. Subsequent documents in the same session will not elicit the banner.

l You will see large thin Xs across each page after the first 50 pages or thumbnails.

l After your expiration date, you will see a banner stating the evaluation has expired. You will not see any output.

Other than that you will have full use of the product including support for all document formats.

What to Expect in a Production Version

When you purchase RasterMaster ActiveX, 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 ActiveX.

204 Appendix B - Software Installation

Installing the Production Version of RasterMaster ActiveX

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.

Installing the Software

There are three different versions of RasterMaster ActiveX that can be installed; traditional SDK, SDK with PDF, and SDK with ABIC.

Note: The installation dialogs that you see during your actual installation may be slightly different depending on which version of the SDK you install. In this example, RasterMaster ActiveX with PDF is being installed.

To install RasterMaster ActiveX:

1. Double-click on the downloaded executable. In this example, double-click on Snowbound-RMExtOcx.exe to display the display the Welcome dialog.

205 Appendix B - Software Installation

2. After reading the dialog, click Next to display the License Agreement dialog.

206 Appendix B - Software Installation

3. Read the license agreement.

l If you agree with the license agreement, select “I accept the license agreement” and click Next to display the Readme Information dialog.

l If you do not agree with the license agreement, you cannot proceed with the installation.

4. Click Next after reading the Readme information to display the Destination Folder dialog.

207 Appendix B - Software Installation

5. Accept the default destination folder and click Next to display the Ready to Install dialog.

208 Appendix B - Software Installation

6. Click Next to begin the installation. Installation begins. This may take a few seconds.

7. You will see a warning message if you do not have the Visual C++ 2005 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++ 2005 Redistributable prerequisite file and continue the RasterMaster ActiveX installation.

209 Appendix B - Software Installation

8. Once installation is complete, the Successful Installation dialog displays.

210 Appendix B - Software Installation

9. Click Finish to complete the installation.

Directory Structure

The installation of RasterMaster ActiveX creates a new directory called C:\Program Files\Snowbound\RM. The example below is a version 18 RasterMaster ActiveX directory.

RM17ActiveX Docs Images Marketing Samples

Installed Files

This section describes the files that are installed during the RasterMaster ActiveX installation. The main installation directory is RMActiveX. For example, if you install the version 18 ActiveX, the directory will be RM18ActiveX. There is also a Product Documentation, Docs, and Samples subdirectory.

211 Appendix B - Software Installation

Main Directory Files

Table B.1: RasterMaster ActiveX Default Directory Files

File Description abicplug.dll ABIC plugin file. Aspose.Words.dll Aspose.Words library file. Aspose.Words.lic Aspose.Words.lic DOCPLUG.dll MS Word plugin file. dwgplg.dll DWG plugin file. HtmlHelper.dll HTML plugin file. htmlplg.dll HTML plugin file. icudt38.dll HTML plugin file. jb2plug.dll JBIG2 plugin file. jp2plug.dll JPEG2 plugin file. ooxmlplug.dll Open Office XML (OOXML) plugin file. pclplug.dll PCL plugin file. pdfplug.dll PDF plugin file. Main Snowbound file for use with Plus or Extended snbdca.ocx installations containing Annotations (redlining). snbdocx.lic Snowbound license file.

Docs Directory

Table B.2: RasterMaster ActiveX Product Documentation Directory Files

File Description Aspose_LicenseAgreement.pdf Aspose end user license agreement. Snowbound Software component installation install_instructions-component.pdf instructions. Open Source Software Licenses Used With Open source sofware license agreement bundled Certain Snowbound Products_2009.05.pdf with Snowbound Software products. RMActiveXProgrammersGuide.pdf Complete ActiveX programmers guide. RMActiveXReleaseNotes.pdf ActiveX release notes.

Marketing Directory Files

Table B.3: RasterMaster ActiveX Marketing Directory Files

212 Appendix B - Software Installation

File Description Provides an overview of Snowbound Software including CompanyOverview.pdf company facts, products, and formats. Provides an overview of Snowbound Software’s RasterMasterOverview.pdf RasterMaster products.

Sample Directory

Table B.4: RasterMaster ActiveX Samples Directory

Sample Description Allows you to decompress and play a Animate_VB4 supported animation image file. See Animate for more information. Shows you the use of most annotation methods. In this sample, you can create an Annotate_VB4 annotation object such as 'Fill Rectangle' and/or 'Highlight Rectangle' as well as many others. See Annotate for more information. Shows you the use of most annotation methods. In this sample, you can create an Annotate_VB5 annotation object such as 'Fill Rectangle' and/or 'Highlight Rectangle' as well as many others. See Annotation for more information. Loops through the specified source directory and converts files, based on the selected BatchConvert_VB5 source file format and places them into the destination directory. See BatchConvert for more information. Compares an image that had brightness and contrast changes made with the BritCnst_VB4 original/unmodified image. See BritCnst for more information. Demonstrates how to create a copy of an Copying_VB4 image file decompressed into a Snowbound Object. See Copying for more information. Demonstrates how to use the Snowbound Events_VB4 ActiveX events to retrieve and set properties and data. See Events for more information. Demonstrates two ways of gathering an FileInfo_VB4 image file information. See File Info for more information. Demonstrates two ways of loading and ImageView_VB5 viewing an image file. See ImageView for more information.

213 Appendix B - Software Installation

Sample Description Demonstrates the loading and displaying of Loadfile_VB4 ASCII (multi-page) text files. See LoadFile for more information. Demonstrates the loading and displaying of Loadtext_VB4 ASCII (multi-page) text files. See LoadText for more information. Allows displaying of images with XORing Merge_VB4 and ANDing Boolean operations. See Merge for more information. Displays multiple images through a Multiple_VB4 Snowbound Object Array. See Multiple for more information. Demonstrates the Octree Color Reduction Octree_VB4 algorithm. See Octree for more information. Demonstrates how to create a view panel that magnifies the image at the selected Pan_VB4 mouse position. See Pan for more information. Demonstrates how to create a view panel that magnifies the image at the selected Pan_VB5 mouse position. See Pan for more information. Demonstrates how to copy an image from a Visual Basic PictureBox control to a Picture_VB4 Snowbound Object. See Picture for more information. Demonstrates how to quickly print ¼, ½, ¾, Print_VB4 or the full page of an image. See Print or more information. Demonstrates a simple way to create a Resize_VB4 thumbnail. See Resize for more information. Demonstrates the quickest way to rotate an Rotate_VB4 image on screen to 0, 90, 180, or 270 degrees. See Rotate or more information. Shows the properties associated with saving SaveMem_V54 and loading an image from a memory pointer. See SaveMem for more information. Demonstrates how to select the scanner Scan_VB4 device. See Scan for more information. Demonstrates how to select the scanner. Scan_VB5 See Scan for more information. Demonstrates how to decompress and save an image into another format. It uses an SetPDFOutputSizePerPage_VB6 input file, save format type, and output filename. SimpleConversionDM_VB6 Demonstrates how to decompress and save

214 Appendix B - Software Installation

Sample Description an image into another format. It uses an input file, save format type, and output filename. See Format Conversion for more information. Demonstrates how to split a given multi- page file into single page files and/or saves SimpleMultipageSavingSplittingSM_VB6 all images from a directory into one multi- page file. See Multi-page for more information. Demonstrates how to search for a given text string and extract that text from a given file. Text_Search_Extract_VB6 See Text Search and Extract for more information. Shows the methods associated with saving Thumbnail_VB5 and loading an image from a memory pointer. See Thumbnail for more information. Shows the methods associated with resizing WatermarkOCXSample watermark images and throws an exception if it fails. Demonstrates several types of zooming properties as well as how they react when Zooming_VB4 rotating. See Zoom for more information.

215 Appendix C - Samples Using Visual Basic V4.0

Appendix C - Samples Using Visual Basic V4.0

This appendix describes the samples available with RasterMaster ActiveX using Visual Basic V4.0.

If you do not find the sample that you are looking for in this manual, please open a support ticket at http://support.snowbound.com to request a specific sample. We are dedicated to helping our customers succeed and we are constantly enhancing our products based on feedback from customers like you.

The appendix contains the following topics:

Animate

Annotate

BritCnst

Copying

Events

File Info

ImageView

LoadFile

LoadText

Merge

Multiple

Octree

Pan

Picture

Print

Resize

Rotate

SaveMem

Scan

Zoom

216 Appendix C - Samples Using Visual Basic V4.0

Animate

This sample allows you to decompress and play a supported animation image file.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

FitToWidth Property forces the image display to fit the image to the width of the current control and allow for scrolling of the width.

FitToHeight Property forces the image display to fit the image to the height of the current control and allow for scrolling of the width.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

AutoSize Property sets the desired display method as it pertains to the current image control.

Image Property decompresses and displays the image to the current control.

AnimateImage Property decompresses and plays all frames of a supported animated image in the current control.

Annotate

This sample shows you the use of most annotation methods. In this sample, you can create the following annotation objects:

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

l Line

l Arrow

l Rectangle

l Fill Rectangle

l Highlight Rectangle

l Filled Circle

l Circle

l Polygon

l Filled Polygon

l Freehand

l Edit

l Post-it

Listed below are the properties used in this sample.

217 Appendix C - Samples Using Visual Basic V4.0

AnnMerge Property permanently merges annotations with the image data.

AnnPrint Property sets the annotation print flag internally so annotations will be printed.

AnnObject Property sets the next object type for the User Interface code to add.

AnnChooseColor Property displays a dialog box for selecting a drawing color.

AnnSetFcolor Property sets the current foreground drawing color for drawing new objects.

AnnChooseFont Property displays a dialog box for selecting the current font, font height, and italic or bold attributes.

AnnChooseLineWidth Property displays a dialog box for selecting line width.

AnnSetLineWidth Property sets the current line drawing width for lines, rectangle, ellipses, freehand drawing, and arrows.

AnnChooseLineStyle Property displays a dialog box for selecting line style.

AnnSetLineStyle Property sets the current line drawing style for lines, ellipses, rectangles, freehand drawing, and arrows.

AnnRead Property reads and displays an annotation file.

AnnWrite Property writes the current annotations displayed to disk as the filename passed in as a string.

AnnCreate Property creates a new annotation.

AnnMode Property turns on or off the annotation display or editing.

PrintSize Property sets the image print size.

PrintImage Property prints the current image in the image control to the default printer.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

Image Property decompresses and displays the image to the current control.

BritCnst

This sample compares an image that had brightness and contrast changes made with the original/unmodified image.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

Brightness Property sets the image’s luminous intensity in the current image control window. The range of values are -127 to +127.

218 Appendix C - Samples Using Visual Basic V4.0

Contrast Property represents the relative difference between the black and white values. The range of values are -127 to +127.

Image Property decompresses and displays the image to the current control.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

AutoSize Property sets the desired display method as it pertains to the current image control.

ImageHeight, ImageWidth Property returns the height and width of the image displayed in the control, which represents the size of the image data in pixels.

ImageBitspix Property returns the bits per pixel of the image in the current control.

ImageXdpi, ImageYdpi Property returns or sets the horizontal and vertical dots per inch (DPI) of the current image located in the current image.

Orientation Property returns image orientation. This value is the amount of rotation in degrees needed to properly display the image.

FileType Property returns the current image file type number displayed in the control.

Copying

This sample demonstrates how to create a copy of an image file decompressed into a Snowbound Object. ImageDib retrieves a pointer to the DIB image data stored in a Snowbound Objects memory and passes that to another Snowbound Object to create a copy using UseHdib. You can select the image that you want to copy. Select the Copy Image to Snowbound Image Control Two button to make a copy of the image. The system displays the original and the copied image.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

Copy Property copies the image in the current image control to the Windows clipboard as a bitmap.

ImageDib Property returns a pointer to the image data stored in memory as a Windows DIB (Device Independent Bitmap).

UseHdib Property allows for the import of a Windows DIB (Device Independent Bitmap) from memory.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

AutoSize Property sets the desired display method as it pertains to the current image control.

Image Property decompresses and displays the image to the current control.

219 Appendix C - Samples Using Visual Basic V4.0

ImageHeight, ImageWidth Property returns the height and width of the image displayed in the control, which represents the size of the image data in pixels.

ImageBitspix Property returns the bits per pixel of the image in the current control.

ImageXdpi, ImageYdpi Property returns or sets the horizontal and vertical dots per inch (DPI) of the current image located in the current image.

Orientation Property returns image orientation. This value is the amount of rotation in degrees needed to properly display the image.

FileType Property returns the current image file type number displayed in the control.

Events

This sample demonstrates how to use the Snowbound ActiveX Control Events to retrieve and set properties and data, such as using the _MouseMove and _Select events to crop and area of an image for zooming. You can select an image. You can Zoom In, Zoom Out, or Zoom an Area of the image. The system displays the screen X and Y position and the image’s X and Y position. The system also displays the Crop Info which shows Crop X and Y and Crop Xsize and Ysize.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

ImageError Property returns an integer corresponding to the image error.

ImagePosX, ImagePosY Property returns the image pixel X and Y screen position while the mouse is over the image control.

CropXpos, CropYpos Property sets the crop start position of a cropping rectangle and are used for zooming or sectioning the image.

CropXsize, CropYsize Property sets the height and width of the image to crop and are used with the CropXpos and CropYpos properties.

Select Property - VBX Selectflag Property - ActiveX draws a rectangle on an image which is moved for zooming.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

SizeControl Property resizes the image control when the image is resized.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

Status Property sets the status event flag.

Image Property decompresses and displays the image to the current control.

AutoSize Property sets the desired display method as it pertains to the current image control.

220 Appendix C - Samples Using Visual Basic V4.0

Listed below are the events used in this sample.

_Error _MouseMove

_Repaint

_Scroll

_Select

_Status

File Info

This sample demonstrates two ways of gathering image file information. GetFileInfo retrieves the relevant file information without decompressing the image. Image decompresses the image into the Snowbound Object before the relevant information is retrieved.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

It displays the following information about the image:

l ImageHeight

l ImageWidth

l ImageBitPix

l ImageXDPI

l ImageYDPI

l Orientation

Listed below are the properties used in this sample.

GetFileInfo Property fills in ImageWidth, ImageHeight, ImageBitxPix, ImageXDPI, ImageYDPI, and Orientation by interrogating the image for which you are getting information.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

AutoSize Property sets the desired display method as it pertains to the current image control.

Image Property decompresses and displays the image to the current control.

ImageHeight, ImageWidth Property returns the height and width of the image displayed in the control, which represents the size of the image data in pixels.

ImageBitspix Property returns the bits per pixel of the image in the current control.

ImageXdpi, ImageYdpi Property returns or sets the horizontal and vertical dots per inch (DPI) of the current image located in the current image.

221 Appendix C - Samples Using Visual Basic V4.0

Orientation Property returns image orientation. This value is the amount of rotation in degrees needed to properly display the image.

ImageView

This sample exercises some of the most common calls for the OCX. The ImageView sample in essence allows you to open and view, gather information, and modify that image with methods like Despeckle, Deskew or Contrast. It allows you to select the Next Page and Previous Page. You can Merge Draw Mode and select an Effect on load. You can select the brightness or contrast and set the sharpness. You can select the following options Zoom Rectangle, Invert, Pan Window, Flip Vertical, Flip Horizontal, and View Statu Bar. You can Zoom In, Zoom Out, Fit Height, or Fit Width. It also allows you to save that image in a selected format.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

About Property displays a message box in the center of the control.

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

AsciiBold Property sets the bold font style for the imported ASCII text.

AsciiFont Property sets the font style name for the imported ASCII text.

AsciiItalic Property sets the Italic font style for imported ASCII text.

AsciiPointSize Property sets the text point size for the imported ASCII text.

AutoRedraw Property automatically forces a redraw after most imaging operations such as rotate, flip, brightness, contrast, and others.

Brightness Property sets the image’s luminous intensity in the current image control window. The range of values are -127 to +127.

Contrast Property represents the relative difference between the black and white values. The range of values are -127 to +127.

Deskew Property fixes skewed or rotated images in the control.

Despeckle Property removes noise from a 1-bit bi-level image.

DrawMode Property draws one image on top of another.

Effect Property displays the image with special effects or wipes.

Encrypt Property allows encryption of a supported image.

ErrorStr Property returns an error string for the last called property.

FileType Property returns the current image file type number displayed in the control.

FileTypeName Property specifies the image name from which to retrieve file type information.

222 Appendix C - Samples Using Visual Basic V4.0

FileTypeStr Property returns the FileType name from the current image.

FitToHeight Property forces the image display to fit the image to the height of the current control and allow for scrolling of the width.

FitToWidth Property forces the image display to fit the image to the width of the current control and allow for scrolling of the width.

FlipX Property when set to true, flips the image in the control horizontally or swaps pixels along the X axis around the center of the image.

FlipY Property when set to true, flips the image in the control vertically or swaps pixels along the Y axis around the center of the image.

GetFileInfo Property fills in ImageWidth, ImageHeight, ImageBitxPix, ImageXDPI, ImageYDPI, and Orientation by interrogating the image for which you are getting information.

Gray Property converts 8, 24, and 32-bit color images to 8-bit grayscale.

Image Property decompresses and displays the image to the current control.

ImageBitspix Property returns the bits per pixel of the image in the current control.

ImageDib Property returns a pointer to the image data stored in memory as a Windows DIB (Device Independent Bitmap).

ImageError Property returns an integer corresponding to the image error.

ImageHeight, ImageWidth Property returns the height and width of the image displayed in the control, which represents the size of the image data in pixels.

ImagePosX, ImagePosY Property returns the image pixel X and Y screen position while the mouse is over the image control.

ImageXdpi, ImageYdpi Property returns or sets the horizontal and vertical dots per inch (DPI) of the current image located in the current image.

Invert Property inverts all pixels of the image. It turns all white pixels to black and all black pixels to white.

MemLoad Property decompresses and loads the image from a memory pointer.

MemSave Property is used to save the image from a memory pointer. It returns the size of the image saved in memory, and works the same as Save but does so from a memory pointer.

MergeMem Property takes a handle from a DIB (Device Independent Bitmap) in memory and merges the image onto the current existing bitmap in the ActiveX Control.

MergeXpos, MergeYpos Property sets the X and Y positions for the image merge to take place.

Orientation Property returns image orientation. This value is the amount of rotation in degrees needed to properly display the image.

Overlay Property sets the path for overlay files for PT:OCA images.

223 Appendix C - Samples Using Visual Basic V4.0

Page Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

Pages Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

PanWindow Property turns on and off the pan window.

PixelValue Property returns the pixel value after setting PixelXpos and the PixelYpos values.

PixelXpos/PixelYpos Property sets the X and Y coordinates of the pixel value returned in PixelValue.

Promote24, Promote8 Property converts one format to another when pixel depths are different.

Rotate Property permanently rotates the image buffer in memory by the specified angle.

Save Property saves an image by passing in the name of the image to save.

SaveFormat Property saves an image to disk when used with the Save property.

Select Property - VBX Selectflag Property - ActiveX draws a rectangle on an image which is moved for zooming.

SetFormat Property is used with UnSetFormat to turn off or on any of the formats supported by the ActiveX for importing into the library with the Image or MemLoad properties.

Sharpness Property sets the level of sharpness in an image. The range of acceptable values are from -127 to +127.

Status Property sets the status event flag.

TiledImage Property decompresses and displays a TIFF (Tagged Image File Format) or JEDMICS tiled image.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property sets the cropping rectangle to allow scrolling. They set up the scroll bars to work properly.

LoadFile

This sample demonstrates two ways of loading and viewing an image file. Image decompresses the whole image before it is viewed. The second way, by using DecompressScreen, displays the images as it is imported from disk, while being decompressed. It allows you to Zoom In and Zoom Out of the image and to display the image while loading.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

224 Appendix C - Samples Using Visual Basic V4.0

Image Property decompresses and displays the image to the current control.

DecompressScreen Property imports images from disk. This property displays the image as it is being decompressed.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property sets the cropping rectangle to allow scrolling. They set up the scroll bars to work properly.

LoadText

This sample demonstrates the loading and displaying of ASCII (multi-page) text files. It allows you to Zoom In and Zoom Out of the image and to select the Next Page and the Previous Page.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

Page Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

Pages Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

SetFormat Property is used with UnSetFormat to turn off or on any of the formats supported by the ActiveX for importing into the library with the Image or MemLoad properties.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

AsciiBold Property sets the bold font style for the imported ASCII text.

AsciiFont Property sets the font style name for the imported ASCII text.

AsciiItalic Property sets the Italic font style for imported ASCII text.

AsciiLinesPerPage Property sets the number of lines per page for the imported ASCII text.

AsciiMarginBottom, AsciiMarginTop Property sets the bottom and top margins for the page for the imported ASCII text. The units are in 1/1000 of an inch.

AsciiMarginBottom, AsciiMarginTop Property sets the bottom and top margins for the page for the imported ASCII text. The units are in 1/1000 of an inch.

AsciiMarginLeft, AsciiMarginRight Property specifies the left and right margins for the imported ASCII text. The units are in 1/1000 of an inch.

AsciiPageHeight, AsciiPageWidth Property sets the page height and width for the imported ASCII text. The units are in 1/1000 of an inch.

AsciiPointSize Property sets the text point size for the imported ASCII text.

225 Appendix C - Samples Using Visual Basic V4.0

AsciiXdpi, AsciiYdpi Property sets the X and Y dots per inch (DPI) for the imported ASCII text.

Filter Property sets the aliasing quality factor. It is used with the Alias property when set to 1 or 2 to determine how many neighboring pixels to look at when scaling the images down to a smaller display size on the screen

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property sets the cropping rectangle to allow scrolling. They set up the scroll bars to work properly.

Image Property decompresses and displays the image to the current control.

Merge

This sample displays images with XORing and ANDing Boolean operations. It allows you to Zoom In and Zoom Out of the image and to merge the next selected image with the current image in the control. Refer to the DrawMode Property for more information.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

ImagePosX, ImagePosY Property returns the image pixel X and Y screen position while the mouse is over the image control.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

DrawMode Property draws one image on top of another.

Image Property decompresses and displays the image to the current control.

MergeXpos, MergeYpos Property sets the X and Y positions for the image merge to take place.

Mergename Property allows the merging of one image onto another.

Listed below are the events used in this sample. _MouseUp

Multiple

This sample displays multiple images through a Snowbound Object Array. It also allows you to display the images in DDB, using UseDDB, which quickly blits the images to the screen. This allows 8 and 24-bit images to appear faster.

226 Appendix C - Samples Using Visual Basic V4.0

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

By using Image, you can display images normally. Use DecompressScreen to display the images as they are decompressed from disk.

Listed below are the properties used in this sample.

AutoColor Property used when displaying multiple palette images.

BlankControl Property clears the background of the image control before displaying the image in the current image control window.

Palette Property refers to realizing the image palette.

Redraw Property redisplays the current image.

DitherMode Property controls color reduction of the image when the image needs to be reduced as a result of the display adapter.

UseDDBs Property converts an image to a DDB when displaying when set to true.

DecompressScreen Property imports images from disk. This property displays the image as it is being decompressed.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

AutoSize Property sets the desired display method as it pertains to the current image control.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

Image Property decompresses and displays the image to the current control.

Listed below are the events used in this sample. _Click

Listed below are the arrays used in this sample.

Snowbound Object Array

Octree

This sample demonstrates the Octree Color Reduction algorithm. It allows you to Zoom In and Zoom Out of the image and Octree - custom palette. It also allows you to select the Bit Depth and the Max Colors.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

227 Appendix C - Samples Using Visual Basic V4.0

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

Image Property decompresses and displays the image to the current control.

OctreeBpp Property sets the bits per pixel for the Octree image color reduction algorithm.

OctreeColors Property sets the number of colors for Octree color reduction.

OctreePal Property uses the palette passed as a pointer of RGBQUAD structures for Octree color reduction.

OctreeStart Property executes the Octree image color-reduction algorithm when set to true.

Pan

This sample demonstrates how to create a view panel that magnifies the image at the selected mouse position. It displays the X and Y position and the Image Width and Image Height position. It also allows you to select Magnify, Grab, or Magnify Pan.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

When you open an image in this sample, you can do the following:

l You can use your mouse after click the Magnify option to enlarge a picture.

l Use the Grab option to scroll the image around when magnified.

l Create a window (pan window) that when moved on top of the image you are able to enlarge the image into the pan window at the position the pan window.

l You can view the relevant information like Pixel position in the image, etc.

Listed below are the properties used in this sample.

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

BlankControl Property clears the background of the image control before displaying the image in the current image control window.

CropXpos, CropYpos Property sets the crop start position of a cropping rectangle and are used for zooming or sectioning the image.

CropXsize, CropYsize Property sets the height and width of the image to crop and are used with the CropXpos and CropYpos properties.

Height, Width Property sets the height and width of the Snowbound control window.

Image Property decompresses and displays the image to the current control.

228 Appendix C - Samples Using Visual Basic V4.0

ImageHeight, ImageWidth Property returns the height and width of the image displayed in the control, which represents the size of the image data in pixels.

ImagePosX, ImagePosY Property returns the image pixel X and Y screen position while the mouse is over the image control.

PixelXpos/PixelYpos Property sets the X and Y coordinates of the pixel value returned in PixelValue.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

UseDDBs Property converts an image to a DDB when displaying when set to true.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

Picture

This sample demonstrates how to copy an image from a Visual Basic PictureBox control to a Snowbound Object.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

BorderStyle Property sets the current image controls border style.

Picture Property copies the image from the Microsoft Visual Basic standard picture control into a Snowbound image control window.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

Print

This sample demonstrates how to quickly print ¼, ½, ¾, or the full page of an image. Refer to PrintXs, PrintYs Property and PrintXsize, PrintYsize Property to print an image area by coordinates.

Listed below are the properties used in this sample.

PrintImage Property prints the current image in the image control to the default printer.

PrintSize Property sets the image print size.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

Image Property decompresses and displays the image to the current control.

229 Appendix C - Samples Using Visual Basic V4.0

Resize

This sample demonstrates a simple way to create a thumbnail. It allows you to select Auto resize X and Auto resize Y.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

AspectRatio Property sets the aspect ratio of the displayed image.

AutoSize Property sets the desired display method as it pertains to the current image control.

AutoResizeX, AutoResizeY Property scales the image to the size specified.

Image Property decompresses and displays the image to the current control.

Rotate

This sample demonstrates the quickest way to rotate an image on screen to 0, 90, 180, or 270 degrees. It allows you to Zoom In and Zoom Out of the image and to display the image while loading. It also allows you to select Rotate 0, Rotate 90, Rotate 180, and Rotate 270. To permanently rotate images see Rotate Property.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

RotateScreen Property is a fast rotate used to rotate the image on screen at display time only.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

DecompressScreen Property imports images from disk. This property displays the image as it is being decompressed.

Image Property decompresses and displays the image to the current control.

SaveMem

This sample shows you the properties associated with saving and loading and image from a memory pointer. It also allows you to modify the image by rotating, flipping, and/or inverting the image. This demonstrates that the loading and saving of the image has been instantiated.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

230 Appendix C - Samples Using Visual Basic V4.0

Since there is no way to know how large an image will be once saved to memory, get the original compressed file size and add about 20KB (assuming you have done nothing to the image). If you're saving to a different file format, e.g., from TIFF_G4_FAX to JPEG or GIF, you need to take the uncompressed file size, and multiply by 8 or 24 (depending on the pixel depth you are saving to). You must do this because TIFF_G4_FAX has only 1-bit per pixel, whereas JPEG and GIF can be 8, 24, or 32-bits per pixel. This automatically makes the uncompressed file size 8, 24, or 32 times larger.

This affects the final compression ratio, but it is impossible to know the final size of the compressed image. For JPEG and GIF you should probably assume 2 or 3 to 1 for the compression ratio. What does that mean? Take the uncompressed size of the image and divide by 2 or 3 and that is how much memory you should allocate (the size of the byte array) for saving.

Note: There is an issue saving to a byte array in Visual Basic. VB5 does not understand a pointer to a byte array, it does, however, understand a pointer to the first element (for you C/C++ programmers, yes, we know it's the same thing), so we use the function VarPtr (which cannot handle a pointer to an array, but it can handle a pointer to an element in the array), and pass the resulting pointer to ocxSnowbound.MemSave.

Listed below are the properties used in this sample.

FlipX Property when set to true, flips the image in the control horizontally or swaps pixels along the X axis around the center of the image.

FlipY Property when set to true, flips the image in the control vertically or swaps pixels along the Y axis around the center of the image.

Invert Property inverts all pixels of the image. It turns all white pixels to black and all black pixels to white.

Rotate Property permanently rotates the image buffer in memory by the specified angle.

DelImage Property deletes the image from the image control and frees the memory associated with that image.

ClearImage Property clears the image from the background of the control. This does not delete the current image.

Contrast Property represents the relative difference between the black and white values. The range of values are -127 to +127.

Redraw Property redisplays the current image.

MemLoad Property decompresses and loads the image from a memory pointer. It works the same as the Image property, but does so from a memory pointer.

Image Property decompresses and displays the image to the current control.

231 Appendix C - Samples Using Visual Basic V4.0

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

Save Property saves an image by passing in the name of the image to save.

SaveFormat Property saves an image to disk when used with the Save property.

ScanAcquire Property begins the scanning process of an image.

ScanAcquireFeeder Property is a TWAIN scanning function used to scan an image from a document feeder.

ScanBits Property saves an image to disk when used with the Save property.

ScanBottom, ScanLeft, ScanRight, ScanTop Property sets the positions for acquiring an image from the scanner.

ScanCap Property sets the positions for acquiring an image from the scanner.sets the positions for acquiring an image from the scannersets or gets the value of a TWAIN scanning ability.

ScanCapGet Property returns the value of a TWAIN scanning capability.

ScanCapValue Property sets the value of a TWAIN scanning ability.

ScanCloseFeeder Property allows TWAIN support for scanning from a document feeder.

ScanDuplex Property turns on duplex scanning when scanning in fast mode.

ScanFast Property turns on fast TWAIN scanning. TWAIN 1.7 supports the fast memory transfer of image data.

ScanHres, ScanVres Property sets the custom scan horizontal/vertical resolution in dots per inch (DPI).

ScanOpenSource Property selects a TWAIN input source if more than one TWAIN device is installed.

ScanPages Property sets the path\filename for multi-page scans from a document feeder.

ScanSetup Property shows the scanner driver’s dialog box for setting the scanning parameters.

Showui Property displays a TWAIN user interface dialog box during scanning.

MemSave Property is used to save the image from a memory pointer. It returns the size of the image saved in memory, and works the same as Save but does so from a memory pointer.

ImageDib Property returns a pointer to the image data stored in memory as a Windows DIB (Device Independent Bitmap).

Scan

This sample lets you select which scanner device to use. You have a choice of where to acquire a image, through ADF or the flatbed. You can also bring up the Vendors User Interface to set up scanning properties.

232 Appendix C - Samples Using Visual Basic V4.0

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

The sample show you how to select the scanner you want, access to the selected scanner driver dialog box in order to set the scanning parameters. It shows you to how to set the properties of the scanner such as resolution and scan area with the CAP defines or you can bring up the scanner particular User Interface.

Notes: Scan_cap_declairs.bas contains the TWAIN defines need for scanning methods like ScanCap and ScanCapValue. To use this sample, you must have a TWAIN compliant driver for your scanner. TWAIN drivers vary considerably in there implementation of what level of compliance they have. Check for ScanFast (high-speed data transfer). Faster TWAIN drivers are unhindered by the Snowbound ActiveX control software, so the ScanFast provides no noticeable benefit. This property should be set to ‘True’ for slower drivers.

Listed below are the properties used in this sample.

ScanDuplex Property turns on duplex scanning when scanning in fast mode.

Showui Property displays a TWAIN user interface dialog box during scanning.

SaveFormat Property saves an image to disk when used with the Save property.

ScanBits Property saves an image to disk when used with the Save property.

ScanHres, ScanVres Property sets the custom scan horizontal/vertical resolution in dots per inch (DPI).

ScanBottom, ScanLeft, ScanRight, ScanTop Property sets the positions for acquiring an image from the scanner.

ScanAcquire Property begins the scanning process of an image.

ScanAcquireFeeder Property is a TWAIN scanning function used to scan an image from a document feeder.

ScanOpenSource Property selects a TWAIN input source if more than one TWAIN device is installed.

Zoom

This sample demonstrates several types of zooming properties as well as how the images react when rotating. It allows you to select the following in the Display Mode: Fit to window, 1 to 1, 1 to centered, and Size Control. You can select to Zoom In, Zoom Out, or Zoom Area. You can select to rotate 0, 90, 180, or 270 degrees.

233 Appendix C - Samples Using Visual Basic V4.0

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

RotateScreen Property is a fast rotate used to rotate the image on screen at display time only.

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property sets the positions for acquiring an image from the scanner.

Select Property - VBX Selectflag Property - ActiveX draws a rectangle on an image which is moved for zooming.

AspectRatio Property sets the aspect ratio of the displayed image.

AutoSize Property sets the desired display method as it pertains to the current image control.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

SizeControl Property resizes the image control when the image is resized.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

UseDDBs Property converts an image to a DDB when displaying when set to true.

Image Property decompresses and displays the image to the current control.

DecompressScreen Property imports images from disk. This property displays the image as it is being decompressed.

234 Appendix D - Samples Using Visual Basic V5.0

Appendix D - Samples Using Visual Basic V5.0

This appendix describes the samples available with RasterMaster ActiveX using Visual Basic V5.0.

If you do not find the sample that you are looking for in this manual, please open a support ticket at http://support.snowbound.com to request a specific sample. We are dedicated to helping our customers succeed and we are constantly enhancing our products based on feedback from customers like you.

See Directory Structure for sample locations. The appendix contains the following topics:

Annotation

BatchConvert

ImageView

Multi-page

Pan

SaveMem

Scan

Thumbnail

Annotation

This sample shows how to use the annotations methods. In this sample, you can create the following annotation objects:

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

l Filled Rectangle

l Highlight

l Rectangle

l Line

l Circle

l Filled Circle

l Freehand

l Bitmap

235 Appendix D - Samples Using Visual Basic V5.0

l Post-it

l Polygon

l Filled Polygon

l Arrow

l Edit

Listed below are the properties used in this sample.

AnnChooseLineStyle Property displays a dialog box for selecting line style.

AnnSetLineStyle Property sets the current line drawing style for lines, ellipses, rectangles, freehand drawing, and arrows.

AnnChooseColor Property displays a dialog box for selecting a drawing color.

AnnSetFcolor Property sets the current foreground drawing color for drawing new objects.

AnnChooseFont Property displays a dialog box for selecting the current font, font height, and italic or bold attributes.

AnnChooseLineWidth Property displays a dialog box for selecting line width.

AnnSetLineWidth Property sets the current line drawing width for lines, rectangle, ellipses, freehand drawing, and arrows.

AnnObject Property sets the next object type for the User Interface code to add.

AnnLoadBitmap Property is used to specify a .BMP file to use as the BITMAP object of the annotation.

AnnMerge Property permanently merges annotations with the image data.

AnnMode Property turns on or off the annotation display or editing.

AnnCreate Property creates a new annotation.

AnnActivate Property turns on and allows text editing for EDIT and POSTIT objects.

AnnRead Property reads and displays an annotation file. This file is separate and contains the annotation properties.

AnnWrite Property writes the current annotations displayed to disk as the filename passed in as a string.

Redraw Property redisplays the current image.

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

Image Property decompresses and displays the image to the current control.

Rotate Property permanently rotates the image buffer in memory by the specified angle.

236 Appendix D - Samples Using Visual Basic V5.0

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

BatchConvert

This sample program in essence loops through the specified source directory. It then converts files, based on the selected source file format, into the selected destination file format. Those files are then placed in the destination directory.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

This sample also allows you to view all the images as they are being converted and to split multi-page images into separate converted files. There is also an option to delete the source file after conversion.

Note: On very large multi-page files, it’s faster to start converting the pages and keep checking for the last page. An Error 11 is displayed when the system goes beyond the last page (Snowbound Object.Page). Some documents cannot be automatically converted to other formats. For instance, a 1- bit TIF cannot be converted to a GIF without first issuing a Promote8, Promote24, or Gray command.

Listed below are the properties used in this sample. The following properties are used in turning on or off viewing of images:

AutoRedraw Property automatically forces a redraw after most imaging operations such as rotate, flip, brightness, contrast, and others.

DelImage Property deletes the image from the image control and frees the memory associated with that image.

Redraw Property redisplays the current image.

The following properties are used in the main batch conversion function.

Image Property decompresses and displays the image to the current control.

ImageError Property returns an integer corresponding to the image error.

SaveFormat Property saves an image to disk when used with the Save property.

ImageBitspix Property returns the bits per pixel of the image in the current control.

DiffusionMono Property converts the image to 1-bit per pixel (black and white) using a Stucky error diffusing algorithm.

Save Property saves an image by passing in the name of the image to save.

237 Appendix D - Samples Using Visual Basic V5.0

ImageView

This sample exercises some of the most common calls for the OCX. The ImageView sample in essence allows you to open and view, gather information, and modify that image with methods like Despeckle, Deskew, or Contrast. It allows you to select the Next Page and Previous Page. You can Merge Draw Mode and select an Effect on load. You can select the brightness or contrast and set the sharpness. You can select the following options Zoom Rectangle, Invert, Pan Window, Flip Vertical, Flip Horizontal, and View Statu Bar. You can Zoom In, Zoom Out, Fit Height, or Fit Width. It also allows you to save that image in a selected format.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

About Property displays a message box in the center of the control.

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

AsciiBold Property sets the bold font style for the imported ASCII text.

AsciiFont Property sets the font style name for the imported ASCII text.

AsciiItalic Property sets the Italic font style for imported ASCII text.

AsciiPointSize Property sets the text point size for the imported ASCII text.

AutoRedraw Property automatically forces a redraw after most imaging operations such as rotate, flip, brightness, contrast, and others.

Brightness Property sets the image’s luminous intensity in the current image control window. The range of values are -127 to +127.

Contrast Property represents the relative difference between the black and white values. The range of values are -127 to +127.

Deskew Property fixes skewed or rotated images in the control.

Despeckle Property removes noise from a 1-bit bi-level image.

DrawMode Property draws one image on top of another.

Effect Property displays the image with special effects or wipes.

Encrypt Property allows encryption of a supported image.

ErrorStr Property returns an error string for the last called property.

FileType Property returns the current image file type number displayed in the control.

FileTypeName Property specifies the image name from which to retrieve file type information.

FileTypeStr Property returns the FileType name from the current image.

238 Appendix D - Samples Using Visual Basic V5.0

FitToHeight Property forces the image display to fit the image to the height of the current control and allow for scrolling of the width.

FitToWidth Property forces the image display to fit the image to the width of the current control and allow for scrolling of the width.

FlipX Property when set to true, flips the image in the control horizontally or swaps pixels along the X axis around the center of the image.

GetFileInfo Property fills in ImageWidth, ImageHeight, ImageBitxPix, ImageXDPI, ImageYDPI, and Orientation by interrogating the image for which you are getting information.

Gray Property converts 8, 24, and 32-bit color images to 8-bit grayscale.

Image Property decompresses and displays the image to the current control.

ImageBitspix Property returns the bits per pixel of the image in the current control.

ImageDib Property returns a pointer to the image data stored in memory as a Windows DIB (Device Independent Bitmap).

ImageError Property returns an integer corresponding to the image error.

ImageHeight, ImageWidth Property returns the height and width of the image displayed in the control, which represents the size of the image data in pixels.

ImagePosX, ImagePosY Property returns the image pixel X and Y screen position while the mouse is over the image control.

ImageXdpi, ImageYdpi Property returns or sets the horizontal and vertical dots per inch (DPI) of the current image located in the current image.

Invert Property inverts all pixels of the image. It turns all white pixels to black and all black pixels to white.

MemLoad Property decompresses and loads the image from a memory pointer.

MergeMem Property takes a handle from a DIB (Device Independent Bitmap) in memory and merges the image onto the current existing bitmap in the ActiveX Control.

MergeXpos, MergeYpos Property sets the X and Y positions for the image merge to take place.

Orientation Property returns image orientation. This value is the amount of rotation in degrees needed to properly display the image.

Overlay Property sets the path for overlay files for PT:OCA images.

Pages Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

PanWindow Property turns on and off the pan window.

PixelValue Property returns the pixel value after setting PixelXpos and the PixelYpos values.

239 Appendix D - Samples Using Visual Basic V5.0

PixelXpos/PixelYpos Property sets the X and Y coordinates of the pixel value returned in PixelValue.

Promote24, Promote8 Property converts one format to another when pixel depths are different.

Rotate Property permanently rotates the image buffer in memory by the specified angle.

Save Property saves an image by passing in the name of the image to save.

SaveFormat Property saves an image to disk when used with the Save property.

Select Property - VBX Selectflag Property - ActiveX draws a rectangle on an image which is moved for zooming.

SetFormat Property is used with UnSetFormat to turn off or on any of the formats supported by the ActiveX for importing into the library with the Image or MemLoad properties.

Sharpness Property sets the level of sharpness in an image. The range of acceptable values are from -127 to +127.

Status Property sets the status event flag.

TiledImage Property decompresses and displays a TIFF (Tagged Image File Format) or JEDMICS tiled image.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

ZoomBottom, ZoomLeft, ZoomRight, ZoomTop Property sets the cropping rectangle to allow scrolling. They set up the scroll bars to work properly.

Multi-page

This sample accomplishes two tasks: it splits a given multi-page file into single page files and/or saves all images from a directory into one multi-page file.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

Image Property decompresses and displays the image to the current control.

ErrorStr Property returns an error string for the last called property.

Pages Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

Page Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

SaveFormat Property saves an image to disk when used with the Save property.

Save Property saves an image by passing in the name of the image to save.

240 Appendix D - Samples Using Visual Basic V5.0

Pan

This sample is used to open an image and select the magnify option to enlarge the image. You can also use the Grab option to scroll the image around when magnified.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

This sample creates a window (pan window). When this window is moved on top of the image, the enlarged image appears in the pan window. You can view the relevant information in the image, like Pixel position and more.

Listed below are the properties used in this sample.

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

BlankControl Property clears the background of the image control before displaying the image in the current image control window.

CropXpos, CropYpos Property sets the crop start position of a cropping rectangle and are used for zooming or sectioning the image.

CropXsize, CropYsize Property sets the height and width of the image to crop and are used with the CropXpos and CropYpos properties.

Height, Width Property sets the height and width of the Snowbound control window.

Image Property decompresses and displays the image to the current control.

ImageHeight, ImageWidth Property returns the height and width of the image displayed in the control, which represents the size of the image data in pixels.

ImagePosX, ImagePosY Property returns the image pixel X and Y screen position while the mouse is over the image control.

PixelXpos/PixelYpos Property sets the X and Y coordinates of the pixel value returned in PixelValue.

ScrollBars Property enables and disables horizontal and vertical scroll bars that appear on the image control.

UseDDBs Property converts an image to a DDB when displaying when set to true.

Zoom Property allows an image to be zoomed in or out. The value range is 0 to 1000. 100 is the standard full size image.

SaveMem

This sample shows you the properties associated with saving and loading an image from a memory pointer. It also allows you to modify the image by rotating, flipping, and/or inverting the

241 Appendix D - Samples Using Visual Basic V5.0

image. This sample demonstrates that the loading and saving of the image has been instantiated.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Notes: Since there is no way to know how large an image will be once saved to memory, get the original compressed file size and add about 20KB (assuming you have done nothing to the image). If you're saving to a different file format, e.g., from TIFF_G4_FAX to JPEG or GIF, you need to take the uncompressed file size, and multiply by 8 or 24 (depending on the pixel depth you are saving to). This is because TIFF_G4_FAX has only 1 bit per pixel, whereas JPEG and GIF can be 8, 24, or 32 bits per pixel. This automatically makes the uncompressed file size 8, 24, or 32 times larger. This will affect the final compression ratio, but it is impossible to know the final size of the compressed image. For JPEG and GIF you should probably assume 2 or 3 to 1 for the compression ratio. What does that mean? Take the uncompressed size of the image and divide by 2 or 3 and that is how much memory you should allocate (the size of the byte array) for saving. There is an issue saving to a byte array in Visual Basic. VB5 does not understand a pointer to a byte array, it does, however, understand a pointer to the first element, so we use the function VarPtr (which cannot handle a pointer to an array, but it can handle a pointer to an element in the array), and pass the resulting pointer to ocxSnowbound.MemSave.

Listed below are the properties used in this sample.

FlipX Property when set to true, flips the image in the control horizontally or swaps pixels along the X axis around the center of the image.

FlipY Property when set to true, flips the image in the control vertically or swaps pixels along the Y axis around the center of the image.

Invert Property inverts all pixels of the image. It turns all white pixels to black and all black pixels to white.

Rotate Property permanently rotates the image buffer in memory by the specified angle.

DelImage Property deletes the image from the image control and frees the memory associated with that image.

ClearImage Property clears the image from the background of the control. This does not delete the current image.

Redraw Property redisplays the current image.

MemLoad Property decompresses and loads the image from a memory pointer. It works the same as the Image property, but does so from a memory pointer.

Image Property decompresses and displays the image to the current control.

242 Appendix D - Samples Using Visual Basic V5.0

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

Save Property saves an image by passing in the name of the image to save.

SaveFormat Property saves an image to disk when used with the Save property.

MemSave Property is used to save the image from a memory pointer. It returns the size of the image saved in memory, and works the same as Save but does so from a memory pointer.

ImageDib Property returns a pointer to the image data stored in memory as a Windows DIB (Device Independent Bitmap).

Scan

This sample shows you how to accomplish many scanning tasks. They are as follows:

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

l Scan images in duplex mode though a feeder, or scan an image located on the flatbed of the scanner.

l Scan images to create multi-page documents through the ScanPages method.

l Select the scanner you want and access to the selected scanner driver dialog box in order to set the scanning parameters.

l Set the properties of the scanner such as resolution and scan area with the CAP defines.

l Bring up the scanner particular User Interface.

Notes: In order to use this sample you must have a TWAIN compliant driver for your scanner. TWAIN drivers vary considerably in their implementation. Check for ScanFast (high-speed data transfer). Faster TWAIN drivers are unhindered by RasterMaster ActiveX control software, so ScanFast provides no noticeable benefit. This property should be set to ‘True’ for slower drivers. scan_cap_declares.bas contains the TWAIN defines needed for scanning methods like ScanCap and ScanCapValue.

Listed below are the properties used in this sample.

ScanDuplex Property turns on duplex scanning when scanning in fast mode.

Showui Property displays a TWAIN user interface dialog box during scanning.

SaveFormat Property saves an image to disk when used with the Save property.

ScanBits Property saves an image to disk when used with the Save property.

243 Appendix D - Samples Using Visual Basic V5.0

ScanHres, ScanVres Property sets the custom scan horizontal/vertical resolution in dots per inch (DPI).

ScanBottom, ScanLeft, ScanRight, ScanTop Property sets the positions for acquiring an image from the scanner.

ScanAcquire Property begins the scanning process of an image.

ScanFast Property turns on fast TWAIN scanning.

ScanAcquireFeeder Property is a TWAIN scanning function used to scan an image from a document feeder.

ScanCloseFeeder Property allows TWAIN support for scanning from a document feeder.

ScanPages Property sets the path\filename for multi-page scans from a document feeder.

ScanOpenSource Property selects a TWAIN input source if more than one TWAIN device is installed.

ScanCap Property sets or gets the value of a TWAIN scanning ability.

ScanCapValue Property sets the value of a TWAIN scanning ability.

ScanSetup Property shows the scanner driver’s dialog box for setting the scanning parameters.

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

ImageError Property returns an integer corresponding to the image error.

ErrorStr Property returns an error string for the last called property.

Image Property decompresses and displays the image to the current control.

ImageBitspix Property returns the bits per pixel of the image in the current control.

FileTypeStr Property returns the FileType name from the current image.

Thumbnail

This sample shows you how to create a thumbnail using the OCX. It allows you to create and display thumbnails from a directory that contains images with certain extensions.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Note: The Snowbound control will open any supported image format no matter the extension.

Listed below are the properties used in this sample.

Image Property decompresses and displays the image to the current control.

244 Appendix D - Samples Using Visual Basic V5.0

ClearImage Property clears the image from the background of the control. This does not delete the current image.

DelImage Property deletes the image from the image control and frees the memory associated with that image.

Redraw Property redisplays the current image.

Alias Property displays scaled-down (zoomed out) 1-bit (black and white) and color images very effectively.

245 Appendix E - Samples Using Visual Basic V6.0

Appendix E - Samples Using Visual Basic V6.0

This appendix describes the samples available with RasterMaster ActiveX using Visual Basic V6.0.

If you do not find the sample that you are looking for in this manual, please open a support ticket at http://support.snowbound.com to request a specific sample. We are dedicated to helping our customers succeed and we are constantly enhancing our products based on feedback from customers like you.

The appendix contains the following topics:

Format Conversion

Text Search and Extract

Format Conversion

This sample demonstrates how to decompress and save an image into another format. It uses an input file, save format type, and output filename.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

Image Property decompresses and displays the image to the current control.

SaveFormat Property saves an image to disk when used with the Save property.

Save Property saves an image by passing in the name of the image to save.

ErrorStr Property returns an error string for the last called property.

Text Search and Extract

This sample demonstrates how to search for a given text string and extract the text from the given file. This sample allows you to open up a file and search that page using the Prev and Next buttons or by typing in the numerical position you want to view in the text box in between the buttons. You can also extract text using the Save Extracted Text button.

You can find the samples in the following directory C:\Program Files\Snowbound Software\RasterMaster® ActiveX Evaluation\ActiveX\Samples.

Listed below are the properties used in this sample.

TsInstance

246 Appendix E - Samples Using Visual Basic V6.0

TSEnable Property enables and starts text searching from a MODCA:PTOCA or PDF image that has already been decompressed using the Image property.

TSstring Property searches for a string from a MODCA:PTOCA or PDF image that has already been decompressed using the Image property.

TSCase Property turns on case sensitivity when searching for a string from a MODCA:PTOCA or PDF image that has already been decompressed using the Image property.

ErrorStr Property returns an error string for the last called property.

Pages Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

Page Property reads additional pages of a multi-page image after the initial page has been loaded with the Image property.

Image Property decompresses and displays the image to the current control.

Redraw Property redisplays the current image.

ActiveImage Property sets the MODCA:PTOCA or PDF image name from which to extract data. Used along with ActivePage, ExtractBuff, and ExtractText.

ActivePage Property sets the page number of the MODCA:PTOCA or PDF image from which to extract text. Used along with ActiveImage, ExtractBuff, and ExtractText.

ExtractText Property activates the extraction of text from MODCA:PTOCA and PDF image. It is used in conjunction with the ActiveImage, ActivePage, and ExtractBuff properties.

ExtractBuff Property returns the memory pointer to the buffer of extracted text from MODCA:PTOCA and the PDF image. It is used in conjunction with the ActiveImage, ActivePage, and ExtractText properties.

247 Appendix F - Using RasterMaster ActiveX with Visual Basic .NET

Appendix F - Using RasterMaster ActiveX with Visual Basic .NET

This appendix describes how to use RasterMaster ActiveX with Visual Basic .NET.

Setting Up .NET

Creating a New Project

Adding the Snowbound Control to the Toolbox

Adding the Control to the Form

Setting Up .NET

You can use RasterMaster ActiveX components from within Microsoft Visual Basic .NET. The current version of the Snowbound RasterMaster ActiveX is fully compatible with Visual Basic .NET.

Note: While these procedures are specifically for setting up RasterMaster ActiveX with Visual Basic .NET, the procedures for Visual C++ .NET and Visual C# .NET are similar.

Creating a New Project

The first step in setting up Visual Basic .NET is to create a new project.

To create a new project:

1. From the main Visual Studio .NET dialog, choose File > New > Project. The New Project dialog opens.

248 Appendix F - Using RasterMaster ActiveX with Visual Basic .NET

2. Choose Project Types > Visual Basic Projects. 3. Choose Templates > Windows Application. 4. Click OK. The project opens with a default, empty form.

Adding the Snowbound Control to the Toolbox

The next step in setting up Visual Basic .NET to work with RasterMaster ActiveX is to add the Snowbound control to the toolbox.

To add the Snowbound control to the toolbox:

1. Choose Project > Add Reference. The Add Reference dialog opens.

249 Appendix F - Using RasterMaster ActiveX with Visual Basic .NET

2. Click Browse and navigate to the directory containing the snbdXym.ocx.

Replace X with your version number, and Y with your product level-usually ‘d’ or ‘c’.

3. Click Open. 4. Click OK to close the Add Reference dialog.

Adding the Control to the Form

After the control has been added to the toolbox, the control must be added to the form.

To add the control to the form:

1. Open the Visual Basic .NET dialog.

250 Appendix F - Using RasterMaster ActiveX with Visual Basic .NET

2. Select the Toolbox tab on the left side of the screen. 3. Click the Components tab, and choose SnbdocxCtrl.

The mouse pointer now looks like this .

4. Hold down and drag the mouse onto the form to the desired size.

Visual Studio .NET automatically creates a wrapper class for the ActiveX component. Now all existing ActiveX properties apply, as in Visual Basic 6.

251 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

Appendix G - Using RasterMaster ActiveX with Visual C# .NET

This appendix describes how to useRasterMaster ActiveX with Visual C# .NET. The appendix contains the following topics:

Setting Up .NET

Creating a New Project

Adding the Snowbound Control to the Toolbox

Adding the Control to the Form

Building Your Application for Distribution

Setting Up .NET

You can use RasterMaster ActiveX components for .NET from within C#. The current version of RasterMaster ActiveX is fully compatible for Visual C# .NET.

Creating a New Project

The first step in setting up Visual C# for .NET is to create a new project.

To create a new project:

1. Open the Visual Studio .NET Integrated Development Environment (IDE) dialog.

252 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

2. Choose File > New Project to display the New Project dialog.

3. Select Visual C# Projects from the Project Types frame. 4. Select Windows Application from the Templates frame. 5. Click OK to return to the IDE dialog with a new project created.

253 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

6. Choose Project > Add Reference to display the Add Reference dialog.

254 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

7. Select the COM tab.

If the Snowbound OLE Custom Control does not appear under Component Name, click Browse.

Navigate to the directory containing the RasterMaster ActiveX control. By default, the control is in the C:\Program Files\Snowbound\RMActiveX directory.

8. Double-click on the ActiveX control from the Component Name column and click OK.

Note: The directory containing the ActiveX control must also contain the AxSnbdocxLib.dll and SndbocxLib.dll files.

Adding the Snowbound Control to the Toolbox

The next step in setting up Visual C# for .NET to work with RasterMaster ActiveX is to add the Snowbound control to the toolbox.

To add the Snowbound control to the toolbox:

1. Select View > Toolbox to open the Toolbox on the left hand side of the screen.

255 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

2. Select the Components tab.

3. Right-click Customize Toolbox from the context menu to display the Customize Toolbox dialog. 4. Select the COM Components tab.

256 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

5. Select the Snowbound Control.

If it the Snowbound control is not present, navigate to the directory containing the RasterMaster ActiveX control. By default, the control is in the C:\Program Files\Snowbound\RMActiveX directory.

6. Once you have located the ActiveX control, double-click it and click OK. 7. Mark the checkbox next to the Snowbound control and click OK.

Adding the Control to the Form

After the control has been added to the toolbox, the control must be added to the form.

To add the control to the form:

1. From the IDE dialog, drag the control from the Components tab and drop it onto the form.

257 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

2. Move your cursor over the blank form. The mouse icon will look like . 3. Add a button to the form.

Follow the standard procedure for adding Microsoft controls to a form.

4. Double-click the new button on the form to display the code view.

258 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

The code view dialog places your cursor on an empty line between brackets.

Example G.1:Placing Cursor on an Empty Line

private void button1_Click(object sender, System.EventArgs e) { }

5. Add the line of code shown below between the brackets (the information in bold). This code is needed for loading the image once the button is clicked.

Example G.2: Loading the Image When Button Clicked

private void button1_Click(object sender, System.EventArgs e) { this.axSnbdocx1.Image = "c:\\images\\myimage.tif"; }

Note: By default, the Snowbound ActiveX control is named axSnbdocx1. To change the

259 Appendix G - Using RasterMaster ActiveX with Visual C# .NET name, follow the standard procedure for renaming controls in the Visual Studio .NET manual.

6. Click Debug .

The project runs and the IDE creates a new window with the RasterMaster ActiveX control and a single button.

7. Click the newly created button to display the image.

Building Your Application for Distribution

This section describes how to prepare your application for distribution.

To create a distributable version of your application:

1. From the IDE dialog, choose Build > Build Solution.

2. In Windows Explorer, navigate to the directory containing your application. By default the directory is C:\Documents and Settings\\My Documents\Visual Studio Projects\\bin\Debug

260 Appendix G - Using RasterMaster ActiveX with Visual C# .NET

Note: The AxInterop.SnbdocxLib.dll, Interop.SnbdocxLib.dll, and ProjectName.exe should also be in this directory.

3. Copy all of the files into a common build directory. 4. Navigate to the directory containing the RasterMaster ActiveX control. By default the control is in the C:\Program Files\Snowbound\RMActiveX directory.

The following files should also be in this directory:

Example G.3: Directory for the Control

AxSnbdocxLib.dll, SnbdocxLib.dll, and snbd.ocx

5. Copy all of the files to the common build directory that you created earlier.

Note: If you upgrade the RasterMaster ActiveX control, you need to replace all peripheral DLLs in addition to the OCX file, then rebuild your application with the new components prior to distribution.

261 Appendix H - TIFF Tags

Appendix H - TIFF Tags

This appendix describes the tags in the header and in Image File Directories (IFDs) used by TIFF (tagged image file format) files to declare and describe their content. Each TIFF file begins with a image file header which points to one or more image file directories which contain the image data and image information.

The TIFF file format was created by an independent group and was supported by Aldus. .TIF files can be any number of bits per pixel, planes and several compression algorithms. The byte order may be Intel or Motorola format. The bytes may also be filled from right to left or left to right. Compression may be uncompressed, pack bits, LZW, modified Huffman, CCITT G4, CCITT G3, CCITT G3-2D or JPEG. The CCITT G4 file format only saves to black and white.

If you have any questions about the TIFF file format and the tags described below, you may contact Snowbound Technical support on the web at http://support.snowbound.com .

Sources for Tag Specifications

The following are descriptions of the types of the sources of the tags:

TIFF Baseline: The baseline set of tags were documented in TIFF 5.0 and carried over on pages 11-47 of the 1992 TIFF 6.0 specification.

TIFF Extended: The extended set includes some additional tags and added values for existing tags, as documented on pages 48-115 of the TIFF 6.0 specification.

TIFF Private: Originally, the term private meant just that. The TIFF 6.0 specification (page 8) states, “An organization might wish to store information meaningful to only that organization . . . . Tags numbered 32768 or higher, sometimes called private tags, are reserved for that purpose. Upon request, the TIFF administrator . . . will allocate and register one or more private tags for an organization . . . . You do not need to tell the TIFF administrator what you plan to use them for, but giving us this information may help other developers to avoid some duplication of effort.” Over time, however, many private tags have become well established and well documented, e.g., tag 34675 for the ICC profile, dubbed InterColorProfile in the TIFF/EP standard. Thus, many members of the private tag class can be viewed as open extensions rather than as containers for secret information.

TIFF/EP, TIFF/IT, and DNG: A number of tags, some of which may once have been private, have been defined in TIFF/EP (ISO 12234-2, 2001), TIFF/IT (ISO 12639, 2004), and DNG_1_1, an Adobe-sponsored extension of the TIFF 6.0 specification.

TIFF Private IFD: The TIFF 6.0 specification (page 9) states, “If you need more than 10 tags, we suggest that you reserve a single private tag, define it as a LONG TIFF data type, and use its value as a pointer (offset) to a private IFD [image file directory] or other data structure of your choosing. Within that IFD, you can use whatever tags you want, since no one else will know that it is an IFD unless you tell them.” As with private tags, we can understand private IFDs as an extension to TIFF, often very public and well documented.

262 Appendix H - TIFF Tags

The private IFD tags of greatest interest to the Library of Congress are those associated with the EXIF_2_2 specification, pertaining to image generation by digital still cameras. is an abbreviation for EXchangeable Image File format, although Exif does not relate to TIFF as, say, JFIF relates to JPEG_DCT. The Exif IFD is pointed to by the Private Exif IFD tag 34665. This and other Exif tags are listed in the numerical table below.

For the Exif specification and other related information, see Exif.org. There are actually three private IFDs specified by the Exif standard. The other two are the GPS IFD, for positioning information, and the Interoperability IFD, used to encode compability information. With numerical sequences of their own, the GPS and interoperability tags are not included in the table below.

HD Photo tags: Although not a true TIFF implementation, WMP_1_0 (originally called Windows Media Photo) is a 2006 specification with a container format that borrows heavily from TIFF and adds a few new tags of interest. Included in the table.

Descriptions of Tags in Numerical Order

Table H.1: TIFF Tags in Numerical Order1

Code Source of Name Description Dec Hex Tag A general indication of the kind of data that is contained in this subfile. This field is made up of a set of 32 flag bits. Unused bits are expected to be 0. Bit 0 is the low-order bit.

Currently defined values for the bitmap are:

254 00FE NewSubfileType 0 - Image is reduced of another TIFF image in Baseline this file

1 - Image is a single page of a multi-page

2 - Image is a transparency mask for another image in this file.

The default is 0. A general indication of the kind of data that is contained in this subfile.

Currently defined values are:

A general indication of the kind of data that is 255 00FF SubfileType contained in this subfile. Baseline

Currently defined values are:

1 = full resolution image data - ImageWidth, ImageLength, and StripOffsets are required fields.

263 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag 2 = reduced resolution image data - ImageWidth, ImageLength, and StripOffsets are required fields. It is further assumed that a reduced resolution image is a reduced version of the entire extent of the corresponding full resolution data.

3 = single page of a multi-page image (see the PageNumber tag description).

Continued use of this field is not recommended. Writers should instead use the new and more general NewSubfileType field. The image's width, in pixels (X:horizontal). The 256 0100 ImageWidth Baseline number of columns in the image. The image's length (height) in pixels (Y:vertical). 257 0101 ImageLength The number of rows (sometimes described as Baseline "scan lines") in the image. Number of bits per sample. Note that this tag allows a different number of bits per sample for each sample corresponding to a pixel. For 258 0102 BitsPerSample example, RGB color data could use a different Baseline number of bits per sample for each of the three color planes.

The default is 1. 1 = No compression, but pack data into bytes as tightly as possible, with no unused bits except at the end of a row. The bytes are stored as an array of bytes, for BitsPerSample <= 8, word if BitsPerSample > 8 and <= 16, and dword if BitsPerSample > 16 and <= 32. The byte ordering of data >8 bits must be consistent with that specified in the TIFF file header (bytes 0 and 1). Rows are required to begin on byte boundaries. 259 0103 Compression Baseline 2 = CCITT Group 3 1-Dimensional Modified Huffman run length encoding. See ALGRTHMS.txt BitsPerSample must be 1, since this type of compression is defined only for bilevel images (like FAX images...)

3 = Facsimile-compatible CCITT Group 3, exactly as specified in "Standardization of Group 3 facsimile apparatus for document

264 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag transmission," Recommendation T.4, Volume VII, Fascicle VII.3, Terminal Equipment and Protocols for Telematic Services, The International Telegraph and Telephone Consultative Committee (CCITT), Geneva, 1985, pages 16 through 31. Each strip must begin on a byte boundary. (But recall that an image can be a single strip.) Rows that are not the first row of a strip are not required to begin on a byte boundary. The data is stored as bytes, not words - byte-reversal is not allowed. See the Group3Options field for Group 3 options such as 1D vs 2D coding.

4 = Facsimile-compatible CCITT Group 4, exactly as specified in "Facsimile Coding Schemes and Coding Control Functions for Group 4 Facsimile Apparatus," Recommendation T.6, Volume VII, Fascicle VII.3, Terminal Equipment and Protocols for Telematic Services, The International Telegraph and Telephone Consultative Committee (CCITT), Geneva, 1985, pages 40 through 48. Each strip must begin on a byte boundary. Rows that are not the first row of a strip are not required to begin on a byte boundary. The data is stored as bytes, not words. See the Group4Options field for Group 4 options.

5 = LZW Compression, for grayscale, mapped color, and full color images. See ALGRTHMS.txt

32773 = PackBits compression, a simple byte oriented run length scheme for 1-bit images.

Data compression only applies to raster image data, as pointed to by StripOffsets.

The default value is 1. 0 = For bilevel and grayscale images: 0 is imaged as white. 2**BitsPerSample-1 is imaged as black. If GrayResponseCurve exists, it PhotometricInterpre- 262 0106 overrides the PhotometricInterpretation value. Baseline tation 1 = For bilevel and grayscale images: 0 is imaged as black. 2**BitsPerSample-1 is imaged as white. If GrayResponseCurveexists, it

265 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag overrides the PhotometricInterpretation value.

2 = RGB. In the RGB model, a color is described as a combination of the three primary colors of light (red, green, and blue) inparticular concentrations. For each of the three samples, 0 represents minimum intensity, and 2**BitsPerSample - 1 represents maximum intensity. For PlanarConfiguration = 1, the samples are stored in the indicated order: first Red, hen Green, then Blue. For PlanarConfiguration = 2, the StripOffsets for the sample planes are stored in the indicated order: first the Red sample plane StripOffsets, then the Green plane StripOffsets, then the Blue plane StripOffsets.

3 = "Palette color." In this mode, a color is described with a single sample. The sample is used as an index into ColorMap. The sample is used to index into each of the red, green and blue curve tables to retrieve an RGB triplet defining an actual color. When this PhotometricInterpretation value is used, the color response curves must also be supplied. SamplesPerPixel must be 1.

4 = Transparency Mask. This means that the image is used to define an irregularly shaped region of another image in the same TIFF file. SamplesPerPixel and BitsPerSample must be 1. PackBits compression is recommended. The 1- bits define the interior of the region; the 0-bits define interior of the region; the 0-bits define the exterior of the region. The Transparency Mask must have the same ImageLength and ImageWidth as the main image. 1 = a bilevel "line art" scan. BitsPerSample must be 1.

2 = a "dithered" scan, usually of continuous tone 263 0107 Threshholding Baseline data such as photographs. BitsPerSample must be 1.

3 = Error Diffused. The width of the dithering or halftoning matrix 264 0108 CellWidth Baseline used to create a dithered or halftoned bilevel file.

266 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag The length of the dithering or halftoning matrix 265 0109 CellLength Baseline used to create a dithered or halftoned bilevel file. 266 010A FillOrder The logical order of bits within a byte. Baseline The name of the document from which this 269 010D DocumentName Extended image was scanned. A string that describes the subject of the image. For example, a user may wish to attach a 270 010E ImageDescription Baseline comment such as "1988 company picnic" to an image. Manufacturer of the scanner, video digitizer. 271 010F Make Baseline Mandatory for TIFF/EP. The model name/number of the scanner, video digitizer. This tag is intended for user information 272 0110 Model only so format is arbitrary. Baseline

Mandatory for TIFF/EP. For each strip, the byte offset of that strip. The offset is specified with respect to the beginning of the TIFF file. Note that this implies that each strip has a location independent of the locations 273 0111 StripOffsets Baseline of other strips. This feature may be useful for editing applications. This field is the only way for a reader to find the image data, and hence must exist. The orientation of the image with respect to the rows and columns.

1 = The 0th row represents the visual top of the image, and the 0th column represents the visual left hand side.

2 = The 0th row represents the visual top of the image, and the 0th column represents the visual right hand side.

274 0112 Orientation 3 = The 0th row represents the visual bottom of Baseline the image, and the 0th column represents the visual right hand side.

4 = The 0th row represents the visual bottom of the image, and the 0th column represents the visual left hand side.

5 = The 0th row represents the visual left hand side of the image, and the 0th column represents the visual top.

267 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag 6 = The 0th row represents the visual right hand side of the image, and the 0th column represents the visual top.

7 = The 0th row represents the visual right hand side of the image, and the 0th column represents the visual bottom.

8 = The 0th row represents the visual left hand side of the image, and the 0th column represents the visual bottom.

It is extremely costly for most readers to perform image rotation "on the fly", i.e., when importing and printing; and users of most desktop publishing applications do not expect a file imported by the application to be altered permanently in any way.

The default value is 1. The number of samples per pixel. SamplesPerPixel is 1 for bilevel, grayscale, and 277 0115 SamplesPerPixel Baseline palette color images. SamplesPerPixel is 3 for RGB images. The number of rows per strip. The image data is organized into strips for fast access to individual rows when the data is compressed - though this 278 0116 RowsPerStrip field is valid even if the data is not compressed. Baseline The default is 2**32 - 1, which is effectively infinity. That is, the entire image is one strip. Recomended is a strip size of 8K. For each strip, the number of bytes in that strip. The existenceof this field greatly simplifies the 279 0117 StripByteCounts Baseline chore of buffering compressed data, if the strip size is reasonable. 280 0118 MinSampleValue The minimum component value used. Baseline 281 0119 MaxSampleValue The maximum component value used. Baseline The number of pixels per ResolutionUnit in the X 282 011A XResolution Baseline direction, i.e., in the ImageWidth direction. The number of pixels per ResolutionUnit in the Y 283 011B YResolution Baseline direction, i.e., in the ImageLength direction. 1 = The sample values for each pixel are stored contiguously, so that there is a single image 284 011C PlanarConfiguration plane. See PhotometricInterpretation to Baseline determine the order of the samples within the pixel data. So, for RGB data, the data is stored

268 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag RGBRGBRGB...and so on.

2 = The samples are stored in separate "sample planes." The values in StripOffsets and StripByteCounts are then arranged as a 2- dimensional array, with SamplesPerPixel rows and StripsPerImage columns. (All of the columns for row 0 are stored first, followed by the columns of row 1, and so on.) PhotometricInterpretation describes the type of data that is stored in each sample plane. For example, RGB data is stored with the Red samples in one sample plane, the Green in another,and the Blue in another.

If SamplesPerPixel is 1, PlanarConfiguration is irrelevant, and should not be included.

The default is 1. The name of the page from which this image was 285 011D PageName Extended scanned. The X offset of the left side of the image, with 286 011E XPosition respect to the left side of the page, in Extended ResolutionUnits. The Y offset of the top of the image, with respect to the top of the page, in ResolutionUnits. In the 287 011F YPosition Extended TIFF oordinate scheme, the positive Y direction is down, so that YPosition is always positive. For each string of contiguous unused bytes in a 288 0120 FreeOffsets Baseline TIFF file, the byte offset of the string. For each string of contiguous unused bytes in a 289 0121 FreeByteCounts Baseline TIFF file, the number of bytes in the string. The precision of the information contained in the GrayResponseCurve.

1 = Number represents tenths of a unit.

2 = Number represents hundredths of a unit.

3 = Number represents thousandths of a unit. 290 0122 GrayResponseUnit Baseline 4 = Number represents ten-thousandths of a unit.

5 = Number represents hundred-thousandths of a unit.

For historical reasons, the default is 2. However, for greater accuracy, 3 is recommended. GrayResponseCurv-For grayscale data, the optical density of each 291 0123 Baseline e possible pixel value.

269 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag The purpose of the gray response curve and the gray units is to provide more exact photometric interpretation information for gray scale image data, in terms of optical density. Those options are for fax-images stored in TIFF format. This field is made up of a set of 32 flag bits. Unused bits are expected to be 0. It is probably not safe to try to read the file if any bit of this field is set that you don't know the meaning of. 292 0124 Group3Options Extended Bit map:

0 - 2-dimensional coding used.

1 - Image is uncompressed

2 - Fill bits have been added before EOL codes, so that EOL always ends on a byte boundary. This field is made up of a set of 32 flag bits and is used for the images with fax group 4 compression. Unused bits are expected to be 0. It is probably not safe to try to read the file if any bit of this field is set that you don't know the meaning of. Gray scale and color coding schemes are under study, and will be added when finalized.

For 2-D coding, each strip is encoded as if it were a separate image. In particular, each strip Group4Options 293 0125 begins on a byte boundary; and the coding for the Extended first row of a strip is encoded independently of the previous row, using horizontal codes, as if the previous row is entirely white. Each strip ends with the 24-bit end-of-facsimile block (EOFB).

Bit map:

0 - reserved (unused)

1 - uncompressed mode is used

2-31 - reserved To be used with XResolution and YResolution.

1 = No absolute unit of measurement. Used for 296 0128 ResolutionUnit Baseline images that may have a non-square aspect ratio, but no meaningful absolute dimensions. The

270 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag drawback of ResolutionUnit=1 is that different applications will import the image at different sizes. Even if the decision is quite arbitrary, it might be better to use dots per inch or dots per centimeter, and pick XResolution and YResolution such that the aspect ratio is correct and the maximum dimension of the image is about four inches (the "four" is quite arbitrary.)

2 = Inch.

3 = Centimeter.

The default is 2. This tag is used to specify page numbers of a multiple page (e.g. facsimile) document. Two word values are specified. The first value is the 297 0129 PageNumber page number; the second value is the total Extended number of pages in the document. Note that pages need not appear in numerical order. The first page is 0 (zero). Describes a transfer function for the image in 301 012D TransferFunction Extended tabular style. Name and release number of the software 305 0131 Software package that created the image. User Baseline information only. Date and time of image creation. Uses the format "YYYY:MM:DD HH:MM:SS", with hours 306 0132 DateTime on a 24-hour clock, and one space character Baseline between the date and the time. The length of the string, including the null, is 20 bytes. 315 013B Artist Person who created the image. Copyright notice. Baseline The computer and/or operating system in use at 316 013C HostComputer the time of image creation. Baseline ENIAC. A mathematical operator that is applied to the image data before an encoding scheme is applied.

317 013D Predictor To be used when Compression=5 (LZW). Extended

1 = No prediction scheme used before coding.

2 = Horizontal differencing. Gives TIFF color image readers a better idea of 318 013E ColorImageType what kind of color image it is. There will be Extended borderline cases.

271 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag 1 = Continuous tone, natural image.

2 = Synthetic image, using a greatly restricted range of colors.

Such images are produced by most color paint programs. See ColorList for a list of colors used in this image.

The default value is 1. A list of colors that are used in this image. Use of this field is only practical for images containing a greatly restricted (usually less than or equal to 256) range of colors. ColorImageType should be 2. See ColorImageType.

319 013F ColorList The list is organized as an array of RGB triplets, Extended with no pad. The RGB triplets are not guaranteed to be in any particular order. Note that the red, green, and blue components can either be a BYTE or a word in length. BYTE should be sufficient for most applications. This tag defines a Red-Green-Blue color map for palette color images. The palette color pixel value is used to index into all 3 subcurves. The subcurves are stored sequentially. The Red entries come first, followed by the Green entries, 320 0140 ColorMap followed by the Blue entries. The width of each Baseline entry is 16 bits, as implied by the type of word. 0 represents the minimum intensity, and 65535 represents the maximum intensity.

ColorMap must be included in all palette color images. Conveys to the halftone function the range of 321 0141 HalftoneHints gray levels within a colorimetrically-specified Extended image that should retain tonal detail. The tile width in pixels. This is the number of 322 0142 TileWidth Extended columns in each tile. The tile length (height) in pixels. This is the 323 0143 TileLength Extended number of rows in each tile. For each tile, the byte offset of that tile, as 324 0144 TileOffsets Extended compressed and stored on disk. For each tile, the number of (compressed) bytes 325 0145 TileByteCounts Extended in that tile. Used in the TIFF-F standard, denotes the 326 0146 BadFaxLines Extended number of 'bad' scan lines encountered by the

272 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag facsimile device. Used in the TIFF-F standard, indicates if 'bad' lines encountered during reception are stored in 327 0147 CleanFaxData Extended the data, or if 'bad' lines have been replaced by the receiver. Used in the TIFF-F standard, denotes the 328 0148 ConsecutiveBadFa-maximum number of consecutive 'bad' scanlines Extended xLines received. 330 014A SubIFDs Offset to child IFDs. Extended The set of inks used in a separated 332 014C InkSet Extended (PhotometricInterpretation=5) image. 333 014D InkNames The name of each ink used in a separated image. Extended 334 014E NumberOfInks The number of inks. Extended The component values that correspond to a 0% 336 0150 DotRange Extended dot and 100% dot. A description of the printing environment for 337 0151 TargetPrinter Extended which this separation is intended. 338 0152 ExtraSamples Description of extra components. Baseline Specifies how to interpret each data sample in a 339 0153 SampleFormat Extended pixel. 340 0154 SMinSampleValue Specifies the minimum sample value. Extended 341 0155 SMaxSampleValue Specifies the maximum sample value. Extended 342 0156 TransferRange Expands the range of the TransferFunction. Extended Mirrors the essentials of PostScript's path 343 0157 ClipPath Extended creation functionality. The number of units that span the width of the 344 0158 XClipPathUnits Extended image, in terms of integer ClipPath coordinates. The number of units that span the height of the 345 0159 YClipPathUnits Extended image, in terms of integer ClipPath coordinates. Aims to broaden the support for indexed images 346 015A Indexed Extended to include support for any color space. 347 015B JPEGTables JPEG quantization and/or Huffman tables. Extended 351 015F OPIProxy OPI-related. Extended Used in the TIFF-FX standard to point to an IFD 400 0190 GlobalParametersI- containing tags that are globally applicable to the Extended FD complete TIFF file. Used in the TIFF-FX standard, denotes the type 401 0191 ProfileType Extended of data stored in this file or IFD. Used in the TIFF-FX standard, denotes the 402 0192 FaxProfile Extended 'profile' that applies to this file. Used in the TIFF-FX standard, indicates which 403 0193 CodingMethods Extended coding methods are used in the file. Used in the TIFF-FX standard, denotes the year 404 0194 VersionYear Extended of the standard specified by the FaxProfile field.

273 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag Used in the TIFF-FX standard, denotes the mode 405 0195 ModeNumber Extended of the standard specified by the FaxProfile field. Used in the TIFF-F and TIFF-FX standards, 433 01B1 Decode holds information about the ITULAB Extended (PhotometricInterpretation = 10) encoding. Defined in the Mixed Raster Content part of RFC 434 01B2 DefaultImageColor 2301, is the default color needed in areas where Extended no image is available. Old-style JPEG compression field. TechNote2 512 0200 JPEGProc Extended invalidates this part of the specification. Old-style JPEG compression field. TechNote2 513 0201 JPEGInterchangeF- Extended invalidates this part of the specification. ormat JPEGInterchangeF-Old-style JPEG compression field. TechNote2 514 0202 Extended ormatLength invalidates this part of the specification. JPEGRestartInterv-Old-style JPEG compression field. TechNote2 515 0203 Extended al invalidates this part of the specification. Old-style JPEG compression field. TechNote2 517 0205 JPEGLosslessPred- Extended invalidates this part of the specification. ictors JPEGPointTransfor-Old-style JPEG compression field. TechNote2 518 0206 Extended ms invalidates this part of the specification. Old-style JPEG compression field. TechNote2 519 0207 JPEGQTables Extended invalidates this part of the specification. Old-style JPEG compression field. TechNote2 520 0208 JPEGDCTables Extended invalidates this part of the specification. Old-style JPEG compression field. TechNote2 521 0209 JPEGACTables Extended invalidates this part of the specification. The transformation from RGB to YCbCr image 529 0211 YCbCrCoefficients data. Extended Mandatory for TIFF/EP YCbCr images. YCbCrSubSamplin- Specifies the subsampling factors used for the 530 0212 Extended g chrominance components of a YCbCr image. Specifies the positioning of subsampled 531 0213 YCbCrPositioning chrominance components relative to luminance Extended samples. ReferenceBlackWh-Specifies a pair of headroom and footroom image 532 0214 Extended ite data values (codes) for each pixel component. Defined in the Mixed Raster Content part of RFC 559 022F StripRowCounts 2301, used to replace RowsPerStrip for IFDs Extended with variable-sized strips. 700 02BC XMP XML packet containing XMP metadata Extended 3278- 800D ImageID OPI-related. Extended 1

274 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag 3293- Annotation data, as used in 'Imaging for 80A4 Wang Annotation Private 2 Windows. 3342- CFARepeatPattern-For camera raw files from sensors with CFA TIFF/EP 828D 1 Dim overlay. spec, p. 23 3342- For camera raw files from sensors with CFA TIFF/EP 828E CFAPattern 2 overlay. spec, p. 23 3342- Encodes camera battery level at time of image TIFF/EP 828F BatteryLevel 3 capture. spec, p. 45 3343- 8298 Copyright Copyright notice. Baseline 2 Exif Private 3343- 829A ExposureTime Exposure time given in seconds. IFD 4 TIFF/EP spec, p. 38 Exif Private 3343- 829D FNumber The F number. IFD 7 TIFF/EP spec, p. 39 3344- Specifies the pixel data format encoding in the 82A5 MD FileTag Private 5 Molecular Dynamics GEL file format. 3344- Specifies a scale factor in the Molecular 82A6 MD ScalePixel Private 6 Dynamics GEL file format. 3344- Used to specify the conversion from 16bit to 8bit 82A7 MD ColorTable Private 7 in the Molecular Dynamics GEL file format. 3344- Name of the lab that scanned this file, as used in 82A8 MD LabName Private 8 the Molecular Dynamics GEL file format. 3344- Information about the sample, as used in the 82A9 MD SampleInfo Private 9 Molecular Dynamics GEL file format. 3345- Date the sample was prepared, as used in the 82AA MD PrepDate Private 0 Molecular Dynamics GEL file format. 3345- Time the sample was prepared, as used in the 82AB MD PrepTime Private 1 Molecular Dynamics GEL file format. 3345- Units for data in this file, as used in the Molecular 82AC MD FileUnits Private 2 Dynamics GEL file format. 3355- ModelPixelScaleTa- 830E Used in interchangeable GeoTIFF_1_0 files. Private 0 g IPTC-NAA (International Press 3372- TIFF/EP 83BB IPTC/NAA Telecommunications Council-Newspaper 3 spec, p. 33 Association of America) metadata. 3391- INGR Packet Data 847E Intergraph Application specific storage. Private 8 Tag

275 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag 3391- INGR Flag 847F Intergraph Application specific flags. Private 9 Registers IrasB 3392- Originally part of Intergraph's GeoTIFF tags, but 8480 Transformation Private 0 likely understood by IrasB only. Matrix Originally part of Intergraph's GeoTIFF tags, but 3392- now used in interchangeable GeoTIFF_1_0 files. 8482 ModelTiepointTag Private 2 In GeoTIFF_1_0, either this tag or 34264 must be defined, but not both TIFF/IT 3401- Site Site where image created. spec, 6 7.2.3 TIFF/IT 3401- ColorSequence Sequence of colors if other than CMYK. spec, 7 7.2.8.3.2 TIFF/IT 3401- IT8Header Certain inherited headers. spec, 8 7.2.3 TIFF/IT 3401- RasterPadding Type of raster padding used, if any. spec, 9 7.2.6 TIFF/IT 3402- BitsPerRunLength Number of bits for short run length encoding. spec, 0 7.2.6 TIFF/IT 3402- BitsPerExtendedRu- Number of bits for long run length encoding. spec, 1 nLength 7.2.6 TIFF/IT 3402- ColorTable Color value in a color pallette. spec, 2 7.2.8.4 TIFF/IT 3402- ImageColorIndicato-Indicates if image (foreground) color or spec, 3 r transparency is specified. 7.2.9 TIFF/IT 3402- BackgroundColorIn- Background color specification. spec, 4 dicator 7.2.9 TIFF/IT 3402- ImageColorValue Specifies image (foreground) color. spec, 5 7.2.8.4 TIFF/IT 3402- BackgroundColorV- Specifies background color. spec, 6 alue 7.2.8.4 TIFF/IT 3402- PixelIntensityRang- Specifies data values for 0 percent and 100 spec, 7 e percent pixel intensity. 7.2.8.4

276 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag TIFF/IT 3402- TransparencyIndica- Specifies if transparency is used in HC file. spec, 8 tor 7.2.8.4 TIFF/IT 3402- ColorCharacterizati-Specifies ASCII table or other reference per ISO spec, 9 on 12641 and ISO 12642. 7.2.8.4 TIFF/IT 3403- HCUsage Indicates the type of information in an HC file. spec, 0 7.2.6 TIFF/IT 3403- Indicates whether or not trapping has been TrapIndicator spec, 1 applied to the file. 7.2.6 TIFF/IT 3403- Specifies CMYK equivalent for specific CMYKEquivalent spec, 2 separations. 7.2.8.3.4 3403- TIFF/IT Reserved For future TIFF/IT use 3 spec 3403- TIFF/IT Reserved For future TIFF/IT use 4 spec 3403- TIFF/IT Reserved For future TIFF/IT use 5 spec Used in interchangeable GeoTIFF_1_0 files. In 3426- 85D8 ModelTransformatio-GeoTIFF_1_0, either this tag or 33922 must be Private 4 nTag defined, but not both 3437- Collection of Photoshop 'Image Resource 8649 Photoshop Private 7 Blocks. 3466- 8769 Exif IFD A pointer to the Exif IFD. Private 5 3467- TIFF/EP 8773 InterColorProfile ICC profile data. 5 spec, p. 47 Defined in the Mixed Raster Content part of RFC 3473- 87AC ImageLayer 2301, used to denote the particular function of Extended 2 this Image in the mixed raster scheme. 3473- GeoKeyDirectoryTa-Used in interchangeable GeoTIFF_1_0 files. 87AF Private 5 g Mandatory in GeoTIFF_1_0. 3473- 87B0 GeoDoubleParams- Used in interchangeable GeoTIFF_1_0 files. Private 6 Tag 3473- GeoAsciiParamsTa- 87B1 Used in interchangeable GeoTIFF_1_0 files. Private 7 g Exif 3485- The class of the program used by the camera to Private 8822 ExposureProgram 0 set exposure when the picture is taken. IFD TIFF/EP

277 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag spec, p. 41 Exif Private 3485- Indicates the spectral sensitivity of each channel 8824 SpectralSensitivity IFD 2 of the camera used. TIFF/EP spec, p. 48 3485- TIFF/EP 8825 GPSInfo A pointer to the Exif-related GPS Info IFD. 3 spec, p. 34 Exif Indicates the ISO Speed and ISO Latitude of the Private 3485- 8827 ISOSpeedRatings camera or input device as specified in ISO IFD 5 12232. TIFF/EP spec, p. 47 Exif Private 3485- Indicates the Opto-Electric Conversion Function 8828 OECF IFD 6 (OECF) specified in ISO 14524. TIFF/EP spec, p. 48 3485- TIFF/EP 8829 Interlace Indicates the field number of multifield images. 7 spec, p. 22 3485- Encodes time zone of camera clock relative to TIFF/EP 882A TimeZoneOffset 8 GMT. spec, p. 38 3485- Number of seconds image capture was delayed TIFF/EP 882B SelfTimeMode 9 from button press. spec, p. 45 3490- HylaFAX 885C Used by HylaFAX. Private 8 FaxRecvParams 3490- HylaFAX 885D Used by HylaFAX. Private 9 FaxSubAddress 3491- HylaFAX 885E Used by HylaFAX. Private 0 FaxRecvTime Exif 3686- The version of the supported Exif standard. 9000 ExifVersion Private 4 Mandatory in the Exif IFD. IFD Exif Private 3686- The date and time when the original image data 9003 DateTimeOriginal IFD 7 was generated. Mandatory for TIFF/EP. TIFF/EP spec, p. 37 Exif 3686- The date and time when the image was stored as 9004 DateTimeDigitized Private 8 digital data. IFD 3712-9101 ComponentsConfig-Specific to compressed data; specifies the Exif

278 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag channels and complements Private 1 uration PhotometricInterpretation IFD Exif Private 3712- CompressedBitsPe-Specific to compressed data; states the 9102 IFD 2 rPixel compressed bits per pixel. TIFF/EP spec, p. 27 Exif Private 3737- 9201 ShutterSpeedValue Shutter speed. IFD 7 TIFF/EP spec, p. 39 Exif Private 3737- 9202 ApertureValue The lens . IFD 8 TIFF/EP spec, p. 39 Exif Private 3737- 9203 BrightnessValue The value of brightness. IFD 9 TIFF/EP spec, p. 40 Exif Private 3738- 9204 ExposureBiasValue The exposure bias. IFD 0 TIFF/EP spec, p. 40 Exif Private 3738- 9205 MaxApertureValue The smallest F number of the lens. IFD 1 TIFF/EP spec, p. 40 Exif Private 3738- 9206 SubjectDistance The distance to the subject, given in meters. IFD 2 TIFF/EP spec, p. 44 Exif 3738- 9207 MeteringMode The metering mode. Private 3 IFD

279 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag TIFF/EP spec, p. 41 Exif Private 3738- 9208 LightSource The kind of light source. IFD 4 TIFF/EP spec, p. 46 Exif Private 3738- Indicates the status of flash when the image was 9209 Flash IFD 5 shot. TIFF/EP spec, p. 42 Exif Private 3738- 920A FocalLength The actual focal length of the lens, in mm. IFD 6 TIFF/EP spec, p. 44 3738- TIFF/EP 920B FlashEnergy Amount of flash energy (BCPS). 7 spec, p. 43 3738- SpatialFrequencyR- TIFF/EP 920C SFR of the camera. 8 esponse spec, p. 49 3738- TIFF/EP 920D Noise Noise measurement values. 9 spec, p. 49 3739- FocalPlaneXResolu-Number of pixels per FocalPlaneResolutionUnit TIFF/EP 920E 0 tion (37392) in ImageWidth direction for main image. spec, p. 18 3739- FocalPlaneYResolu-Number of pixels per FocalPlaneResolutionUnit TIFF/EP 920F 1 tion (37392) in ImageLength direction for main image. spec, p. 19 3739- FocalPlaneResoluti-Unit of measurement for FocalPlaneXResolution TIFF/EP 9210 2 onUnit (37390) and FocalPlaneYResolution(37391). spec, p. 19 3739- Number assigned to an image, e.g., in a chained TIFF/EP 9211 ImageNumber 3 image burst. spec, p. 32 3739- SecurityClassificati- TIFF/EP 9212 Security classification assigned to the image. 4 on spec, p. 33 3739- TIFF/EP 9213 ImageHistory Record of what has been done to the image. 5 spec, p. 33 Exif Private 3739- Indicates the location and area of the main 9214 SubjectLocation IFD 6 subject in the overall scene. TIFF/EP spec, p. 45 3739- Encodes the camera exposure index setting TIFF/EP 9215 ExposureIndex 7 when image was captured. spec, p. 47

280 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag 3739- TIFF/EPStandardI- For current spec, tag value equals 1 0 0 0. TIFF/EP 9216 8 D Mandatory in TIFF/EP. spec, p. 16 3739- Type of image sensor. TIFF/EP 9217 SensingMethod 9 Mandatory in TIFF/EP. spec, p. 22 Exif 3750- 927C MakerNote Manufacturer specific information. Private 0 IFD Exif 3751- Keywords or comments on the image; 9286 UserComment Private 0 complements ImageDescription. IFD Exif 3752- A tag used to record fractions of seconds for the 9290 SubsecTime Private 0 DateTime tag. IFD Exif 3752- SubsecTimeOrigina-A tag used to record fractions of seconds for the 9291 Private 1 l DateTimeOriginal tag. IFD Exif 3752- SubsecTimeDigitiz- A tag used to record fractions of seconds for the 9292 Private 2 ed DateTimeDigitized tag. IFD 3772- 935C ImageSourceData Used by Adobe Photoshop. Private 4 The Flashpix format version supported by a Exif 4096- A000 FlashpixVersion FPXR file., Private 0 Mandatory in the Exif IFD IFD The color space information tag is always Exif 4096- A001 ColorSpace recorded as the color space specifier. Private 1 Mandatory in the Exif IFD. IFD Exif 4096- Specific to compressed data; the valid width of A002 PixelXDimension Private 2 the meaningful image. IFD Exif 4096- Specific to compressed data; the valid height of A003 PixelYDimension Private 3 the meaningful image. IFD Exif 4096- Used to record the name of an audio file related A004 RelatedSoundFile Private 4 to the image data. IFD 4096- A005 Interoperability IFD A pointer to the Exif-related Interoperability IFD. Private 5 Indicates the strobe energy at the time the image Exif 4148- A20B FlashEnergy is captured, as measured in Beam Candle Power Private 3 Seconds IFD 4148-A20C SpatialFrequencyR-Records the camera or input device spatial Exif

281 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag frequency table and SFR values in the direction Private 4 esponse of image width, image height, and diagonal IFD direction, as specified in ISO 12233. Indicates the number of pixels in the image width Exif 4148- A20E FocalPlaneXResolu-(X) direction per FocalPlaneResolutionUnit on Private 6 tion the camera focal plane. IFD Indicates the number of pixels in the image Exif 4148- FocalPlaneYResolu-height (Y) direction per A20F Private 7 tion FocalPlaneResolutionUnit on the camera focal IFD plane. Indicates the unit for measuring Exif 4148- FocalPlaneResoluti- A210 FocalPlaneXResolution and Private 8 onUnit FocalPlaneYResolution. IFD Exif 4149- Indicates the location of the main subject in the A214 SubjectLocation Private 2 scene. IFD Indicates the exposure index selected on the Exif 4149- A215 ExposureIndex camera or input device at the time the image is Private 3 captured. IFD Exif 4149- Indicates the image sensor type on the camera A217 SensingMethod Private 5 or input device. IFD Exif 4172- A300 FileSource Indicates the image source. Private 8 IFD Exif 4172- A301 SceneType Indicates the image source. Private 9 IFD Indicates the color filter array (CFA) geometric Exif 4173- A302 CFAPattern pattern of the image sensor when a one-chip Private 0 color area sensor is used. IFD Exif 4198- Indicates the use of special processing on image A401 CustomRendered Private 5 data, such as rendering geared to output. IFD Exif 4198- Indicates the exposure mode set when the image A402 ExposureMode Private 6 was shot. IFD Exif 4198- Indicates the white balance mode set when the A403 WhiteBalance Private 7 image was shot. IFD Exif 4198- Indicates the digital zoom ratio when the image A404 DigitalZoomRatio Private 8 was shot. IFD 4198- Indicates the equivalent focal length assuming a A405 Exif 9 FocalLengthIn35m- 35mm film camera, in mm.

282 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag Private mFilm IFD Exif 4199- A406 SceneCaptureType Indicates the type of scene that was shot. Private 0 IFD Exif 4199- Indicates the degree of overall image gain A407 GainControl Private 1 adjustment. IFD Exif 4199- Indicates the direction of contrast processing A408 Contrast Private 2 applied by the camera when the image was shot. IFD Exif 4199- Indicates the direction of saturation processing A409 Saturation Private 3 applied by the camera when the image was shot. IFD Exif 4199- Indicates the direction of sharpness processing A40A Sharpness Private 4 applied by the camera when the image was shot. IFD Exif 4199- This tag indicates information on the picture- A40B DeviceSettingDesc- Private 5 taking conditions of a particular camera model. ription IFD Exif 4199- SubjectDistanceRa- A40C Indicates the distance to the subject. Private 6 nge IFD Exif 4201- Indicates an identifier assigned uniquely to each A420 ImageUniqueID Private 6 image. IFD Used by the GDAL library, holds an XML list of 4211- GDAL_ A480 name=value 'metadata' values about the image Private 2 METADATA as a whole, and about specific samples. 4211- Used by the GDAL library, contains an ASCII A481 GDAL_NODATA Private 3 encoded nodata or background pixel value. HD Photo 4812- A 128-bit Globally Unique Identifier (GUID) that Feature BC01 PixelFormat 9 identifies the image pixel format. Spec, p. 17 HD Photo Specifies the transformation to be applied when 4813- Feature BC02 Transformation decoding the image to present the desired 0 Spec, p. representation. 23 HD Photo 4813- Feature BC03 Uncompressed Specifies that image data is uncompressed. 1 Spec, p. 23 4813- Specifies the image type of each individual frame BC04 ImageType HD Photo 2 in a multi-frame file.

283 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag Feature Spec, p. 27 HD Photo 4825- The image's width, in pixels (X:horizontal). The Feature BC80 ImageWidth 6 number of columns in the image. Spec, p. 21 HD Photo 4825- Specifies the number of pixels or scan lines in Feature BC81 ImageHeight 7 the transformed photo. Spec, p. 21 HD Photo 4825- Specifies the horizontal resolution of a Feature BC82 WidthResolution 8 transformed image expressed in pixels per inch. Spec, p. 21 HD Photo 4825- Specifies the vertical resolution of a transformed Feature BC83 HeightResolution 9 image expressed in pixels per inch. Spec, p. 21 HD Photo Specifies the byte offset pointer to the beginning 4832- Feature BCC0 ImageOffset of the photo data, relative to the beginning of the 0 Spec, p. file. 22 HD Photo 4832- Feature BCC1 ImageByteCount Specifies the size of the photo in bytes. 1 Spec, p. 22 HD Photo Specifies the byte offset pointer the beginning of 4832- Feature BCC2 AlphaOffset the planar alpha channel data, relative to the 2 Spec, p. beginning of the file. 22 HD Photo 4832- Specifies the size of the alpha channel data in Feature BCC3 AlphaByteCount 3 bytes. Spec, p. 23 Signifies the level of data that has been HD Photo 4832- discarded from the image as a result of a Feature BCC4 ImageDataDiscard 4 compressed domain transcode to reduce the file Spec, p. size. 25 Signifies the level of data that has been HD Photo 4832- discarded from the planar alpha channel as a Feature BCC5 AlphaDataDiscard 5 result of a compressed domain transcode to Spec, p. reduce the file size. 26 4813- Specifies the image type of each individual frame HD Photo BC04 ImageType 2 in a multi-frame file. Feature

284 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag Spec, p. 27 5021- Oce Scanjob C427 Used in the Oce scanning process. Private 5 Description 5021- Oce Application C428 Used in the Oce scanning process. Private 6 Selector 5021- Oce Identification C429 Used in the Oce scanning process. Private 7 Number 5021- Oce ImageLogic C42A Used in the Oce scanning process. Private 8 Characteristics Encodes DNG four-tier version number; for 5070- DNG C612 DNGVersion version 1.1.0.0, the tag contains the bytes 1, 1, 6 spec, p. 17 0, 0. Used in IFD 0 of DNG files. 5070- Defines oldest version of spec with which file is DNG C613 DNGBackwardVers- 7 compatible. Used in IFD 0 of DNG files. spec, p. 17 ion 5070- Unique, non-localized nbame for camera model. DNG C614 UniqueCameraMod- 8 Used in IFD 0 of DNG files. spec, p. 18 el 5070- LocalizedCameraM-Similar to 50708, with localized camera name. DNG C615 9 odel Used in IFD 0 of DNG files. spec, p. 19 Mapping between values in the CFAPattern tag 5071- and the plane numbers in LinearRaw space. DNG C616 CFAPlaneColor 0 Used in Raw IFD of DNG files. spec, p. 19 Required for non-RGB CFA images. 5071- Spatial layout of the CFA. Used in Raw IFD of DNG C617 CFALayout 1 DNG files. spec, p. 20 5071- Lookup table that maps stored values to linear DNG C618 LinearizationTable 2 values. Used in Raw IFD of DNG files. spec, p. 20 5071- Repeat pattern size for BlackLevel tag. Used in DNG C619 BlackLevelRepeat- 3 Raw IFD of DNG files. spec, p. 21 Dim 5071- Specifies the zero light encoding level.Used in DNG C61A BlackLevel 4 Raw IFD of DNG files. spec, p. 21 Specifies the difference between zero light 5071- encoding level for each column and the baseline DNG C61B BlackLevelDeltaH 5 zero light encoding level. Used in Raw IFD of spec, p. 22 DNG files. Specifies the difference between zero light 5071- encoding level for each row and the baseline zero DNG C61C BlackLevelDeltaV 6 light encoding level. Used in Raw IFD of DNG spec, p. 23 files. 5071- Specifies the fully saturated encoding level for DNG C61D WhiteLevel 7 the raw sample values. Used in Raw IFD of spec, p. 23

285 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag DNG files. For cameras with non-square pixels, specifies 5071- the default scale factors for each direction to DNG C61E DefaultScale 8 convert the image to square pixels. Used in Raw spec, p. 24 IFD of DNG files. Specifies the origin of the final image area, 5071- ignoring the extra pixels at edges used to prevent DNG C61F DefaultCropOrigin 9 interpolation artifacts. Used in Raw IFD of DNG spec, p. 25 files. 5072- Specifies size of final image area in raw image DNG C620 DefaultCropSize 0 coordinates. Used in Raw IFD of DNG files. spec, p. 25 Defines a transformation matrix that converts 5072- XYZ values to reference camera native color DNG C621 ColorMatrix1 1 space values, under the first calibration spec, p. 27 illuminant. Used in IFD 0 of DNG files. Defines a transformation matrix that converts 5072- XYZ values to reference camera native color DNG C622 ColorMatrix2 2 space values, under the second calibration spec, p. 28 illuminant. Used in IFD 0 of DNG files. Defines a calibration matrix that transforms reference camera native space values to 5072- DNG C623 CameraCalibration1 individual camera native space values under the 3 spec, p. 28 first calibration illuminant. Used in IFD 0 of DNG files. Defines a calibration matrix that transforms reference camera native space values to 5072- DNG C624 CameraCalibration2 individual camera native space values under the 4 spec, p. 29 second calibration illuminant. Used in IFD 0 of DNG files. Defines a dimensionality reduction matrix for use as the first stage in converting color camera 5072- DNG C625 ReductionMatrix1 native space values to XYZ values, under the 5 spec, p. 30 first calibration illuminant. Used in IFD 0 of DNG files. Defines a dimensionality reduction matrix for use as the first stage in converting color camera 5072- DNG C626 ReductionMatrix2 native space values to XYZ values, under the 6 spec, p. 30 second calibration illuminant. Used in IFD 0 of DNG files. Pertaining to white balance, defines the gain, 5072- either analog or digital, that has been applied to DNG C627 AnalogBalance 7 the stored raw values. Used in IFD 0 of DNG spec, p. 31 files. 5072- Specifies the selected white balance at the time DNG C628 AsShotNeutral 8 of capture, encoded as the coordinates of a spec, p. 31

286 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag perfectly neutral color in linear reference space values. Used in IFD 0 of DNG files. Specifies the selected white balance at the time 5072- DNG C629 AsShotWhiteXY of capture, encoded as x-y chromaticity 9 spec, p. 32 coordinates. Used in IFD 0 of DNG files. Specifies in EV units how much to move the zero 5073- DNG C62A BaselineExposure point for exposure compensation. Used in IFD 0 0 spec, p. 32 of DNG files. Specifies the relative noise of the camera model 5073- at a baseline ISO value of 100, compared to DNG C62B BaselineNoise 1 reference camera model. Used in IFD 0 of DNG spec, p. 33 files. Specifies the relative amount of sharpening 5073- required for this camera model, compared to DNG C62C BaselineSharpness 2 reference camera model. Used in IFD 0 of DNG spec, p. 33 files. For CFA images, specifies, in arbitrary units, how closely the values of the green pixels in the 5073- DNG C62D BayerGreenSplit blue/green rows track the values of the green 3 spec, p. 34 pixels in the red/green rows. Used in Raw IFD of DNG files. Specifies the fraction of the encoding range 5073- above which the response may become DNG C62E LinearResponseLim- 4 significantly non-linear. Used in IFD 0 of DNG spec, p. 34 it files. 5073- CameraSerialNumb-Serial number of camera. Used in IFD 0 of DNG DNG C62F 5 er files. spec, p. 35 5073- Information about the lens. Used in IFD 0 of DNG C630 LensInfo 6 DNG files. spec, p. 35 Normally for non-CFA images, provides a hint 5073- DNG C631 ChromaBlurRadius about how much chroma blur ought to be applied. 7 spec, p. 36 Used in Raw IFD of DNG files. Provides a hint about the strength of the 5073- DNG C632 AntiAliasStrength camera's anti-aliasing filter. Used in Raw IFD of 8 spec, p. 36 DNG files. Used by Adobe Camera Raw to control 5073- DNG ShadowScale sensitivity of its shadows slider. Used in IFD 0 of 9 spec, p. 38 DNG files. Provides a way for camera manufacturers to 5074- DNG C634 DNGPrivateData store private data in DNG files for use by their 0 spec, p. 37 own raw convertors. Used in IFD 0 of DNG files. Lets the DNG reader know whether the Exif 5074- DNG C635 MakerNoteSafety MakerNote tag is safe to preserve. Used in IFD 0 1 spec, p. 38 of DNG files.

287 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag 5077- Illuminant used for first set of calibration tags. DNG C65A CalibrationIlluminan- 8 Used in IFD 0 of DNG files. spec, p. 26 t1 5077- CalibrationIlluminan-Illuminant used for second set of calibration tags. DNG C65B 9 t2 Used in IFD 0 of DNG files. spec, p. 26 Specifies the amount by which the values of the 5078- DefaultScale tag need to be multiplied to achieve DNG C65C BestQualityScale 0 best quality image size. Used in Raw IFD of spec, p. 24 DNG files. Contains a 16-byte unique identifier for the raw 5078- DNG RawDataUniqueID image file in the DNG file. Used in IFD 0 of DNG 1 spec, p. 39 files. 5078- Alias Layer C660 Alias Sketchbook Pro layer usage description. Private 4 Metadata Name of original file if the DNG file results from 5082- OriginalRawFileNa- DNG conversion from a non-DNG raw file. Used in 7 me spec, p. 39 IFD 0 of DNG files. If the DNG file was converted from a non-DNG 5082- OriginalRawFileDat- DNG raw file, then this tag contains the original raw 8 a spec, p. 40 data. Used in IFD 0 of DNG files. 5082- Defines the active (non-masked) pixels of the DNG ActiveArea 9 sensor. Used in Raw IFD of DNG files. spec, p. 41 List of non-overlapping rectangle coordinates of 5083- fully masked pixels, which can optimally be used DNG MaskedAreas 0 by DNG readers to measure the black encoding spec, p. 42 level. Used in Raw IFD of DNG files. Contains ICC profile that, in conjunction with the AsShotPreProfileMatrix tag, specifies a default 5083- color rendering from camera color space DNG AsShotICCProfile 1 coordinates (linear reference values) into the ICC spec, p. 42 profile connection space. Used in IFD 0 of DNG files. Specifies a matrix that should be applied to the camera color space coordinates before 5083- AsShotPreProfileM- DNG processing the values through the ICC profile 2 atrix spec, p. 43 specified in the AsShotICCProfile tag. Used in IFD 0 of DNG files. The CurrentICCProfile and CurrentPreProfileMatrix tags have the same 5083- purpose and usage as the AsShotICCProfile and DNG CurrentICCProfile 3 AsShotPreProfileMatrix tag pair, except they are spec, p. 44 for use by raw file editors rather than camera manufacturers. Used in IFD 0 of DNG files. 5083- CurrentPreProfileM-The CurrentICCProfile and DNG 4 atrix spec, p. 44

288 Appendix H - TIFF Tags

Code Source of Name Description Dec Hex Tag CurrentPreProfileMatrix tags have the same purpose and usage as the AsShotICCProfile and AsShotPreProfileMatrix tag pair, except they are for use by raw file editors rather than camera manufacturers. Used in IFD 0 of DNG files.

1Content for base and extended tags used by permission of the author, Max Maischein.

289 Appendix I - Snowbound Error Codes

Appendix I - Snowbound Error Codes

This appendix describes the error codes that are returned by function execution problems.

Detailed Status/Error Codes

Table I.1: Error Codes

Error Error Code Description Failed on memory allocation. Problem with a standard memory allocation. Please see Determining Memory OUT_OF_MEMORY -1 Requirements in Chapter 2 for more information on the amount of memory required. Open call failed when trying to FILE_NOT_FOUND -2 decompress an image. CORRUPTED_FILE -3 File format bad, or unreadable. BAD_STRING -4 String passed in is null or invalid. Internal DLL problem. Submit a support issue at http://support.snowbound.com BAD_RETURN -5 and attach the document you were processing when you received this error. Fail on saving when attempting to create a CANT_CREATE_FILE -6 new file. Image was not recognized as a format the library can decompress. Please see FORMAT_NOT_ALLOWED -7 Appendix A, Supported File Formats to see if the file format is optional or requires special handling. Getobject() call failed to return bitmap header for using DDB functions or may be NO_BITMAP_FOUND -8 returned in formats that can contain vector information such as .WPG, .WMF and .PCT if no bitmap information is found. Error writing data to the disk. Standard file DISK_FULL -9 i/o write failed. Tried to display with negative coordinates BAD_DISPLAY_AREA -10 or out of range. Used for multi-page file format support when attempting to access a page which does not exist. This error code provides PAGE_NOT_FOUND -11 information of an empty Word-page which is not converted to an empty page in PDF or TIFF.

290 Appendix I - Snowbound Error Codes

Error Error Code Description File format was truncated and tried to read DISK_READ_ERROR -12 past end of file. Standard read i/o function failed. Application passed bad image handle. Not BAD_HANDLE -13 a valid Snowbound library image handle. NO_CLIPBOARD_IMAGE -14 Image not found on clipboard. TWAIN scanner driver not installed or not NO_SCANNER_FOUND -15 found (TWAIN.DLL). Bad scanner driver or driver not configured ERROR_OPENING_SCANNER -16 properly. TWAIN scanner driver not installed or not CANT_FIND_TWAIN_DLL -17 found (TWAIN.DLL). Cancel out of low level save or low level USER_CANCEL -18 decompress. Usually not an error but termination of a function intentionally. Date on an evaluation copy of the EVAL_TIMEOUT -19 Snowbound product has expired. USING_RUNTIME -20 Version not allowed for design mode. Tried to save an image to a format that does not support the image’s bits per pixel. Or tried to perform an image PIXEL_DEPTH_UNSUPPORTED -21 processing function on an image whose bits per pixel is not allowed. Please see Appendix A, Supported File Formats for the pixel depths of each supported format. PALETTE_IMAGES_NOT_ Some image processing operations does -22 ALLOWED not work on palette images. NO_LZW_VERSION -23 No LZW or GIF code in this version. DLL_NOT_LOADED -24 DLL not loaded for Win 3.x version. Format will not support on the fly FORMAT_WILL_NOT_OTFLY -25 decompression. NO_TCOLOR_FOUND -26 No transparency color information found. COMPRESSION_NOT_ Currently not supporting this compression -27 SUPPORTED format. Returned when scanning has completed NO_MORE_PAGES -28 all pages in the document feeder. FEEDER_NOT_READY -29 No more pages ready in document feeder. No delay time was found for the animated NO_DELAY_TIME_FOUND -30 GIF. TIFF_TAG_NOT_FOUND -31 Could not find the .TIF tag. NOT_A_TILED_IMAGE -32 Not recognized as a TIFF tiled image. You are using a version that does not NOT_SUPPORTED_IN_THIS_ support this function. You do not have -33 VERSION support for this file format. You may contact support or your account

291 Appendix I - Snowbound Error Codes

Error Error Code Description representative to get information on the RasterMaster option that will allow you to process the file format. AUTOFEED_FAILED -34 Autofeed fail in the TWAIN Scanner. NO_FAST_TWAIN_SUPPORTED -35 TWAIN driver cannot do fast transfer. NO_PDF_VERSION -36 No PDF code in this version. NO_ABIC_VERSION -37 No ABIC plug-in code in this version. Internal error. An exception occurred during processing. Please enter a support ticket at http://support.snowbound.com providing the document that was being EXCEPTION_ERROR -38 processed and the Java console log output. If the RasterMaster function being called was not a decompress bitmap, then please include a small sample program that can be used to reproduce the issue. NO_VECTOR_CAPABILITY -39 No vector plug-in found in this version. NO_PCL_VERSION -40 No PCL plug-in found in this version. NO JPEG2000 plug-in found in this NO_JPEG2000_VERSION -41 version. SEARCH_STRING_NOT_FOUND -42 Did not find attempted search string. NO_WORD_VERSION -43 NO MS Word plug-in found in this version. PASSWORD_PROTECTED_PDF -44 This file was password protected. The Snowbound method was not found. METHOD_NOT_FOUND -45 Please check the spelling of the method name and Snowbound library version. Access denied. Please check the security ACCESS_DENIED -46 permissions. BAD_LICENSE_PRIMARY Primary level license loaded is bad. -47 BAD_LICENSE_SECONDARY Secondary level license loaded is bad. This file was password protected for Word PASSWORD_PROTECTED_FILE -48 or other formats. PDF_PACKAGE_NOT_ You are using a version that does not -50 SUPPORTED support PDF packages. The OOXML Aspose license file was not OOXML_LICENSE_NOT_FOUND -52 found.ई The OOXML Aspose license file expired OOXML_LICENSE_EXPIRED -53 or is otherwise invalid.

292 Appendix I - Snowbound Error Codes

General Error Define Values Retrieved from Status Property

Table I.2: General Error Define Values Retrieved from Status Property

Value Error Code Description GENERAL_STATUS.SYSTEM_ If an internal exception is thrown, this is -100 CRASH the resulting value. GENERAL_STATUS.DELETE_ -101 Image data of the object failed ERROR GENERAL_STATUS.DEFAULT -102 What the internal values are initially set to GENERAL STATUS.SNOWBND_ 1 Operation completed successfully OK GENERAL STATUS.SNOWBND_ Operation failed. See StatusDetails -1 ERROR property. GENERAL_STATUS.IMAGE_ Internal image data unavailable when -103 NOT_AVAILABLE trying to complete an operation GENERAL STATUS.SNOWBND_ -104 API is not implemented API_NOT_AVAILABLE GENERAL STATUS.NOT_VALID -105 Parameter is not valid GENERAL STATUS.DISPLAY_ -106 General error display ERROR

General Status/Error Codes

Table I.3: General Status/Error Codes

Error Description The image in memory cannot DELETE_ERROR be removed. Any problems with displaying DISPLAY_ERROR an image will return this error code. No image data is available to IMAGE_NOT_AVAILABLE do manipulations on. This is returned if a parameter NOT_VALID passed into an API is not valid. This is returned if an API SNOWBND_API_NOT_AVAILABLE method is not implemented in the current build. General API error code of an SNOWBND_ERROR unsuccessful action.

293 Appendix I - Snowbound Error Codes

Error Description General API status of a SNOWBND_OK successful action. This is returned when a Critical SYSTEM_CRASH Exception is thrown.

294 Appendix J - Troubleshooting

Appendix J - Troubleshooting

This appendix describes solutions to issues that you may run across when installing and using RasterMaster ActiveX.

Receiving an Error Code When Loading, Saving or Converting a Document

If you receive an error code when trying to load, save or convert a document with RasterMaster ActiveX, please check the list of error codes and their descriptions in Appendix I, Snowbound Error Codes to determine the source of the issue. If you still cannot resolve the issue after looking at the list of error codes, please submit a support ticket at http://support.snowbound.com and include the error code and the document that you were trying to load, save or convert when you got the error message.

Output Document Differs from Original Document

When you convert a document and the output document is different from the original document, please create a support ticket at http://support.snowbound.com and attach the document along with a screenshot of the output document in RasterMaster ActiveX. Some examples of the differences that may occur include missing data, missing text, distorted graphics or displaying an incorrect or different font. We can test the document with the latest release of RasterMaster ActiveX which contains fixes which may resolve your issue.

Output Document Displays Incorrect or Missing Characters

When you convert a document, the output document may display incorrect or missing characters if the document contains special characters which are commonly found in Non- English languages such as Chinese, Japanese and Thai. Make sure that your system is properly configured to support these characters. For more information, please see Snowbound Software’s Font Configuration Guide.

Identifying an Unknown File Format

To identify an unknown file format, you can use the FileType Property function in RasterMaster ActiveX. This function returns a number that corresponds to a file type as defined in the RasterMaster library. Please see Appendix A,Supported File Formats for a list of the Snowbound file type constants.

295 Appendix J - Troubleshooting

Scanning Error

If the ERROR_OPENING_SCANNER (-16) is being returned, then check that the control is visible. You can set the height and width of the control to be very small (1) to make it nearly invisible or hide it behind something. However the control Visible Property has to be true so it can process the Windows messages and communicate with the scanner.

Color Annotations Appear Black and White or Not at All

If color annotations appear black and white or do not appear at all after an image is converted, make sure that the bit depth for the AnnMerge property is set to 24 before the image is decompressed for color annotations to appear. For more information, please see the AnnMerge Property .

Receiving a -3 Corrupted File Error code

If you receive a -3 corrupted file error code, the input document may have become corrupt. To resolve this issue, open the document in an editor and write it back out again.

Some PDF document generators do not properly specify all of the information needed in a document. To resolve this issue in PDF documents that are generated by custom applications, open the document in Adobe Acrobat and then save it. You should then be able to process the newly saved document in RasterMaster ActiveX.

Overlay Resources Not Pulled into APF or MODCA Document

If overlay resources such as signatures are not being pulled into an AFP or MODCA document, then make sure that the resource filename does not have a filename extension. If the resource filename has a filename extension, remove it.

Searching for Text in a Snowbound Software Generated PDF

If you are having trouble finding text in a Snowbound Software generated searchable PDF, please use Adobe Reader version 9.4 to do the search.

Some TIFF_JPEG Files Produced By RasterMaster ActiveX Do Not Open In Third Party Image Viewers

When converting a file to TIFF_JPEG with RasterMaster ActiveX, you may see that the resulting TIFF is blank when opened in a third party image viewer such as MS Office Document

296 Appendix J - Troubleshooting

Imaging or Windows Photo Viewer. In some cases, the viewer may also display an error message indicating that the TIFF is corrupted or too large.

This issue typically occurs when the file in question is converted at 1-bit black and white or 8-bit grayscale, rather than 24-bit color. By default, RasterMaster ActiveX will often choose 1 bit/pixel to ensure better performance during conversion. Formats which are converted to 1-bit by default include AFP, DOC, XLS, and PCL. For these formats, we recommend that you call the IMGLOW_set_document_input() method prior to decompression if you wish to convert to TIFF_JPEG. Please see the following example: status = s.IMGLOW_set_document_input(200, 24, Defines.DOC) status = s.IMG_decompress_bitmap("C:\\input\\file.doc", page); status = s.IMG_save_bitmap("C:\\output\\file.tif", Defines.TIFF_JPEG)

In the above example, the input DPI and bit-depth are set to 200 and 24 respectively for the input DOC file before being converted to TIFF_JPEG.

Please also note that while color input images (e.g. JPEG, TIFF, PNG) will be converted to 24 bits/pixel by default, you still might see this issue for black and white or grayscale input images. In the case where your input file is a black and white or grayscale image, you can promote the bit-depth to 24 by calling IMG_promote_24() after decompression. Please see the following example: status = s.IMG_decompress_bitmap("C:\\input\\file.png", page); status = s.IMG_promote_24(); status = s.IMG_save_bitmap("C:\\output\\file.tif", Defines.TIFF_JPEG)

This should produce an output TIFF that can be viewed by most third party image viewers.

297 Index: -1 error code – -43 error code

-22 error code 291 Index -23 error code 291

-24 error code 291 -

-1 error code 290 -25 error code 291

-10 error code 290 -26 error code 291

-100 error code 293 -27 error code 291

-101 error code 293 -28 error code 291

-102 error code 293 -29 error code 291

-103 error code 293 -3 error code 290

-104 error code 293 -30 error code 291

-105 error code 293 -31 error code 291

-106 error code 293 -32 error code 291

-11 error code 290 -33 error code 291

-12 error code 291 -34 error code 292

-13 error code 291 -35 error code 292

-14 error code 291 -36 error code 292

-15 error code 291 -37 error code 292

-16 error code 291 -38 error code 292

-17 error codee 291 -39 error code 292

-18 error code 291 -4 error code 290

-19 error code 291 -40 error code 292

-2 error code 290 -41 error code 292

-20 error code 291 -42 error code 292

-21 error code 291 -43 error code 292

298 Index: -44 error code – AnnMode Property

-44 error code 292 AFP 185

-45 error code 292 AFP Font Mapping 154

-46 error code 292 AFP Font Mapping Property 154

-47 error code 292 AFP resource

-48 error code 292 not displayed 296

-5 error code 290 AFP troubleshooting

-50 error code 292 overlay 296

-52 error code 292 Alias Property 41

-53 error code 292 Animate sample 217

-6 error code 290 AnimateImage Property 42

-7 error code 290 AnnActivate Property 172

-8 error code 290 AnnAddBitmap Property 172

-9 error code 290 AnnAddObject Property 172

AnnAddText Property 173 1 AnnChooseColor Property 173 1 error code 293 AnnChooseFont Property 173 A AnnChooseLineStyle Property 174 ABIC 184 AnnCreate Property 175 Abicplug.dll 212 AnnFontItalic Property 175 About Property 39 AnnGetText Property 175 ACCESS_DENIED error code 292 AnnLoadBitmap Property 175 ActiveImage Property 40 AnnMerge Property 176, 296 ActivePage Property 40 AnnMergeFile Property 176 additions 24 AnnMode Property 176

299 Index: AnnObject Property – AxInterop.SnbdocxLib.dll

AnnObject Property 177 AsciiFont Property 44

AnnObjectNum Property 177 AsciiItalic Property 44

Annotate sample 217 AsciiLinesPerPage Property 45

Annotate_VB5 26, 213 AsciiMarginLeft Property 47

Annotation Constants 177 AsciiMarginRight Property 47

Annotation sample 235 AsciiMarginTop Property 46 annotations AsciiPageHeight Property 47

not appearing 296 AsciiPageWidth Property 47

AnnPrint Property 177 AsciiPointSize Property 48

AnnRead Property 178 AsciiTab Property 49

AnnSetBcolor Property 178 AsciiYdpi Property 49

AnnSetFcolor Property 178 AspectRatio Property 50

AnnSetFontHeight Property 178 Aspose.Words.dll 212

AnnSetFontName Property 179 Aspose.Words.lic 212

AnnSetFontWeight Property 179 AutoColor Property 51

AnnSetLineStyle Property 179 AutoCrop Property 52

AnnSetLineWidth Property 179 AUTOFEED_FAILED error code 292

AnnSetObjectNum Property 180 AutoOrient Property 52

AnnWrite Property 180 AutoRedraw Property 53

ASCII 184-185 AutoReduce Property 54

filter bit level support 184 AutoResizeX Property 54

ASCII Import Properties 156 AutoResizeY Property 54

AsciiBold Property 42 AutoSize Property 55

AsciiCharsPerLine Property 43 AxInterop.SnbdocxLib.dll 261

300 Index: AxSnbdocxLib.dll – CORRUPTED_FILE error code

AxSnbdocxLib.dll 261 C

B CALS 185

BackColor Property 56 CANT_CREATE_FILE error code 290

BAD_DISPLAY_AREA error CANT_FIND_TWAIN_DLL error code 290 code 291

BAD_HANDLE error code 291 CCITT_G3 185

BAD_LICENSE_PRIMARY error CCITT_G3_FO 185 code 292 CCITT_G4 185 BAD_LICENSE_SECONDARY error CCITT_G4_FO 185 code 292 CFF 185 BAD_RETURN error code 290 CIFF 185 BAD_STRING error code 290 CIMS 186 BatchConvert sample 237 ClearImage Property 60 BatchConvert_VB5 27, 213 CLIP 186 BayerColor Property 57 CmykToRGB Property 61 BayerMono Property 57 COD 186 bit depth 296 color 296 BlankControl Property 58 COM Components 256 BMP 185 COMPRESSION_NOT_ BMP_UNCOMPRESSED 185 SUPPORTED error code 291 BorderStyle Property 58 Contrast Property 61 Brightness Property 59 Copying sample 219 BritCnst sample 218 Copying_VB4 27, 213 BritCnst_VB4 27, 213 CORRUPTED_FILE error code 290 BRK 185

301 Index: CropXpos Property – error code

CropXpos Property 63 DitherMode Property 70

CropXsize Property 64 DLL_NOT_LOADED error code 291

CropYpos Property 63 DOC 186

CropYsize Property 64 DOCPLUG.dll 212

Customize Toolbox dialog 252 DOCX 187

CUT 186 DragIcon Property 70

DragMode Property 71 D DrawMode Property 72 DCS 186 DWG 187 DCX 186 dwgplg.dll 212 DecompressScreen Property 65 DXF 187 DELETE_ERROR error code 293

DelImage Property 66 E

Deskew Property 66 EdgeDetect Property 73

Despeckle Property 67 Effect Property 74

Dialation Property 68 EMAIL 187

DIB 186 Encrypt Property 75

DibToRuns Property 68 EPS 187

DICOM 186 EPS_BITMAP 188

Diffusion Property 69 EPS_BITMAP_G4 188

DiffusionColor Property 69 EPS_BITMAP_LZW 188

DiffusionMono Property 69 error code

DISK_FULL error code 290 -1 290

DISK_READ_ERROR error code 291 -10 290

DISPLAY_ERRORerror code 293 -100 293

302 Index: error codeZ – DISPLAY_ERRORerror code

-101 293 -28 291

-102 293 -29 291

-103 293 -3 290

-104 293 -30 291

-105 293 -31 291

-106 293 -32 291

-11 290 -33 291

-12 291 -34 292

-13 291 -35 292

-14 291 -36 292

-15 291 -37 292

-16 291 -38 292

-17 291 -39 292

-18 291 -4 290

-19 291 -40 292

-2 290 -41 292

-20 291 -42 292

-21 291 -43 292

-22 291 -44 292

-23 291 -45 292

-24 291 -46 292

-25 291 -47 292

-26 291 -48 292

-27 291 -5 290

303 Index: error codeZ – DISPLAY_ERRORerror code

-52 292 DLL_NOT_LOADED 291

-53 292 ERROR_OPENING_ SCANNER 291 -6 290 EVAL_TIMEOUT 291 -7 290 EXCEPTION_ERROR 292 -8 290 FEEDER_NOT_READY 291 -9 290 FILE_NOT_FOUND 290 1 293 FORMAT_NOT_ALLOWED 290 ACCESS_DENIED 292 FORMAT_WILL_NOT_ AUTOFEED_FAILED 292 OTFLY 291 BAD_DISPLAY_AREA 290 GENERAL_ BAD_HANDLE 291 STATUS.DEFAULT 293

BAD_LICENSE_PRIMARY 292 GENERAL_STATUS.DELETE_

BAD_LICENSE_ ERROR 293

SECONDARY 292 GENERAL_STATUS.DISPLAY_

BAD_RETURN 290 ERROR 293

BAD_STRING 290 GENERAL_STATUS.IMAGE_ NOT_AVAILABLE 293 CAN_CREATE_FILE 290 GENERAL_STATUS.NET_ CANT_FIND_TWAIN_DLL 291 VALID 293 COMPRESSION_NOT_ GENERAL_ SUPPORTED 291 STATUS.SNOWBND_API_ CORRUPTED_FILE 290 NOT_AVAILABLE 293

DELETE_ERROR 293 GENERAL_ STATUS.SNOWBND_ DISK_FULL 290 OK 293 DISK_READ_ERROR 291 GENERAL_STATUS.SYSTEM_ DISPLAY_ERROR 293 CRASH 293

304 Index: error codeZ – EVAL_TIMEOUT error code

IMAGE_NOT_AVAILABLE 293 PAGE_NOT_FOUND 290

METHOD_NOT_FOUND 292 PALETTE_IMAGE_NOT_ ALLOWED 291 NO_ABIC_VERSION 292 PASSWORD_PROTECTED_ NO_BITMAP_FOUND 290 FILE 292 NO_CLIPBOARD_IMAGE 291 PASSWORD_PROTECTED_ NO_DELAY_TIME_FOUND 291 PDF 292

NO_FAST_TWAIN_ PDF_PACKAGE_NOT_ SUPPORTED 292 SUPPORTED 292

NO_JPEG2000_VERSION 292 PIXEL_DEPTH_

NO_MORE_PAGES 291 UNSUPPORTE 291

NO_PCL_VERSION 292 SEARCH_STRING_NOT_ FOUND 292 NO_PDF_VERSION 292 SNOWBND_API_NOT 293 NO_SCANNER_FOUND 291 SNOWBND_OK 294 NO_TCOLOR_FOUND 291 SYSTEM_CRASH 294 NO_VECTOR_CAPABILITY 292 TIFF_TAG_NOT_FOUND 291 NO_WORD_VERSION 292 USER_CANCEL 291 NOT_A_TILED_IMAGE 291 USING_RUNTIME 291 NOT_SUPPORTED_IN_THIS_ VERSION 291 error codeZ

NOT_VALID 293 NO_LZWZ_VERSION 291

OOXML_LICENSE_ ERROR_OPENING_SCANNER error EXPIRED 292 code 291

OOXML_LICENSE_NOT_ ErrorStr Property 75

FOUND 292 EVAL_TIMEOUT error code 291

OUT_OF_MEMORY 290

305 Index: evaluation version – GENERAL_STATUS.DISPLAY_ERROR error code

evaluation version FileTypeStr Property 80

installing 204 FillColor Property 35

Events sample 220 FillOrder Property 81

Events_VB4 27, 213 Filter Property 82

EXCEPTION_ERROR error code 292 FitToHeight Property 81

ExtractBuff Property 76 FitToWidth Property 82

ExtractText Property 76 FLASHPIX 188

FlipX Property 83 F FlipY Property 83 Fax Property 77 Font Mapping Data 154 FaxOffset Property 78 Format Conversion sample 246 FaxType Property 78 FORMAT_NOT_ALLOWED error FaxXsize Property 78 code 290 FaxYsize Property 78 FORMAT_WILL_NOT_OTFLY error FEEDER_NOT_READY error code 291 code 291 G File Info sample 221 Gamma Property 84 FILE_NOT_FOUND error code 290 General Status Error 293 FileInfo_VB4 27, 213 GENERAL_STATUS.DEFAULT error filename extension 296 code 293 FileNet 188 GENERAL_STATUS.DELETE_ files ERROR error code 293

redistributed 204 GENERAL_STATUS.DISPLAY_

FileType Property 79 ERROR error code 293

FileTypeName Property 79

306 Index: GENERAL_STATUS.IMAGE_NOT_AVAILABLE error code – ImageView sample

GENERAL_STATUS.IMAGE_NOT_ HorzEdgeDetect Property 88 AVAILABLE error code 293 HTML 188 GENERAL_STATUS.NOT_VALID HtmlHelper.dll 212 error code 293 Htmlplg.dll 212 GENERAL_STATUS.SNOWBND_ API_NOT_AVAILABLE error I code 293 ICO 189 GENERAL_STATUS.SNOWBND_ icudt38.dll 212 ERROR 293 IFF 189 GENERAL_STATUS.SNOWBND_ OK error code 293 Image File Directories (IFDs) 262

GENERAL_STATUS.SYSTEM_ Image Management System 186 CRASH error code 293 Image Property 89 GetBuffer Property 85 IMAGE_NOT_AVAILABLE error GetBytes Property 85 code 293

GetFileInfo Property 85 ImageAccel Property 90

GetYpos Property 86 ImageAccelRot Property 91

GIF 188 ImageBitspix Property 91

GIF_INTERLACED 188 ImageDate Property 92

Gray Property 86 ImageDib Property 92

GX2 188 ImageError Property 93

ImageHeight Property 93 H ImageName Property 94 HalftoneMono Property 87 ImagePosX Property 94 Height Property 87 ImagePosY Property 94 HelpContextID Property 87 ImageView sample 238 HistoGramEqualize Property 88

307 Index: ImageView_VB5 – Merge sample

ImageView_VB5 27, 213 JpegInterleave Property 98

ImageWidth Property 93 K ImageXdpi Property 95 KOFAX 190 ImageYdpi Property 95 L IMG 189 Laplacian Property 99 IMGLOW_get_tiff_tag 262 large documents IMGLOW_set_tiff_tag 262 printing 159 IMNET 189 LASER_DATA 190 improvements 24 Left Property 100 Index Property 96 LINE_DATA 190 Installation Process 203 LoadFile sample 224 Installed Files 203 Loadfile_VB4 27, 214 Interp Property 96 LoadText sample 225 Invert Property 97 Loadtext_VB4 27, 214 IOCA 189

IsolatePoints Property 98 M

MACPAINT 190 J MAG 190 Jb2plug.dll 212 MemLoad Property 100 JBIG 189 memory JBIG2 189 requirements 31 JEDMICS 190 memory requirements 31 Jp2plug.dll 212 MemSave Property 101 JPEG 190 Merge sample 226 JPEG2000 190

308 Index: Merge_VB4 – NOT_SUPPORTED_IN_THIS_VERSION error code

Merge_VB4 27, 214 new features 24

MergeMem Property 101 NO_ABIC_VERSION error code 292

Mergename Property 102 NO_BITMAP_FOUND error code 290

MergeXpos Property 103 NO_CLIPBOARD_IMAGE error code 291 MergeXsize Property 104 NO_DELAY_TIME_FOUND error MergeYpos Property 103 code 291 MergeYsize Property 104 NO_FAST_TWAIN_SUPPORTED METHOD_NOT_FOUND error error code 292 code 292 NO_JPEG2000_VERSION error Minimum Requirements 203 code 292

MMR 191 NO_LZW_VERSION error code 291

MODCA resource NO_MORE_PAGES error code 291

not displayed 296 NO_PCL_VERSION error code 292

MODCA troubleshooting NO_PDF_VERSION error code 292

overlay 296 NO_SCANNER_FOUND error

MSP 191 code 291

Multi-page Format Properties 163 NO_TCOLOR_FOUND error code 291 Multi-page sample 240 NO_VECTOR_CAPABILITY error Multiple sample 226 code 292 Multiple_VB4 27, 214 NO_WORD_VERSION error code 292 N NOT_A_TILED_IMAGE error Name Property 104 code 291 NCR 191 NOT_SUPPORTED_IN_THIS_ Neg45EdgeDetect Property 104 VERSION error code 291

309 Index: NOT_VALID error code – PDF_16

NOT_VALID error code 293 Overlay Property 109

O P

Octree sample 227 Page Property 110

Octree_VB4 27, 214 PAGE_NOT_FOUND error code 290

OctreeBpp Property 105 Pages Property 110

OctreeColors Property 106 Palette Property 111

OctreePal Property 107 PALETTE_IMAGES_NOT_ ALLOWED error code 291 OctreeStart Property 108 Pan sample 228 OCX/VBX Properties 171 Pan_VB4 27, 214 ODF 191 Pan_VB5 27, 214 ODP 191 PanWindow Property 112 ODS 191 PASSWORD_PROTECTED_FILE ODT 191 error code 292 OOXML 191 PASSWORD_PROTECTED_PDF OOXML_LICENSE_EXPIRED error error code 292 code 292 Paste Property 112 OOXML_LICENSE_NOT_FOUND PCL 191 error code 292 PCL_5 192 ooxmlplug.dll 212 Pclplug.dll 212 Orientation Property 109 PCX 192 OUT_OF_MEMORY error code 290 PDF 192 overlay filter bit level support 184 AFP troubleshooting 296 PDF_15 193 MODCA troubleshooting 296 PDF_16 194

310 Index: PDF_PACKAGE_NOT_SUPPORTED error code – Redraw Property

PDF_PACKAGE_NOT_ Print sample 229 SUPPORTED error code 292 Print_VB4 28, 214 PdfBitsPerPixel Property 113 PrintFast Property 117 PdfDpi Property 113 PrintImage Property 118 Pdfplug.dll 212 Printing Pdfplug.dll file 182 large documents 159 PdfXPageSize Property 113 PrintSize Property 119 PdfYPageSize Property 114 PrintXs Property 120 Photoshop 195 PrintXsize Property 120 PICT 195 PrintYs Property 120 Picture Property 114 PrintYsize Property 120 Picture sample 229 production version Picture_VB4 27, 214 installing 204 PIXEL_DEPTH_ ProjectName.exe 261 UNSUPPORTED 184 Promote24 Property 121 PIXEL_DEPTH_UNSUPPORTED error code 291 Promote8 Property 121

PixelValue Property 115 PutBuffer Property 122

PixelXpos Property 115 PutBytes Property 122

PixelYpos Property 115 PutYpos Property 122

PNG 195 R

Popularity Property 116 RAST 196

Pos45EdgeDetect Property 116 Read/Write Capabilities 184

PPT 195 Reading Multi-page Images 162

PPTX 196 Redraw Property 123

311 Index: Regsvr32 snbd13cm.ocx – ScanDuplex Property

Regsvr32 snbd13cm.ocx 169 SANN_FILLED_ELLIPSE 180 requirements SANN_FILLED_POLYGON 180

memory 31 SANN_FREEHAND 180

Resize Property 124 SANN_LINE 180

Resize sample 230 SANN_POLYGON 180

Resize_VB4 28, 214 SANN_POSTIT 180

ResizeHeight Property 124 SANN_RECTANGLE 180

ResizeWidth Property 124 SANN_TRANSPARENT_ BITMAP 180 RGBToCmyk Property 33 SaveMem sample 230 Rich Text Format 196 SaveMem_V54 28, 214 RobertsCross Property 125 SaveQuality Property 129 Rotate Property 126 Scan sample 232 Rotate sample 230 Scan_VB4 28, 214 Rotate_VB4 28, 214 Scan_VB5 28, 214 RotateScreen Property 127 ScanAcquire Property 130 RTF 196 ScanAcquireFeeder Property 130 RunsToDib Property 128 ScanBits Property 131 S ScanBottom Property 132 SAN_HIGHLIGHTED_RECT 180 ScanCap Property 132 SANN_ARROW 180 ScanCapGet Property 132 SANN_BITMAP 180 ScanCapValue Property 133 SANN_EDIT 180 ScanCloseFeeder Property 133 SANN_ELLIPSE 180 ScanDuplex Property 134 SANN_FILED_RECT 180

312 Index: ScanFast Property – Text_Search_Extract_VB6

ScanFast Property 134 Snbdocx.lic 212

ScanHres Property 135 SnbdocxCtrl 251

ScanLeft Property 132 SnbdocxLib.dll 261

ScanOpenSource Property 135 SNOWBND_API_NOT error code 293

ScanPages Property 136 SNOWBND_OK error code 294

ScanRight Property 132 Snowbound Custom Control 115

ScanSetup Property 136 Snowbound Error Codes 290

ScanTop Property 132 Status Property 142

ScanVres Property 135 Supported File Format Descriptions 184 SCITEX 196 Supported Multi-page Formats 162 ScrollBars Property 137 SYSTEM_CRASH error code 294 SEARCH_STRING_NOT_FOUND error code 292 T Select Property 138 TabIndex Property 142 SetFormat Property 139 TabStop Property 142 SetPDFOutputSizePerPage_VB6 28, Tag Property 143 214 tag specifications 262 Sharpness Property 139 TagString Property 143 Showui Property 140 TagtoRead Property 143 SimpleConversionDM_VB6 28, 214 TagValue Property 143 SimpleMultipageSavingSplittingSM_ VB6 28, 215 TARGA 196

SizeControl Property 141 TARGA16 196

Snbd_map.fnt file 154 Text Search and Extract sample 246

snbdca.ocx 212 Text_Search_Extract_VB6 28, 215

313 Index: third party viewer – Version Property

third party viewer 296 Top Property 144

Thresh Property 144 TranspColor Property 145

Thumbnail sample 244 troubleshooting 295

Thumbnail_VB5 28, 215 corrupted file error 296

TIFF error code 295

read tag 262 missing characters 295

TIFF tags 262 output differs 295

TIFF UNCOMPRESSED 198 scanning error 296

TIFF_2D 196 searching text 296

TIFF_ABIC 197 third party viewer 296

TIFF_ABIC_BW 197 TIFF_JPEG 296

TIFF_G3_FAX 197 unknown file format 295

TIFF_G4_FAX 197 TSCase Property 145

TIFF_G4_FAX_FO 197 TSEnable Property 145

TIFF_G4_FAX_STRIP 197 TSstring Property 146

TIFF_HUFFMAN 197 U TIFF_JBIG 198 UnSetFormat Property 146 TIFF_JPEG 198, 296 UseDDBs Property 147 TIFF_JPEG7 198 UseHdib Property 148 TIFF_LZW 198 USER_CANCEL error code 291 TIFF_PACK 198 USING_RUNTIME error code 291 TIFF_TAG_NOT_FOUND error code 291 V

TiledImage Property 144 Version Property 148

314 Index: VertEdgeDetect Property – ZoomTop Property

VertEdgeDetect Property 148 ZoomBottom Property 153

Vertical Edge Detect 149 Zooming_VB4 28, 215

Visible Property 149 ZoomLeft Property 153

ZoomRight Property 153 W ZoomTop Property 153 WatermarkOCXSample 28, 215

WBMP 198

WhatsThisHelpID Property 150

WindowLevel Property 150

WINFAX 198

WipeDelay Property 151

WMF 198

WPG 199

X

XBM 199

Xerox_EPS 199

XLS 199

XLSX 199

XPM 200

XWD 200

filter bit level support 184

Z

Zoom Property 151

Zoom sample 233

315