File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
JPEG structure and Exif metadata parsing library.
2
2
3
- ## JPEG File Structure
4
-
5
- ![ JPEG Structure] ( docs/jpeg_format.png )
6
-
7
3
## Requirements
8
4
9
5
* Python >= 3.7
10
6
* No extra dependencies
7
+ ## JPEG File Structure
8
+
9
+
10
+ ![ JPEG Structure] ( docs/jpeg_format.png )
11
11
12
12
## Examples
13
13
14
- ### Read TAG value
14
+ ### Reading TAG value
15
15
16
16
``` python
17
17
from jparse import JpegMetaParser, TagPath
@@ -29,13 +29,13 @@ print(f'Image Width: {image_width}')
29
29
print (f ' DateTime: { date_time} ' )
30
30
```
31
31
32
- output :
32
+ Output :
33
33
```
34
34
Image Width: 4096
35
35
DateTime: 2021:03:29 21:27:04
36
36
```
37
37
38
- ### Enumerate IFD's fields
38
+ ### Enumerating IFD's fields
39
39
40
40
``` python
41
41
from jparse import JpegMetaParser
@@ -50,7 +50,7 @@ with open('image.jpg', 'rb') as f:
50
50
print (f ' TAG 0x { tag_id:04X } : { field.value} ' )
51
51
```
52
52
53
- output :
53
+ Output :
54
54
```
55
55
TAG 0x0100: 512
56
56
TAG 0x0101: 384
@@ -76,7 +76,7 @@ logging.basicConfig(format='[%(name)s][%(levelname)s]: %(message)s', level=loggi
76
76
with open (' image.jpg' , ' rb' ) as f:
77
77
parser = JpegMetaParser(f)
78
78
```
79
- output :
79
+ Output :
80
80
```
81
81
[jparse][DEBUG]: 0x00000000 -> SOI : 2 bytes
82
82
[jparse][DEBUG]: 0x00000002 -> APP1 : 30251 bytes
@@ -113,7 +113,7 @@ with open('image.jpg', 'rb') as f:
113
113
app1.load()
114
114
```
115
115
116
- output :
116
+ Output :
117
117
```
118
118
[jparse][DEBUG]: 0x00000000 -> SOI : 2 bytes
119
119
[jparse][DEBUG]: 0x00000002 -> APP1 : 30251 bytes
You can’t perform that action at this time.
0 commit comments