Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
imgs.h
Go to the documentation of this file.
1 /**********************************************************************
2  * File: imgs.h (Formerly images.h)
3  * Description: Header file for IMAGE member functions.
4  * Author: Ray Smith
5  * Created: Mon Jun 11 15:32:53 BST 1990
6  *
7  * (C) Copyright 1990, Hewlett-Packard Ltd.
8  ** Licensed under the Apache License, Version 2.0 (the "License");
9  ** you may not use this file except in compliance with the License.
10  ** You may obtain a copy of the License at
11  ** http://www.apache.org/licenses/LICENSE-2.0
12  ** Unless required by applicable law or agreed to in writing, software
13  ** distributed under the License is distributed on an "AS IS" BASIS,
14  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  ** See the License for the specific language governing permissions and
16  ** limitations under the License.
17  *
18  **********************************************************************/
19 
20 #ifndef IMGS_H
21 #define IMGS_H
22 
23 #include "img.h"
24 #include "params.h"
25 
26 extern INT_VAR_H (image_default_resolution, 300, "Image resolution dpi");
27 
28 inT32 check_legal_image_size( //get rest of image
29  inT32 x, //x size required
30  inT32 y, //ysize required
31  inT8 bits_per_pixel //bpp required
32  );
33  //copy rectangle
34 extern DLLSYM void copy_sub_image(IMAGE *source, //source image
35  inT32 xstart, //start coords
36  inT32 ystart,
37  inT32 xext, //extent to copy
38  inT32 yext,
39  IMAGE *dest, //destination image
40  inT32 xdest, //destination coords
41  inT32 ydest,
42  BOOL8 adjust_grey //shift to new bpp
43  );
44  //enlarge rectangle
45 extern DLLSYM void enlarge_sub_image(IMAGE *source, //source image
46  inT32 xstart, //scaled start coords
47  inT32 ystart,
48  IMAGE *dest, //destination image
49  inT32 xdest, //dest coords
50  inT32 ydest,
51  inT32 xext, //destination extent
52  inT32 yext,
53  inT32 scale, //scale factor
54  BOOL8 adjust_grey //shift to new bpp
55  );
56  //reduce rectangle
57 extern DLLSYM void fast_reduce_sub_image(IMAGE *source, //source image
58  inT32 xstart, //start coords
59  inT32 ystart,
60  inT32 xext, //extent to copy
61  inT32 yext,
62  IMAGE *dest, //destination image
63  inT32 xdest, //destination coords
64  inT32 ydest,
65  inT32 scale, //reduction factor
66  BOOL8 adjust_grey //shift to new bpp
67  );
68  //reduce rectangle
69 extern DLLSYM void reduce_sub_image(IMAGE *source, //source image
70  inT32 xstart, //start coords
71  inT32 ystart,
72  inT32 xext, //extent to copy
73  inT32 yext,
74  IMAGE *dest, //destination image
75  inT32 xdest, //destination coords
76  inT32 ydest,
77  inT32 scale, //reduction factor
78  BOOL8 adjust_grey //shift to new bpp
79  );
80 extern DLLSYM void invert_image( /*invert the image */
81  IMAGE *image /*image ot invert */
82  );
83  //bias rectangle
84 extern DLLSYM void bias_sub_image(IMAGE *source, //source image
85  inT32 xstart, //start coords
86  inT32 ystart,
87  inT32 xext, //extent to copy
88  inT32 yext,
89  uinT8 bias //number to add
90  );
91  //copy rectangle
92 extern DLLSYM void starbase_to_normal(IMAGE *source, //source image
93  inT32 xstart, //start coords
94  inT32 ystart,
95  inT32 xext, //extent to copy
96  inT32 yext,
97  IMAGE *dest, //destination image
98  inT32 xdest, //destination coords
99  inT32 ydest,
100  BOOL8 preserve_grey //shift to new bpp
101  );
102 #endif