Files
SnapOtter/apps/docs/th/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

5.0 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
ลบเมทาดาทา EXIF, GPS, ICC และ XMP ออกจากภาพเพื่อความเป็นส่วนตัวและลดขนาดไฟล์ 07f61cdb2c26 human 58afe13510ea

ลบข้อมูลเมตาของภาพ

ลบเมทาดาทา EXIF, GPS, โปรไฟล์สี ICC และ XMP ออกจากภาพ มีประโยชน์สำหรับความเป็นส่วนตัว (ลบพิกัด GPS, ข้อมูลกล้อง) และลดขนาดไฟล์

API Endpoints

Strip Metadata

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

ประมวลผลภาพและคืนค่าเวอร์ชันที่ล้างแล้วโดยลบเมทาดาทาที่เลือกออก

Inspect Metadata

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

คืนค่าเมทาดาทาที่แยกวิเคราะห์แล้วเป็น JSON โดยไม่แก้ไขภาพ มีประโยชน์สำหรับดูตัวอย่างว่ามีเมทาดาทาใดอยู่ก่อนที่จะลบ

Parameters (Strip)

Parameter Type Required Default Description
stripExif boolean No false ลบข้อมูล EXIF (การตั้งค่ากล้อง วันที่ ฯลฯ)
stripGps boolean No false ลบข้อมูล GPS/ตำแหน่งเท่านั้น
stripIcc boolean No false ลบโปรไฟล์สี ICC
stripXmp boolean No false ลบเมทาดาทา XMP (Adobe, IPTC)
stripAll boolean No true ลบเมทาดาทาทั้งหมดพร้อมกัน

เมื่อ stripAll เป็น true ค่านี้จะแทนที่แฟล็กแต่ละตัวและลบทุกอย่างออก

Example Request

ลบเมทาดาทาทั้งหมด:

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}'

ลบเฉพาะข้อมูล GPS (คงข้อมูลกล้องและโปรไฟล์สีไว้):

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}'

ตรวจสอบเมทาดาทาโดยไม่แก้ไข:

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

  • ภาพจะถูกเข้ารหัสใหม่ในรูปแบบเดิมหลังจากลบเมทาดาทา JPEG ใช้ mozjpeg ที่คุณภาพ 90, PNG ใช้ระดับการบีบอัด 9, WebP ใช้คุณภาพ 85
  • การลบโปรไฟล์ ICC อาจทำให้สีเปลี่ยนเล็กน้อยหากภาพถูกแท็กด้วยโปรไฟล์ที่ไม่ใช่ sRGB ใช้ stripIcc: false หากความแม่นยำของสีมีความสำคัญ
  • endpoint สำหรับตรวจสอบจะแยกวิเคราะห์พิกัด GPS เป็นค่าละติจูด/ลองจิจูดแบบทศนิยม (นำหน้าด้วยขีดล่าง) เพื่อความสะดวก
  • รูปแบบไฟล์นำเข้าที่รองรับ: JPEG, PNG, WebP, AVIF, TIFF, GIF