خرید بک لینک

Vote count: 0

I'm loading images using NSImage class in my application like that.

 if let image = NSImage(contentsOfURL: openPanel.URL!) {
  ...
 }

It works fine with most of images. I then convert it to CGImage and use like I want. But with some images it simply glitches and I cant understand why. For example If I load image size 2133x2133, it appears like nothing and if I'm printing image.size I see very strange (511.92, 511.92).

What can cause that type of behaviour? All images are in PNG format. At the same time, I can load image with size (2048.0, 1536.0) and everything works just fine.

How one should even start debugging loading with NSImage?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 2 خرداد 1395 ساعت: 2:42

صفحه بندی