------------------------------------------------------------------------

NED Image OCX

Copyright (c) 1995-1996 Northeast Data Corp.

All Rights Reserved

------------------------------------------------------------------------

Demo Release 1.42 for 32-bit VB 4.0 users
April 1996

This document describes the NED Image OCX Control. 


CONTENTS

1. Product Description
2. Legal Information
3. Installation <---IMPORTANT
4. Usage
5. Ordering information
6. Release notes

------------------------------------------------------------------------

1. Product Description

The NED Image OCX Control is a 32-bit Microsoft Windows OLE custom 
control that displays, prints and saves various types of image files. 
It works with TIFF, BMP, DIB, GIF, JPEG, PCX, TGA and Kodak Photo CD 
files. The control will also allow you to copy images to the clipboard.

It can be used with any host programming environment or application
that supports 32-bit OCX controls. 

------------------------------------------------------------------------

2. Legal Information

The purchaser of the NED Image OCX Control is allowed to use it and
distribute it in applications without paying any royalty, and without
printing or displaying a copyright notice for the control. This only
includes distribution of the NEDIMAGE.OCX control and supporting files. 
It does not include distribution of documentation that comes with the 
NED Image OCX Control. 

The purchaser of the NED Image OCX Control may distribute the control 
with applications that are networked (multiple users accessing the 
control from a file server) without paying any license fees to Northeast 
Data Corp. 


Portions of this software are based on the work of the Independent JPEG 
Group.

Portions of this software Copyright (c) 1988-1996 Sam Leffler Copyright 
(c) 1991-1996 Silicon Graphics, Inc.

------------------------------------------------------------------------

3. Installation

Create a temp directory on your hard disk and copy all files from
the distribution disk to the directory. These files include:

README.TXT     (This file)
PCDLIB32.DLL   (Required for OCX)
NEDIMAGE.OCX   (NED Image OCX)
NEDIMAGE.TLB   (NED Image OCX Type Library)
FORM1.FRM      (VB 4.0 form definition file)
FORM1.FRX      (VB 4.0 form definition file)
PROJECT1.VBP   (VB 4.0 Project file)
REGISTER.EXE   (Registration program)

The files listed below are required to use the OCX and demo in this
archive.  This files can be found in OCX4032.ZIP in the same area as
NIMGVB13.ZIP.  This files in this archive should be placed in the 
same directory as the above OCX files.

MFC40.DLL      (Required for OCX)
MSVCRT40.DLL   (Required for OCX)
OLEPRO32.DLL   (Required for OCX)

If you already have these files on your system, they are probably 
located in the System or System32 directory.  If this is the case,
you probably do not need to download these files again.  

To register the OCX and DLL files, place all of the above files in 
the same directory and run the REGISTER.EXE file.

A 32-bit Microsoft Visual Basic 4.0 example application is provided with 
the NED Image OCX control. You must have the 32-bit version of Microsoft 
Visual Basic 4.0 installed on your machine to run this demo.

The example application allows you to 
+ open image files
+ save image files
+ change the color reduction method
+ display the image file on the screen
+ rotate the image file
+ change the fit type
+ print the image to a printer
+ print using advanced printing functions
+ copy the loaded image to the clipboard

The demo application is not crippled in any way.  The dialog specifying 
that this is an unregistered version of the control does not appear in 
the release version.

------------------------------------------------------------------------

4. Usage

PROPERTIES
----------

Picture	- The full file specification of the file containing the
image to display.

FitType	-	
 0 = Best Fit
 1 = Horizontal Fit
 2 = Vertical Fit
 3 = One to One

AutoDisplay - 	
 True - Displays image as soon as it is loaded
 False - Does not display image until Refresh is called

VScrollPos - Value of the Vertical Scroll position

HScrollPos - Value of the Horizontal Scroll position

ScrollBars -	
 True - Show scroll bars if needed.
 False - Hide scroll bars.

ColorReductionMethod - Returns the type of Color reduction method used.  
This is a read-only property.
 1 = OrderedDither
 2 = ErrorDiffusionDither
 3 = MedianCutQuant

TotalRotate - Returns the total amount the image has rotated.  This 
is a read-only property.
 90  - Image has been rotated 90 from original
 180 - Image has been rotated 180 from original
 270 - Image has been rotated 180 from original

NumScreenColors - Returns the number of colors the display is capable 
of. This is a read-only property.

NumPrinterColors - Returns the number of colors the default printer is 
capable of. This is a read-only property.

NumImageColors - Returns the number of colors in the original image. 
This is a read-only property.

