Return-Path: <tiff-bounces@remotesensing.org>
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx007.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j5KAH3cU018238
        for <joris.at.lebbeke@skynet.be>; Mon, 20 Jun 2005 12:17:04 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id DF2E72646D53; Mon, 20 Jun 2005 06:16:40 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from mail1.telefax400.de (mail1.telefax400.de [212.185.103.53])
	by xserve.flids.com (Postfix) with ESMTP id 3B5F72646D30
	for <tiff@remotesensing.org>; Mon, 20 Jun 2005 06:16:38 -0400 (EDT)
Received: from mail1 (mail1 [212.185.103.53])
	by mail1.telefax400.de (8.9.3+Sun/8.9.3) with ESMTP id MAA15536
	for <tiff@remotesensing.org>; Mon, 20 Jun 2005 12:16:36 +0200 (MET DST)
Received: from dtagbrg1.telefax400.de ([10.4.2.1])
	by mail1 (MailMonitor for SMTP v1.2.2 ) ;
	Mon, 20 Jun 2005 12:16:36 +0200 (MET DST)
Received: from mlac (mlac [10.99.1.13])
	by dtagbrg1.telefax400.de (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id
	j5KALqK16775
	for <tiff@remotesensing.org>; Mon, 20 Jun 2005 12:21:52 +0200
Message-Id: <200506201021.j5KALqK16775@dtagbrg1.telefax400.de>
From: "Matthias Lach" <Matthias.Lach@Telefax400.de>
To: <tiff@remotesensing.org>
Date: Mon, 20 Jun 2005 12:19:09 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
Thread-Index: AcV1gX8+TFLy1EnbRN+irMZxwxuuXQ==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Subject: [Tiff] Invert-problem
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 000000000023ceae.000003f6
X-MSP-STORE: Mon, 20 Jun 2005 12:17:13 +0200
Status:   

Hello All,

ist me again - and i have still a problem saving my file.

i opend a fax g-3 tiff with LibTif for Delphi (D7).

I open it as 32 bit bitmap and can work and manipulate it 
if i like ot save it i need to convert it back into 
1-bit because all other formats make the outputfile looks
jolted.

But - no matter what bit-format i choose, all output
is invertet - and i cant find the reason why.
i got a tip from Michel Salvagniac - but it does not work for me.


"
--
maybe the resolution is faulty... ; )
I had to invert black and white (i don't understand why...) like that :

      TmpBMP.Height := BMP.Height;
      TmpBMP.Width :=BMP.Width   ;
     if TmpBMP.width mod 8 <> 0 then bm:= (TmpBMP.width div 8)
                           else bm := (TmpBMP.width div 8) -1;
    FOR j := 0 TO TmpBMP.Height-1 DO
    BEGIN
      RowOut := pByteArray(TmpBMP.Scanline[j]);
      RowIn  := pByteArray(BMP.Scanline[j]);
      FOR i := 0 TO bm DO
      BEGIN
        RowOut[i] := NOT RowIn[i]
      END
    END;

you will need some var's:
   RowIn :  pByteArray;
   RowOut:  pByteArray;
bm: integer;
don't forget to create TmpBMP...
--
"

---
Mit freundlichen Gruessen

Matthias Lach 
 


_______________________________________________
Tiff mailing list: Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
