import sqlite3 conn=sqlite3.connect('facial.db') cursor = conn.cursor() #=========================Insert Photos ======================= # Convert digital data to binary format def convertToBinaryData(images): for images in Directory: with open(images, 'wb') as f: photo = f.read() name= "Pix"+1 cursor.execute("""INSERT INTO faces_file (name, photo) VALUES (?,?) """,(name,photo)
convertToBinaryData(images) conn.commit() cursor.close() conn.close()photos are in the below directory and I want to read the list into my data base
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.