ImageHeight - Returns the original image height. This is a read-only 
property.

ImageWidth - Returns the original image width. This is a read-only 
property.

PCDResolution - Sets the resolution that PCD files should be read at.
 0 = Base over 64
 1 = Base over 16
 2 = Base over 4
 3 = Base
 4 = 4 Base
 5 = 16 Base
 6 = 64 Base


METHODS
-------

Rotate90 - Rotates the image 90 degrees from its current location.

Rotate180 - Rotates the image 180 degrees from its current location.

Rotate270 - Rotates the image 270 degrees from its current location.

OrderedDither - Performs an ordered dither on the True Color image.

ErrorDiffusionDither - Performs an error diffusion dither on the True 
Color image.

MedianCutQuant - Performs a median cut color reduction method on the 
True Color Image.

GetLastError - Returns the Last Error that the NED Image OCX 
encountered.

PrintImage - Prints the image with the given fit type to the printer.

Refresh - Refreshes/Redraws the image.

AboutBox - Displays the about box for the NED Image OCX.

GetNumPCDResolutions - Returns the total number of resolutions present 
in the specified Photo CD file.

GetPCDResolutions - Returns the resolutions present in the specified
Photo CD file.  The string returned contains 7 characters.  Each
character is either a '1' or a '0'.  If the character is '1', that
resolution is present in the file.  If the character is '0', that
resolution is not present in the file.  The positions for each
resolution are:
 0 - Base over 64
 1 - Base over 16
 2 - Base over 4
 3 - Base
 4 - 4 Base
 5 - 16 Base
 6 - 64 Base

For example, if this function returns the string "0111000", the following
resolutions are enclosed in the specified file:
 - Base over 16
 - Base over 4
 - Base

RefreshPCDResolution - Changes the resolution of the loaded PCD file to 
the resolution specified by the PCDResolution property.  If the specified
resolution is not in the already loaded PCD file, the image is unloaded
and no new image is available. 

CopyImageToClipboard - Copies the currently loaded image to the clipboard.

SaveAsBMP(filename) - Saves the currently loaded image to the specified 
filename as a BMP file.  Returns True on success, False on failure.

SaveAsPCX(filename) - Saves the currently loaded image to the specified 
filename as a PCX file.  Returns True on success, False on failure.

SaveAsGIF(filename) - Saves the currently loaded image to the specified 
filename as a GIF file.  Returns True on success, False on failure.  The
saved file can only contain 256 colors.  If the current image loaded 
contains greater than 256 colors, the MedianCutQuant method is called 
internally to product a 256 color image.

SaveAsJPEG(filename, quality) - Saves the currently loaded image to the 
specified filename as a JPEG file using the quality value provided.  The
higher the value, the better the quality.  Returns True on success, False 
on failure.

SaveAsTIFF(filename) - Saves the currently loaded image to the specified 
filename as a uncompressed TIFF file.  Returns True on success, False on 
failure.

SaveAsTGA(filename) - Saves the currently loaded image to the specified 
filename as a TGA file.  Returns True on success, False on failure.

AdvPrintStartDoc(hDC, bSupplyCancel, bShowPrintDialog) - Prepares the OCX 
to begin the advanced printing feature.  This feature is great for 
printing custom reports. 
The hDC variable is the Device Context you wish to print to.  
The bSupplyCancel variable is a bool that specifies if you want a cancel 
dialog shown to the user.
The bShowPrintDialog variable is a bool that indicates your desire to 
display the printer selection dialog.
If hDC is NULL or 0 and bShowPrintDialog is FALSE, the default printer
will be used and no dialog will be presented to the user.  If hDC contians
a value and bShowPrintDialog is FALSE, the supplied DC will be used for
printing.  All other combinations of hDC and bShowPrintDialog result in
an error and False is returned.
Returns True on success, False on failure.

AdvPrintStartPage - Starts the first or next page on an advanced print.
This function can only be called after AdvPrintStartDoc and
AdvPrintEndPage.  Returns True on success, False on failure.

AdvPrintImagePrint(lLeft, lTop, lRight, lBottom)
Prints the current image in the specified rectangle specified by lLeft,
lTop, lRight and lBottom.  The units specified by the rectangle must be
the same as those specified by the device context.  If lLeft, lTop, 
lRight and lBottom are all 0, then the image is printed according to the
FitType specified as a property of the control on the entire surface of
the device context.  Returns True on success, False on failure.

AdvPrintEndPage - Ends the currently printed page.  This function can
only be called after AdvPrintStartDoc is called.  Returns True on success,
and False on failure.

