Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas006.isp.belgacom.be (localhost [127.0.0.1])
        by inav016.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id l27HdT7A005166
        for <joris.at.lebbeke@skynet.be>; Wed, 7 Mar 2007 18:39:29 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx011.isp.belgacom.be (inmx011.isp.belgacom.be [195.238.5.50])
        by inas006.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id l27HdJQV015451
        for <joris.at.lebbeke@skynet.be>; Wed, 7 Mar 2007 18:39:22 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx011.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l27HdFVE015512
        for <joris.at.lebbeke@skynet.be>; Wed, 7 Mar 2007 18:39:16 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l27HKrSS008477;
	Wed, 7 Mar 2007 12:22:14 -0500
Received: from outmx002.isp.belgacom.be (outmx002.isp.belgacom.be
	[195.238.5.52])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l27HKpMx008472
	for <tiff@lists.maptools.org>; Wed, 7 Mar 2007 12:20:51 -0500
Received: from outmx002.isp.belgacom.be (localhost [127.0.0.1])
	by outmx002.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with ESMTP id l27HKlH1001030
	for <tiff@lists.maptools.org>; Wed, 7 Mar 2007 18:20:47 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from AWareCore2Duo ([87.64.169.40])
	by outmx002.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with SMTP id l27HKfc7000944; Wed, 7 Mar 2007 18:20:41 +0100
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <002301c760dc$f06a7a10$0201a8c0@AWareCore2Duo>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Enzo Costantini" <enzocostantini@libero.it>,
        "tiff" <tiff@lists.maptools.org>
References: <200703060633006403469@libero.it>
Subject: Re: [Tiff] load a jpeg in bitmap
Date: Wed, 7 Mar 2007 18:20:41 +0100
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00002158
X-MSP-STORE: Wed, 07 Mar 2007 18:39:32 +0100
Status:   

Enzo,

Enzo Costantini wrote:
> Is anybody who can tell me what I'd make to load a JPeg in a Bitmap
> using LibJPegFelphi?

There is no such thing as a LibJpegDelphi. The version of LibJpeg that 
accompanies LibTiffDelphi, is compiled specifically for this purpose. No 
attempt is made to be complete in what it exports and in its IO interface 
and all, other then what I needed in LibTiffDelphi. It is not intended to be 
used in any other way.

There is a version of LibJpeg that accompanies your Delphi distribution. 
Maybe you'll have better luck trying that one.

In addition, there are documents in the standard LibJpeg distribution that 
describe its usage. One such file is called 'libjpeg.doc'. Don't let the 
extension disgust you, it's a plain text file. Here you can learn how to use 
it.

> I have imported the procedures
>
> procedure jpeg_stdio_src(cinfo: PRJpegDecompressStruct; InStream:
> Pointer ); cdecl; external; procedure jpeg_stdio_dest(cinfo:
> PRJpegCompressStruct; OutStream: Pointer ); cdecl; external;
>
>
> and linked two object files:
>
> {$L JpegObj\jdatasrc.obj}
> {$L JpegObj\jdatadst.obj}

It's really not that simple. Borland doesn't support using statically linked 
C .obj files inside a Delphi project. (They do support the other way around, 
and of course they do support dynamic linking and such.) You can make it 
work, but you need a whole bag of tricks. Even the order in which you $L the 
(many more) different .obj files plays its part as that influences the 
linker (I get the impression the linker does one pass only through the 
stuff, links in what it already knows it needs, forgets about the rest, and 
if it needs any of that rest later on it reports trouble). And even if you 
get that right, there's compiler magic to resolve...

Stick with the pre-compiled LibJpeg distributed with Delphi, and you'll have 
none of those problems.


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

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
