"Add one" to every color in an image
Mathematica, 78 bytes
Image@Apply[16#+#2&,Mod[IntegerDigits[#~ImageData~"Byte",16,2]+1,16]/255,{3}]&
Takes and returns an image object (to create an image object, just paste the image into Mathematica).
Result for the test case:
Taking input and returning output as a 3D array of integer channel values, this reduces to 51 bytes:
Apply[16#+#2&,Mod[IntegerDigits[#,16,2]+1,16],{3}]&
But those meta posts don't have an overwhelming amount of support yet, so I'm going with the 78-byte version for now.
Pyke, 17 13 bytes
.Fh16j%ijcjs 8{
Try it here!
.F - for i in deep_for(input):
h16% - (i+1)%16
+ - ^+V
i16+ - (i+16)
8{ - unset_bit(8, ^)
Takes input as a 3d integer array of pixels and outputs in the same format
Python, 226 bytes
Now, it's valid !
Use the Pillow library.
from PIL import Image
m=Image.open(input()).convert("RGB")
for y in range(m.size[1]):
for x in range(m.size[0]):
t=m.getpixel((x,y))
h=t[0]+(t[1]<<8)+(t[2]<<16)+1118481
m.putpixel((x,y),(h&255,h>>8&255,h>>16&255))
m.show()
Output:
Thanks to @TuukkaX for saving 9 bytes !
Thanks to @mbomb007 for saving 18 bytes !