Post

Replies

Boosts

Views

Activity

Reply to Incorrect image alpha rendering on Xcode 15b3 and iOS 17
as LimingWan said trans png to 8 bit is fine。 simple use python fix install PIL pip install pillow from PIL import Image def deal_png_at_location(root): for root, dirs, files in os.walk(root): for file in files: if file.endswith(".png"): img_path = os.path.join(root, file) img = Image.open(img_path) # whether this file is an 8-bit png, skip it if not if img.mode != "P": continue img = img.convert("RGBA") img.save(img_path) deal_png_at_location("./Assets.xcassets")
Mar ’24
Reply to Incorrect image alpha rendering on Xcode 15b3 and iOS 17
I found an ugly solution to this problem, just drag image from Assets.xcassets to project。 just use UIImage(named: "btn_trend_release") works well。 but app size may increase
Replies
Boosts
Views
Activity
Mar ’24
Reply to Incorrect image alpha rendering on Xcode 15b3 and iOS 17
as LimingWan said trans png to 8 bit is fine。 simple use python fix install PIL pip install pillow from PIL import Image def deal_png_at_location(root): for root, dirs, files in os.walk(root): for file in files: if file.endswith(".png"): img_path = os.path.join(root, file) img = Image.open(img_path) # whether this file is an 8-bit png, skip it if not if img.mode != "P": continue img = img.convert("RGBA") img.save(img_path) deal_png_at_location("./Assets.xcassets")
Replies
Boosts
Views
Activity
Mar ’24