shithub: imgtools

Download patch

ref: 75872eff709f3d02bac21f1943f7432be7654ebb
parent: bdb25a79c4b335a7977e661d359eade09ca505a3
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Jan 20 03:45:52 EST 2021

add "convert" tool

--- a/README.md
+++ b/README.md
@@ -2,6 +2,14 @@
 
 Some random image-related tools.
 
+## convert
+
+Converts a Plan 9 image from one format to another.  For example,
+`convert -c rgb16 <a.img >b.img` will convert `a.img` to RGB16 and
+save it as `b.img`.
+
+"Channels" (`-c` argument) are defined at `/sys/include/draw.h:133`.
+
 ## resample
 
 A faster drop-in replacement of `resample(1)` with some more features.
--- a/mkfile
+++ b/mkfile
@@ -2,7 +2,7 @@
 
 MAN=/sys/man/1
 CFLAGS=$CFLAGS -p
-TARG=resample
+TARG=resample convert
 BIN=/$objtype/bin
 HFILES=stb_image_resize.h
 UPDATE=$HFILES