https://github.com/jd557/context-aware-image-resize
Context aware image resizing in Scala
https://github.com/jd557/context-aware-image-resize
Last synced: about 1 month ago
JSON representation
Context aware image resizing in Scala
- Host: GitHub
- URL: https://github.com/jd557/context-aware-image-resize
- Owner: JD557
- Created: 2021-04-19T21:02:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-20T21:08:59.000Z (almost 2 years ago)
- Last Synced: 2025-04-01T18:09:23.162Z (about 1 month ago)
- Language: Scala
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Context Aware Image Resize
A toy implementation of the [Seam Carving algorithm](https://perso.crans.org/frenoy/matlab2012/seamcarving.pdf) in Scala, based on the blog post ["Content-aware image resizing in JavaScript"](https://trekhleb.dev/blog/2021/content-aware-image-resizing-in-javascript/)
Supports both downscaling and upscaling (up to 2x).
Supports PPM, BMP and QOI images.
Usage:
`java -jar resize.jar [-w width] [-h height] [-o output] `
or
`./resize [-w width] [-h height] [-o output] `
Where the width and height are a number between 0.0 and 2.0, representing how much to scale that size (e.g. `-w 0.5 -h 2.0` will resize a 640 x 480 image to 320 960).
If the output is unspecified, the resized image will show up in a window.