Samples for Giraffe
Opened this issue · 7 comments
Are there any samples for how to use your lib? I only see the short part in the readme which does not help me a lot.
Thank you!
The headers are pretty well commented. If you have a specific question that might be a better starting point for getting help.
@RSully sure I have
- does your lib compute a gif with 256 colors or full true colors?
- will the resulting gif be compressed with LZW encoding? I have seen such a folder in the code?
- how do I comvert a UIImage in a ANGifImageFrame?
Thank you for help.
for 3) see UIImagePixelSource
, which is mentioned briefly in the readme.
As for the other 2 questions, I'll leave those to @unixpickle
@confile here are some answers:
- The encoder only supports 256 colors per file and does not use true colors. This is because some decoders do not have good support for tiled images, and the resulting file is usually huge.
- I do not use actual LZW compression (mainly out of laziness). Since all GIFs require LZW encoded data, I cheat and generate data that is uncompressed but valid LZW. If you would like, you may implement LZW encoding and make a pull request.
- Have a look at the
UIImagePixelSource
class. The README shows how to add image frames, and the code in ExportViewController.m will show you how to generate an image frame from aUIImage
.
@unixpickle thank you for your answer. Is there another way to generate true color gifs on ios?
@unixpickle I read that the Angif lib supports 24-bit colors would it be easy to include this in your code?
I know very little about other GIF libraries, but I'm sure it's possible to port one of them to iOS.