
Xojo VNS JPEG Metadata
A pure Xojo library for reading and writing JPEG EXIF metadata.
No plugins. No declares. No shell calls. Just Xojo code that works everywhere.
If you like this library and would like to help me maintain it, you can make a donation
Why VNS JPEG Metadata?
Working with JPEG metadata in Xojo has always meant relying on external tools, plugins, or platform-specific declares. VNS JPEG Metadata changes that.
This library is 100% pure Xojo code. Drop it into your project, and you can read, edit, and save EXIF metadata on macOS, Windows, and Linux with zero dependencies.
What It Does
- Read EXIF metadata from any JPEG file (159 tag types supported)
- Write and edit tags like Artist, Copyright, DateTime, Camera Model, and more
- GPS coordinates: read, write, and convert between DMS and decimal formats
- Non-destructive editing: image pixel data is preserved byte-for-byte
- MemoryBlock I/O for database blobs and network streams
- Both byte orders: Motorola (big-endian) and Intel (little-endian) TIFF headers
Simple API
Reading EXIF data takes just a few lines:
Var meta As New VNSJPEGMetadata
If meta.ReadFromFile(myPhoto) Then
Var camera As String = meta.GetTag("Model").StringValue
Var date As String = meta.GetTag("DateTimeOriginal").StringValue
Var iso As Integer = meta.GetTag("ISOSpeedRatings").IntegerValue
End If
Writing is just as easy:
meta.SetTag("Artist", "Jane Smith")
meta.SetTag("Copyright", "2026 Jane Smith")
meta.WriteToFile(outputFile)
GPS Coordinates Made Easy
Read GPS locations as human-readable values, or write new coordinates from decimal degrees or DMS notation:
// Write Paris coordinates: 48° 51' 24" N, 2° 21' 7" E
Var lat() As Variant
lat.Add(48 : 1)
lat.Add(51 : 1)
lat.Add(24000000 : 1000000)
gps.Value(kTagGPSLatitude) = lat
gps.Value(kTagGPSLatitudeRef) = "N"
Supported Metadata
| Category | Example Tags |
|---|---|
| Image Info | Make, Model, Orientation, Software, DateTime |
| Camera Settings | ExposureTime, FNumber, ISO, FocalLength, Flash |
| GPS Location | Latitude, Longitude, Altitude, TimeStamp, MapDatum |
| Author | Artist, Copyright, ImageDescription |
| Thumbnail | Embedded thumbnail image properties |
| Interoperability | InteroperabilityIndex, Version |
What’s Included
The library ships with everything you need:
- VNSJPEGMetadata – Main API class (ReadFromFile, WriteToFile, GetTag, SetTag)
- VNSJPEGSegmentParser – JPEG binary segment parser and assembler
- VNSEXIFParser – TIFF/IFD structure parser and serializer
- VNSEXIFTags – 159 EXIF tag constants with name lookups
- VNSMetadataListBox – Styled ListBox subclass for metadata display
- Demo application – Full working app with image preview, metadata browser, inline editing, and GPS entry dialog
- Test images – Sample JPEGs from Canon, Nikon, Sony, and a GPS-tagged photo
- Developer documentation – Architecture guide, 10 code examples, API reference
Demo Application
The included demo app shows the library in action:
- Open any JPEG and see its preview alongside all EXIF metadata
- Metadata is organized by section: Image, Camera, GPS, Interoperability, Thumbnail
- Edit any value directly in the list
- Set GPS coordinates with a dedicated dialog (DMS or decimal input)
- Save modified metadata to a new file
Requirements
- Xojo 2025r1 or later
- No external dependencies
- Works on macOS, Windows, and Linux
Open Source
VNS JPEG Metadata is released under the MIT License. Use it freely in your commercial or open-source projects.
Ported from piexif (Python, MIT License). The JPEG segment parser was written from scratch for Xojo.
Get It
The source code, documentation, and demo app are available on GitHub:
github.com/JYPochez/VNS-JPEG-Metadata
VNS JPEG Metadata is developed by VeryNiceSW.

