Skip to content

Instantly share code, notes, and snippets.

@OmniZ3D
Forked from KelSolaar/linearRamp.py
Created December 13, 2013 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OmniZ3D/7941817 to your computer and use it in GitHub Desktop.
Save OmniZ3D/7941817 to your computer and use it in GitHub Desktop.
from PIL import Image
width, height = 256, 32
image = Image.new("RGB", (width, height))
pixels = image.load()
for i in range(image.size[0]):
for j in range(image.size[1]):
pixels[i,j] = (i, i, i)
image.save("Linear_Ramp.png", "PNG")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment