Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2015 11:59
What would you like to do?
create image whose file size you can specify for test
# brew install imagemagick exiftool
system('convert -size 128x128 xc:blue test.jpg')
file_size = 1_048_576 - 448
ascii = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a'random.txt', 'w') do |file|
file.write( { ascii.sample }.join)
puts `exiftool test.jpg -comment\\<=random.txt`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment