lib_raw 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +30 -0
- data/Rakefile +6 -0
- data/ext/lib_raw/extconf.rb +31 -0
- data/ext/lib_raw/lib_raw.cpp +1114 -0
- data/ext/lib_raw/lib_raw.h +105 -0
- data/lib/lib_raw/version.rb +3 -0
- data/lib/lib_raw.rb +5 -0
- data/lib_raw.gemspec +24 -0
- metadata +85 -0
@@ -0,0 +1,105 @@
|
|
1
|
+
#ifndef LIB_RAW_H
|
2
|
+
#define LIB_RAW_H 1
|
3
|
+
|
4
|
+
#include <time.h>
|
5
|
+
#include "ruby.h"
|
6
|
+
#include "libraw/libraw.h"
|
7
|
+
|
8
|
+
|
9
|
+
typedef struct {
|
10
|
+
LibRaw *libraw;
|
11
|
+
} LibRawNativeResource;
|
12
|
+
|
13
|
+
typedef struct {
|
14
|
+
libraw_output_params_t params;
|
15
|
+
} OutputParamNativeResource;
|
16
|
+
|
17
|
+
|
18
|
+
extern VALUE rb_mLibRaw;
|
19
|
+
|
20
|
+
extern VALUE rb_mColormatrixType;
|
21
|
+
extern VALUE rb_mCameraMount;
|
22
|
+
extern VALUE rb_mCameraFormat;
|
23
|
+
extern VALUE rb_mSonyArw2Option;
|
24
|
+
extern VALUE rb_mDp2qOption;
|
25
|
+
extern VALUE rb_mDecoderFlag;
|
26
|
+
extern VALUE rb_mWarning;
|
27
|
+
extern VALUE rb_mProgress;
|
28
|
+
extern VALUE rb_mThumbnailFormat;
|
29
|
+
|
30
|
+
extern VALUE rb_cRawObject;
|
31
|
+
|
32
|
+
extern VALUE rb_cIParam;
|
33
|
+
extern VALUE rb_cImageSize;
|
34
|
+
extern VALUE rb_cOutputParam;
|
35
|
+
extern VALUE rb_cMakerNote;
|
36
|
+
extern VALUE rb_cLensInfo;
|
37
|
+
|
38
|
+
extern VALUE rb_eRawError;
|
39
|
+
extern VALUE rb_eUnspecifiedError;
|
40
|
+
extern VALUE rb_eFileUnsupported;
|
41
|
+
extern VALUE rb_eRequestForNonexistentImage;
|
42
|
+
extern VALUE rb_eOutOfOrderCall;
|
43
|
+
extern VALUE rb_eNoThumbnail;
|
44
|
+
extern VALUE rb_eUnsupportedThumbnail;
|
45
|
+
extern VALUE rb_eInputClosed;
|
46
|
+
extern VALUE rb_eUnsufficientMemory;
|
47
|
+
extern VALUE rb_eDataError;
|
48
|
+
extern VALUE rb_eIOError;
|
49
|
+
extern VALUE rb_eCancelledByCallback;
|
50
|
+
extern VALUE rb_eBadCrop;
|
51
|
+
|
52
|
+
|
53
|
+
// LibRaw Native Resource
|
54
|
+
extern void lib_raw_native_resource_delete(LibRawNativeResource * p);
|
55
|
+
extern void output_param_native_resource_delete(OutputParamNativeResource * p);
|
56
|
+
extern LibRaw* get_lib_raw(VALUE self);
|
57
|
+
extern void copy_lib_raw(VALUE dst, VALUE src);
|
58
|
+
extern void check_errors(int e);
|
59
|
+
|
60
|
+
// LibRaw::RawObject
|
61
|
+
extern void apply_rawobject(VALUE self);
|
62
|
+
extern void apply_data(VALUE self, libraw_data_t *p);
|
63
|
+
extern VALUE rb_raw_object_initialize(VALUE self);
|
64
|
+
extern VALUE rb_raw_object_open_file(VALUE self, VALUE filename);
|
65
|
+
extern VALUE rb_raw_object_open_buffer(VALUE self, VALUE buff);
|
66
|
+
extern VALUE rb_raw_object_unpack(VALUE self);
|
67
|
+
extern VALUE rb_raw_object_unpack_thumb(VALUE self);
|
68
|
+
extern VALUE rb_raw_object_recycle_datastream(VALUE self);
|
69
|
+
extern VALUE rb_raw_object_recycle(VALUE self);
|
70
|
+
extern VALUE rb_raw_object_dcraw_ppm_tiff_writer(VALUE self, VALUE filename);
|
71
|
+
extern VALUE rb_raw_object_dcraw_thumb_writer(VALUE self, VALUE filename);
|
72
|
+
extern VALUE rb_raw_object_dcraw_process(VALUE self, VALUE param);
|
73
|
+
|
74
|
+
// LibRaw::IParam
|
75
|
+
extern void apply_iparam(VALUE self, libraw_iparams_t *p);
|
76
|
+
|
77
|
+
// LibRaw::ImageSize
|
78
|
+
extern void apply_image_size(VALUE self, libraw_image_sizes_t *p);
|
79
|
+
|
80
|
+
// LibRaw::ColorData
|
81
|
+
extern void apply_colordata(VALUE self, libraw_colordata_t *p);
|
82
|
+
|
83
|
+
// LibRaw::ImgOther
|
84
|
+
extern void apply_imgother(VALUE self, libraw_imgother_t *p);
|
85
|
+
|
86
|
+
// LibRaw::OutputParam
|
87
|
+
extern void apply_output_param(VALUE self, libraw_output_params_t *p);
|
88
|
+
extern VALUE rb_output_param_greybox(VALUE self, VALUE x, VALUE y, VALUE w, VALUE h);
|
89
|
+
extern VALUE rb_output_param_cropbox(VALUE self, VALUE x, VALUE y, VALUE w, VALUE h);
|
90
|
+
extern VALUE rb_output_param_gamma(VALUE self, VALUE pwr, VALUE ts);
|
91
|
+
extern VALUE rb_output_param_whitebalance(VALUE self, VALUE r, VALUE g, VALUE b, VALUE g2);
|
92
|
+
extern VALUE rb_output_param_set_bright(VALUE self, VALUE val);
|
93
|
+
extern VALUE rb_output_param_set_highlight(VALUE self, VALUE val);
|
94
|
+
extern VALUE rb_output_param_set_use_auto_wb(VALUE self, VALUE val);
|
95
|
+
extern VALUE rb_output_param_set_use_camera_wb(VALUE self, VALUE val);
|
96
|
+
extern VALUE rb_output_param_set_fbdd_noiserd(VALUE self, VALUE val);
|
97
|
+
|
98
|
+
// LibRaw::MakerNote
|
99
|
+
extern void apply_makernote(VALUE self, libraw_makernotes_lens_t *p);
|
100
|
+
|
101
|
+
// LibRaw::LensInfo
|
102
|
+
extern void apply_lensinfo(VALUE self, libraw_lensinfo_t *p);
|
103
|
+
|
104
|
+
|
105
|
+
#endif /* LIB_RAW_H */
|
data/lib/lib_raw.rb
ADDED
data/lib_raw.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'lib_raw/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "lib_raw"
|
8
|
+
spec.version = LibRaw::VERSION
|
9
|
+
spec.authors = ["Yoshida Tetsuya"]
|
10
|
+
spec.email = ["yoshida.eth0@gmail.com"]
|
11
|
+
spec.description = %q{LibRaw is a library for reading RAW files obtained from digital photo cameras}
|
12
|
+
spec.summary = %q{LibRaw is a library for reading RAW files obtained from digital photo cameras}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.extensions = %w[ext/lib_raw/extconf.rb]
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lib_raw
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yoshida Tetsuya
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: LibRaw is a library for reading RAW files obtained from digital photo
|
42
|
+
cameras
|
43
|
+
email:
|
44
|
+
- yoshida.eth0@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions:
|
47
|
+
- ext/lib_raw/extconf.rb
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- .gitignore
|
51
|
+
- Gemfile
|
52
|
+
- LICENSE.txt
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- ext/lib_raw/extconf.rb
|
56
|
+
- ext/lib_raw/lib_raw.cpp
|
57
|
+
- ext/lib_raw/lib_raw.h
|
58
|
+
- lib/lib_raw.rb
|
59
|
+
- lib/lib_raw/version.rb
|
60
|
+
- lib_raw.gemspec
|
61
|
+
homepage: ''
|
62
|
+
licenses:
|
63
|
+
- MIT
|
64
|
+
metadata: {}
|
65
|
+
post_install_message:
|
66
|
+
rdoc_options: []
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubyforge_project:
|
81
|
+
rubygems_version: 2.0.2
|
82
|
+
signing_key:
|
83
|
+
specification_version: 4
|
84
|
+
summary: LibRaw is a library for reading RAW files obtained from digital photo cameras
|
85
|
+
test_files: []
|