NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

Image / NSImage – getting weird 'sub-pixel' like artifacts

Forums > SwiftUI

Hello - been trying to figure this one out the last day or so.

I have an image that I am displaying and even if the scale / frame size exactly matches the original I am getting a weird (almost sub-pixel like display - when at 1X or maginified to any above 2X, 5X, 16X). Interpolation is .none

I took the same image / JPEG and exported to both JPEG and PNG from Photoshop and had no issues with those versions.

I also tested some strict checkerboards of B&W and in color and had no similar issues.

Do I have a cursed JPEG of some sort?

Zoom in on these in Preview or Photoshop to see... Chrome blurs/interpolates on zoom in.

one with weird splits (original JPG - screenshot is PNG) Weird split of some singular pixels in left and right halfs

exported JPG from Photoshop (normal / solid pixels singletons - screenshot is PNG) Expected singular pixel display

general UI at the moment (is a remake of an old GUI I did for JPEGTRAN back in like 2005... trying to learn SwiftUI) Cursed UI

   

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until October 1st.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.