Thanks, so I saw the following possibly relevant info:
- JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
- The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
and the requests take either url (which presumably be easy but require you to host an image on a server somewhere) or application/octet-stream, so assuming it is so accomodating of arbitrary binary data, given some assumption of JPG or PNG, or GIF formats we could try the simplest R approach and see if it works...
my best guess.
library(jpeg)
# i saved the image at https://pbs.twimg.com/profile_images/905186381995147264/7zKAG5sY_400x400.jpg
# to the folder where this R script is
hadley_jpeg <- readJPEG("7zKAG5sY_400x400.jpg", native = FALSE) # could try TRUE if false didnt work ?
#show the image to screen
plot(1:2,1:2, type='n')
rasterImage(hadley_jpeg, 1, 1, 2, 2)
#image dimensions
dim(hadley_jpeg)
# 400 400 3
#
binary_rep <- as.raw(hadley_jpeg)
text_of_binary_rep <- paste0(as.character(binary_rep),collapse = "")