# trekhleb/js-image-carver

🌅 Content-aware image resizer and object remover based on Seam Carving algorithm

Repository: https://github.com/trekhleb/js-image-carver
Canonical: https://ross.abutalabs.com/products/js-image-carver
Homepage: https://trekhleb.dev/js-image-carver/
Language: TypeScript
License: MIT
License Family: permissive
Topics: javascript, image-processing, seam-carving, resize-images, image-manipulation, algorithms, algorithm
Last push: 2025-11-23T04:27:39+00:00

## Health v2 (maintenance only)
Score: 56/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 53, release rhythm 35, longevity 100
- inputs: {"age_days": 1973, "days_push": 283, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1594, forks 149 (observed 2026-08-28T04:05:08.959938+00:00)

## What it is
A JavaScript/TypeScript implementation of the Seam Carving algorithm for content-aware image resizing and object removal. It ships as both a reusable library and a hosted web demo where users can resize images or erase objects by masking them.

## Use cases
- resize images without distorting objects
- remove unwanted objects from photos
- change image aspect ratio while preserving subject proportions
- learn how the seam carving algorithm works
- shrink image width while keeping the main subject intact

## When to choose
- you need content-aware resizing in a JavaScript or browser environment
- you want a simple, MIT-licensed seam carving implementation to study or embed
- you want an interactive demo for removing objects via a mask

## When to avoid
- you need high-performance batch processing of very large images (seam carving is computationally expensive)
- you need GPU-accelerated or production-scale image pipelines
- you only need simple scaling or cropping, which standard tools handle faster

## Facets
- artifact type: library
- maturity: active
- function: image-processing
- domain: image-processing
- platform: browser
- tags: seam-carving, content-aware-resizing, object-removal, typescript, demo-app, algorithms, web-server

## Member repositories
- trekhleb/js-image-carver (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:08.959938+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:54:13.658275+00:00, confidence not recorded.
  - readme: https://github.com/trekhleb/js-image-carver (fetched 2026-08-28T04:05:08.959938+00:00, sha 155f526da4cf)
  - homepage: https://trekhleb.dev/js-image-carver/ (fetched 2026-08-29T11:25:18.040798+00:00, sha a1971de1419e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
