Since original www-page of Matthew Considine is no longer available,
I reproduced his materials and utilities here (with his permission). -lenik.
Programming the HP PhotoSmart Scanner
by Matt Considinemailto: email@example.com
Contrary to what HP says, the Photosmart scanner does support SCL (it can also export 30bit data and do a crude grayscale, FWIW). This allows for programming of the scanner without using TWAIN or the interface that ships with the scanner. This is most easily accomplished using HP's SCL Toolkit and a C-compiler such as Microsoft's Visual C++. What follows are my notes on how I figured out how to program the scanner. I will expand these notes as more information is available (or I find out that I forgot to mention something).
Robert Nilandís Photosmart FAQ.
This FAQ can be found by searching DejaNews and gives a good idea of how the scanner
works and what it can and cannot do.
Where to get Hewlett Packardís Scanner Control Language (SCL) Toolkit.
I used version 7.0 of the toolkit - version 9.0 is available at
There is also a software developer's guide for the PhotoSmart entitled:
"The HP PhotoSmart Family Software Developer's Guide" version 1.5, dated Sept. 97. Part # 5965-8783EUC
This is only helpful, however, if you want to access the scanner via TWAIN.
Minimal changes to make to the toolkit.
Three of the files in the Toolkit need to be edited to recognize the scanner :
I added a line after the ID code for the ScanJet 5p that looked like :
#define SL_C5100A 11 // PhotoSmart Scanner
Further down, I defined the PhotoSmart as SL_MODEL_10 by adding the
Following line :
#define SL_MODEL_10 73 // Returns C5100A (PhotoSmart)
Finally, a variable corresponding to the last string inquire needs to be
Incremented. So I changed SL_HI_STRING to 74 :
#define SL_HI_STRING 74 // Last SCL string inquire
SCL.C(found in the \SCL\COMMON subdirectory of the installed toolkit)
In the HP 7.0 version of SCL.C there is an "Inquire String" for different
Scanner models, the last one being model 9. This has a command
"16E" command associated with it and is numbered 72. Number 73 is
"Reserved." I changed number 73 to be SL_MODEL_10 and associated
with it the command "17E." This has been added in version 8.0
In the section of code which requests model strings I added :
// inquire the model string 10 from the scanner (PhotoSmart)
if ((status = InquireString(SL_MODEL_10, ModelString
, sizeof(ModelString)-1, (PINT16)&count)) == OKAY)
*pModel = SL_C5100A;
I changed the section of code which processes the returned model number
For the ScanJet 4p and 5p to look like :
(pScanState->Info.Model == SL_HP1130A)|| // ScanJet 4p
(pScanState->Info.Model == SL_HP5110A)|| // ScanJet 5p
(pScanState->Info.Model == SL_C5100A) ) // PhotoSmart
Further along, there is another section handling model numbers, which
I changed to look like :
(pScanState->Info.Model == SL_HP2520A)|| // ScanJet 3c
(pScanState->Info.Model == SL_HP1130A)||
(pScanState->Info.Model == SL_C5100A)) // PhotoSmart
In each of the above cases I just added a case for the PhotoSmart
The SCL Toolkit expects to find a file called HPSCL32.DLL This is the same file
As HPI_SCL.DLL that ships with the scanner and which can be found in the
WINDOWS\SYSTEM subdirectory of the PC on which the scanner is attached.
For my purposes, I copy this file to whereever my programs are and rename it to
Be HPSCL32.DLL. (One could also change the file's name in the Toolkit Ö)
Capabilities of the utilities :
Automatic color balancing (SINGLE) Unmounted positive media (SINGLE)
30bit TIF output (SINGLE, MULTSCAN) Mounted negative media (SINGLE)
Frame extraction (MULTSCAN)
Sprocket cropping (CONTACT)
Multscan and Contact will be getting the above-mentioned features of Single soon.
Down the road : GUI interface
Other suggestions? Please e-mail me at firstname.lastname@example.org
Scan multiple frames at one time
Create an index or contact sheet
Scan odd sized negatives
Copyright 1998 by Matt Considine (6/6/98)