Skip to content

Instantly share code, notes, and snippets.

@mattsgarrison
Created February 9, 2011 22:00
Show Gist options
  • Save mattsgarrison/819396 to your computer and use it in GitHub Desktop.
Save mattsgarrison/819396 to your computer and use it in GitHub Desktop.
Quick way to previewing what a given image will look like on the ST7565 LCD display.
require 'mini_magick'
image = MiniMagick::Image.open("big_color.jpg")
image.resize"128x64^" #resize but retain aspect ratio
image.depth 1
image.format 'bmp'
image.colorspace 'gray'
image.write "grayscale.bmp"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment