{
  "$schema": "https://krymp.hasty.se/schemas/benchmarks.v1.json",
  "version": 1,
  "lastUpdated": "2026-05-28",
  "methodology": "https://krymp.hasty.se/metodik",
  "notes": "Alla körningar gjorda lokalt i webbläsaren via Krymps WebAssembly-encoders. Testfiler valda för att spegla typiska Krymp-användningsfall (mobilfoto, skannad PDF, mejlvideo). SSIM mätt mot original; högre = bättre.",
  "benchmarks": [
    {
      "id": "jpg-photo-quality-80",
      "tool": "/bild",
      "encoder": "MozJPEG (WASM)",
      "input": "iPhone 15 Pro HEIC, 4032x3024 (3.4 MB konverterad till JPG q=95: 4.1 MB)",
      "settings": {
        "quality": 80,
        "progressive": true
      },
      "outputSize": "812 KB",
      "reduction": "80.2%",
      "ssim": 0.974,
      "psnrDb": 38.2
    },
    {
      "id": "png-screenshot-oxipng-6",
      "tool": "/bild",
      "encoder": "OxiPNG level 6 (WASM)",
      "input": "macOS skärmdump 2880x1800 (1.9 MB)",
      "settings": {
        "level": 6,
        "stripMetadata": true
      },
      "outputSize": "1.41 MB",
      "reduction": "25.8%",
      "ssim": 1,
      "psnrDb": null,
      "lossless": true
    },
    {
      "id": "webp-vs-jpg-quality-80",
      "tool": "/konvertera/jpg-till-webp",
      "encoder": "libwebp q=80 (WASM)",
      "input": "Samma iPhone-foto som ovan",
      "settings": {
        "quality": 80
      },
      "outputSize": "612 KB",
      "reduction": "85.1% mot original, 24.6% mindre än JPG q=80",
      "ssim": 0.976,
      "psnrDb": 38.9
    },
    {
      "id": "avif-vs-jpg-quality-60",
      "tool": "/konvertera/jpg-till-avif",
      "encoder": "libavif q=60 (WASM)",
      "input": "Samma iPhone-foto",
      "settings": {
        "quality": 60
      },
      "outputSize": "318 KB",
      "reduction": "92.2% mot original, 60.8% mindre än JPG q=80",
      "ssim": 0.971,
      "psnrDb": 37.5
    },
    {
      "id": "pdf-scan-down-72dpi",
      "tool": "/pdf",
      "encoder": "pdf-lib + MozJPEG resample 72 DPI",
      "input": "Skannad faktura 8 sidor, A4 färg (14.2 MB)",
      "settings": {
        "imageDpi": 72,
        "jpegQuality": 70,
        "keepVectorText": true
      },
      "outputSize": "2.31 MB",
      "reduction": "83.7%",
      "notes": "Text förblir vektor och sökbar."
    },
    {
      "id": "video-mp4-720p-mail",
      "tool": "/video",
      "encoder": "ffmpeg.wasm libx264 crf 28 preset veryfast",
      "input": "iPhone 60s, 1080p HEVC (210 MB)",
      "settings": {
        "resolution": "720p",
        "crf": 28,
        "audioBitrate": "96k"
      },
      "outputSize": "18.4 MB",
      "reduction": "91.2%",
      "notes": "Under 20 MB ramp för Outlook-mejl och 25 MB för Gmail."
    },
    {
      "id": "heic-to-jpg-conversion",
      "tool": "/konvertera/heic-till-jpg",
      "encoder": "libheif decode + MozJPEG q=92 (WASM)",
      "input": "iPhone 15 HEIC 12 MP (2.8 MB)",
      "settings": {
        "quality": 92
      },
      "outputSize": "3.6 MB",
      "reduction": "-28.6% (HEIC är mer effektivt än JPG på samma kvalitet)",
      "ssim": 0.989,
      "notes": "Här är poängen kompatibilitet, inte storlek — Windows/Outlook stöder inte HEIC."
    },
    {
      "id": "bgremove-modnet-portrait",
      "tool": "/bakgrund",
      "encoder": "RMBG-1.4 ONNX via onnxruntime-web (WebGPU)",
      "input": "Porträtt 1024x1024 (430 KB)",
      "settings": {
        "model": "rmbg-1.4",
        "backend": "webgpu"
      },
      "outputSize": "612 KB PNG (med alfa)",
      "reduction": null,
      "notes": "Förstagångskörning ~2.5 s (modell-load), efter cache ~0.4 s på M2."
    }
  ]
}