Vampyre Imaging Library Forum

Imaging Category => Suggestions, Feature Requests, Contributions => Topic started by: nomas on 24 June 2007, 04:04:02

Title: libtiff 3.8.2 source for delphi
Post by: nomas on 24 June 2007, 04:04:02
I recently changed it for libtiffdelphi.

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

;D
Title: Re: libtiff 3.8.2 source for delphi
Post by: Galfar 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.
Title: Re: libtiff 3.8.2 source for delphi
Post by: nomas on 25 June 2007, 03:51:02
Quote from: Galfar 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.



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.

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.

Title: Re: bug fixed tif_jpeg.obj
Post by: nomas on 25 June 2007, 09:00:18
In 'jmorecfg.h',

/*
* 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.

Title: Re: libtiff 3.8.2 source for delphi
Post by: Galfar on 26 June 2007, 03:32:41
Nice, works ok now.