Created
November 17, 2018 15:02
-
-
Save Techbrunch/a90b37a8f3100bb16dcd39bef1194dbb to your computer and use it in GitHub Desktop.
Extact pixels from image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chunky_png' | |
i = ChunkyPNG::Image.from_file(ARGV[0]) | |
p = ChunkyPNG::Canvas.from_io(StringIO.new(i.to_blob)) | |
p.crop(452,1600,61,63).save('test.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment