Skip to content

Instantly share code, notes, and snippets.

@mattsgarrison
mattsgarrison / ST7565_Image_Previewer.rb
Created February 9, 2011 22:00
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"