Change Image size from 150*150 to 70*70 in using sql query?

前端 未结 2 1078
离开以前
离开以前 2021-01-23 03:17

I am storing image in SQL server 2008 R2 database in varBinary(max) column named: image1 which is of size 150*150. I have added another column named image2 varBinary(max) and i

2条回答
  •  遇见更好的自我
    2021-01-23 03:46

    As has been said in a few of the comments, SQL is a data storage system and is unable to edit your images.

    I suggest that you perform a one-time update on the table using your preferred language (c# etc) fetching each image and resizing it before updating it back into the table.

    Then from that point on ensure that any images inserted into the table are resized before they are inserted.

提交回复
热议问题