Usually you receive (you did not specify the way you receive them) images as bunchs of bytes. So no special tranformation on received data should be performed. On the other hand, in order to store binary data on the database then you have to use something called
BLOB
, see for instance
MySQL BLOB[
^] (here you may find sample C code
here[
^], check out the "
Inserting images into MySQL database" section).