Skip to content

Commit f988c95

Browse files
committed
first commit
1 parent 4dc6492 commit f988c95

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

README

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
"exif.c" is a simple implementation to access the Exif segment in a JPEG file.
2+
It easily enables you to get the value of the IFD tag field with such code:
3+
4+
TagNodeInfo *tag = getTagInfo(ifdArray, IFD_EXIF, TAG_DateTimeOriginal);
5+
printf("DateTimeOriginal = [%s]\n", tag->byteData);
6+
7+
-> DateTimeOriginal = [2013:09:01 09:49:00]
8+
9+
See "sample_main.c" and "exif.h" for details.
10+
11+
exif.c only uses standard C library functions. So, it will be usable in many environments.
12+
It has been tested in the following environments.
13+
14+
- Windows XP 32bit + 32bit Visual C++
15+
- Windows 7 64bit + 64bit Visual C++
16+
- Redhat Linux 32bit + 32bit gcc
17+
- Mac OS X 64bit + 64bit gcc
18+
19+
building with gcc:
20+
gcc -o exif sample_main.c exif.c
21+
22+
building with Microsoft Visual C++:
23+
cl.exe /o exif sample_main.c exif.c
24+
25+
The following output is the result of the sample program.
26+
---------------------------------------------------------------------------
27+
$ exif test.jpg
28+
29+
[test.jpg] createIfdTableArray: result=4
30+
31+
{0TH IFD}
32+
- Make: [Apple]
33+
- Model: [iPod touch]
34+
- Orientation: 1
35+
- XResolution: 72/1
36+
- YResolution: 72/1
37+
- ResolutionUnit: 2
38+
- Software: [6.1.4]
39+
- DateTime: [2013:09:01 09:49:00]
40+
- YCbCrPositioning: 1
41+
- ExifIFDPointer: 206
42+
- GPSInfoIFDPointer: 576
43+
44+
{EXIF IFD}
45+
- ExposureTime: 1/30
46+
- FNumber: 12/5
47+
- ExposureProgram: 2
48+
- PhotographicSensitivity: 400
49+
- ExifVersion: 0 2 2 1
50+
- DateTimeOriginal: [2013:09:01 09:49:00]
51+
- DateTimeDigitized: [2013:09:01 09:49:00]
52+
- ComponentsConfiguration: 0x01 0x02 0x03 0x00
53+
- ShutterSpeedValue: 4035/821
54+
- ApertureValue: 4845/1918
55+
- BrightnessValue: 2234/1113
56+
- MeteringMode: 5
57+
- Flash: 32
58+
- FocalLength: 77/20
59+
- FlashPixVersion: 0 1 0 0
60+
- ColorSpace: 1
61+
- PixelXDimension: 960
62+
- PixelYDimension: 720
63+
- SensingMethod: 2
64+
- ExposureMode: 0
65+
- WhiteBalance: 0
66+
- FocalLengthIn35mmFormat: 32
67+
- SceneCaptureType: 0
68+
69+
{GPS IFD}
70+
- GPSLatitudeRef: [S]
71+
- GPSLatitude: 69/1 17/100 0/1
72+
- GPSLongitudeRef: [E]
73+
- GPSLongitude: 39/1 35/100 0/1
74+
- GPSAltitudeRef: 0
75+
- GPSAltitude: 6151/470
76+
- GPSTimeStamp: 0/1 48/1 3921/100
77+
78+
{1ST IFD}
79+
- Compression: 6
80+
- XResolution: 72/1
81+
- YResolution: 72/1
82+
- ResolutionUnit: 2
83+
- JPEGInterchangeFormat: 840
84+
- JPEGInterchangeFormatLength: 8648
85+
86+
0th IFD : Model = [iPod touch]
87+
Exif IFD : DateTimeOriginal = [2013:09:01 09:49:00]
88+
GPS IFD : GPSLatitude = 69/1 17/100 0/1
89+
removeExifSegmentFromJPEGFile: result=1
90+
---------------------------------------------------------------------------
91+
92+
Copyright (C) 2013 KLab Inc.
93+

0 commit comments

Comments
 (0)