Skip to content

License

Notifications You must be signed in to change notification settings

Piernikkk/imagen

Repository files navigation

Imagen

Framework for building images from rects and circles.

This project contains framework itself, and demo api and web app

Framework description:

(core and img folder)

I built this framework as much from scratch as i could. I build shapes pixel by pixel in my own canvas implementation. I handle png building myself, exept for compression algorithm part (i use external create for that). I also used extenral create in text generation to decode font glyphs.

Functions:

  • drawing circles and rects
  • drawing these shapes rouned
  • drawing only outlines of shapes
  • filling outlines with different colors
  • drawing text

Technologies:

Built with rust and these libs:

  • ab_glyph - decoding fonts
  • crc32fast - png checksums
  • flate2 - compression algorithm

Simple code example demo:

(demo folder)

In this folder there is simple code that generates a few images to output folder. Nothing more nothing less.

Api + frontend:

(api and web folder)

Functions:

  • simple landing page with links to demo and github
  • live demo with image creating with blocks
  • downloading generated images
  • generating all whats possible using imagen framework

Openapi documentation:

You can view all the enpoints that this api has here

Technologies:

I built this project's frontend partialy with shadcn components

Host it yourself:

You can host it by yourself with docker!

If you want to use something different than traefik, you need to adjust compose file for your needs.

Dependencies:

Run:

docker-compose up -d

Development:

Dependencies:

Run:

web

cd web/
pnpm i
pnpm devev

api

cd api/
cargo runn

caddy - mixing api and web together on one port

caddy run

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published