Skip to content

Fix GPS extraction for ImageMagick string format#80

Merged
ildyria merged 1 commit intoLycheeOrg:masterfrom
hyazinthh:master
Apr 23, 2026
Merged

Fix GPS extraction for ImageMagick string format#80
ildyria merged 1 commit intoLycheeOrg:masterfrom
hyazinthh:master

Conversation

@hyazinthh
Copy link
Copy Markdown

@hyazinthh hyazinthh commented Mar 28, 2026

Updates the GPS coordinate regex to account for variations in whitespace.

On my system ImageMagick does not output any whitespace after the commas, making extraction fail with current regex:

$ identify -format "%[EXIF:GPSLatitude]\n" tests/files/mongolia.jpeg 
46/1,53903520/1000000,0/1

I assume this is version dependent but I haven't investigated any further.

$ identify --version
Version: ImageMagick 6.9.12-98 Q16 x86_64 18038 https://legacy.imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5) 
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raw tiff webp wmf x xml zlib

Update the GPS coordinate regex to handle variations in whitespace.
Newer versions of ImageMagick appear to omit the space after commas.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.56%. Comparing base (94f2670) to head (fa2229c).
⚠️ Report is 11 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ildyria ildyria merged commit 7d8d3eb into LycheeOrg:master Apr 23, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants