How to save BMP images and read to SQL Server

zhaozj2021-02-17  46

Insert save the modified image bmTemp: = TBitmap.Create; ms: = TMemoryStream.Create; try qryFace.Close; qryFace.SQL.Clear; qryFace.SQL.Add ( 'update video_face_image set face_image2 =: face_image2'); qryFace.SQL .Add ('where event_id =% d', [qryprepare.fieldbyname ('Event_ID'). Asinteger]); BMTEMP.LOADFROMFILE ('c: /face2.bmp'); BMTemp.saveTroupTream (MS); Qryface . Parameters.Parambyname ('face_image2'). LoadFromstream (MS, FTBLOB); Finally Ms.Free; BMTemp.Free;

How to display bmtemp: = tbitmap.create; ms: = tmemorystream.create; try_image1 '); ms.position: = 0; // The most important Little BMTEMP.LOADFROMSTREAM (MS); imgface1.picture.bitmap: = BmTemp; Finally Ms.Free; BMTemp.Free;

转载请注明原文地址:https://www.9cbs.com/read-29408.html

New Post(0)