开发者

Should I use png or jpg for my image and thumbnail?

开发者 https://www.devze.com 2023-03-18 08:33 出处:网络
I\'m taking images from the camera or the开发者_Python百科 camera roll and I\'m saving them to core data using an ImageToDataTransformer class. I need to use these saved images in two different places

I'm taking images from the camera or the开发者_Python百科 camera roll and I'm saving them to core data using an ImageToDataTransformer class. I need to use these saved images in two different places in my app: 250x250 imageview and 50x50 imageview.

First, should I use png format for both imageviews?

Second, can I compress the image before I save it to core data, and what's the best way?

Third, should I save two different images, one for the big image and another for the thumbnail in a different view?


  1. When Xcode builds your project, it automatically optimizes PNG files included in your project. So, I guess you should use PNG.
  2. I don't know about runtime.
  3. That would be a good idea if you have a table view and you want to show thumbnails. You wouldn't want to be loading the huge files, that would be excruciatingly slow.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号