1
CGImageRef를 팔레트 기반 PNG-8 파일로 저장하는 방법이 궁금합니다.CGImageRef를 PNG-8로 저장
CFURLRef url = (CFURLRef)[[NSURL alloc] initFileURLWithPath:path];
CGImageDestinationRef destination = CGImageDestinationCreateWithURL(url, kUTTypePNG, 1, NULL);
CGImageDestinationAddImage(destination, image, properties);
CGImageDestinationFinalize(destination);
지금 PNG-8이를 변환하는 상대 :
나는 PNG-24에 대한 다음과 같은 코드가 있습니다. libpng를 사용해야 할 경우, 어떻게 다시 작성 하시겠습니까?
현재 pngquant에서 파생 된 [libimagequant] (http://pngquant.org/lib)가 있으며 속도/품질 절충을 조정할 수있는'liq_set_speed()'옵션이 있습니다 (속도를 높이더라도 재고 GIF 작가가 달성하는 것보다 나은 품질을 얻을 수 있습니다.) – Kornel