| Conditions | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 1 |
| CRAP Score | 15.2377 |
| Changes | 0 | ||
| 1 | """heic_parse |
||
| 26 | 1 | def parse_heic(item: str) -> dict: |
|
| 27 | """parse_heic |
||
| 28 | --- |
||
| 29 | The parses heic files |
||
| 30 | """ |
||
| 31 | heif_file = pyheif.read_heif(item) |
||
| 32 | if not heif_file.metadata: |
||
| 33 | return {}
|
||
| 34 | for metadata in heif_file.metadata: |
||
| 35 | |||
| 36 | if metadata['type'] == 'Exif': |
||
| 37 | fstream = io.BytesIO(metadata['data'][6:]) |
||
| 38 | |||
| 39 | return exifread.process_file(fstream) |
||
| 40 | return {}
|
||
| 41 |