On Wed, 2006-11-15 at 10:56 +0100, Claudio wrote: > Hello, I'm writing a client in the C language which uses the libsane > library. The basic idea, at the stage i'm in, is to write code to copy > scanimage's behavior. It's supposed to get the scanned data and write it > to stdout in tiff format. > I'm having some troubles with the tiff header: i'm using stiff.c I found > in the backends' package to write the header of the file. The problem > I'm having is that the tiff file is practically malformed (test opening > it with the gimp). So i hijacked the stiff library and put a fprintf and > exit right after the header is created. Here's what i get for the same > page from the original scanimage and my code: > > < scanimage > > > width 5056 height 9000 depth 8 resolution 600 > > < my code > > > width 5399 height 9000 depth 8 resolution 600 > > doing a binary diff on the two headers i realize that (of course) they > are different (same size though). I cannot really understand the problem > as the stiff code is untouched and my code is practically equivalent to > test.c > > My question is: why does my code get a different width than scanimage as > we are both using data from sane_get_parameters()? I guess the problem > will be solved in the moment i find an answer to this question. > > I'll send my code to those who request it (less than 200 lines). > > I'm using an HP LaserJet 3055 with hplip 1.6.9 on ubuntu edgy, sane > 1.0.14. > > TIA > > Claudio Martella > > P.S.= for the moderator: I've sent a copy of this email with another > address and should be waiting in your queue for acceptance. Please, drop > it. > >
Maybe is bugreport the reason? [#303752] Maybe faulty icc-profile-file length detection -- -------- m.vr.gr. Gerard Klaver