primax: Thread: what's that color spacing?


[<<] [<] Page 1 of 1 [>] [>>]
Subject: what's that color spacing?
From: Andre Herms ####@####.####
Date: 21 Aug 2000 21:30:43 -0000
Message-Id: <00082123322600.01843@wh2-229>

Hi

Actually I try to change primax_scan to do it's output in raw format.
While looking in the code, I found something I don't really understood.
There are these x- and y-tables, which seem to reduce the resolution. Then I
found the color spacing stuff. This looks, like the color channels are recived
per line. This color spacing changes the lines for the channels. 
What does this mean?
Has someone found out, what this does?

Bye

-- 
Andre Herms                   ####@####.####
                              http://www.cs.uni-magdeburg.de/~aherms
Subject: Re: what's that color spacing?
From: Christian Ordig ####@####.####
Date: 22 Aug 2000 19:19:56 -0000
Message-Id: <20000822212425.A976@thor.chris.com>

On Mon, Aug 21, 2000 at 11:25:31PM +0200, Andre Herms wrote:
> Actually I try to change primax_scan to do it's output in raw format.
sounds nice ...

> While looking in the code, I found something I don't really understood.
> There are these x- and y-tables, which seem to reduce the resolution. Then I
> found the color spacing stuff. This looks, like the color channels are recived
> per line. This color spacing changes the lines for the channels.
> What does this mean?
> Has someone found out, what this does?
Making the raw output module without really understanding what the other code
does, should be quite simple. ;-)

Well:
as you can see the date is accumulated on a per line basis and then written
by TIFFWriteScanline. As you can see from the command's man-page it doesn't
take a parameter about how many pixels or bytes to write. It actually isn't
needed at this point, since we've told the TIFF library what the image's
width is. But for raw writing of date we'll need it. But the function
where the actual writing is done "void read_scan_data(scan_image *image)"
put's the width in pixels into "int width" and the width in bytes into
"int total_width". We'd need "int total_width" of course.
Now one could out another loop into this function which cycles thru the
buffer, or simply make a function for that, let's call it RAWWriteScanline
or something like that. It could take the same parameters as the TIFF
function takes plus an additional total_width parameter.

I think that's it...

ok... there are some other things in the code to be changed to make it
fully support this raw output without creating dead tiff files and other
weird things or even to make it possible the chose the mode from the
command line...

Question: where did you want to put the raw output? STDOUT or into a file?
Each version has it's own problems ...

Hope I could help you at least a little bit.

--
Christian Ordig      | The Primax Scanner Driver Project for Linux/UN*X
Germany              |   http://thor.prohosting.com/~chrordig/Primax

[Content type application/pgp-signature not shown. Download]
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.