2
2
Copyright (c) 1993-2008, Cognitive Technologies
5
����������� ��������� ��������������� � ������������� ��� � ���� ��������� ����,
6
��� � � �������� �����, � ����������� ��� ���, ��� ���������� ��������� �������:
8
* ��� ��������� ��������������� ��������� ���� ������ ���������� ���������
9
���� ����������� �� ��������� �����, ���� ������ ������� � �����������
11
* ��� ��������� ��������������� ��������� ���� � ������������ �/��� �
12
������ ����������, ������������ ��� ���������������, ������ �����������
13
��������� ���� ���������� �� ��������� �����, ���� ������ ������� �
14
����������� ����� �� ��������.
15
* �� �������� Cognitive Technologies, �� ����� �� ����������� �� �����
16
���� ������������ � �������� �������� ��������� �/��� �����������
17
���������, ���������� �� ���� ��, ��� ���������������� �����������
20
��� ��������� ������������� ����������� ��������� ���� �/��� ������� ������ "���
21
��� ����" ��� ������-���� ���� ��������, ���������� ���� ��� ���������������,
22
������� �������� ������������ �������� � ����������� ��� ���������� ����, �� ��
23
������������� ���. �� �������� ��������� ���� � �� ���� ������ ����, �������
24
����� �������� �/��� �������� �������������� ���������, �� � ���� ������ ��
25
��Ѩ� ���������������, ������� ����� �����, ���������, ����������� ���
26
������������� ������, ��������� � �������������� ��� ���������� ����������
27
������������� ������������� ��������� (������� ������ ������, ��� ������,
28
������� ���������, ��� ������ �/��� ������ �������, ���������� ��-�� ��������
29
������� ��� �/��� ������ ��������� �������� ��������� � ������� �����������,
30
�� �� ������������� ����� ��������), �� �� ������������� ���, ���� ���� �����
31
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
5
Разрешается повторное распространение и использование как в виде исходного кода,
6
так и в двоичной форме, с изменениями или без, при соблюдении следующих условий:
8
* При повторном распространении исходного кода должны оставаться указанное
9
выше уведомление об авторском праве, этот список условий и последующий
11
* При повторном распространении двоичного кода в документации и/или в
12
других материалах, поставляемых при распространении, должны сохраняться
13
указанная выше информация об авторском праве, этот список условий и
14
последующий отказ от гарантий.
15
* Ни название Cognitive Technologies, ни имена ее сотрудников не могут
16
быть использованы в качестве средства поддержки и/или продвижения
17
продуктов, основанных на этом ПО, без предварительного письменного
20
ЭТА ПРОГРАММА ПРЕДОСТАВЛЕНА ВЛАДЕЛЬЦАМИ АВТОРСКИХ ПРАВ И/ИЛИ ДРУГИМИ ЛИЦАМИ "КАК
21
ОНА ЕСТЬ" БЕЗ КАКОГО-ЛИБО ВИДА ГАРАНТИЙ, ВЫРАЖЕННЫХ ЯВНО ИЛИ ПОДРАЗУМЕВАЕМЫХ,
22
ВКЛЮЧАЯ ГАРАНТИИ КОММЕРЧЕСКОЙ ЦЕННОСТИ И ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ, НО НЕ
23
ОГРАНИЧИВАЯСЬ ИМИ. НИ ВЛАДЕЛЕЦ АВТОРСКИХ ПРАВ И НИ ОДНО ДРУГОЕ ЛИЦО, КОТОРОЕ
24
МОЖЕТ ИЗМЕНЯТЬ И/ИЛИ ПОВТОРНО РАСПРОСТРАНЯТЬ ПРОГРАММУ, НИ В КОЕМ СЛУЧАЕ НЕ
25
НЕСЁТ ОТВЕТСТВЕННОСТИ, ВКЛЮЧАЯ ЛЮБЫЕ ОБЩИЕ, СЛУЧАЙНЫЕ, СПЕЦИАЛЬНЫЕ ИЛИ
26
ПОСЛЕДОВАВШИЕ УБЫТКИ, СВЯЗАННЫЕ С ИСПОЛЬЗОВАНИЕМ ИЛИ ПОНЕСЕННЫЕ ВСЛЕДСТВИЕ
27
НЕВОЗМОЖНОСТИ ИСПОЛЬЗОВАНИЯ ПРОГРАММЫ (ВКЛЮЧАЯ ПОТЕРИ ДАННЫХ, ИЛИ ДАННЫЕ,
28
СТАВШИЕ НЕГОДНЫМИ, ИЛИ УБЫТКИ И/ИЛИ ПОТЕРИ ДОХОДОВ, ПОНЕСЕННЫЕ ИЗ-ЗА ДЕЙСТВИЙ
29
ТРЕТЬИХ ЛИЦ И/ИЛИ ОТКАЗА ПРОГРАММЫ РАБОТАТЬ СОВМЕСТНО С ДРУГИМИ ПРОГРАММАМИ,
30
НО НЕ ОГРАНИЧИВАЯСЬ ЭТИМИ СЛУЧАЯМИ), НО НЕ ОГРАНИЧИВАЯСЬ ИМИ, ДАЖЕ ЕСЛИ ТАКОЙ
31
ВЛАДЕЛЕЦ ИЛИ ДРУГОЕ ЛИЦО БЫЛИ ИЗВЕЩЕНЫ О ВОЗМОЖНОСТИ ТАКИХ УБЫТКОВ И ПОТЕРЬ.
33
33
Redistribution and use in source and binary forms, with or without modification,
34
34
are permitted provided that the following conditions are met:
79
79
// Export/import image descriptor.
80
80
typedef struct tagImgInfo
82
Word16 wImageHeight; // in pixels
83
Word16 wImageWidth; // in pixels
84
Word16 wImageByteWidth; // in bytes
85
Word16 wImageDisplacement; // in pixels
82
uint16_t wImageHeight; // in pixels
83
uint16_t wImageWidth; // in pixels
84
uint16_t wImageByteWidth; // in bytes
85
uint16_t wImageDisplacement; // in pixels
87
Word16 wResolutionX; // in dpi
88
Word16 wResolutionY; // in dpi
89
Word8 bFotoMetrics; // 1, if white is highest number,
87
uint16_t wResolutionX; // in dpi
88
uint16_t wResolutionY; // in dpi
89
uchar bFotoMetrics; // 1, if white is highest number,
90
90
// 0 -if white is lowest number.
91
Word8 bCompression; // compression of delivered strips
91
uchar bCompression; // compression of delivered strips
92
92
#define CM_UNCOMPRESSED 0x0010
93
93
#define CM_GROUP4 0x0020
94
94
#define CM_JPEG 0x0040
95
95
#define CM_2XX 0x0080
98
Word16 wAddX; // "real" coordinates of
99
Word16 wAddY; // upper-left corner (in pixels).
98
uint16_t wAddX; // "real" coordinates of
99
uint16_t wAddY; // upper-left corner (in pixels).
101
Word8 bSamplesPerPixel;
102
Word8 bBitsPerSample;
104
Word8 LinesOrder; // 0 - as DDB, 1 as DIB.
101
uchar bSamplesPerPixel;
102
uchar bBitsPerSample;
104
uchar LinesOrder; // 0 - as DDB, 1 as DIB.
105
105
#define LO_FIRSTFIRST 0
106
106
#define LO_FIRSTLAST 1
108
108
TImgRGB* Palette;
111
111
#define BA_COMPACT 1
112
112
#define BA_TWOBYTE 2
113
113
#define BA_FOURBYTE 3
115
Word8 spare[15]; // reserved for future.
115
uchar spare[15]; // reserved for future.
117
Int16 step; // step of sender/receiver conversation.
117
int16_t step; // step of sender/receiver conversation.
118
118
#define CS_QUEST 0x0000 // struct has no information;
119
119
// it should be filled.
120
120
//(should be set by receiver when it calls
262
262
typedef struct tagTiger_ImageInfo
264
Word16 wImageHeight; /* Height of the image in lines */
265
Word16 wImageWidth; /* Width of the image in pixels */
266
Word16 wImageByteWidth; /* Size of the image line in bytes */
267
Word16 wImageDisplacement; /* Displacement of the first pixel of */
264
uint16_t wImageHeight; /* Height of the image in lines */
265
uint16_t wImageWidth; /* Width of the image in pixels */
266
uint16_t wImageByteWidth; /* Size of the image line in bytes */
267
uint16_t wImageDisplacement; /* Displacement of the first pixel of */
268
268
/* image line in pixels, usually 0 */
269
Word16 wResolutionX; /* Resolution by X-axe */
270
Word16 wResolutionY; /* Resolution by Y-axe */
271
Word8 bFotoMetrics; /* White pixel */
272
Word8 bUnused; /* not used; for alignment purpose only */
269
uint16_t wResolutionX; /* Resolution by X-axe */
270
uint16_t wResolutionY; /* Resolution by Y-axe */
271
uchar bFotoMetrics; /* White pixel */
272
uchar bUnused; /* not used; for alignment purpose only */
276
276
} Tiger_ImageInfo;
284
284
#if defined( _MSC_VER ) && ( _MSC_VER == 800 ) /* MSVC 1.5 */
285
285
typedef Bool16 (_far _pascal _export *TImageOpen )(Tiger_ImageInfo* lpImageInfo);
286
typedef Int16 (_far _pascal _export *TImageRead )(Word8* lpImage, Word16 wMaxSize);
287
typedef Int16 (_far _pascal _export *TImageGetBlock )(Word8* lpBuff, Int16 fstLine, Int16 nLines);
286
typedef int16_t (_far _pascal _export *TImageRead )(uchar* lpImage, uint16_t wMaxSize);
287
typedef int16_t (_far _pascal _export *TImageGetBlock )(uchar* lpBuff, int16_t fstLine, int16_t nLines);
288
288
typedef Bool16 (_far _pascal _export *TImageClose )(void);
290
290
#ifdef __cplusplus
293
typedef Int16 (*TImageGetBlock )(Word8* lpBuff, Int16 fstLine, Int16 nLines);
293
typedef int16_t (*TImageGetBlock )(uchar* lpBuff, int16_t fstLine, int16_t nLines);
294
294
typedef Bool16 (*TImageOpen )(Tiger_ImageInfo* lpImageInfo);
295
typedef Int16 (*TImageRead )(Word8* lpImage, Word16 wMaxSize);
295
typedef int16_t (*TImageRead )(uchar* lpImage, uint16_t wMaxSize);
296
296
typedef Bool16 (*TImageClose )(void);
297
297
#ifdef __cplusplus