<commit_before>WebP-UIImage
============

<code>UIImage</code> category to work with <code>WebP</code> image files in iOS.

## Installation ##

Drag and drop the <code>Classes</code> folder and <code>WebP.framework</code> into your project.

## Usage ##

Getting started with <code>WebP-UIImage</code> is simple. 
Import framework <code>#import "UIImage+WebP.h"</code> and call following methods:

```objc
- (NSData *)dataWebPWithQuality:(float)quality;//quality = 0..100
+ (UIImage*)imageWithWebPAtPath:(NSString *)filePath;

+ (UIImage *)imageWithWebPData:(NSData *)imgData;
@property (nonatomic, readonly) NSData *dataWebPLossless;

- (BOOL)writeWebPToDocumentsWithFileName:(NSString *)filename quality:(float)quality;
- (BOOL)writeWebPLosslessToDocumentsWithFileName:(NSString *)filename;
```

## Thanks ##
The project is heavily based on [<code>nyteshade/iOSWebPWithAlphaExample</code>](https://github.com/nyteshade/iOSWebPWithAlphaExample)

## License ##
MIT

## Tests ##
No speed/size tests were done. You can make your own and commit it here.
<commit_msg>Readme updated<commit_after>WebP-UIImage
============

<code>UIImage</code> category to work with <code>WebP</code> image files in iOS.

## Installation ##

Drag and drop the <code>Classes</code> folder and <code>WebP.framework</code> into your project.

## Usage ##

Getting started with <code>WebP-UIImage</code> is simple. 
Import framework <code>#import "UIImage+WebP.h"</code> and call following methods:

```objc
- (NSData *)dataWebPWithQuality:(float)quality;//quality = 0..100
+ (UIImage*)imageWithWebPAtPath:(NSString *)filePath;

+ (UIImage *)imageWithWebPData:(NSData *)imgData;
@property (nonatomic, readonly) NSData *dataWebPLossless;

- (BOOL)writeWebPToDocumentsWithFileName:(NSString *)filename quality:(float)quality;
- (BOOL)writeWebPLosslessToDocumentsWithFileName:(NSString *)filename;
```

## Bonus ##
I made also an <code>NSValueTransformer</code> subclass called <code>ImageToWebPDataTransformer</code>.
You can use it in CoreData to store images with less sizes than jpeg.
I use 75 quality value as it is default Google value. 

## Thanks ##
The project is heavily based on [<code>nyteshade/iOSWebPWithAlphaExample</code>](https://github.com/nyteshade/iOSWebPWithAlphaExample)

## License ##
MIT

## Tests ##
No speed/size tests were done. You can make your own and commit it here.

{'fraction_non_alphanumeric': 0.14056563951034193, 'fraction_numerical': 0.004221190375685944, 'mean_word_length': 6.203647416413374, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5336246', 'n_tokens_mistral': 784, 'n_tokens_neox': 731, 'n_words': 199}