https://github.com/abdus/java-image-resizer
On-the-Fly Image Resizer built using the Spring Framework
https://github.com/abdus/java-image-resizer
image-processing image-resizer java spring-boot
Last synced: about 2 months ago
JSON representation
On-the-Fly Image Resizer built using the Spring Framework
- Host: GitHub
- URL: https://github.com/abdus/java-image-resizer
- Owner: abdus
- Created: 2021-05-06T13:15:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-07T13:18:01.000Z (about 4 years ago)
- Last Synced: 2025-01-30T10:15:31.452Z (4 months ago)
- Topics: image-processing, image-resizer, java, spring-boot
- Language: Java
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Resizer
> A Spring web application for resizing images
## Usage
```
JAVA_HOME=/path/to/java/java-15-openjdk ./mvnw spring-boot:run
```## API Usage
to resize a Base64 encoded image, make a `POST` call to `/resize` with `base64`
and `scale` as body param.```
curl --request POST \
--url https://java-img-resize.herokuapp.com/resize \
--header 'content-type: application/json' \
--data '{
"scale": 0.1,
"base64": ".... base64 string here ....."
}'
```> the `scale` param determines whether to scale up or down the image dimensions.
> `scale<1` will reduce the size, and `scale>1` will increase the size.
> `scale` must be greater than 0.to resize an image available at a remote location:
```
curl --request POST \
--url https://java-img-resize.herokuapp.com/resize \
--header 'content-type: application/json' \
--data '{
"scale": 0.1,
"url": "image url here"
}'
```