Files
SnapOtter/apps/docs/id/tools/image/strip-metadata.md
T
SnapOtterandGitHub f858c4cea0 feat: clearer, disambiguated tool names across all surfaces (#520)
Renames 18 ambiguous or hard-to-search tool names so image tools self-qualify like the other modalities ("Compress" becomes "Compress Image"), and cleans up a few awkward names. Propagated across search (constants.ts), display (en.ts + 20 locales), the OpenAPI base spec + 20 locale specs, and the docs tool-page headings in 21 languages. Removes the duplicate "Normalize Audio" summary shared by the video and audio endpoints. Tool ids and routes are unchanged, so no API paths or bookmarks break.
2026-07-15 21:55:51 +08:00

3.6 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
Menghapus metadata EXIF, GPS, ICC, dan XMP dari gambar untuk privasi dan ukuran file yang lebih kecil. 07f61cdb2c26 human 522e570f7a41

Hapus Metadata Gambar

Menghapus metadata EXIF, GPS, profil warna ICC, dan XMP dari gambar. Berguna untuk privasi (menghapus koordinat GPS, info kamera) dan mengurangi ukuran file.

API Endpoints

Strip Metadata

POST /api/v1/tools/image/strip-metadata

Memproses gambar dan mengembalikan versi bersih dengan metadata yang dipilih dihapus.

Inspect Metadata

POST /api/v1/tools/image/strip-metadata/inspect

Mengembalikan metadata yang telah diurai sebagai JSON tanpa memodifikasi gambar. Berguna untuk melihat pratinjau metadata apa saja yang ada sebelum dihapus.

Parameters (Strip)

Parameter Type Required Default Description
stripExif boolean No false Menghapus data EXIF (pengaturan kamera, tanggal, dll.)
stripGps boolean No false Menghapus data GPS/lokasi saja
stripIcc boolean No false Menghapus profil warna ICC
stripXmp boolean No false Menghapus metadata XMP (Adobe, IPTC)
stripAll boolean No true Menghapus semua metadata sekaligus

Ketika stripAll bernilai true, itu menggantikan flag individual dan menghapus segalanya.

Example Request

Menghapus semua metadata:

curl -X POST http://localhost:1349/api/v1/tools/image/strip-metadata \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@photo.jpg" \
  -F 'settings={"stripAll": true}'

Menghapus hanya data GPS (mempertahankan info kamera dan profil warna):

curl -X POST http://localhost:1349/api/v1/tools/image/strip-metadata \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@photo.jpg" \
  -F 'settings={"stripAll": false, "stripGps": true}'

Memeriksa metadata tanpa memodifikasi:

curl -X POST http://localhost:1349/api/v1/tools/image/strip-metadata/inspect \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@photo.jpg"

Example Response (Strip)

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/photo.jpg",
  "originalSize": 2450000,
  "processedSize": 2380000
}

Example Response (Inspect)

{
  "filename": "photo.jpg",
  "fileSize": 2450000,
  "exif": {
    "Make": "Canon",
    "Model": "EOS R5",
    "DateTimeOriginal": "2024:03:15 14:30:00",
    "ExposureTime": "1/250",
    "FNumber": 2.8,
    "ISO": 400
  },
  "gps": {
    "GPSLatitudeRef": "N",
    "GPSLatitude": [37, 46, 30],
    "_latitude": 37.775,
    "_longitude": -122.4183
  },
  "icc": {
    "Profile Size": "3144 bytes",
    "Color Space": "RGB",
    "Description": "sRGB IEC61966-2.1"
  },
  "xmp": {
    "CreatorTool": "Adobe Photoshop 25.0"
  }
}

Notes

  • Gambar dienkode ulang dalam format aslinya setelah dihapus. JPEG menggunakan mozjpeg pada kualitas 90, PNG menggunakan level kompresi 9, WebP menggunakan kualitas 85.
  • Menghapus profil ICC dapat menyebabkan pergeseran warna yang halus jika gambar ditandai dengan profil non-sRGB. Gunakan stripIcc: false jika akurasi warna penting.
  • Endpoint inspect mengurai koordinat GPS menjadi nilai lintang/bujur desimal (diawali dengan garis bawah) untuk kemudahan.
  • Format masukan yang didukung: JPEG, PNG, WebP, AVIF, TIFF, GIF.