00001 /********************************************************************** 00002 * File: imgbmp.c (Formerly lz.c) 00003 * Description: bmp image reader/writer. 00004 * Author: Ray Smith 00005 * Created: Tue Jan 06 20:15:52 GMT 1998 00006 * 00007 * (C) Copyright 1998, Ray Smith. 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 IMGBMP_H 00021 #define IMGBMP_H 00022 00023 #include "host.h" 00024 00025 inT8 open_bmp_image( //read header 00026 int fd, //file to read 00027 inT32 *xsize, //size of image 00028 inT32 *ysize, 00029 inT8 *bpp, //bits per pixel 00030 inT8 *photo, 00031 inT32 *res //resolution 00032 ); 00033 inT8 read_bmp_image( //read header 00034 int fd, //file to read 00035 uinT8 *pixels, //pixels of image 00036 inT32 xsize, //size of image 00037 inT32 ysize, 00038 inT8 bpp, //bits per pixel 00039 inT32 //bytes per line 00040 ); 00041 inT8 write_bmp_image( //write whole image 00042 int fd, //file to write on 00043 uinT8 *pixels, //image pixels 00044 inT32 xsize, //size of image 00045 inT32 ysize, 00046 inT8 bpp, //bits per pixel 00047 inT8, 00048 inT32 //resolution 00049 ); 00050 #endif