C# ImageFormat to string

前端 未结 4 1642
灰色年华
灰色年华 2021-02-07 23:24

How can I obtain human readable string(i.e. image format itself) from System.Drawing.ImageFormat object?

I mean if I have ImageF

4条回答
  •  情歌与酒
    2021-02-07 23:54

    There are not so many Image formats. So you can use a switch in case you want to specify your descriptions yourself or just use the

    Imageformat.Specific.ToString()
    

    (specific is the name of the specific image format)

提交回复
热议问题