save pic data to database.