AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2007.07.11 15:13 "[Tiff] how to handle pixel vs. byte-boundary", by Oliver Geisen
2007.07.12 05:25 "Re: [Tiff] how to handle pixel vs. byte-boundary", by Bob Friesenhahn
2007.07.12 07:24 "Re: [Tiff] how to handle pixel vs. byte-boundary", by Oliver Geisen
2007.07.12 09:05 "Re: [Tiff] how to handle pixel vs. byte-boundary", by Andy Cave

2007.07.11 15:13 "[Tiff] how to handle pixel vs. byte-boundary", by Oliver Geisen

Hello,

as i try to deal with bilevel images, where 1 pixel equals 1 bit, i ran more and more into problems.

I want to place a bilevel TIFF onto another one (digital mounting). Therefore i specifiy x,y-offsets in pixels where to place the second image on the first.

But if the offset-value isn't divideable by 8 without remainder (=don't fit into byte-boundary), it seems that i had to shift ALL bytes in the scanline to fit into the new position. This is terrible! Aren't there any other solutions to this problem? I even don't know how to handle a bitwise-shift over approx. 1000 bytes in a scanline! I would have to shift each byte from right to left, save the bits falling out of the left side, shift it into the right side of the next byte, and so forth... arg, this sounds slow.

Oliver Geisen
Systemadministrator
_____________________________
Kreisboten Verlag Mühlfellner KG
82362 Weilheim i. Ob.
Tel. 0881/686-904
Fax 0881/686-74
Sitz Weilheim, AG München, HRA 64016, p.h.G.:
Kreisboten-Verlag Verwaltungsgesellschaft mbH,
Weilheim, AG München, HRB 119773,
Geschäftsführer: Dr. Dirk Ippen, Dr. Gerd Waldenmaier