00001 /********************************************************************** 00002 * File: imgtiff.h (Formerly tiff.h) 00003 * Description: Header file for tiff format image reader/writer. 00004 * Author: Ray Smith 00005 * Created: Mon Jun 11 15:19:41 BST 1990 00006 * 00007 * (C) Copyright 1990, Hewlett-Packard Ltd. 00008 ** Licensed under the Apache License, Version 2.0 (the "License"); 00009 ** you may not use this file except in compliance with the License. 00010 ** You may obtain a copy of the License at 00011 ** http://www.apache.org/licenses/LICENSE-2.0 00012 ** Unless required by applicable law or agreed to in writing, software 00013 ** distributed under the License is distributed on an "AS IS" BASIS, 00014 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 ** See the License for the specific language governing permissions and 00016 ** limitations under the License. 00017 * 00018 **********************************************************************/ 00019 00020 #ifndef IMGTIFF_H 00021 #define IMGTIFF_H 00022 00023 #include "host.h" 00024 #include "bitstrm.h" 00025 00026 inT8 open_tif_image( //read header 00027 int fd, //file to read 00028 inT32 *xsize, //size of image 00029 inT32 *ysize, 00030 inT8 *bpp, //bits per pixel 00031 inT8 *photo, //interpretation 00032 inT32 *res //resolution 00033 ); 00034 inT8 read_tif_image( //read whole image 00035 int fd, //file to read 00036 uinT8 *pixels, //pixels of image 00037 inT32 xsize, //size of image 00038 inT32 ysize, 00039 inT8 bpp, //bits per pixel 00040 inT32 //bytes per line 00041 ); 00042 inT32 read_eol( //read end of line 00043 R_BITSTREAM *bits, //bitstream to read 00044 uinT16 &code //current code 00045 ); 00046 inT8 write_moto_tif( //write whole image 00047 int fd, //file to write on 00048 uinT8 *pixels, //image pixels 00049 inT32 xsize, //size of image 00050 inT32 ysize, 00051 inT8 bpp, //bits per pixel 00052 inT8 photo, 00053 inT32 res //resolution 00054 ); 00055 inT8 write_intel_tif( //write whole image 00056 int fd, //file to write on 00057 uinT8 *pixels, //image pixels 00058 inT32 xsize, //size of image 00059 inT32 ysize, 00060 inT8 bpp, //bits per pixel 00061 inT8 photo, 00062 inT32 res //resolution 00063 ); 00064 inT8 write_inverse_tif( //write whole image 00065 int fd, //file to write on 00066 uinT8 *pixels, //image pixels 00067 inT32 xsize, //size of image 00068 inT32 ysize, 00069 inT8 bpp, //bits per pixel 00070 inT8 photo, 00071 inT32 res //resolution 00072 ); 00073 inT8 write_tif_image( //write whole image 00074 int fd, //file to write on 00075 uinT8 *pixels, //image pixels 00076 inT32 xsize, //size of image 00077 inT32 ysize, 00078 inT8 bpp, //bits per pixel 00079 inT32 res, //resolution 00080 inT16 type, //format type 00081 inT16 photo //metric interp 00082 ); 00083 #endif