~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/libs/dcraw/dcraw_parse.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.3.2 upstream) (37 hardy)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20080717202539-1bw3w3nrsso7yj4z
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ============================================================
2
 
 * Author: Gilles Caulier <caulier dot gilles at free.fr>
3
 
 * Date  : 2005-12-20
4
 
 * Description : Raw Photo Parser
5
 
 * 
6
 
 * Copyright 2005-2006 by Gilles Caulier
7
 
 *
8
 
 * This program is free software; you can redistribute it
9
 
 * and/or modify it under the terms of the GNU General
10
 
 * Public License as published by the Free Software Foundation;
11
 
 * either version 2, or (at your option)
12
 
 * any later version.
13
 
 * 
14
 
 * This program is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 * GNU General Public License for more details.
18
 
 * 
19
 
 * ============================================================ */
20
 
 
21
 
#ifndef DCRAW_PARSE_H
22
 
#define DCRAW_PARSE_H
23
 
 
24
 
// Digikam Includes.
25
 
 
26
 
#include "digikam_export.h"
27
 
 
28
 
namespace Digikam
29
 
{
30
 
 
31
 
class DIGIKAM_EXPORT DcrawParse
32
 
{
33
 
public:
34
 
 
35
 
    DcrawParse();
36
 
    ~DcrawParse();
37
 
 
38
 
    int getThumbnail(const char* infile, const char* outfile);
39
 
    int getCameraModel(const char* infile, char* cameraConstructor, char* cameraModel);
40
 
 
41
 
private:
42
 
 
43
 
    typedef unsigned char uchar;
44
 
    typedef unsigned short ushort;
45
 
    typedef long long INT64;
46
 
 
47
 
    struct decode
48
 
    {
49
 
        struct decode *branch[2];
50
 
        int leaf;
51
 
    } first_decode[640], *free_decode;
52
 
 
53
 
    FILE  *ifp;
54
 
    short  order;
55
 
    char   make[128], model[128], model2[128], thumb_head[128];
56
 
    int    width, height, offset, length, bps, is_dng;
57
 
    int    thumb_offset, thumb_length, thumb_layers;
58
 
 
59
 
private:
60
 
 
61
 
    ushort  sget2 (uchar *s);
62
 
    ushort  get2();
63
 
    int     sget4 (uchar *s);
64
 
    int     get4();
65
 
    float   int_to_float (int i);
66
 
    void    tiff_dump(int base, int tag, int type, int count, int level);
67
 
    void    parse_nikon_capture_note (int length);
68
 
    void    nikon_decrypt (uchar ci, uchar cj, int tag, int i, int size, uchar *buf);
69
 
    void    nef_parse_makernote (int base);
70
 
    void    nef_parse_exif(int base);
71
 
    void    sony_decrypt (unsigned *data, int len, int start, int key);
72
 
    int     parse_tiff_ifd (int base, int level);
73
 
    void    parse_tiff (int base);
74
 
    void    parse_minolta();
75
 
    void    parse_ciff (int offset, int length, int level);
76
 
    int     parse_jpeg (int offset);
77
 
    void    parse_riff (int level);
78
 
    void    parse_mos(int level);
79
 
    void    parse_rollei();
80
 
    void    rollei_decode (FILE *tfp);
81
 
    void    get_utf8 (int offset, char *buf, int len);
82
 
    void    parse_foveon();
83
 
    void    foveon_tree (unsigned huff[1024], unsigned code);
84
 
    void    foveon_decode (FILE *tfp);
85
 
    void    kodak_yuv_decode (FILE *tfp);
86
 
    void    parse_fuji (int offset);
87
 
    void    parse_phase_one (int base);
88
 
    char   *memmem (char *haystack, size_t haystacklen, char *needle, size_t needlelen);
89
 
 
90
 
};
91
 
 
92
 
}  // NameSpace Digikam
93
 
 
94
 
#endif /* DCRAW_PARSE_H */