Skip to content

KJ-Chiu/go-image-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Image Converter

What for

Convert image to target type. ex: heic to jpg

Usage

Easy to use as micro service in a system

Building requirment

  • docker

Skills

  • docker
  • golang
  • imagemagick

Step by Step

The following is apply to local development or test

  1. Build the image
cd <path-of-repo>
docker build -t image-converter ./
  1. Start the image
docker run -p 80:80 -d -t image-converter
  1. Open Postman or other tools can send POST method with form-data

  2. Pass the params to endpoint /image

POST /image

form-data:
image: <the file you pick>
type: <the target type you want. ex: jpg>
  1. Done! Receive the image return from the container

If using Postman, the image will directly display in the response body

Wish list

  • Compress the image if too large
  • Response image's url by keeping the image in the container
  • Allow pdf to jpg

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published