Skip to content

heliumoss/akira

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akira header

Akira - The simple image processor

Akira is a simple image processor that takes a single HTTP POST request with two form data inputs - size and image - and returns an array of images in those sizes in Base64 format.

Installation

Installing Akira is simple! Simply clone the repository and run docker build then run.

git clone https://github.com/kttyoss/akira
cd akira
docker build --tag akira .
docker run -d -p 8000:8000 akira

You can also download Akira from the Docker Hub

docker pull embedbblz/akira
docker run -d -p 8000:8000 embedbblz/akira

Usage

To use Akira, send a POST request to the /resize endpoint with size and image and the optional quality form data inputs. The size accepts multiple parameters and is formatted with a ; in between each size.

curl -X POST -F 'size=64x64;128x128' -F 'image=@/path/to/image.jpg' http://localhost:8000/resize -F "quality=85"

Akira will return a JSON response that includes an array of images with their size and the image encoded as a base64 string.

{
	"images": [
		{
			"size": "64x64",
			"base64": "data:image/webp;base64,/9j/4QC8RXhpZgAASUkqAAgAAAAGABIBAwABAAAAAQAAABoBBQABAAAAVgAAABsBBQABAAAAXgAAACgBAwABAAAAAgAAABMCAwABAAAAAQAAAGmHBAABAAAAZgAAAAAAAABIAAAAAQAAAEgAAAABAAAABgAAkAcABAAAADAyMTABkQcABAAAAAECAwAAoAcABAAAADAxMDABoAMAAQAAAP//AAACoAQAAQAAAEAAAAADoAQAAQAAAEAAAAAAAAAA/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgAQABAAwEiAAIRAQMRAf/EABwAAAICAwEBAAAAAAAAAAAAAAUGBAcAAQMCCP/EADMQAAIBAgQEAwYFBQAAAAAAAAECAwQRAAUSIQYxQVETYXEUIiNCgZEyweHw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7DjsH0r1o2XzbxirFVJCig+hrL5g2QeavdwTgnNRIGKiIHLcmqmyDWqLG7k4qckaHPp81XUf/9k="
		}
	],
	"error": false
}

Contributing

Contributions to Akira are welcome! To contribute, fork this repository, make your changes, and submit a pull request.

License

Akira is licensed under the GNU General Public License v3.0. See LICENSE for more information.