Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

Well, it's not a built-in feature (as far as I know) but it should be possible to create a script which imports an image and does other stuff with it at the same time. 

I don't have much direct advice on how, since I haven't done that kind of thing, but I do know that in the Array Interface section of the Decker manual there's an example of reading/using information from an imported image. Just in case that's useful to you.

I just checked that and saw that there is indeed a way, specifically using this code that was provided as an example:

bin:read["src.gif" "array"]

gif.magic      :"char",6  # "GIF89a" magic number.
gif.size       :"u16l",2  # (width,height) in pixels.
gif.gct.present:1         # flag: is there a global colortable?
gif.gct.res    :3         # color resolution (almost always 7; 8-bits per channel).
gif.gct.sorted :1         # flag: are the colors sorted by importance? (almost always zero).
gif.gct.size   :3         # number of entries in the global colortable.
gif.background :"u8"      # index of the background color.
gif.aspect     :"u8"      # pixel aspect ratio (almost always zero).

header: bin.struct[gif]
colors: bin.struct["u8",header.gct.present*3*2^header.gct.size+1]

I might be able to figure out a workaround to use it for my needs, but I’ve noticed that this method doesn’t work if you’re using Decker from within a web browser