Author Topic: libtiff 3.8.2 source for delphi  (Read 3426 times)

Offline nomas

  • Imaging User
  • *
  • Posts: 18
    • View Profile
libtiff 3.8.2 source for delphi
« on: 24 June 2007, 04:04:02 »
I recently changed it for libtiffdelphi.

http://www.mediafire.com/?aopdztgdw3y

 ;D

Offline Galfar

  • Administrator
  • Imaging User
  • *****
  • Posts: 312
    • View Profile
    • Galfar's Homepage
Re: libtiff 3.8.2 source for delphi
« Reply #1 on: 25 June 2007, 01:54:47 »
I tried it but I get acess violation when opening some TIFFs which use JPEG compression.
I'll stick with original 3.7.0.0 LibTiffDelphi for Imaging 0.24 release (this week!)
because it has been tested more. It can be updated to 3.8.2 later.

Offline nomas

  • Imaging User
  • *
  • Posts: 18
    • View Profile
Re: libtiff 3.8.2 source for delphi
« Reply #2 on: 25 June 2007, 03:51:02 »
I tried it but I get acess violation when opening some TIFFs which use JPEG compression.
I'll stick with original 3.7.0.0 LibTiffDelphi for Imaging 0.24 release (this week!)
because it has been tested more. It can be updated to 3.8.2 later.


JPEG compression is not fully tested yet.

If get exception, change tif_jpeg from 3.7.0, it help you, I guess.

p.s.

I found reason to raise exception.

Code: [Select]
GLOBAL(void)
jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize)
{
  int i;

  /* Guard against version mismatches between library and caller. */
  cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */
  if (version != JPEG_LIB_VERSION)
    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
  if (structsize != SIZEOF(struct jpeg_decompress_struct))
    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
     (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize);

  /* For debugging purposes, we zero the whole master structure.
   * But the application has already set the err pointer, and may have set
   * client_data, so we have to save and restore those fields.
   * Note: if application hasn't set client_data, tools like Purify may
   * complain here.
   */

This code check structure size, and if don't match size raise exception.
(comipled obj has 0x1b0, but new complied obj has 0x1d0.)

recently BDS2006's bcc32 is fixed bug code generation with sizeof() bug and one another.

« Last Edit: 25 June 2007, 05:38:40 by nomas »

Offline nomas

  • Imaging User
  • *
  • Posts: 18
    • View Profile
Re: bug fixed tif_jpeg.obj
« Reply #3 on: 25 June 2007, 09:00:18 »
In 'jmorecfg.h',

Code: [Select]
/*
 * On a few systems, type boolean and/or its values FALSE, TRUE may appear
 * in standard header files.  Or you may have conflicts with application-
 * specific header files that you want to include together with these files.
 * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
 */

#ifndef HAVE_BOOLEAN
typedef char boolean;       // 'int' -> 'char' or 'unsigned char'
#endif
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */
#endif
#ifndef TRUE
#define TRUE 1
#endif



modify it and recompile it.

It work fine.

« Last Edit: 25 June 2007, 09:36:01 by nomas »

Offline Galfar

  • Administrator
  • Imaging User
  • *****
  • Posts: 312
    • View Profile
    • Galfar's Homepage
Re: libtiff 3.8.2 source for delphi
« Reply #4 on: 26 June 2007, 03:32:41 »
Nice, works ok now.