~shabbyrobe/imgx

Collection of Go modules to supplement the stdlib image packages
d4b17fbd — Blake Williams 2 months ago
Fix incorrect type in EGA palette
e3abc9e5 — Blake Williams 2 months ago
Add dospalette, tweak README, add CI
401d24df — Blake Williams 11 months ago
imgconv: Image conversion functions

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~shabbyrobe/imgx
read/write
git@git.sr.ht:~shabbyrobe/imgx

You can also use your local clone with git send-email.

#imgx - Collection of Go modules to supplement the stdlib image packages

I've accumulated a lot of little tools for dealing with images since starting to play around with them in Go. Go's not the best language for this stuff performance-wise (it's actually a wee bit slow for some of the heavy lifting), but the ergonomics of the langauge seem to gel well with my overall set of preferences for writing code, so I persist with it in spite of the gaps, and have developed a number of helpers, tools and coping strategies (some of which are contained herein).

Each subfolder is its own Go module.

No guarantees whatsoever are made about the stability of any APIs contained in this repo. If you require stability, it is strongly recommended that you copy and paste the required modules into your project's internal folder (don't forget the attribution!). They should be small and discrete enough, with minimal interdependencies.

Individual modules are separately licensed, but if there is no LICENSE file contained therein, the code is licensed under the LICENSE at the top-level.

#Probably incomplete list of modules:

  • dospalette: Contains color.Palette instances for MS-DOS era colour palettes.
  • imgconv: Image conversion functions to help avoid the painfully slow standard library methods.
  • imggeom: Image geometry helpers.
  • rgba: Alternative image format to image.RGBA. I feel rgba produces more readable code with less array-index gymnastics. I use this as the basis for a lot of further processing, but perhaps I shouldn't've.
  • termpalette: Contains color.Palette instances for the 256-color terminal palette and the 16-color terminal palette using the widely used xterm formula.
  • testimg: Random image generation that I use a lot in testing.

#Expectation management

These are tools I hack on for my own amusement in an ad-hoc fashion. No stability guarantees are made, the code is not guaranteed to work, and anything may be changed, renamed or removed at any time as I see fit.

If you wish to use any of this, I strongly recommend you copy-paste pieces as-needed (including tests and license/attribution) into your own project, or fork it for your own purposes.

Bug reports are welcome, feature requests discouraged, and code contributions will not be accepted.