i have pet chickens, i make drawings, and i write software of questionable usefulness. that's pretty much the extent of my personality. ask me about array programming, decker, or anything, really.


Brisket
@Brisket asked:

Decker Question! I've been looking for a way to use color dithered images in Decker. I saw you answered this on the Itch community, and it involved using ImageMagick and the command prompt, but... it was a little difficult to understand and I couldn't get it to work! Is there an easier way, or maybe there's something simple I'm overlooking?

The main reason I discuss ImageMagick in this thread is because it offers a repeatable way of batch-converting images that works on any major OS. If you aren't a command-line person, that's fine- there are other ways of doing things!

Any tool that can prepare dithered images will work, so long as you configure it to use the same palette as Decker. DitherIt! is browser-based and pretty easy to use. Here's Decker's default palette in the format DitherIt uses:

[{"hex":"#FFFFFF"},{"hex":"#FFFF00"},{"hex":"#FF6500"},{"hex":"#DC0000"},{"hex":"#FF0097"},{"hex":"#360097"},{"hex":"#0000CA"},{"hex":"#0097FF"},{"hex":"#00A800"},{"hex":"#006500"},{"hex":"#653600"},{"hex":"#976536"},{"hex":"#B9B9B9"},{"hex":"#868686"},{"hex":"#454545"},{"hex":"#000000"}]

(I generated this in the Listener like so, for reference; this may be handy if you've customized Decker's palette:)

"%j" format list range each c in colors
 r.hex:"#%06H" format patterns[c]
end

Once you save a dithered image, you can follow the same sort of process described in the thread above to read it in and splat it on a card, again in the Listener:

card.image.paste[read["image" "color"]]

Is that any easier to follow?


You must log in to comment.

in reply to @internet-janitor's post: