Click here to Skip to main content
15,898,987 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I would like to know are there any ways to convert jpeg to bytes and vice versa,because the ultimate aim is to receive images through C code and insert it into DB....
Posted

1 solution

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).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900