How to read PNG image to NSImage

后端 未结 2 689
轻奢々
轻奢々 2021-02-15 16:06

how can i read PNG image to NSImage. I tried the following way,but when i get the width and size of the image i\'m getting some weird value.. if any one can direct me in right p

2条回答
  •  青春惊慌失措
    2021-02-15 16:42

    Use [NSImage imageNamed:tString]. tString should be the base file name of the image file; and need not contain a file extension.

提交回复
热议问题