Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » TIFF wrapper: to access lib methods
TIFF wrapper: to access lib methods [message #32278] |
Thu, 05 May 2011 21:11  |
|
Hello All,
I propose to add in <plugin/tif/tif.h>
#define HAVE_INT8
#define HAVE_INT16
#define HAVE_INT32
#define HAVE_UINT8
#define HAVE_UINT16
#define HAVE_UINT32
#define int8 signed char
#define uint8 unsigned char
#define int16 short
#define uint16 unsigned short
#if !defined(PLATFORM_WIN32)
#define int32 int
#define uint32 unsigned int
#else
#define int32 long
#define uint32 unsigned long
#endif
#include <plugin/tif/lib/tiff.h>
#include <plugin/tif/lib/tiffio.h>
#include <plugin/tif/lib/tiffiop.h>
/*
#undef int8
#undef uint8
#undef int16
#undef uint16
#undef int32
#undef uint32
*/
#undef HAVE_INT8
#undef HAVE_INT16
#undef HAVE_INT32
#undef HAVE_UINT8
#undef HAVE_UINT16
#undef HAVE_UINT32
in tifupp.cpp to remove include files of library and add:
#define tif_int32 int32
#define tif_uint32 uint32
in file <plugin/tif/lib/tif.h> to change the code in:
#ifndef HAVE_INT8
typedef signed char int8; /* NB: non-ANSI compilers may not grok */
#endif
#ifndef HAVE_UINT8
typedef unsigned char uint8;
#endif
#ifndef HAVE_INT16
typedef short int16;
#endif
#ifndef HAVE_UINT16
typedef unsigned short uint16; /* sizeof (uint16) must == 2 */
#endif
#if SIZEOF_INT == 4
#ifndef HAVE_INT32
typedef int int32;
#endif
#ifndef HAVE_UINT32
typedef unsigned int uint32; /* sizeof (uint32) must == 4 */
#endif
#elif SIZEOF_LONG == 4
#ifndef HAVE_INT32
typedef long int32;
#endif
#ifndef HAVE_UINT32
typedef unsigned long uint32; /* sizeof (uint32) must == 4 */
#endif
#endif
This realization gives the possibility to access core tif functions.
Motivation: I used this to access 16 bit image.
Any advice are welcome.
|
|
|
Goto Forum:
Current Time: Fri May 09 22:55:57 CEST 2025
Total time taken to generate the page: 0.01134 seconds
|