open_image 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.travis.yml +5 -0
- data/.yardopts +4 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +18 -0
- data/TODO.md +38 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/open_image/color.c +165 -0
- data/ext/open_image/color.h +27 -0
- data/ext/open_image/common.h +62 -0
- data/ext/open_image/extconf.rb +3 -0
- data/ext/open_image/image.c +398 -0
- data/ext/open_image/image.h +36 -0
- data/ext/open_image/open_image.c +16 -0
- data/ext/open_image/open_image.h +10 -0
- data/ext/open_image/point.c +96 -0
- data/ext/open_image/point.h +24 -0
- data/ext/open_image/rect.c +192 -0
- data/ext/open_image/rect.h +29 -0
- data/ext/open_image/size.c +100 -0
- data/ext/open_image/size.h +20 -0
- data/ext/open_image/stb_image.c +6997 -0
- data/ext/open_image/stb_image.h +453 -0
- data/ext/open_image/stb_image_write.c +1377 -0
- data/ext/open_image/stb_image_write.h +184 -0
- data/lib/open_image.rb +8 -0
- data/lib/open_image/colors.rb +166 -0
- data/lib/open_image/version.rb +3 -0
- data/open_image.gemspec +31 -0
- metadata +121 -0
@@ -0,0 +1,184 @@
|
|
1
|
+
/* stb_image_write - v1.09 - public domain - http://nothings.org/stb/stb_image_write.h
|
2
|
+
writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015
|
3
|
+
no warranty implied; use at your own risk
|
4
|
+
|
5
|
+
Before #including,
|
6
|
+
|
7
|
+
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
8
|
+
|
9
|
+
in the file that you want to have the implementation.
|
10
|
+
|
11
|
+
Will probably not work correctly with strict-aliasing optimizations.
|
12
|
+
|
13
|
+
If using a modern Microsoft Compiler, non-safe versions of CRT calls may cause
|
14
|
+
compilation warnings or even errors. To avoid this, also before #including,
|
15
|
+
|
16
|
+
#define STBI_MSC_SECURE_CRT
|
17
|
+
|
18
|
+
ABOUT:
|
19
|
+
|
20
|
+
This header file is a library for writing images to C stdio. It could be
|
21
|
+
adapted to write to memory or a general streaming interface; let me know.
|
22
|
+
|
23
|
+
The PNG output is not optimal; it is 20-50% larger than the file
|
24
|
+
written by a decent optimizing implementation; though providing a custom
|
25
|
+
zlib compress function (see STBIW_ZLIB_COMPRESS) can mitigate that.
|
26
|
+
This library is designed for source code compactness and simplicity,
|
27
|
+
not optimal image file size or run-time performance.
|
28
|
+
|
29
|
+
BUILDING:
|
30
|
+
|
31
|
+
You can #define STBIW_ASSERT(x) before the #include to avoid using assert.h.
|
32
|
+
You can #define STBIW_MALLOC(), STBIW_REALLOC(), and STBIW_FREE() to replace
|
33
|
+
malloc,realloc,free.
|
34
|
+
You can #define STBIW_MEMMOVE() to replace memmove()
|
35
|
+
You can #define STBIW_ZLIB_COMPRESS to use a custom zlib-style compress function
|
36
|
+
for PNG compression (instead of the builtin one), it must have the following signature:
|
37
|
+
unsigned char * my_compress(unsigned char *data, int data_len, int *out_len, int quality);
|
38
|
+
The returned data will be freed with STBIW_FREE() (free() by default),
|
39
|
+
so it must be heap allocated with STBIW_MALLOC() (malloc() by default),
|
40
|
+
|
41
|
+
USAGE:
|
42
|
+
|
43
|
+
There are five functions, one for each image file format:
|
44
|
+
|
45
|
+
int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
|
46
|
+
int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
|
47
|
+
int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
|
48
|
+
int stbi_write_jpg(char const *filename, int w, int h, int comp, const void *data, int quality);
|
49
|
+
int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
|
50
|
+
|
51
|
+
void stbi_flip_vertically_on_write(int flag); // flag is non-zero to flip data vertically
|
52
|
+
|
53
|
+
There are also five equivalent functions that use an arbitrary write function. You are
|
54
|
+
expected to open/close your file-equivalent before and after calling these:
|
55
|
+
|
56
|
+
int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes);
|
57
|
+
int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
|
58
|
+
int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
|
59
|
+
int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);
|
60
|
+
int stbi_write_jpg_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int quality);
|
61
|
+
|
62
|
+
where the callback is:
|
63
|
+
void stbi_write_func(void *context, void *data, int size);
|
64
|
+
|
65
|
+
You can configure it with these global variables:
|
66
|
+
int stbi_write_tga_with_rle; // defaults to true; set to 0 to disable RLE
|
67
|
+
int stbi_write_png_compression_level; // defaults to 8; set to higher for more compression
|
68
|
+
int stbi_write_force_png_filter; // defaults to -1; set to 0..5 to force a filter mode
|
69
|
+
|
70
|
+
|
71
|
+
You can define STBI_WRITE_NO_STDIO to disable the file variant of these
|
72
|
+
functions, so the library will not use stdio.h at all. However, this will
|
73
|
+
also disable HDR writing, because it requires stdio for formatted output.
|
74
|
+
|
75
|
+
Each function returns 0 on failure and non-0 on success.
|
76
|
+
|
77
|
+
The functions create an image file defined by the parameters. The image
|
78
|
+
is a rectangle of pixels stored from left-to-right, top-to-bottom.
|
79
|
+
Each pixel contains 'comp' channels of data stored interleaved with 8-bits
|
80
|
+
per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is
|
81
|
+
monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall.
|
82
|
+
The *data pointer points to the first byte of the top-left-most pixel.
|
83
|
+
For PNG, "stride_in_bytes" is the distance in bytes from the first byte of
|
84
|
+
a row of pixels to the first byte of the next row of pixels.
|
85
|
+
|
86
|
+
PNG creates output files with the same number of components as the input.
|
87
|
+
The BMP format expands Y to RGB in the file format and does not
|
88
|
+
output alpha.
|
89
|
+
|
90
|
+
PNG supports writing rectangles of data even when the bytes storing rows of
|
91
|
+
data are not consecutive in memory (e.g. sub-rectangles of a larger image),
|
92
|
+
by supplying the stride between the beginning of adjacent rows. The other
|
93
|
+
formats do not. (Thus you cannot write a native-format BMP through the BMP
|
94
|
+
writer, both because it is in BGR order and because it may have padding
|
95
|
+
at the end of the line.)
|
96
|
+
|
97
|
+
PNG allows you to set the deflate compression level by setting the global
|
98
|
+
variable 'stbi_write_png_compression_level' (it defaults to 8).
|
99
|
+
|
100
|
+
HDR expects linear float data. Since the format is always 32-bit rgb(e)
|
101
|
+
data, alpha (if provided) is discarded, and for monochrome data it is
|
102
|
+
replicated across all three channels.
|
103
|
+
|
104
|
+
TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed
|
105
|
+
data, set the global variable 'stbi_write_tga_with_rle' to 0.
|
106
|
+
|
107
|
+
JPEG does ignore alpha channels in input data; quality is between 1 and 100.
|
108
|
+
Higher quality looks better but results in a bigger image.
|
109
|
+
JPEG baseline (no JPEG progressive).
|
110
|
+
|
111
|
+
CREDITS:
|
112
|
+
|
113
|
+
|
114
|
+
Sean Barrett - PNG/BMP/TGA
|
115
|
+
Baldur Karlsson - HDR
|
116
|
+
Jean-Sebastien Guay - TGA monochrome
|
117
|
+
Tim Kelsey - misc enhancements
|
118
|
+
Alan Hickman - TGA RLE
|
119
|
+
Emmanuel Julien - initial file IO callback implementation
|
120
|
+
Jon Olick - original jo_jpeg.cpp code
|
121
|
+
Daniel Gibson - integrate JPEG, allow external zlib
|
122
|
+
Aarni Koskela - allow choosing PNG filter
|
123
|
+
|
124
|
+
bugfixes:
|
125
|
+
github:Chribba
|
126
|
+
Guillaume Chereau
|
127
|
+
github:jry2
|
128
|
+
github:romigrou
|
129
|
+
Sergio Gonzalez
|
130
|
+
Jonas Karlsson
|
131
|
+
Filip Wasil
|
132
|
+
Thatcher Ulrich
|
133
|
+
github:poppolopoppo
|
134
|
+
Patrick Boettcher
|
135
|
+
github:xeekworx
|
136
|
+
Cap Petschulat
|
137
|
+
Simon Rodriguez
|
138
|
+
Ivan Tikhonov
|
139
|
+
github:ignotion
|
140
|
+
Adam Schackart
|
141
|
+
|
142
|
+
LICENSE
|
143
|
+
|
144
|
+
See end of file for license information.
|
145
|
+
|
146
|
+
*/
|
147
|
+
|
148
|
+
#ifndef INCLUDE_STB_IMAGE_WRITE_H
|
149
|
+
#define INCLUDE_STB_IMAGE_WRITE_H
|
150
|
+
|
151
|
+
// if STB_IMAGE_WRITE_STATIC causes problems, try defining STBIWDEF to 'inline' or 'static inline'
|
152
|
+
#ifndef STBIWDEF
|
153
|
+
#ifdef STB_IMAGE_WRITE_STATIC
|
154
|
+
#define STBIWDEF static
|
155
|
+
#else
|
156
|
+
#define STBIWDEF extern
|
157
|
+
#endif
|
158
|
+
#endif
|
159
|
+
|
160
|
+
#ifndef STB_IMAGE_WRITE_STATIC // C++ forbids static forward declarations
|
161
|
+
extern int stbi_write_tga_with_rle;
|
162
|
+
extern int stbi_write_png_compression_level;
|
163
|
+
extern int stbi_write_force_png_filter;
|
164
|
+
#endif
|
165
|
+
|
166
|
+
#ifndef STBI_WRITE_NO_STDIO
|
167
|
+
STBIWDEF int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
|
168
|
+
STBIWDEF int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
|
169
|
+
STBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
|
170
|
+
STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
|
171
|
+
STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality);
|
172
|
+
#endif
|
173
|
+
|
174
|
+
typedef void stbi_write_func(void *context, void *data, int size);
|
175
|
+
|
176
|
+
STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes);
|
177
|
+
STBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
|
178
|
+
STBIWDEF int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
|
179
|
+
STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);
|
180
|
+
STBIWDEF int stbi_write_jpg_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int quality);
|
181
|
+
|
182
|
+
STBIWDEF void stbi_flip_vertically_on_write(int flip_boolean);
|
183
|
+
|
184
|
+
#endif//INCLUDE_STB_IMAGE_WRITE_H
|
data/lib/open_image.rb
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
|
2
|
+
module OpenImage
|
3
|
+
|
4
|
+
module Colors
|
5
|
+
|
6
|
+
def self.define_color(name, uint)
|
7
|
+
define_singleton_method(name) { Color.new(uint) }
|
8
|
+
@names ||= []
|
9
|
+
@names << name.to_s.split('_').map(&:capitalize).join(' ')
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.names
|
13
|
+
@names
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.each
|
17
|
+
return enum_for __method__ unless block_given?
|
18
|
+
@names.each do |name|
|
19
|
+
sym = name.downcase.tr(' ', '_').to_sym
|
20
|
+
yield method(sym).call rescue next
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
define_color :alice_blue, 0xFFF0F8FF
|
25
|
+
define_color :antique_white, 0xFFFAEBD7
|
26
|
+
define_color :aqua, 0xFF00FFFF
|
27
|
+
define_color :aquamarine, 0xFF7FFFD4
|
28
|
+
define_color :azure, 0xFFF0FFFF
|
29
|
+
define_color :beige, 0xFFF5F5DC
|
30
|
+
define_color :bisque, 0xFFFFE4C4
|
31
|
+
define_color :black, 0xFF000000
|
32
|
+
define_color :blanched_almond, 0xFFFFEBCD
|
33
|
+
define_color :blue, 0xFF0000FF
|
34
|
+
define_color :blue_violet, 0xFF8A2BE2
|
35
|
+
define_color :brown, 0xFFA52A2A
|
36
|
+
define_color :burly_wood, 0xFFDEB887
|
37
|
+
define_color :cadet_blue, 0xFF5F9EA0
|
38
|
+
define_color :chartreuse, 0xFF7FFF00
|
39
|
+
define_color :chocolate, 0xFFD2691E
|
40
|
+
define_color :coral, 0xFFFF7F50
|
41
|
+
define_color :cornflower_blue, 0xFF6495ED
|
42
|
+
define_color :cornsilk, 0xFFFFF8DC
|
43
|
+
define_color :crimson, 0xFFDC143C
|
44
|
+
define_color :cyan, 0xFF00FFFF
|
45
|
+
define_color :dark_blue, 0xFF00008B
|
46
|
+
define_color :dark_cyan, 0xFF008B8B
|
47
|
+
define_color :dark_goldenrod, 0xFFB8860B
|
48
|
+
define_color :dark_gray, 0xFFA9A9A9
|
49
|
+
define_color :dark_green, 0xFF006400
|
50
|
+
define_color :dark_khaki, 0xFFBDB76B
|
51
|
+
define_color :dark_magenta, 0xFF8B008B
|
52
|
+
define_color :dark_olive_green, 0xFF556B2F
|
53
|
+
define_color :dark_orange, 0xFFFF8C00
|
54
|
+
define_color :dark_orchid, 0xFF9932CC
|
55
|
+
define_color :dark_red, 0xFF8B0000
|
56
|
+
define_color :dark_salmon, 0xFFE9967A
|
57
|
+
define_color :dark_sea_green, 0xFF8FBC8F
|
58
|
+
define_color :dark_slate_blue, 0xFF483D8B
|
59
|
+
define_color :dark_slate_gray, 0xFF2F4F4F
|
60
|
+
define_color :dark_turquoise, 0xFF00CED1
|
61
|
+
define_color :dark_violet, 0xFF9400D3
|
62
|
+
define_color :deep_pink, 0xFFFF1493
|
63
|
+
define_color :deep_sky_blue, 0xFF00BFFF
|
64
|
+
define_color :dim_gray, 0xFF696969
|
65
|
+
define_color :dodger_blue, 0xFF1E90FF
|
66
|
+
define_color :firebrick, 0xFFB22222
|
67
|
+
define_color :floral_white, 0xFFFFFAF0
|
68
|
+
define_color :forest_green, 0xFF228B22
|
69
|
+
define_color :fuchsia, 0xFFFF00FF
|
70
|
+
define_color :gainsboro, 0xFFDCDCDC
|
71
|
+
define_color :ghost_white, 0xFFF8F8FF
|
72
|
+
define_color :gold, 0xFFFFD700
|
73
|
+
define_color :goldenrod, 0xFFDAA520
|
74
|
+
define_color :gray, 0xFF808080
|
75
|
+
define_color :green, 0xFF008000
|
76
|
+
define_color :green_yellow, 0xFFADFF2F
|
77
|
+
define_color :honeydew, 0xFFF0FFF0
|
78
|
+
define_color :hot_pink, 0xFFFF69B4
|
79
|
+
define_color :indian_red, 0xFFCD5C5C
|
80
|
+
define_color :indigo, 0xFF4B0082
|
81
|
+
define_color :ivory, 0xFFFFFFF0
|
82
|
+
define_color :khaki, 0xFFF0E68C
|
83
|
+
define_color :lavender, 0xFFE6E6FA
|
84
|
+
define_color :lavender_blush, 0xFFFFF0F5
|
85
|
+
define_color :lawn_green, 0xFF7CFC00
|
86
|
+
define_color :lemon_chiffon, 0xFFFFFACD
|
87
|
+
define_color :light_blue, 0xFFADD8E6
|
88
|
+
define_color :light_coral, 0xFFF08080
|
89
|
+
define_color :light_cyan, 0xFFE0FFFF
|
90
|
+
define_color :light_goldenrod_yellow, 0xFFFAFAD2
|
91
|
+
define_color :light_green, 0xFF90EE90
|
92
|
+
define_color :light_gray, 0xFFD3D3D3
|
93
|
+
define_color :light_pink, 0xFFFFB6C1
|
94
|
+
define_color :light_salmon, 0xFFFFA07A
|
95
|
+
define_color :light_sea_green, 0xFF20B2AA
|
96
|
+
define_color :light_sky_blue, 0xFF87CEFA
|
97
|
+
define_color :light_slate_gray, 0xFF778899
|
98
|
+
define_color :light_steel_blue, 0xFFB0C4DE
|
99
|
+
define_color :light_yellow, 0xFFFFFFE0
|
100
|
+
define_color :lime, 0xFF00FF00
|
101
|
+
define_color :lime_green, 0xFF32CD32
|
102
|
+
define_color :linen, 0xFFFAF0E6
|
103
|
+
define_color :magenta, 0xFFFF00FF
|
104
|
+
define_color :maroon, 0xFF800000
|
105
|
+
define_color :medium_aquamarine, 0xFF66CDAA
|
106
|
+
define_color :medium_blue, 0xFF0000CD
|
107
|
+
define_color :medium_orchid, 0xFFBA55D3
|
108
|
+
define_color :medium_purple, 0xFF9370DB
|
109
|
+
define_color :medium_sea_green, 0xFF3CB371
|
110
|
+
define_color :medium_slate_blue, 0xFF7B68EE
|
111
|
+
define_color :medium_spring_green, 0xFF00FA9A
|
112
|
+
define_color :medium_turquoise, 0xFF48D1CC
|
113
|
+
define_color :medium_violet_red, 0xFFC71585
|
114
|
+
define_color :midnight_blue, 0xFF191970
|
115
|
+
define_color :mint_cream, 0xFFF5FFFA
|
116
|
+
define_color :misty_rose, 0xFFFFE4E1
|
117
|
+
define_color :moccasin, 0xFFFFE4B5
|
118
|
+
define_color :navajo_white, 0xFFFFDEAD
|
119
|
+
define_color :navy, 0xFF000080
|
120
|
+
define_color :old_lace, 0xFFFDF5E6
|
121
|
+
define_color :olive, 0xFF808000
|
122
|
+
define_color :olive_drab, 0xFF6B8E23
|
123
|
+
define_color :orange, 0xFFFFA500
|
124
|
+
define_color :orange_red, 0xFFFF4500
|
125
|
+
define_color :orchid, 0xFFDA70D6
|
126
|
+
define_color :pale_goldenrod, 0xFFEEE8AA
|
127
|
+
define_color :pale_green, 0xFF98FB98
|
128
|
+
define_color :pale_turquoise, 0xFFAFEEEE
|
129
|
+
define_color :pale_violet_red, 0xFFDB7093
|
130
|
+
define_color :papaya_whip, 0xFFFFEFD5
|
131
|
+
define_color :peach_puff, 0xFFFFDAB9
|
132
|
+
define_color :peru, 0xFFCD853F
|
133
|
+
define_color :pink, 0xFFFFC0CB
|
134
|
+
define_color :plum, 0xFFDDA0DD
|
135
|
+
define_color :powder_blue, 0xFFB0E0E6
|
136
|
+
define_color :purple, 0xFF800080
|
137
|
+
define_color :red, 0xFFFF0000
|
138
|
+
define_color :rosy_brown, 0xFFBC8F8F
|
139
|
+
define_color :royal_blue, 0xFF4169E1
|
140
|
+
define_color :saddle_brown, 0xFF8B4513
|
141
|
+
define_color :salmon, 0xFFFA8072
|
142
|
+
define_color :sandy_brown, 0xFFF4A460
|
143
|
+
define_color :sea_green, 0xFF2E8B57
|
144
|
+
define_color :sea_shell, 0xFFFFF5EE
|
145
|
+
define_color :sienna, 0xFFA0522D
|
146
|
+
define_color :silver, 0xFFC0C0C0
|
147
|
+
define_color :sky_blue, 0xFF87CEEB
|
148
|
+
define_color :slate_blue, 0xFF6A5ACD
|
149
|
+
define_color :slate_gray, 0xFF708090
|
150
|
+
define_color :snow, 0xFFFFFAFA
|
151
|
+
define_color :spring_green, 0xFF00FF7F
|
152
|
+
define_color :steel_blue, 0xFF4682B4
|
153
|
+
define_color :tan, 0xFFD2B48C
|
154
|
+
define_color :teal, 0xFF008080
|
155
|
+
define_color :thistle, 0xFFD8BFD8
|
156
|
+
define_color :tomato, 0xFFFF6347
|
157
|
+
define_color :transparent, 0x00FFFFFF
|
158
|
+
define_color :turquoise, 0xFF40E0D0
|
159
|
+
define_color :violet, 0xFFEE82EE
|
160
|
+
define_color :wheat, 0xFFF5DEB3
|
161
|
+
define_color :white, 0xFFFFFFFF
|
162
|
+
define_color :white_smoke, 0xFFF5F5F5
|
163
|
+
define_color :yellow, 0xFFFFFF00
|
164
|
+
define_color :yellow_green, 0xFF9ACD32
|
165
|
+
end
|
166
|
+
end
|
data/open_image.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('lib', __dir__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'open_image/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'open_image'
|
8
|
+
spec.version = OpenImage::VERSION
|
9
|
+
spec.authors = ['Eric Freed']
|
10
|
+
spec.email = ['efreed09@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = %q{Cross-platform and dependency-free image library with emphasis on performance and ease-of-use.}
|
13
|
+
spec.description = %q{Currently Under Construction}
|
14
|
+
spec.homepage = "https://github.com/ForeverZer0/open-image"
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
18
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
end
|
20
|
+
|
21
|
+
spec.bindir = 'exe'
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ['lib']
|
24
|
+
spec.extensions = ['ext/open_image/extconf.rb']
|
25
|
+
|
26
|
+
spec.required_ruby_version = '>= 2.0.0'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
+
spec.add_development_dependency 'rake-compiler', '~> 1.0'
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: open_image
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Eric Freed
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-15 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.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake-compiler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
description: Currently Under Construction
|
56
|
+
email:
|
57
|
+
- efreed09@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions:
|
60
|
+
- ext/open_image/extconf.rb
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- ".travis.yml"
|
65
|
+
- ".yardopts"
|
66
|
+
- CODE_OF_CONDUCT.md
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- TODO.md
|
72
|
+
- bin/console
|
73
|
+
- bin/setup
|
74
|
+
- ext/open_image/color.c
|
75
|
+
- ext/open_image/color.h
|
76
|
+
- ext/open_image/common.h
|
77
|
+
- ext/open_image/extconf.rb
|
78
|
+
- ext/open_image/image.c
|
79
|
+
- ext/open_image/image.h
|
80
|
+
- ext/open_image/open_image.c
|
81
|
+
- ext/open_image/open_image.h
|
82
|
+
- ext/open_image/point.c
|
83
|
+
- ext/open_image/point.h
|
84
|
+
- ext/open_image/rect.c
|
85
|
+
- ext/open_image/rect.h
|
86
|
+
- ext/open_image/size.c
|
87
|
+
- ext/open_image/size.h
|
88
|
+
- ext/open_image/stb_image.c
|
89
|
+
- ext/open_image/stb_image.h
|
90
|
+
- ext/open_image/stb_image_write.c
|
91
|
+
- ext/open_image/stb_image_write.h
|
92
|
+
- lib/open_image.rb
|
93
|
+
- lib/open_image/colors.rb
|
94
|
+
- lib/open_image/version.rb
|
95
|
+
- open_image.gemspec
|
96
|
+
homepage: https://github.com/ForeverZer0/open-image
|
97
|
+
licenses:
|
98
|
+
- MIT
|
99
|
+
metadata: {}
|
100
|
+
post_install_message:
|
101
|
+
rdoc_options: []
|
102
|
+
require_paths:
|
103
|
+
- lib
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 2.0.0
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
requirements: []
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 2.6.14.1
|
117
|
+
signing_key:
|
118
|
+
specification_version: 4
|
119
|
+
summary: Cross-platform and dependency-free image library with emphasis on performance
|
120
|
+
and ease-of-use.
|
121
|
+
test_files: []
|