All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted in any form or any means, electronic, mechanical, photocopying, recording, or
otherwise, without the prior written permission of Seiko Epson Corporation. No patent liability is
assumed with respect to the use of the information contained herein. While every precaution has
been taken in the preparation of this book, Seiko Epson Corporation assumes no responsibility for
errors or omissions. Neither is any liability assumed for damages resulting from the use of the
information contained herein.
Seiko Epson Corporation shall not be liable against any damages or problems arising from the use
of any options other than those designated as Original Epson Products by Seiko Epson Corporation.
EPSON is a registered trademark of Seiko Epson Corporation.
EPSON ESC/I is a trademark of Seiko Epson Corporation.
HP PaintJet is a trademark of Hewlett-Packard Company.
Apple and Macintosh are trademarks of Apple Computer, Inc.
This manual was designed to be a comprehensive guide to
programming EPSON scanners using the advanced ESC/I control
language. It was written with both the professional and advanced
hobbyist programmer in mind.
Before you begin using this manual, you should thoroughly review
the operating instructions in your scanner’s user’s guide.
The contents of each of these sections is described below:
Overview
Presents an overview of scanner functions, EPSON scanner
features, control codes, and programming concepts. This
information is helpful in quickly understanding scanner operating
concepts.
Command Usage
Provides recommended ESC/I command usage and program
construction for optimum use of EPSON scanner features. This
section also provides information on image data transfer, the
scanning environment, and error handling.
Command Reference
Lists each ESC/I command and its parameters in detail.
Appendix
Offers additional information necessary for writing scanner
programs. This includes the specifications for each type of
interface, command support levels, and available scanner options.
2 Introduction
Using This Manual
To get the most out of this manual, you should follow the steps
below:
To understand EPSON scanners
Read through the overview once, and then read the Command
Usage section in depth.
To write a scanner control program
Read through the overview once, then read the Command Usage
section. From there, move to the Command Reference section,
followed by the Appendix.
Always refer to the Appendix to ensure that the interface and data
types correspond to your target scanner models.
Also, several examples of common programming errors and
information on resolving these errors are included.
Introduction 3
4 Introduction
Chapter 1
Overview
This chapter provides a brief description of scanner operations and
concepts. The special features of EPSON brand scanners are also
outlined in this chapter.
1
Overview 1-1
What Is a Scanner
A scanner is a device that performs the following functions:
❏Reflects light off your documents
❏Separates the light by color and intensity
❏Converts that reflected light to digital data
❏Sends the digital data to your computer for further processing
Basic scanning principles
A scanner normally includes two components: a light source that
illuminates the document and a sensor that detects the light reflected
off the document. The sensor is composed of CCD element arrays that
detect the brightness of the reflected light and produce corresponding
digital signals.
The document is read by a horizontal row of sensors that move
vertically down the page. Data from the sensors is read at regular
intervals (such as 300 times per inch), achieving very high resolutions.
Data is organized horizontally and vertically; the scanning direction is
referred to by the following terms:
1-2 Overview
Main scan
The horizontal scanning direction
Sub scan
The vertical scanning direction
By combining the main scan and sub scan data, an entire page can be
converted into organized digital data.
Overview 1-3
Reading color
By illuminating the document with three lights, red (R), green (G),
and blue (B), the scanner can analyze and separate a document’s three
color components. The computer can then overlay this color-separated
data to produce full-color images.
Reading monochrome
Even though you have a color scanner, you can still read your documents
as monochrome. Color scanners can read documents as monochrome in
two ways:
❏Treat all the data on the page as the same color. This method uses
all the light sources, and is fine if you plan to print data in black
and white only.
❏Specify one color (R, G, or B) as a dropout color. This method
uses only one light source and reads all data except for the color
specified.
1-4 Overview
EPSON Scanner Features
EPSON scanners feature the following special attributes.
❏A unified control code structure
All scanner features are controlled by EPSON’s ESC/I scanner
control codes, so the commands for each feature are the same for
all scanner models. All models are downwardly compatible, so
programs written for lower level scanners will work identically on
upper level scanners.
❏Internal image data processing circuits
Each scanner contains circuitry capable of processing image data
before it is sent to the computer; the type of processing is
specified by control codes. By preprocessing image data, the
computer can process data faster with a reduction in image
distortion.
An automatic document feeder can be mounted on the GT-8000
(ES-800C), GT-6500 (ES-600C), GT-8500 (ES-1000C), or
GT-9000 (ES-1200C) scanner models, allowing you to
automatically load and scan multiple documents. This is
particularly useful when using OCR (Optical Character
Recognition) software to input text from long documents, or
when creating an image data base.
❏Optional transparency illumination unit
This unit can read transparencies (film) when mounted on the
GT-8000 (ES-800C), GT-6500 (ES-600C), GT-8500 (ES-1000C),
or GT-9000 (ES-1200C) models. You can now scan film directly,
without having to first make a print of the film as was necessary
in the past. This allows for more accurate reading of film colors
with a minimum of degradation in image resolution. You can also
now directly read documents stored on film.
1-6 Overview
Control Code Construction
Function level
The EPSON image scanner control language currently has the
following function levels: B1 to B5 and A5. The relationship of each
level is shown in the following diagram. Each level contains the
commands and features of all lower levels.
For example, if you are using a B4-level scanner, all programs made
for B1 through B3 levels should run with no problem. All scanners
feature the control codes from lower level machines.
However, some scanner settings are unique to particular scanner
models, so you must take these into account when writing scanner
programs.
Parameters
Some commands require additional parameters. Commands that
require parameters do not take effect until the parameters are sent, so
always make sure you send the correct parameters. Sending an
incorrect parameter may cause a scanner error.
Overview 1-7
Computers and Handshaking
Scanners are connected to their host computers by some kind of
interface. Since a scanner sends data to the computer, the interface
must carry data not only from the computer to the scanner, but also
from the scanner to the computer. For this reason, the interface must
be capable of bi-directional communication.
A method of interaction between the computer and scanners is
necessary to prevent the computer from sending data at the same time
the scanner is sending data. This interaction method is the basis for
governing scanner operation.
EPSON scanner and computer interaction is controlled by a method
called handshaking. After the computer sends data to the scanner, it
must wait for the proper reply from the scanner before sending more
data. Also, when the scanner sends data to the computer, it must wait
for the correct response from the computer before sending additional
data. Handshaking dictates the method of sending data and how the
data is acknowledged by both the computer and scanner.
1-8 Overview
Image Data
The manner in which an image is converted into data and the way the
data is sent to the computer is predetermined. The following sections
describe this process.
Image data format
The smallest element of image data is called a pixel (short for picture
element). A pixel is an individual dot; combining these dots, or pixels,
forms an image.
If you represent each pixel by one bit of data, you can determine
whether that pixel is light or dark (1 or 0). This is called bi-level
conversion, and produces bilevel data.
However, most images contain a nearly infinite number of color
shades. By increasing the number of data bits per pixel, you can
increase the possible number of pixel shades you can represent. As
you can see from the following illustration, 1 bit per pixel allows you
to show only two shades; 2 bits per pixel allows you to represent up to
4 shades.
The image data format is what determines the amount of data
necessary for each pixel. The amount of data determines how many
shades you can express. Normally, you can select from 1 to 8 bits per
pixel. For monochrome scanning, this data determines the shade of
gray. For color scanning, you can differentiate the same number of
shades for each of three colors (green, red, and blue).
Overview 1-9
As you increase the amount of data, you dramatically increase the
number of minute differences in color you can represent.
The scanner reads one horizontal line of data (main scan) and sends it
to the computer. After the computer confirms it has received the data,
the scanner sends the next line of data. The scanner repeats theses
steps until data for the entire image is sent to the computer. This
method is called line data transfer.
Overview 1-11
Block data transfer
Line data transfer sends the data to the computer line by line.
However, block data transfer sends multiple lines of data to the
computer all at once. You can use commands to specify the number of
lines sent at one time; in this way you can select the most efficient
block size to send your data.
1-12 Overview
Functions
EPSON scanners feature a number of various functions. A brief
overview of these functions is provided below. For more detailed
explanations, see the following chapter on using these functions, as
well as the command reference section.
Image definition
Brightness
This function allows you to set the brightness at which images are
scanned. The following illustration shows the difference this setting
can make in the final scanned image. Setting the brightness to a
brighter setting results in a bright image in which some thinner lines
may be washed out. On the other hand, setting brightness to a darker
setting results in a blacker image in which some intricate details may
turn out completely black.
DarkBright
Overview 1-13
Gamma correction
Gamma correction is a function that adjusts the light intensity so it
matches the output device.
Although an image may display clearly on your CRT display, your
printer may not produce it the same way. Since image reproduction
depends on the output device (CRT, printer, etc.), gamma correction
adjusts the light intensity so the image is faithfully reproduced on the
output device you are using. The term gamma refers to the ratio
between the input and output light intensity.
Display ADisplay B
Printer A Printer B Printer C
1-14 Overview
Halftoning
Halftoning adjusts the shade and color of each pixel according to the
shade and color of the surrounding pixels. Setting halftoning to large
results in a sharper contrast between dots. Setting halftoning to small
results in reduced contrast.
Overview 1-15
Data form definition
Data format
The data format function determines how many bits are used to
represent one pixel. Increasing the bits increases the number of shades
and intensity that can be expressed. However, the data required to
represent an image is also increased. For example, to scan an A4 size
image using 8 bits per pixel at 300 dots per inch (dpi) in color would
require 26.4 MB of data.
Also, if your printer or CRT is not capable of expressing these
differences in color and shade, there is no reason to produce such
precise (and sizable data).
8 bit2 bit1 bit
1-16 Overview
Loading...
+ 238 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.