ios - Why is ImagePlaygroundViewController sourceImage not working? - Stack Overflow

I'm trying to create a ImagePlaygroundViewController in my iOS application and it works great. How

I'm trying to create a ImagePlaygroundViewController in my iOS application and it works great. However when I try to pass in a sourceImage property it doesn't use that sourceImage as the base for the image it generates. Normally with ImagePlayground it shows the image around the image it generates, but it isn't doing that.

I'm trying to create a ImagePlaygroundViewController in my iOS application and it works great. However when I try to pass in a sourceImage property it doesn't use that sourceImage as the base for the image it generates. Normally with ImagePlayground it shows the image around the image it generates, but it isn't doing that.

Share Improve this question asked Nov 16, 2024 at 23:54 Charlie FishCharlie Fish 20.7k23 gold badges107 silver badges200 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

It took me hours of research to figure out what is going on here. There are a few requirements in order for ImagePlayground to use your sourceImage.

  • Image must be at least 384x384 pixels
  • Image must be no larger than 4096x4096 pixels
  • Image must be square

While Apple does mention the recommended sizes in the documentation they make it sound like it's a recommendation as opposed to a requirement. Additionally Apple doesn't mention anything about the image needing to be square.

For some reason when you manually add an image to an ImagePlayground it doesn't seem like any of these requirements apply. It seems to only apply when passing in images through that sourceImage property.

I tested this on iOS 18.2 (22C5131e) and Xcode 16.1 (16B40).


Edit: I just tested this some more. And it looks like images larger than 2048x2048 pixels also do not work. This was tested on the same versions as mentioned above.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745643247a4637817.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信