File: in_jai.hpp

package info (click to toggle)
sam2p 0.44-10-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,264 kB
  • ctags: 3,180
  • sloc: cpp: 14,092; ansic: 9,026; tcl: 973; sh: 554; makefile: 237; perl: 67
file content (46 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* in_jai.hpp -- Tue Jun 11 19:05:04 CEST 2002
 */

#ifdef __GNUC__
#pragma interface
#endif

#ifndef IN_JAI_HPP
#define IN_JAI_HPP 1

#include "config2.h"

#if USE_IN_JAI

#include "gensio.hpp"

struct jai_gfxinfo {
  /** 0 for baseline JPEG, 1..15 for other JPEG compression */
  unsigned char SOF_type;
  unsigned char colorspace;
  unsigned char bad, bpc, cpp, had_jfif, colortransform, id_rgb;
  /** (Horiz<<4+Vert) sampling factor for the first color component. Usually
   * 0x11, but TIFF defaults to 0x22.
   */
  unsigned char hvs;
  /*Image::Sampled::dimen_t*/slen_t height, width;
  /** Offset of byte just _after_ the first SOF marker (FF C0 or alike)
   * from the beginning of the file.
   */
  slen_t SOF_offs;
};

extern char *jai_errors[];
#if 0
  extern void jai_parse_jpeg(struct gfxinfo *result, Filter::FlatR *f);
  extern void jai_parse_jpeg(struct gfxinfo *result, FILE *f);
#else
  extern void jai_parse_jpeg(struct jai_gfxinfo *result, DecoderTeller *fp, bool must_be_baseline=true);
  /** Doesn't treat `-' as a special filename. @return 0, 1, or -1 on I/O error */
  extern int jai_is_baseline_jpeg(char const* filename);
  extern int jai_is_baseline_jpeg(/*DecoderTeller*/ Filter::UngetFILED *fp);
#endif

#endif

#endif /* in_jai.hpp */