AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
April 2006

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2006.04.06 19:40 "LibTiffDelphi problem with WriteEncodedStrip Newbee", by Thorsten Hagelstein
2006.04.07 09:56 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Joris Van Damme
2006.04.11 16:43 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Thorsten Hagelstein
2006.04.11 22:07 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Joris Van Damme
2006.04.13 15:02 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Thorsten Hagelstein
2006.04.13 19:53 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Bernie Pallek
2006.04.14 17:02 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Joris Van Damme
2006.04.15 10:46 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Joris Van Damme
2006.04.18 09:22 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Thorsten Hagelstein

2006.04.14 17:02 "Re: LibTiffDelphi problem with WriteEncodedStrip Newbee", by Joris Van Damme

Thorsten,

Thorsten Hagelstein wrote:
> > Please keep all mail that can be of public interest inside the
> > mailing list. This can be a good thread, useful to many.
>
> Sorry for that, it's the first mailing list I joined. Hopefully I did
> it right this time ;-)

Yes, you did perfectly fine. Thank you.

> > A complete adoption to save a pf1bit Bitmap to a G4 compressed
> > TIFF, may look somewhat like this:
>
> Thank you for your code, but it didn't work, and I can't figure out,
> what wents wrong. I tried to understand your code, but there are
> still some questions... Maybe you can help me
>
> >   RowSize:=((Bitmap.Width+7) div 8);
>
> Why did you add 7 here? To get a multiple of 8?

I believe Bernie answered that perfectly. Another approach is,
substitute Bitmap.Width with some values like 1,7, 8, and 9, and
manually calculate RowSize. You'll find that the formulae fits, RowSize
is exactly the number of bytes that is required to store Bitmap.Width
subsequent bits.

Stepping through code, trying to "manually execute", is often a
recommendable way to gain more insight.

> The Result of the procedure is a file without data. The only thing
> included is the tiff-header. Maybe you can check your code? I'm not
> able to figure out, what's wrong.

I've double-checked my draft attempt, and it works perfectly fine over
here. Except that you should replace PHOTOMETRIC_MINISWHITE with
PHOTOMETRIC_MINISBLACK, as I suspected already.

Try again. If it still doesn't work, mail me your zipped bitmap and
relevant code, and I'll take a look.


Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html