PNG images render incorrectly in running iOS app

242 views Asked by At

I have two pencil sketch PNGs which I'm rendering within UIImageViews in an iOS app.

The images on the left render correctly—the strokes are thick. This is how they appear in Figma, on my computer, and in Xcode (storyboard).

The images on the right render incorrectly—the strokes are very thin. This is how they appear when the app actually runs (screenshots).

Why/how could these images be rendering differently in Xcode & Figma vs the actual app?

Example 2 Example 1

For reference, here are the original PNGs:

[Squiggly] [Two people]

2

There are 2 answers

0
Plato On BEST ANSWER

The problem has something to do with Xcode 15 beta and iOS 17 beta.

I ran the app on the iOS 16 simulator from Xcode 14 and it rendered correctly.

enter image description here

Xcode 15 beta, iOS 17 (left). Xcode 14, iOS 16 (right)

I created an issue on Apple Developer forums.

0
Mark Adler On

They both have an alpha channel. Their appearances are likely due to differences in the backgrounds that the PNG images are placed over.