home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / fontutils-0.6 / imageto / extract.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-27  |  2.1 KB  |  51 lines

  1. /* extract.h: declare operations on bitmaps.
  2.  
  3. Copyright (C) 1992 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef EXTRACT_H
  20. #define EXTRACT_H
  21.  
  22. #include "bitmap.h"
  23. #include "bounding-box.h"
  24.  
  25.  
  26. /* Return the segment in B starting after the column START that begins
  27.    with a column with at least one black pixel, to a column that is all
  28.    white (or the end of the bitmap).  If no such segment is found,
  29.    return NULL.  */
  30. extern bitmap_type *some_black_to_all_white_column (bitmap_type b);
  31.  
  32. /* Read scanlines of width WIDTH (in pixels) from the input file until
  33.    we find a segment starting with a row with at least one black pixel,
  34.    and ending with a row that is all white (or the end of the file).  If
  35.    no such segment is found, return NULL.  In TRANSITIONS we return the
  36.    column numbers where white changes to black or black to white.  The
  37.    first transition is black-to-white.  */
  38. extern bitmap_type *some_black_to_all_white_row (unsigned width,
  39.                                                  unsigned **transitions);
  40.  
  41. /* Like `some_black_to_all_white_row', except appends both the white
  42.    rows and then the black ones to B.  */
  43. extern bitmap_type *append_next_image_row
  44.   (bitmap_type b, unsigned width, unsigned **transitions);
  45.  
  46. /* Combine the bitmaps B1 and B2 based on the bounding boxes, returning
  47.    the result in B1.  Also combine the bounding boxes.  */
  48. extern void combine_images (bitmap_type *b1, bitmap_type b2,
  49.                             bounding_box_type *, bounding_box_type);
  50. #endif /* not EXTRACT_H */
  51.