I told you that a while back, when you were arguing that you couldn't
get accurate image statistics from the preview.
You did, indeed! If I find the time, I'd like to create a Nikon Scan
cache file by hand and stick a full resolution image (3946 x 5782) in
there to see what Nikon Scan does with it! ;o)
Will it just blow up or will the preview window suddenly sprout scroll
bars, or...?
In spite of everything, I find that the core of Nikon Scan is very
well programmed. As I said before, when I fed it a modified TWAIN
extended to +16 AG, Nikon Scan did not blink an eyelid and adjusted AG
exposure sliders accordingly. Excellent!! If only Nikon Scan were not
so bad tempered when I want to turn things off... ;o)
I preview at a
resolution close to 800x500 pixels on a 1600x1200 pixel display, so the
statistics and histograms are very accurate.
The problem was I only have 1024x768 here. But it's all a bit academic
now because I use my own program these days.
Hmmm. This might explain some strange effects I was getting while
experimenting with which profiles applied to which configurations a
while back.
I tried all permutations and this is what I got:
NKLS50_K.icm - Kodachrome
NKLS50_N.icm - negative, color
NKLS50_MN.icm - monochrome, negative
NKLS50_MN.icm - ditto + grayscale
NKLS50_P.icm - positive
NKLS50_P.icm - ditto + grayscale
So, grayscale is independent. Negative does not reverse but does
something else (?) and the same goes for Kodachrome.
Mind you, all that is the information stored in the preview cache.
Nikon Scan presumably does other things when one actually scans (as
you note below). Apparently a lot is done in TWAIN too (negative
processing i.e. orange mask removal, KC, etc).
For example, I'm still not sure where the color space profiles (sRGB,
Adobe, and friends) fit into this picture? Any idea?
The cache image itself is 16-bit, scanner profile (i.e. no profile or
"raw") and always stored in portrait orientation (i.e. as it comes off
the scanner). The cache file on my W2K installation lives at:
D:\Documents and Settings\All Users.WINNT\Application Data\Nikon\Nikon
Scan\4.0\Cache\CACHE001.DAT
There are flags for other things but I only decoded a few bits:
00000008: 80 00 00 00 - offset to strings (more below)
0000000C: 60 01 00 00 - preview width (here 352)
00000010: 04 02 00 00 - preview height (here 516)
....
00000028: 6A 0F 00 00 - total image width (3946 for LS-50)
0000002C: 96 16 00 00 - total image height (5782 for LS-50)
00000030: 03 00 00 00 - number of strings
....
' all strings are rounded up to 4-byte (longword) boundary
00000080: 14 00 00 00 - string length (including trailing 0 pad bytes)
00000084: 01 00 00 00 - string index
00000088: 4E 69 6B 6F... string bytes, here:
"Nikon COOLSCAN V ED" (scanner name, I guess)
'
0000009C: 3C 00 00 00 - string length (including trailing 0 pad bytes)
000000A0: 02 00 00 00 - string index
000000A4: 44 3A 5C 50... string bytes, here:
"D:\Program Files\Common Files\Nikon\Profiles\NKLS50_K.icm"
'
000000E0: 3C 00 00 00 - string length (including trailing 0 pad bytes)
000000E4: 03 00 00 00 - string index
000000E8: 44 3A 5C 50... string bytes, here:
"D:\Program Files\Common Files\Nikon\Profiles\NKLS50_R.icm"
....
00000124: ...
start of image data: 16-bit, interleaved RGB, no profile i.e. raw.
When the NS requires a specific profile and can't find it,
it throws up an error message. Scanning Kodachrome with the *_K.icm
profile removed still enabled a preview to be obtained, but a full scan
threw up an error. I guess if the preview didn't find the specific
profile it was looking for it defaulted to the second choice, *_R.icm,
and hence produced a preview without registering an error.
I don't know much about all this so ICC profile inspector data don't
mean much either.
However, from what I can see the "R" profile seems to set the black
point. It may do other things, but that's the most obvious. Could very
well be "R" is actually the "profile engine" and some flags in the
header tell it which profile(s) to apply (e.g. sRGB, Adobe, etc)?
Another strong indication that this is indeed the case is that when I
inspect a cache after previewing with "scanner profile" there is only
*one* string (the generic scanner identifier) but no *.icm strings!
Don.