Documentation
Comprehensive guide to the metadata extraction capabilities of MetaX.
Overview
MetaX provides comprehensive metadata extraction for images, supporting a wide range of formats including JPEG, PNG, GIF, TIFF, BMP, and WebP. Our extraction engine is built with Python and uses libraries like PIL, ExifRead, and python-magic to deliver detailed analysis of your images.
The metadata extractor can retrieve over 100 different metadata fields, including standard EXIF data, camera settings, GPS information, and even detect potential hidden data in images.
Extraction Capabilities
The following table shows the categories of metadata that can be extracted:
Category | Description |
---|---|
Basic File Information | Filename, file size, creation/modification dates, file path, mime type, file signature |
Image Properties | Dimensions, format, color mode, resolution, bit depth, compression, color profile |
EXIF Data | Full EXIF metadata organized by categories |
Camera Information | Camera make/model, lens info, firmware version, serial numbers |
Camera Settings | Exposure, aperture, ISO, focal length, white balance, metering mode |
GPS Data | Coordinates, altitude, timestamp, Google Maps integration |
Author/Copyright | Artist, copyright info, image description |
File Checksums | MD5 and SHA-256 hashes for file integrity verification |
Hidden Data Detection | Detection of potential steganography, embedded files, and data after EOF |
Color Analysis | Histogram data, color distribution, palette information |
Scene Analysis | AI-powered scene type detection and classification |
Object Detection | Basic detection of objects within images based on visual characteristics |
Face Detection | Simple detection of human faces in images |
Basic File Information
Detailed information about the image file itself, independent of its content:
Field | Description |
---|---|
Filename | The name of the file |
File Size | Size in bytes with human-readable format |
File Dates | Creation, modification, and last access timestamps |
File Path | Absolute path to the file |
File Signature | Hexadecimal representation of the file's magic number |
MIME Type | Detected MIME type of the file |
File Format | Information about the file format and extension |
File Permissions | Unix-style permissions of the file |
File Owner | User and group IDs of the file owner |
Image Properties
Technical details about the image content:
Field | Description |
---|---|
Dimensions | Width, height, resolution, aspect ratio, megapixels |
Format | Image format (JPEG, PNG, etc.) and description |
Color Mode | Color mode with human-readable description |
Color Depth | Bits per pixel and total color depth |
Resolution | DPI (dots per inch) information |
Animation | Whether the image is animated (GIF) and frame count |
Compression | Type of compression used |
Color Profile | ICC profile information if available |
Transparency | Whether the image has transparency |
Histogram | Color distribution analysis |
EXIF Data
Our EXIF data extraction is comprehensive, pulling all available EXIF tags from images and organizing them into logical categories.
Key EXIF data fields include:
- Date/Time information (Original, Digitized, Modified)
- Orientation and resolution data
- Color space and bit depth information
- Compression type and format details
- Software used to create or edit the image
- Thumbnail data if available
Special EXIF Processing
MetaX performs additional processing on certain EXIF fields to make them more user-friendly:
- Exposure time formatted as fractions (e.g., "1/125 sec")
- F-number formatted in f-stop notation (e.g., "f/2.8")
- Orientation values with descriptive text (e.g., "Rotated 90°")
- GPS coordinates with Google Maps links
Camera Information
Detailed information about the camera used to take the photo:
Field | Description |
---|---|
Camera Make | Manufacturer of the camera |
Camera Model | Model name/number of the camera |
Lens Model | Lens information if available |
Firmware Version | Camera firmware version |
Camera Serial Number | Unique identifier for the camera body |
Lens Serial Number | Unique identifier for the lens |
Camera Owner | Owner information if stored in the image |
Camera Settings
Field | Description |
---|---|
Exposure Time | Shutter speed (e.g., "1/125 sec") |
F-Number | Aperture value (e.g., "f/2.8") |
ISO Speed | ISO sensitivity setting |
Focal Length | Lens focal length in mm |
White Balance | White balance setting (Auto, Manual, etc.) |
Flash | Flash status and mode |
Metering Mode | Light metering method used |
Exposure Mode | Shooting mode (Manual, Auto, etc.) |
Exposure Bias | Exposure compensation value |
Digital Zoom | Digital zoom ratio if used |
Scene Type | Scene mode if used |
GPS Data
Geographic location information extracted from the image:
Field | Description |
---|---|
GPS Latitude | Latitude coordinates in degrees |
GPS Longitude | Longitude coordinates in degrees |
GPS Altitude | Altitude above sea level |
GPS Timestamp | Time when GPS coordinates were recorded |
Maps URL | Direct link to Google Maps at the photo location |
GPS Processing Method | Method used to determine location |
GPS Speed | Speed of movement when photo was taken |
GPS Direction | Direction of movement |
GPS Map Datum | Reference system used for the coordinates |
Advanced Features
File Checksums
MetaX generates cryptographic hashes to verify file integrity:
- MD5 hash
- SHA-256 hash
Color Analysis
Advanced color analysis capabilities:
- RGB histogram analysis
- Color distribution statistics
- Palette extraction for indexed color images
- ICC color profile analysis
Embedded Text Extraction
MetaX can identify and extract embedded text data:
- Text strings found in binary data
- XMP metadata detection
- IPTC metadata detection
Thumbnail Handling
Advanced thumbnail extraction and generation:
- EXIF embedded thumbnail extraction
- Dynamic thumbnail generation with proper orientation
- Transparency handling
AI Analysis Features
MetaX now includes AI-powered analysis capabilities to extract deeper insights from your images:
Scene Classification
Our scene classification technology can identify the type of scene in an image based on visual characteristics:
- Landscape detection
- Portrait detection
- Night scene detection
- Sunset/sunrise identification
- Architecture detection
- Food image detection
- Beach/snow scene detection
- Forest/greenery detection
Results include confidence scores and scene attributes.
Object Detection
Basic object detection can identify common elements in images:
- Sky detection
- Vegetation detection
- Water detection
- Building detection
- Person detection
Results include confidence scores for detected objects.
Color Analysis
Comprehensive color analysis provides insights into the visual characteristics of the image:
- Average color calculation
- Color distribution analysis
- Brightness and saturation measurement
- Dominant color detection
- Color variance calculation
Texture Analysis
Texture analysis examines the patterns and surfaces in the image:
- Edge density calculation
- Texture classification (smooth, textured, highly detailed)
- Basic pattern recognition
Visualization Options
MetaX offers multiple visualization options to help you analyze and understand your images:
Normal View
Standard image display with basic information.
Binary View
Binary representation of image data for low-level analysis.
Hex View
Hexadecimal representation of image data.
ASCII View
ASCII representation of image data to identify text patterns.
Metadata View
Detailed view of all extracted metadata fields.
Pixel Data View
Visualization of pixel-level data sampling.
Histogram View
Color distribution histograms for image analysis.
Channels View
Separation of RGB color channels for detailed analysis.
Bit Planes View
Visualization of bit planes for steganography analysis.
Thumbnail View
View of embedded EXIF thumbnail if available.
Layers View
Analysis of potential image layers and composition.
Steganography View
Specialized view for hidden data detection and analysis.
API Access
MetaX offers an open API for programmatic access to the metadata extraction capabilities. Our API includes rate limiting to ensure fair usage for all users.
Available Endpoints
Metadata Extraction Endpoint
POST /api/extract
Rate Limit: 60 requests per hour, 5 per minute
API Status Endpoint
GET /api/status
Rate Limit: 100 requests per hour
Request Format
Extraction Request
Headers:
Content-Type: multipart/form-data
Body:
Multipart form data with a single file in the 'file' field.
Response Format
Successful Response
JSON object containing metadata for the uploaded file:
{
"filename": "example.jpg",
"metadata": {
"basic_info": {...},
"image_properties": {...},
"exif_data": {...},
"checksums": {...},
"hidden_data": {...},
"embedded_text": {...}
},
"request_info": {
"timestamp": "2023-08-15T14:22:36.421Z",
"ip": "198.51.100.42"
}
}
Status Response
JSON object containing API status information:
{
"status": "operational",
"version": "1.2.0",
"rate_limits": {
"extract_endpoint": "60 per hour; 5 per minute",
"status_endpoint": "100 per hour"
},
"request_info": {
"timestamp": "2023-08-15T14:23:15.782Z",
"ip": "198.51.100.42"
}
}
Error Responses
Rate Limit Exceeded (429)
{
"error": "Rate limit exceeded",
"description": "5 per 1 minute",
"retry_after": 58
}
Invalid Request (400)
{
"error": "No file provided"
}
Code Examples
Example Usage (JavaScript)
// Extract metadata from an image
const formData = new FormData();
const fileInput = document.getElementById('file-upload');
formData.append('file', fileInput.files[0]);
fetch('/api/extract', {
method: 'POST',
body: formData
})
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json();
})
.then(data => {
console.log('Metadata:', data);
})
.catch(error => {
console.error('Error:', error);
});
Example Usage (Python)
import requests
file_path = "path/to/image.jpg"
# Check API status
response = requests.get("https://metaex.vercel.app/api/status")
print(f"API Status: {response.json()}")
# Upload and extract metadata
with open(file_path, "rb") as image_file:
files = {"file": (image_file.name, image_file, "image/jpeg")}
response = requests.post(
"https://metaex.vercel.app/api/extract",
files=files
)
if response.status_code == 200:
metadata = response.json()
print(f"Metadata successfully extracted from {file_path}")
print(metadata)
else:
print(f"Error: {response.status_code}")
print(response.json())
Rate Limiting
The API enforces the following rate limits to ensure fair usage and system stability:
- Extract Endpoint: 60 requests per hour, with a maximum of 5 requests per minute
- Status Endpoint: 100 requests per hour
- Web Interface: 20 requests per minute (batch uploads count as 1 request)
If you need higher rate limits for your application, please contact us to discuss your requirements.
Important Notes
- Maximum file size: 10MB per image
- Supported formats: JPEG, PNG, GIF, TIFF, BMP, WebP
- All API access must be over HTTPS
- IP addresses are logged for security and rate limiting purposes
Batch Processing
For batch processing of multiple files, use the /extract
endpoint with the 'files[]' parameter via the web interface. This endpoint is limited to 20 requests per minute.