AdvPrintEndDoc - Ends the current advanced printing function.  This 
function must be called anytime AdvPrintStartDoc is called in order to free
the resources associated with printing.  This is tru even if any of the 
previous advanced printing functions fail.  The return value is True
on success and False on failure if AdvPrintStartPage returns true, 
otherwise, the return value is undefined.

------------------------------------------------------------------------

   Northeast Data Corp.
   2117 Buffalo Rd., Suite 290
   Rochester, NY  14624

   Phone (716) 247-5934 (voice & fax)
   E-Mail 
	Internet:	ned1@frontiernet.net 
	CompuServe:	71321,3304
	
   	Home Page:	http://www.frontiernet.net/~ned1/index.htm

------------------------------------------------------------------------

5. Ordering Information

The easiest way to obtain a registered version is to type GO SWREG on
CompuServe. The ID for the NED Image OCX is 8884. The ID for the source 
code version of the control is 8885. After you provide the information, 
CompuServe will send us a mail message. We will send you the software. 
CompuServe will bill you and then pay us.


To obtain the software directly from us, send a money order or a check
drawn on a U.S bank to the address above.  Specify "NED Image OCX" and
provide your full address. If you provide a CompuServe ID, we can send
the software via e-mail.

The price of the NED Image OCX control is $199.00.
The price of the NED Image OCX source code is $1199.00.
Shipping and handling fees in the US are $15.00.
Shipping and handling fees outside the US are $20.00.
New York State residents must add 8% sales tax.

------------------------------------------------------------------------

6. Release notes

Version 1.42 - April 1996
+Bug Fixes
	+ A problem was discovered by Michael Dyer in the advanced printing 
functions.  Device contexts could be leaked in certain situations.  This 
would cause GDI and HEAP resources to be lost for each print.
	+ 1-bit TIFF decompression was accelerated.  1-bit TIFF images should
all decompress much faster now.  This change can be seen in CCITT group 3 
and group 4 TIFF images.
	+ Image stretching on Windows 95 was corrected.  A difference was
discovered between NT and Windows 95 during testing where images were not 
correctly displayed on Windows 95 when their fit types were either horizontal
or vertical fit.

Version 1.41 - March 1996
+New Functionality
	+ Support for uncompressed TGA files
	+ Support for writing all file formats except Kodak Photo CD
	+ Added advanced printing functions.
+Bug Fixes
	+ Fixed an array indexing problem in the GIF decoder.

Version 1.31 - February 1996
+New Functionality
	+ Support for the PCX file format
	+ Support for the clipboard

+Bug Fixes
	+ A problem was discovered in the GIF library.  Decompression
of GIF files with less than 5 bits per pixel caused the library to
generate exception faults.  
	+ A problem loading incomplete GIF files was fixed.
	+ A problem was discovered by Chris Hopkins in the JPEG library.
Certain JPEG files contained invalid Start Of Scan lengths (SOS).  The bug
was fixed by bypassing any additional bytes reported by the SOS length
field that are not expected.  Not bypassing these bytes results in 
images that look washed-out.

Version 1.21 - January 1996
+New Functionality
        + Multiple Photo CD resolutions are now displayed

+Bug fixes
        + A problem was discovered by Al Cattani in the GIF library.
Some GIFs are generated as 5-bit per pixel gray scale.  These were not
displaying when loaded in the NED Image OCX.
        + Problems were discovered by Jaap Van Der Kreeft in the JPEG
library.  Certain JPEG files that were generated incorrectly would cause
the NED Image OCX to exception fault or display bad images.  The 
exception fault was fixed by removing the memory mapped file code and 
moving to JPEG6.  Another error was found in not handling 8-bit gray scale
images correctly.  These were fixed.  The NED Image OCX now tries to 
decompress JPEG files in a try/catch sequence in case other color space
variants are introduced.


Version 1.0 - December 1995

+ First commercial release.
	+ There are bugs in some of the printer drivers that are 
distributed with Windows 95 and Windows NT. Specifically, using an Epson 
Stylus Color printer with the printer driver distributed with Windows NT 
only allows for printing with 16 colors. Printing with the Epson Stylus 
Color printer with the printer driver distributed with Window 95 does 
not print at all.  To print with the Epson Stylus Color printer under 
Windows, your users should use the Windows 3.11 driver available from 
Epson.  The 1.06 or 2.03 driver included with the printer works fine and 
prints in True Color. If you have a doubt about the NED Image OCX print 
quality, first check to see if any updated drivers are available from 
the printer manufacturer.  If you are still having problems with color 
printing, please make sure you have configured your printer driver for 
color. 
	
