Go to file
a beb403c2d1
noot
2024-08-05 23:41:04 -05:00
_data noot 2024-08-05 23:27:48 -05:00
cmd noot 2024-08-05 22:43:54 -05:00
render_test noot 2024-08-05 22:45:02 -05:00
renderer あああああああああああああああああああああああああああ 2022-03-26 02:52:59 -04:00
utils あああああああああああああああああああああああああああ 2022-03-26 02:52:59 -04:00
.gitignore noot 2024-08-05 22:45:02 -05:00
Makefile あああああああああああああああああああああああああああ 2022-03-26 02:52:59 -04:00
animation.go Rename 2022-03-25 17:33:48 -05:00
const.go Rename 2022-03-25 17:33:48 -05:00
decode.go test 2023-01-05 01:08:48 -06:00
frame.go あああああああああああああああああああああああああああ 2022-03-26 02:52:59 -04:00
gawi.go support subimages and compressed 2022-12-19 03:09:29 -06:00
go.mod noot 2024-08-05 22:35:53 -05:00
go.sum noot 2024-08-05 22:35:53 -05:00
image.go support subimages and compressed 2022-12-19 03:09:29 -06:00
nori.go Rename 2022-03-25 17:33:48 -05:00
palette.go noot 2024-08-05 23:41:04 -05:00
plane.go Rename 2022-03-25 17:33:48 -05:00
reader.go support subimages and compressed 2022-12-19 03:09:29 -06:00
readme.md あああああああああああああああああああああああああああ 2022-03-26 02:52:59 -04:00
render.go support subimages and compressed 2022-12-19 03:09:29 -06:00
render_test.go あああああああああああああああああああああああああああ 2022-03-26 02:52:59 -04:00
server.Dockerfile cli 2022-03-25 17:19:32 -05:00

readme.md

nri file reader

about

common/nori provides structs and decoders for nori file

usage:

import (
  "log"
  "git.tuxpa.in/a/nori"
)

func main() {
  n, err := nori.FromFile(filename)
  if err != nil {
  	log.Panicln("decode: %s", err)
  }
  // uses apng encoder/decoder from https://gitlab.com/gfxlabs/gfximg
  animations, err := n.RenderAnimationsApng(n)
  if err != nil {
  	log.Panicln("render: %s", err)
  }
  // each animation has slice of frames
  // each frame contains an image.Image, if another format is needed
  // internally they are stored as &image.NRGBA64{}
  log.Println(animations[0].Frames[])
}

cory

cmd/cory is command line util for working with nori files

get a zip file of animations from a nori file

usage: ./cory -d -f=filename.nri -o=output.zip

optionally, use webserver

start: ./cory -serve

example with curl: curl -X POST --data-binary "@filename.nri" localhost:3333/animations --output output.zip

building cory

make cory

docker

oh yeah there's also a docker image for cory lol

make docker

and to run server

make server-run