Fix small typos

This commit is contained in:
Wu Zhong 2019-02-18 14:54:59 +08:00 committed by DreamPiggy
parent c2a3e60955
commit 5076a1dd45
1 changed files with 2 additions and 2 deletions

View File

@ -342,8 +342,8 @@
WebPChunkIterator chunk_iter; WebPChunkIterator chunk_iter;
int result = WebPDemuxGetChunk(demuxer, "ICCP", 1, &chunk_iter); int result = WebPDemuxGetChunk(demuxer, "ICCP", 1, &chunk_iter);
if (result) { if (result) {
// See #2618, the `CGColorSpaceCreateWithICCProfile` does not copy ICC Profile data, it only retain the byte ptr. // See #2618, the `CGColorSpaceCreateWithICCProfile` does not copy ICC Profile data, it only retain `CFDataRef`.
// When the libwebp `WebPDemuxer` dealloc, all chunk will be freed. So we must copy the ICC data (really cheap, less than 10KB) // When the libwebp `WebPDemuxer` dealloc, all chunks will be freed. So we must copy the ICC data (really cheap, less than 10KB)
NSData *profileData = [NSData dataWithBytes:chunk_iter.chunk.bytes length:chunk_iter.chunk.size]; NSData *profileData = [NSData dataWithBytes:chunk_iter.chunk.bytes length:chunk_iter.chunk.size];
colorSpaceRef = CGColorSpaceCreateWithICCProfile((__bridge CFDataRef)profileData); colorSpaceRef = CGColorSpaceCreateWithICCProfile((__bridge CFDataRef)profileData);
WebPDemuxReleaseChunkIterator(&chunk_iter); WebPDemuxReleaseChunkIterator(&chunk_iter);