# How to participate in image-processing challenges if the language does not support images?

Is participating in image-processing challenges allowed, if the language does not support images? If it is allowed, what shall the input format be?

Related question where this issue came up in the comments.

• It's not the first time this problem arises; I'm shocked to learn that there is no meta post about this. Jun 4 '16 at 16:16
• @LeakyNun That's not really the case. There's this which shows some support for allowing matrix input for image processing challenges. Jun 6 '16 at 8:39

All languages (which support input via an arbitrary stream of bytes) technically support images. An image file (PNG, JPG, GIF, etc.) can simply be processed without builtin image manipulation functions or image libraries.

However, clearly it is impractical to expect answers to rewrite an implementation of PNG for every challenge. A popular image format that I've used and seen used on PPCG is Netpbm, which is extremely easy to parse; images can be converted to and from .p*m with Imagemagick (convert) or a similar tool.

For challenge-writers: Unless the image format is integral to the challenge (such as Output a solid PNG from scratch), it is strongly recommended that you do not arbitrarily restrict image formats for input and output, so that all languages can reasonably participate.

• On the same token, do not abuse the format looseness to your advantage. For example, if converting the original image to something lossy, even if common (such as jpeg), would give some sort of advantage (not dealing with the reading/writing, but with the meat of the challenge), I'd consider that foul play. Jun 4 '16 at 19:15
• Another image format that is very easy to write to: BMP.
– user42643
Jun 5 '16 at 2:14
• In principle I agree. In practice, how does input in Brainfuck look like? Do we assume it just exists somewhere in memory? Jun 6 '16 at 15:38
• @mınxomaτ Unfortunately, that's proprietary. Jun 11 '16 at 19:11
• @ThomasWeller brainfuck has an input operator. Jun 13 '16 at 16:36
• I'd go further, and suggest that a good code-golf challenge where the image processing is important, but not the reading or writing, should either permit the use of necessary libraries for I/O or allow the image to be passed as a suitable array of pixels. Jun 15 '16 at 9:43