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

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - nomas

16
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.

17
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.

19
Quote from: Galfar on 23 June 2007, 22:36:24
Thanks for reporting this.
I have fixed the issue and uploaded it to SVN.
JPEG you posted was not properly detected as JPEG (some unsual stuff in header).


thanks  :)
20
Quote from: Galfar on 23 June 2007, 23:24:39
I am not sure what exactly you mean but I suppose it is record field alignment mismatch.
I have added few compiler options to LibTiffDelphi unit that may help you (and updated SVN).
Please let me know if it helps.


I use libtiff 3.8.2 obj files.

It has table in tif_codec.obj.

/*
* Compression schemes statically built into the library.
*/

#ifdef VMS
const TIFFCodec _TIFFBuiltinCODECS[] = {
#else
TIFFCodec _TIFFBuiltinCODECS[] = {
#endif
    { "None", COMPRESSION_NONE, TIFFInitDumpMode },
    { "LZW", COMPRESSION_LZW, TIFFInitLZW },
    { "PackBits", COMPRESSION_PACKBITS, TIFFInitPackBits },
    { "ThunderScan", COMPRESSION_THUNDERSCAN,TIFFInitThunderScan },
    { "NeXT", COMPRESSION_NEXT, TIFFInitNeXT },
    { "JPEG", COMPRESSION_JPEG, TIFFInitJPEG },
    { "Old-style JPEG", COMPRESSION_OJPEG, TIFFInitOJPEG },
    { "CCITT RLE", COMPRESSION_CCITTRLE, TIFFInitCCITTRLE },
    { "CCITT RLE/W", COMPRESSION_CCITTRLEW, TIFFInitCCITTRLEW },
    { "CCITT Group 3", COMPRESSION_CCITTFAX3, TIFFInitCCITTFax3 },
    { "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 },
    { "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG },
    { "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP },
    { "AdobeDeflate",   COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP },
    { "PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog },
    { "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog },
    { "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog },
    { NULL,             0,                      NULL }
};


thanks for reading.  :D
21
I changed LibTiffDelphi with LibTiff 3.8.2 objs except tiff_jpeg and tiff_ojpeg.

;D
22
LibTiffDelphi is problem with BDS 2006.

In 'LibTiffDelphi.pas'

{const

  _TIFFBuiltinCODECS: array[0..17] of TIFFCodec = (
       (name:'None'; scheme: COMPRESSION_NONE; init: TIFFInitDumpMode),
       (name:'LZW'; scheme: COMPRESSION_LZW; init: TIFFInitLZW),
       (name:'PackBits'; scheme: COMPRESSION_PACKBITS; init: TIFFInitPackBits),
       (name:'ThunderScan'; scheme: COMPRESSION_THUNDERSCAN; init: TIFFInitThunderScan),
       (name:'NeXT'; scheme: COMPRESSION_NEXT; init: TIFFInitNeXT),
       (name:'JPEG'; scheme: COMPRESSION_JPEG; init: TIFFInitJPEG),
       (name:'Old-style JPEG'; scheme: COMPRESSION_OJPEG; init: NotConfigured),
       (name:'CCITT RLE'; scheme: COMPRESSION_CCITTRLE; init: TIFFInitCCITTRLE),
       (name:'CCITT RLE/W'; scheme: COMPRESSION_CCITTRLEW; init: TIFFInitCCITTRLEW),
       (name:'CCITT Group 3'; scheme: COMPRESSION_CCITTFAX3; init: TIFFInitCCITTFax3),
       (name:'CCITT Group 4'; scheme: COMPRESSION_CCITTFAX4; init: TIFFInitCCITTFax4),
       (name:'ISO JBIG'; scheme: COMPRESSION_JBIG; init: NotConfigured),
       (name:'Deflate'; scheme: COMPRESSION_DEFLATE; init: TIFFInitZIP),
       (name:'AdobeDeflate'; scheme: COMPRESSION_ADOBE_DEFLATE; init: TIFFInitZIP),
       (name:'PixarLog'; scheme: COMPRESSION_PIXARLOG; init: TIFFInitPixarLog),
       (name:'SGILog'; scheme: COMPRESSION_SGILOG; init: TIFFInitSGILog),
       (name:'SGILog24'; scheme: COMPRESSION_SGILOG24; init: TIFFInitSGILog),
       (name:nil; scheme:0; init:nil));}


is commented, and It works fine.

The problem is that 'init' address value of record is mismatching with obj between delphi implementaion record.

Thanks for reading  ;D
23
this jpeg file(attchment) is not loaded with lastest svn imaginglib.

pardon me poor English  ;D
SMF spam blocked by CleanTalk