C# image whitespace

前端 未结 4 1792
面向向阳花
面向向阳花 2021-02-13 14:35

I have an image that is 240x320 (iphone camera image in portrait), and I need to programmatically (in C#) add white \"bars\" to the sides increasing the full image size to 320x3

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-13 15:28

    Basically create a new bitmap with the required dimension, clear it with the color you want and then draw the smaller bitmap so that it is centered vertically.

提交回复
热议问题