Error while loading pvr.ccz textures in iOS - ios

I'm using TexturePacker to create my sprite sheets for my iOS game. Everything is working fine with generated PNG textures (RGBA 4444), the textures are correctly loaded inside my code and correctly displayed on the iPad screen but as soon I remplace those textures by the PVRC format (pvr.ccz) with PVRTCI 4bpp RGBA pixel format, I get the following message for each of my textures from the console:
"SKTexture: Error loading image resource: "/var/containers/Bundle/Application/657D8692-594C-4180-AA8B-6CE35962C8D5/FurryLight Puzzles.app/Puzzle0.atlasc/Puzzle0.2.pvr.ccz"
The textures generated by TexturePacker are all POT and SQUARE format (2048x2048 max), the plist files are inside my directories .atlasc with the pvr.ccz files. In fact, I just replace the precedent .atlasc directories inside my tree shader inside Xcode with the PNG files by the new .atlasc directories with pvr.ccz files. All my code is in Swift 3.0
What am I missing, is there something to tune somewhere ? The pvr.ccz textures are correctly displayed by Xcode when I click on them inside the tree.

Here is the reply I got from the creators of TexturePacker:
"I am currently not sure if pvr works - you can try it. But pvr.ccz surely does not work.
pvr.ccz is a special format for cocos2d(x). It compresses the pvr files with zlib. This is not supported by SpriteKit.
Best
Andreas
"

Related

MIPS and MARS bitmap, loading images?

Is it possible to load images directly to be displayed on MARS bitmap displayer? It seems as if more complex file specifications like .jpeg and .png would be a no go but what about .BMP files? Is it as simple as loading the file into a buffer and displaying it how I would normally using base address for display?
After looking up the BMP spec I realize the spec is still pretty complicated so I guess the question is more along the lines of if I just grab the pixel array from the .BPM file how will it be affected without the other components?

use pdfs as source for textures in Xcode 6 spritekit level editor

In iOS apps we're now able to use pdfs and in the compilation step appropriate sized .pngs will generated (including #2x and #3x sized and named files). Is it possible to use the same format for generating the right correct sized textures for use in sprite kit?
The spritekit level editor does "see" the images in the files in the preview area at the bottom right of the editor but unlike standard .pngs which can be just dragged across to the level editor, the pdfs won't go.
In the end I found that it is not possible to use PDFs as the source for SpriteKit textures.

Xcode generates png form pdf with different colors

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 color in Photoshop/Illustrator to #039AF0 then exported pdf will generate png with #1185ec color.
If we use old png way then colors are fine (please ignore pixelized image, the most important is color):
What can be the cause?
When a new artboard is created in Illustrator it defaults to using Adobe RGB for the color space which doesn't work well with iOS. To make sure the colors remain as close to the original as possible, set the color space to sRGB by selecting "Web" for Profile and RGB for Color Mode under Advanced.
This works well for new artboards. I have an Illustrator file as a deliverable that was created in Adobe RGB. For such cases, I've resorted to copy pasting vector paths on a new artboard that's set to sRGB before saving as PDF for use in Xcode 6.
I got the same problem, and finally I found that set the deployment Target to 7.0 or above solves the problem.
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.

Xcode 6: pdf vector images with transparency

Xcode 6 now has support for pdf vector-based images in asset catalogs. Is it possible to create pdf vector-based images with transparency?
Yes, this is certainly possible, I tried adding a PDF as vector based image in a test project, and the backgroundcolor properly showed trough.
What are you having trouble with?

Texture Packer pvr.ccz files

Can Texture Packer's pvr.ccz files be used in a non cocos2d app? I'd like to use them with core animation. Is this possible?
Out of the box? No.
You can write your own .pvr.ccz texture loader respectively adapt the .pvr.ccz texture loading code from cocos2d. The key part really is just the compression format (ccz) which uses the zlib compression provided by the iOS/Mac SDK. After inflating the compressed file, you end up with a regular PVR texture that you can use in Core Animation.

Resources