Xcode generates png form pdf with different colors

前端 未结 3 1288
被撕碎了的回忆
被撕碎了的回忆 2021-02-10 08:53

We are following article to use pdf vector resources in iOS project: http://martiancraft.com/blog/2014/09/vector-images-xcode6/

However we faced problems. If we set colo

3条回答
  •  借酒劲吻你
    2021-02-10 09:11

    It is possible that Photoshop/Illustrator generates CMYK or other special colors in the PDF file and Xcode uses the PDF rendering engine that is implemented in iOS to convert the PDF files to PNG.
    Because the iOS has problems with displaying CMYK colors, your PNG image has distorted colors.

    The above is only an assumption because I have not seen a sample PDF file and the process used by Xcode to convert the PDF to PNG is not documented.

提交回复
热议问题