cul_image_props 0.1.0
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.
- data/lib/cul_image_props/image/magic.rb +22 -0
- data/lib/cul_image_props/image/properties/exif/constants.rb +1075 -0
- data/lib/cul_image_props/image/properties/exif/types.rb +542 -0
- data/lib/cul_image_props/image/properties/exif.rb +189 -0
- data/lib/cul_image_props/image/properties/types.rb +318 -0
- data/lib/cul_image_props/image/properties/version.rb +7 -0
- data/lib/cul_image_props/image/properties.rb +51 -0
- data/lib/cul_image_props/image.rb +5 -0
- data/lib/cul_image_props.rb +11 -0
- metadata +118 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
module Cul
|
2
|
+
module Image
|
3
|
+
module Magic
|
4
|
+
BMP = "\x42\x4D"
|
5
|
+
GIF = "\x47\x49\x46\x38"
|
6
|
+
JPEG = "\xFF\xD8"
|
7
|
+
JPEG_FRAME_MARKERS = ["\xFF\xC0","\xFF\xC1","\xFF\xC2","\xFF\xC5","\xFF\xC6","\xFF\xC9","\xFF\xCA","\xFF\xCD","\xFF\xCE"]
|
8
|
+
JPEG_SEGMENTS = {
|
9
|
+
"\xFF\xE0"=>"APP0",
|
10
|
+
"\xFF\xE1"=>"APP1",
|
11
|
+
"\xFF\xC1"=>"SOF1", # image data: extended sequential dct
|
12
|
+
"\xFF\xC2"=>"SOF2", # image data: progressive dct
|
13
|
+
"\xFF\xC4"=>"DHT", # image data: huffman table(s)
|
14
|
+
"\xFF\xDA"=>"SOS", # image data: start of scan
|
15
|
+
"\xFF\xDB"=>"DQT" # quantization tables
|
16
|
+
}
|
17
|
+
PNG = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a"
|
18
|
+
TIFF_MOTOROLA_BE = "\x4d\x4d\x00\x2a"
|
19
|
+
TIFF_INTEL_LE = "\x49\x49\x2a\x00"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|