I have a publication "MySQL" written by Paul DuBois that has the answer for your question, yes you can do it and it is by using blob fields, the code is found on page 269 - Working With Image Data. I haven't got it to work yet because I am fairly new to C++, but I think I am close, if you look at this publication with the code in it and you get it to work, let me know how.
thanx
bill