• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

libtiff 3.8.2 source for delphi

Started by nomas, 24 June 2007, 04:04:02

Previous topic - Next topic

nomas


Galfar

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.

nomas

25 June 2007, 03:51:02 #2 Last Edit: 25 June 2007, 05:38:40 by nomas
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.


nomas

25 June 2007, 09:00:18 #3 Last Edit: 25 June 2007, 09:36:01 by nomas
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.


Galfar


Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk