Image storage in WPF

This time, I mainly explain the storage and transmission of pictures. In the transmission of data tables, it is inevitable that pictures will be transmitted. If the format of the pictures is directly stored in the database, several pictures will not occupy much space, but if there are many pictures It will put a lot of load on the space. Not much nonsense. See the code below.

First, the picture usually has the functions of uploading and deleting. The following is the upload function. The first is to open the dialog box. Select the corresponding image format first.

Note that the upload here is the client, upload the picture, but if you save it, it will still go to the server.

The above is to query the picture according to the path, so the picture only saves the path to the database, but the storage size will be saved in the server. I know so much so far, so I'll add more later.

Guess you like

Origin blog.csdn.net/weixin_44591600/article/details/121519342