Why won't this code allow me to hide a pdf file "inside" of a png file using Ruby?
I'm trying to hide a file called "hello_world.pdf" inside of an image file "kitten.png". The code I'm using is: original_image_file = File.read("kitten.png") hidden_file = File.read("hello_world.pdf") output_file = "output.png" separator = "*----------[#{hidden_file}]----------*" output = [original_image_file, separator, hidden_file] File.open(output_file,'wb') do |f_out| output.each do |f| f_out.puts f end end I'm supposed to be able to click on output.png and see the original image (kitten.png), but then if I change the file extension to .pdf and click on output.pdf, it's supposed to show me
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.