Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.     jbig2dec
  3.  
  4.     Copyright (C) 2001-2002 Artifex Software, Inc.
  5.  
  6.     This software is distributed under license and may not
  7.     be copied, modified or distributed except as expressly
  8.     authorized under the terms of the license contained in
  9.     the file LICENSE in this distribution.
  10.  
  11.     For further licensing information refer to http://artifex.com/ or
  12.     contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
  13.     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
  14. */
  15.  
  16. /* symbol dictionary header */
  17.  
  18. /* the results of decoding a symbol dictionary */
  19. typedef struct {
  20.     int n_symbols;
  21.     Jbig2Image **glyphs;
  22. } Jbig2SymbolDict;
  23.  
  24. /* decode a symbol dictionary segment and store the results */
  25. int
  26. jbig2_symbol_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment,
  27.                         const byte *segment_data);
  28.  
  29. /* get a particular glyph by index */
  30. Jbig2Image *
  31. jbig2_sd_glyph(Jbig2SymbolDict *dict, unsigned int id);
  32.  
  33. /* return a new empty symbol dict */
  34. Jbig2SymbolDict *
  35. jbig2_sd_new(Jbig2Ctx *ctx, int n_symbols);
  36.  
  37. /* release the memory associated with a symbol dict */
  38. void
  39. jbig2_sd_release(Jbig2Ctx *ctx, Jbig2SymbolDict *dict);
  40.  
  41. /* generate a new symbol dictionary by concatenating a list of
  42.    existing dictionaries */
  43. Jbig2SymbolDict *
  44. jbig2_sd_cat(Jbig2Ctx *ctx, int n_dicts,
  45.                         Jbig2SymbolDict **dicts);
  46.  
  47. /* count the number of dictionary segments referred
  48.    to by the given segment */
  49. int
  50. jbig2_sd_count_referred(Jbig2Ctx *ctx, Jbig2Segment *segment);
  51.  
  52. /* return an array of pointers to symbol dictionaries referred
  53.    to by a segment */
  54. Jbig2SymbolDict **
  55. jbig2_sd_list_referred(Jbig2Ctx *ctx, Jbig2Segment *segment);
  56.  
  57.