├── .gitignore ├── .travis.yml ├── BuildConfiguration ├── TwitterImagePipeline.Debug.xcconfig ├── TwitterImagePipeline.Release.xcconfig ├── TwitterImagePipeline.Test.app.xcconfig ├── TwitterImagePipeline.Test.ios.xcconfig ├── TwitterImagePipeline.Test.swift.xcconfig ├── TwitterImagePipeline.Test.tvos.xcconfig ├── TwitterImagePipeline.Test.xcconfig ├── TwitterImagePipeline.framework.ios.xcconfig ├── TwitterImagePipeline.framework.tvos.xcconfig ├── TwitterImagePipeline.framework.xcconfig ├── TwitterImagePipeline.static-library.xcconfig ├── TwitterImagePipeline.webp.framework.xcconfig └── TwitterImagePipeline.xcconfig ├── CHANGELOG.md ├── COCOAPODS.md ├── Extended ├── TIPXMP4Codec.h ├── TIPXMP4Codec.m ├── TIPXUtils.h ├── TIPXUtils.m ├── TIPXWebPCodec.h ├── TIPXWebPCodec.m ├── WEBP_README.md ├── WebP.framework │ ├── Headers │ │ ├── decode.h │ │ ├── encode.h │ │ └── types.h │ └── WebP ├── WebPDemux.framework │ ├── Headers │ │ ├── decode.h │ │ ├── demux.h │ │ ├── mux_types.h │ │ └── types.h │ └── WebPDemux └── libwebp │ ├── AUTHORS │ ├── Android.mk │ ├── CMakeLists.txt │ ├── COPYING │ ├── ChangeLog │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── Makefile.vc │ ├── NEWS │ ├── PATENTS │ ├── README │ ├── README.mux │ ├── README.webp_js │ ├── aclocal.m4 │ ├── ar-lib │ ├── autogen.sh │ ├── build.gradle │ ├── cmake │ ├── WebPConfig.cmake.in │ ├── config.h.in │ ├── cpu.cmake │ └── deps.cmake │ ├── codereview.settings │ ├── compile │ ├── config.guess │ ├── config.log │ ├── config.status │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── doc │ ├── README │ ├── template.html │ ├── webp-container-spec.txt │ └── webp-lossless-bitstream-spec.txt │ ├── examples │ ├── .deps │ │ ├── anim_diff-anim_diff.Po │ │ ├── anim_diff-anim_util.Po │ │ ├── anim_diff-gifdec.Po │ │ ├── anim_dump-anim_dump.Po │ │ ├── anim_dump-anim_util.Po │ │ ├── anim_dump-gifdec.Po │ │ ├── cwebp-cwebp.Po │ │ ├── dwebp-dwebp.Po │ │ ├── example_util.Plo │ │ ├── gif2webp-gif2webp.Po │ │ ├── gif2webp-gifdec.Po │ │ ├── img2webp-img2webp.Po │ │ ├── vwebp-vwebp.Po │ │ ├── webpinfo-webpinfo.Po │ │ └── webpmux-webpmux.Po │ ├── Android.mk │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── anim_diff.c │ ├── anim_dump.c │ ├── anim_util.c │ ├── anim_util.h │ ├── cwebp.c │ ├── dwebp.c │ ├── example_util.c │ ├── example_util.h │ ├── gif2webp.c │ ├── gifdec.c │ ├── gifdec.h │ ├── img2webp.c │ ├── stopwatch.h │ ├── test.webp │ ├── test_ref.ppm │ ├── unicode.h │ ├── unicode_gif.h │ ├── vwebp.c │ ├── webpinfo.c │ └── webpmux.c │ ├── extras │ ├── .deps │ │ ├── get_disto-get_disto.Po │ │ ├── libwebpextras_la-extras.Plo │ │ ├── libwebpextras_la-quality_estimate.Plo │ │ ├── vwebp_sdl-vwebp_sdl.Po │ │ ├── vwebp_sdl-webp_to_sdl.Po │ │ └── webp_quality-webp_quality.Po │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── extras.c │ ├── extras.h │ ├── get_disto.c │ ├── quality_estimate.c │ ├── vwebp_sdl.c │ ├── webp_quality.c │ ├── webp_to_sdl.c │ └── webp_to_sdl.h │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── imageio │ ├── .deps │ │ ├── imageio_util.Plo │ │ ├── libimagedec_la-image_dec.Plo │ │ ├── libimagedec_la-jpegdec.Plo │ │ ├── libimagedec_la-metadata.Plo │ │ ├── libimagedec_la-pngdec.Plo │ │ ├── libimagedec_la-pnmdec.Plo │ │ ├── libimagedec_la-tiffdec.Plo │ │ ├── libimagedec_la-webpdec.Plo │ │ ├── libimagedec_la-wicdec.Plo │ │ └── libimageenc_la-image_enc.Plo │ ├── Android.mk │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── image_dec.c │ ├── image_dec.h │ ├── image_enc.c │ ├── image_enc.h │ ├── imageio_util.c │ ├── imageio_util.h │ ├── jpegdec.c │ ├── jpegdec.h │ ├── metadata.c │ ├── metadata.h │ ├── pngdec.c │ ├── pngdec.h │ ├── pnmdec.c │ ├── pnmdec.h │ ├── tiffdec.c │ ├── tiffdec.h │ ├── webpdec.c │ ├── webpdec.h │ ├── wicdec.c │ └── wicdec.h │ ├── install-sh │ ├── iosbuild.sh │ ├── libtool │ ├── ltmain.sh │ ├── m4 │ ├── ax_pthread.m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ └── lt~obsolete.m4 │ ├── makefile.unix │ ├── man │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── cwebp.1 │ ├── dwebp.1 │ ├── gif2webp.1 │ ├── img2webp.1 │ ├── vwebp.1 │ ├── webpinfo.1 │ └── webpmux.1 │ ├── missing │ ├── src │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── dec │ │ ├── .deps │ │ │ ├── libwebpdecode_la-alpha_dec.Plo │ │ │ ├── libwebpdecode_la-buffer_dec.Plo │ │ │ ├── libwebpdecode_la-frame_dec.Plo │ │ │ ├── libwebpdecode_la-idec_dec.Plo │ │ │ ├── libwebpdecode_la-io_dec.Plo │ │ │ ├── libwebpdecode_la-quant_dec.Plo │ │ │ ├── libwebpdecode_la-tree_dec.Plo │ │ │ ├── libwebpdecode_la-vp8_dec.Plo │ │ │ ├── libwebpdecode_la-vp8l_dec.Plo │ │ │ └── libwebpdecode_la-webp_dec.Plo │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── alpha_dec.c │ │ ├── alphai_dec.h │ │ ├── buffer_dec.c │ │ ├── common_dec.h │ │ ├── frame_dec.c │ │ ├── idec_dec.c │ │ ├── io_dec.c │ │ ├── quant_dec.c │ │ ├── tree_dec.c │ │ ├── vp8_dec.c │ │ ├── vp8_dec.h │ │ ├── vp8i_dec.h │ │ ├── vp8l_dec.c │ │ ├── vp8li_dec.h │ │ ├── webp_dec.c │ │ └── webpi_dec.h │ ├── demux │ │ ├── .deps │ │ │ ├── anim_decode.Plo │ │ │ └── demux.Plo │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── anim_decode.c │ │ ├── demux.c │ │ ├── libwebpdemux.pc │ │ ├── libwebpdemux.pc.in │ │ └── libwebpdemux.rc │ ├── dsp │ │ ├── .deps │ │ │ ├── libwebpdsp_la-alpha_processing.Plo │ │ │ ├── libwebpdsp_la-cost.Plo │ │ │ ├── libwebpdsp_la-cpu.Plo │ │ │ ├── libwebpdsp_la-dec.Plo │ │ │ ├── libwebpdsp_la-dec_clip_tables.Plo │ │ │ ├── libwebpdsp_la-enc.Plo │ │ │ ├── libwebpdsp_la-filters.Plo │ │ │ ├── libwebpdsp_la-lossless.Plo │ │ │ ├── libwebpdsp_la-lossless_enc.Plo │ │ │ ├── libwebpdsp_la-rescaler.Plo │ │ │ ├── libwebpdsp_la-ssim.Plo │ │ │ ├── libwebpdsp_la-upsampling.Plo │ │ │ ├── libwebpdsp_la-yuv.Plo │ │ │ ├── libwebpdsp_mips32_la-cost_mips32.Plo │ │ │ ├── libwebpdsp_mips32_la-enc_mips32.Plo │ │ │ ├── libwebpdsp_mips32_la-lossless_enc_mips32.Plo │ │ │ ├── libwebpdsp_mips_dsp_r2_la-cost_mips_dsp_r2.Plo │ │ │ ├── libwebpdsp_mips_dsp_r2_la-enc_mips_dsp_r2.Plo │ │ │ ├── libwebpdsp_mips_dsp_r2_la-lossless_enc_mips_dsp_r2.Plo │ │ │ ├── libwebpdsp_msa_la-enc_msa.Plo │ │ │ ├── libwebpdsp_msa_la-lossless_enc_msa.Plo │ │ │ ├── libwebpdsp_neon_la-cost_neon.Plo │ │ │ ├── libwebpdsp_neon_la-enc_neon.Plo │ │ │ ├── libwebpdsp_neon_la-lossless_enc_neon.Plo │ │ │ ├── libwebpdsp_sse2_la-cost_sse2.Plo │ │ │ ├── libwebpdsp_sse2_la-enc_sse2.Plo │ │ │ ├── libwebpdsp_sse2_la-lossless_enc_sse2.Plo │ │ │ ├── libwebpdsp_sse2_la-ssim_sse2.Plo │ │ │ ├── libwebpdsp_sse41_la-enc_sse41.Plo │ │ │ ├── libwebpdsp_sse41_la-lossless_enc_sse41.Plo │ │ │ ├── libwebpdspdecode_la-alpha_processing.Plo │ │ │ ├── libwebpdspdecode_la-cpu.Plo │ │ │ ├── libwebpdspdecode_la-dec.Plo │ │ │ ├── libwebpdspdecode_la-dec_clip_tables.Plo │ │ │ ├── libwebpdspdecode_la-filters.Plo │ │ │ ├── libwebpdspdecode_la-lossless.Plo │ │ │ ├── libwebpdspdecode_la-rescaler.Plo │ │ │ ├── libwebpdspdecode_la-upsampling.Plo │ │ │ ├── libwebpdspdecode_la-yuv.Plo │ │ │ ├── libwebpdspdecode_mips32_la-dec_mips32.Plo │ │ │ ├── libwebpdspdecode_mips32_la-rescaler_mips32.Plo │ │ │ ├── libwebpdspdecode_mips32_la-yuv_mips32.Plo │ │ │ ├── libwebpdspdecode_mips_dsp_r2_la-alpha_processing_mips_dsp_r2.Plo │ │ │ ├── libwebpdspdecode_mips_dsp_r2_la-dec_mips_dsp_r2.Plo │ │ │ ├── libwebpdspdecode_mips_dsp_r2_la-filters_mips_dsp_r2.Plo │ │ │ ├── libwebpdspdecode_mips_dsp_r2_la-lossless_mips_dsp_r2.Plo │ │ │ ├── libwebpdspdecode_mips_dsp_r2_la-rescaler_mips_dsp_r2.Plo │ │ │ ├── libwebpdspdecode_mips_dsp_r2_la-upsampling_mips_dsp_r2.Plo │ │ │ ├── libwebpdspdecode_mips_dsp_r2_la-yuv_mips_dsp_r2.Plo │ │ │ ├── libwebpdspdecode_msa_la-dec_msa.Plo │ │ │ ├── libwebpdspdecode_msa_la-filters_msa.Plo │ │ │ ├── libwebpdspdecode_msa_la-lossless_msa.Plo │ │ │ ├── libwebpdspdecode_msa_la-rescaler_msa.Plo │ │ │ ├── libwebpdspdecode_msa_la-upsampling_msa.Plo │ │ │ ├── libwebpdspdecode_neon_la-alpha_processing_neon.Plo │ │ │ ├── libwebpdspdecode_neon_la-dec_neon.Plo │ │ │ ├── libwebpdspdecode_neon_la-filters_neon.Plo │ │ │ ├── libwebpdspdecode_neon_la-lossless_neon.Plo │ │ │ ├── libwebpdspdecode_neon_la-rescaler_neon.Plo │ │ │ ├── libwebpdspdecode_neon_la-upsampling_neon.Plo │ │ │ ├── libwebpdspdecode_neon_la-yuv_neon.Plo │ │ │ ├── libwebpdspdecode_sse2_la-alpha_processing_sse2.Plo │ │ │ ├── libwebpdspdecode_sse2_la-dec_sse2.Plo │ │ │ ├── libwebpdspdecode_sse2_la-filters_sse2.Plo │ │ │ ├── libwebpdspdecode_sse2_la-lossless_sse2.Plo │ │ │ ├── libwebpdspdecode_sse2_la-rescaler_sse2.Plo │ │ │ ├── libwebpdspdecode_sse2_la-upsampling_sse2.Plo │ │ │ ├── libwebpdspdecode_sse2_la-yuv_sse2.Plo │ │ │ ├── libwebpdspdecode_sse41_la-alpha_processing_sse41.Plo │ │ │ ├── libwebpdspdecode_sse41_la-dec_sse41.Plo │ │ │ ├── libwebpdspdecode_sse41_la-upsampling_sse41.Plo │ │ │ └── libwebpdspdecode_sse41_la-yuv_sse41.Plo │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── alpha_processing.c │ │ ├── alpha_processing_mips_dsp_r2.c │ │ ├── alpha_processing_neon.c │ │ ├── alpha_processing_sse2.c │ │ ├── alpha_processing_sse41.c │ │ ├── common_sse2.h │ │ ├── common_sse41.h │ │ ├── cost.c │ │ ├── cost_mips32.c │ │ ├── cost_mips_dsp_r2.c │ │ ├── cost_neon.c │ │ ├── cost_sse2.c │ │ ├── cpu.c │ │ ├── dec.c │ │ ├── dec_clip_tables.c │ │ ├── dec_mips32.c │ │ ├── dec_mips_dsp_r2.c │ │ ├── dec_msa.c │ │ ├── dec_neon.c │ │ ├── dec_sse2.c │ │ ├── dec_sse41.c │ │ ├── dsp.h │ │ ├── enc.c │ │ ├── enc_mips32.c │ │ ├── enc_mips_dsp_r2.c │ │ ├── enc_msa.c │ │ ├── enc_neon.c │ │ ├── enc_sse2.c │ │ ├── enc_sse41.c │ │ ├── filters.c │ │ ├── filters_mips_dsp_r2.c │ │ ├── filters_msa.c │ │ ├── filters_neon.c │ │ ├── filters_sse2.c │ │ ├── lossless.c │ │ ├── lossless.h │ │ ├── lossless_common.h │ │ ├── lossless_enc.c │ │ ├── lossless_enc_mips32.c │ │ ├── lossless_enc_mips_dsp_r2.c │ │ ├── lossless_enc_msa.c │ │ ├── lossless_enc_neon.c │ │ ├── lossless_enc_sse2.c │ │ ├── lossless_enc_sse41.c │ │ ├── lossless_mips_dsp_r2.c │ │ ├── lossless_msa.c │ │ ├── lossless_neon.c │ │ ├── lossless_sse2.c │ │ ├── mips_macro.h │ │ ├── msa_macro.h │ │ ├── neon.h │ │ ├── quant.h │ │ ├── rescaler.c │ │ ├── rescaler_mips32.c │ │ ├── rescaler_mips_dsp_r2.c │ │ ├── rescaler_msa.c │ │ ├── rescaler_neon.c │ │ ├── rescaler_sse2.c │ │ ├── ssim.c │ │ ├── ssim_sse2.c │ │ ├── upsampling.c │ │ ├── upsampling_mips_dsp_r2.c │ │ ├── upsampling_msa.c │ │ ├── upsampling_neon.c │ │ ├── upsampling_sse2.c │ │ ├── upsampling_sse41.c │ │ ├── yuv.c │ │ ├── yuv.h │ │ ├── yuv_mips32.c │ │ ├── yuv_mips_dsp_r2.c │ │ ├── yuv_neon.c │ │ ├── yuv_sse2.c │ │ └── yuv_sse41.c │ ├── enc │ │ ├── .deps │ │ │ ├── libwebpencode_la-alpha_enc.Plo │ │ │ ├── libwebpencode_la-analysis_enc.Plo │ │ │ ├── libwebpencode_la-backward_references_cost_enc.Plo │ │ │ ├── libwebpencode_la-backward_references_enc.Plo │ │ │ ├── libwebpencode_la-config_enc.Plo │ │ │ ├── libwebpencode_la-cost_enc.Plo │ │ │ ├── libwebpencode_la-filter_enc.Plo │ │ │ ├── libwebpencode_la-frame_enc.Plo │ │ │ ├── libwebpencode_la-histogram_enc.Plo │ │ │ ├── libwebpencode_la-iterator_enc.Plo │ │ │ ├── libwebpencode_la-near_lossless_enc.Plo │ │ │ ├── libwebpencode_la-picture_csp_enc.Plo │ │ │ ├── libwebpencode_la-picture_enc.Plo │ │ │ ├── libwebpencode_la-picture_psnr_enc.Plo │ │ │ ├── libwebpencode_la-picture_rescale_enc.Plo │ │ │ ├── libwebpencode_la-picture_tools_enc.Plo │ │ │ ├── libwebpencode_la-predictor_enc.Plo │ │ │ ├── libwebpencode_la-quant_enc.Plo │ │ │ ├── libwebpencode_la-syntax_enc.Plo │ │ │ ├── libwebpencode_la-token_enc.Plo │ │ │ ├── libwebpencode_la-tree_enc.Plo │ │ │ ├── libwebpencode_la-vp8l_enc.Plo │ │ │ └── libwebpencode_la-webp_enc.Plo │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── alpha_enc.c │ │ ├── analysis_enc.c │ │ ├── backward_references_cost_enc.c │ │ ├── backward_references_enc.c │ │ ├── backward_references_enc.h │ │ ├── config_enc.c │ │ ├── cost_enc.c │ │ ├── cost_enc.h │ │ ├── filter_enc.c │ │ ├── frame_enc.c │ │ ├── histogram_enc.c │ │ ├── histogram_enc.h │ │ ├── iterator_enc.c │ │ ├── near_lossless_enc.c │ │ ├── picture_csp_enc.c │ │ ├── picture_enc.c │ │ ├── picture_psnr_enc.c │ │ ├── picture_rescale_enc.c │ │ ├── picture_tools_enc.c │ │ ├── predictor_enc.c │ │ ├── quant_enc.c │ │ ├── syntax_enc.c │ │ ├── token_enc.c │ │ ├── tree_enc.c │ │ ├── vp8i_enc.h │ │ ├── vp8l_enc.c │ │ ├── vp8li_enc.h │ │ └── webp_enc.c │ ├── libwebp.pc │ ├── libwebp.pc.in │ ├── libwebp.rc │ ├── libwebpdecoder.pc │ ├── libwebpdecoder.pc.in │ ├── libwebpdecoder.rc │ ├── mux │ │ ├── .deps │ │ │ ├── anim_encode.Plo │ │ │ ├── muxedit.Plo │ │ │ ├── muxinternal.Plo │ │ │ └── muxread.Plo │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── anim_encode.c │ │ ├── animi.h │ │ ├── libwebpmux.pc │ │ ├── libwebpmux.pc.in │ │ ├── libwebpmux.rc │ │ ├── muxedit.c │ │ ├── muxi.h │ │ ├── muxinternal.c │ │ └── muxread.c │ ├── utils │ │ ├── .deps │ │ │ ├── bit_reader_utils.Plo │ │ │ ├── bit_writer_utils.Plo │ │ │ ├── color_cache_utils.Plo │ │ │ ├── filters_utils.Plo │ │ │ ├── huffman_encode_utils.Plo │ │ │ ├── huffman_utils.Plo │ │ │ ├── quant_levels_dec_utils.Plo │ │ │ ├── quant_levels_utils.Plo │ │ │ ├── random_utils.Plo │ │ │ ├── rescaler_utils.Plo │ │ │ ├── thread_utils.Plo │ │ │ └── utils.Plo │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── bit_reader_inl_utils.h │ │ ├── bit_reader_utils.c │ │ ├── bit_reader_utils.h │ │ ├── bit_writer_utils.c │ │ ├── bit_writer_utils.h │ │ ├── color_cache_utils.c │ │ ├── color_cache_utils.h │ │ ├── endian_inl_utils.h │ │ ├── filters_utils.c │ │ ├── filters_utils.h │ │ ├── huffman_encode_utils.c │ │ ├── huffman_encode_utils.h │ │ ├── huffman_utils.c │ │ ├── huffman_utils.h │ │ ├── quant_levels_dec_utils.c │ │ ├── quant_levels_dec_utils.h │ │ ├── quant_levels_utils.c │ │ ├── quant_levels_utils.h │ │ ├── random_utils.c │ │ ├── random_utils.h │ │ ├── rescaler_utils.c │ │ ├── rescaler_utils.h │ │ ├── thread_utils.c │ │ ├── thread_utils.h │ │ ├── utils.c │ │ └── utils.h │ └── webp │ │ ├── config.h │ │ ├── config.h.in │ │ ├── decode.h │ │ ├── demux.h │ │ ├── encode.h │ │ ├── format_constants.h │ │ ├── mux.h │ │ ├── mux_types.h │ │ ├── stamp-h1 │ │ └── types.h │ ├── swig │ ├── README │ ├── libwebp.go │ ├── libwebp.jar │ ├── libwebp.py │ ├── libwebp.swig │ ├── libwebp_gc.c │ ├── libwebp_go_wrap.c │ ├── libwebp_java_wrap.c │ ├── libwebp_python_wrap.c │ └── setup.py │ └── webp_js │ ├── index.html │ ├── index_wasm.html │ ├── test_webp_js.webp │ └── test_webp_wasm.webp ├── GraphicsRendererSpeed ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── GraphicsRendererSpeed.entitlements ├── Info.plist ├── Supporting Files │ ├── carnival.png │ ├── carnival_less_color.png │ ├── carnival_less_color_alpha_pixels.png │ ├── carnival_less_color_transparent_pixels.png │ ├── iceland_P3.jpg │ ├── iceland_png8.png │ ├── iceland_sRGB.jpg │ ├── italy_P3.jpg │ ├── italy_sRGB.jpg │ ├── parrot_png8.png │ ├── parrot_srgb.jpg │ ├── parrot_wide.jpg │ ├── shoes_adobeRGB.jpg │ ├── shoes_sRGB.jpg │ ├── webkit_P3.png │ └── webkit_sRGB.png ├── ViewController.h ├── ViewController.m └── main.m ├── ImageSpeedComparison ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── ImageSpeedComparison.entitlements ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── ViewController.h ├── ViewController.m ├── fireworks_original.gif ├── fireworks_original.webp ├── interlace.png ├── main.m ├── no-interlace.png ├── starfield_animation.heic ├── tenor_test.webp ├── twitterfied.RLCP.jp2 ├── twitterfied.RPCL.jp2 ├── twitterfied.heic ├── twitterfied.jp2 ├── twitterfied.jpg ├── twitterfied.pjpg ├── twitterfied.png ├── twitterfied.small.pjpg ├── twitterfied.tiff └── twitterfied.webp ├── LICENSE ├── README.md ├── Resources └── module.modulemap ├── TIP Sample App ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── first.imageset │ │ ├── Contents.json │ │ └── first.pdf │ └── second.imageset │ │ ├── Contents.json │ │ └── second.pdf ├── Base.lproj │ └── LaunchScreen.storyboard ├── Info.plist ├── InspectorViewController.h ├── InspectorViewController.m ├── PipelineCacheInspectionResultsViewController.h ├── PipelineCacheInspectionResultsViewController.m ├── PipelineInspectorViewController.h ├── PipelineInspectorViewController.m ├── SettingsViewController.h ├── SettingsViewController.m ├── TIP Sample App.entitlements ├── TweetImageFetchRequest.h ├── TweetImageFetchRequest.m ├── TwitterAPI.h ├── TwitterAPI.m ├── TwitterSearchViewController.h ├── TwitterSearchViewController.m ├── ZoomingTweetImageViewController.h ├── ZoomingTweetImageViewController.m └── main.m ├── TIP Swift Sample App ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── first.imageset │ │ ├── Contents.json │ │ └── first.pdf │ └── second.imageset │ │ ├── Contents.json │ │ └── second.pdf ├── Base.lproj │ └── LaunchScreen.storyboard ├── Info.plist ├── Sample-Bridging-Header.h ├── TIP Swift Sample App.entitlements ├── TweetImageFetchRequest.swift ├── TwitterSearchViewController.swift └── ZoomingTweetImageViewController.swift ├── TIPTests └── Info.plist ├── TIPTestsResources.bundle ├── 1538x2048.jpg ├── 200w.mp4 ├── Info.plist ├── allAlpha.png ├── carnival.bmp ├── carnival.heic ├── carnival.jp2 ├── carnival.jpg ├── carnival.pjpg ├── carnival.png ├── carnival.tga ├── carnival.tiff ├── carnival_less_color.png ├── carnival_less_color_alpha_pixels.png ├── carnival_less_color_transparent_pixels.png ├── fireworks.gif ├── fireworks_original.gif ├── fireworks_original.heic ├── fireworks_original.webp ├── jpeg2k.jp2 ├── logo_only_final_reasonably_small.jpg ├── noAlpha.png ├── pink_outfit.jpg ├── sample.cr2 ├── sample.icns ├── sample.ico ├── sample.pict ├── sample.webp ├── single_frame.gif ├── someAlpha.png ├── tenor_test.webp ├── tenor_test2.webp ├── twitterfied.heic ├── twitterfied.jp2 ├── twitterfied.jpg ├── twitterfied.pjpg ├── twitterfied.png ├── twitterfied.tiff ├── twitterfied.webp └── weird_dpi_image.jpg ├── TwitterImagePipeline.podspec ├── TwitterImagePipeline.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── TIP GraphicsRendererSpeed.xcscheme │ ├── TIP ImageSpeedComparison.xcscheme │ ├── TIP Sample App.xcscheme │ ├── TIP Swift Sample App.xcscheme │ ├── TIPTests.xcscheme │ ├── TwitterImagePipeline.framework.tvOS.xcscheme │ ├── TwitterImagePipeline.framework.xcscheme │ └── libTwitterImagePipeline.a.xcscheme ├── TwitterImagePipeline ├── Info.plist ├── Project │ ├── NSData+TIPAdditions.h │ ├── NSData+TIPAdditions.m │ ├── NSDictionary+TIPAdditions.h │ ├── NSDictionary+TIPAdditions.m │ ├── TIPDefaultImageCodecs.h │ ├── TIPDefaultImageCodecs.m │ ├── TIPGlobalConfiguration+Project.h │ ├── TIPImageCache.h │ ├── TIPImageCacheEntry.h │ ├── TIPImageCacheEntry.m │ ├── TIPImageDiskCache.h │ ├── TIPImageDiskCache.m │ ├── TIPImageDiskCacheTemporaryFile.h │ ├── TIPImageDiskCacheTemporaryFile.m │ ├── TIPImageDownloadInternalContext.h │ ├── TIPImageDownloadInternalContext.m │ ├── TIPImageDownloader.h │ ├── TIPImageDownloader.m │ ├── TIPImageFetchDownloadInternal.h │ ├── TIPImageFetchMetrics+Project.h │ ├── TIPImageFetchOperation+Project.h │ ├── TIPImageMemoryCache.h │ ├── TIPImageMemoryCache.m │ ├── TIPImagePipeline+Project.h │ ├── TIPImagePipelineInspectionResult+Project.h │ ├── TIPImageRenderedCache.h │ ├── TIPImageRenderedCache.m │ ├── TIPImageStoreAndMoveOperations.h │ ├── TIPImageStoreAndMoveOperations.m │ ├── TIPInspectableCache.h │ ├── TIPLRUCache.h │ ├── TIPLRUCache.m │ ├── TIPPartialImage.h │ ├── TIPPartialImage.m │ ├── TIPTiming.h │ ├── TIPTiming.m │ ├── TIPURLStringCoding.h │ ├── TIPURLStringCoding.m │ ├── TIP_Project.h │ ├── TIP_Project.m │ ├── TIP_ProjectCommon.h │ └── TIP_ProjectCommon.m ├── TIPDefinitions.h ├── TIPError.h ├── TIPFileUtils.h ├── TIPFileUtils.m ├── TIPGlobalConfiguration.h ├── TIPGlobalConfiguration.m ├── TIPImageCodecCatalogue.h ├── TIPImageCodecCatalogue.m ├── TIPImageCodecs.h ├── TIPImageCodecs.m ├── TIPImageContainer.h ├── TIPImageContainer.m ├── TIPImageFetchDelegate.h ├── TIPImageFetchDownload.h ├── TIPImageFetchDownload.m ├── TIPImageFetchMetrics.h ├── TIPImageFetchMetrics.m ├── TIPImageFetchOperation.h ├── TIPImageFetchOperation.m ├── TIPImageFetchProgressiveLoadingPolicies.h ├── TIPImageFetchProgressiveLoadingPolicies.m ├── TIPImageFetchRequest.h ├── TIPImageFetchRequest.m ├── TIPImageFetchTransformer.h ├── TIPImageFetchable.h ├── TIPImageFetchable.m ├── TIPImagePipeline.h ├── TIPImagePipeline.m ├── TIPImagePipelineInspectionResult.h ├── TIPImagePipelineInspectionResult.m ├── TIPImageStoreRequest.h ├── TIPImageTypes.h ├── TIPImageTypes.m ├── TIPImageUtils.h ├── TIPImageUtils.m ├── TIPImageViewFetchHelper.h ├── TIPImageViewFetchHelper.m ├── TIPLogger.h ├── TIPProgressive.h ├── TIPSafeOperation.h ├── TIPSafeOperation.m ├── TwitterImagePipeline.h ├── UIImage+TIPAdditions.h ├── UIImage+TIPAdditions.m ├── UIView+TIPImageFetchable.h └── UIView+TIPImageFetchable.m ├── TwitterImagePipelineTests ├── Info.plist ├── TIPFileUtilsTest.m ├── TIPImageFetchDelegateTests.m ├── TIPImagePipelineFetchingTests.m ├── TIPImagePipelineTests.m ├── TIPImageTest.m ├── TIPImageViewTests.m ├── TIPProblematicImagesTest.m ├── TIPTestImageFetchDownloadInternalWithStubbing.h ├── TIPTestImageFetchDownloadInternalWithStubbing.m ├── TIPTestURLProtocol.h ├── TIPTestURLProtocol.m ├── TIPTests.h ├── TIPTests.m ├── TIPTestsSharedUtils.h ├── TIPTestsSharedUtils.m ├── TIPUtilitiesTests.m └── TwitterImagePipelineTests.m ├── build.sh ├── placeholder.jpg └── webp ├── Info.plist └── webp.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | TwitterImagePipeline.xcodeproj/project.xcworkspace/xcuserdata 21 | TwitterImagePipeline.xcodeproj/xcuserdata 22 | 23 | ## Other 24 | *.xccheckout 25 | *.moved-aside 26 | *.xcuserstate 27 | *.xcscmblueprint 28 | 29 | ## Obj-C/Swift specific 30 | *.hmap 31 | *.ipa 32 | 33 | # CocoaPods 34 | # 35 | # We recommend against adding the Pods directory to your .gitignore. However 36 | # you should judge for yourself, the pros and cons are mentioned at: 37 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 38 | # 39 | # Pods/ 40 | 41 | # Carthage 42 | # 43 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 44 | # Carthage/Checkouts 45 | 46 | Carthage/Build 47 | 48 | # fastlane 49 | # 50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 51 | # screenshots whenever they are needed. 52 | # For more information about the recommended setup visit: 53 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 54 | 55 | fastlane/report.xml 56 | fastlane/screenshots 57 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode11.5 3 | script: 4 | ./build.sh 5 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.Debug.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.xcconfig" 13 | 14 | // Architectures 15 | ONLY_ACTIVE_ARCH = YES 16 | 17 | // Build Options 18 | DEBUG_INFORMATION_FORMAT = dwarf 19 | ENABLE_TESTABILITY = YES 20 | VALIDATE_PRODUCT = NO 21 | 22 | // Apple LLVM 6.0 - Code Generation 23 | GCC_OPTIMIZATION_LEVEL = 0 24 | 25 | // Apple LLVM 6.0 - Preprocessing 26 | ENABLE_NS_ASSERTIONS = YES 27 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG=1 28 | 29 | // Swift Compiler - Code Generation 30 | SWIFT_OPTIMIZATION_LEVEL = -Onone 31 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.Release.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.xcconfig" 13 | 14 | // Build Options 15 | 16 | // FB7419630 - unless dwarf-with-dsym explicitly set, no dSYM will be generated for mac catalyst build 17 | DEBUG_INFORMATION_FORMAT[sdk=macosx*] = dwarf-with-dsym 18 | 19 | 20 | // Deployment 21 | COPY_PHASE_STRIP = YES 22 | 23 | GCC_OPTIMIZATION_LEVEL = fast 24 | 25 | // Swift Compiler - Code Generation 26 | SWIFT_COMPILATION_MODE = wholemodule 27 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.Test.app.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.Test.app.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.Test.xcconfig" 13 | 14 | // Apple Clang - Language 15 | GCC_C_LANGUAGE_STANDARD = gnu11 16 | 17 | // Apple Clang - Language - C++ 18 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14" 19 | 20 | // Apple Clang - Warnings - All Languages 21 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 22 | 23 | // Architectures 24 | ONLY_ACTVE_ARCH = YES 25 | 26 | // Asset Catalog Compiler - Options 27 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon 28 | 29 | // Deployment 30 | SKIP_INSTALL = NO 31 | COPY_PHASE_STRIP = NO 32 | 33 | // Linking 34 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks 35 | 36 | // Mac Catalyst - Deployment 37 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES 38 | SUPPORTS_MACCATALYST = YES 39 | 40 | // Packaging 41 | INFOPLIST_FILE = $(TARGET_NAME)/Info.plist 42 | PRODUCT_BUNDLE_IDENTIFIER = com.twitter.${PRODUCT_NAME:rfc1034identifier} 43 | PRODUCT_NAME = $(TARGET_NAME) 44 | 45 | // Search Paths 46 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Extended 47 | 48 | // Signing 49 | CODE_SIGN_ENTITLEMENTS = $(TARGET_NAME)/$(TARGET_NAME).entitlements 50 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.Test.ios.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.Test.ios.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.Test.xcconfig" 13 | 14 | // Architectures 15 | SDKROOT = iphoneos 16 | 17 | // Signing 18 | 19 | // This is the result of setting "Sign to run locally" in "Signing & Capabilities" for mac (catalyst) 20 | CODE_SIGN_IDENTITY[sdk=macosx*] = - 21 | 22 | // Search Paths 23 | 24 | // 1. we keep WebP.framework in our local "Extended" subfolder 25 | // 2. while there is an XCTest.framework at the appropriate location relative to SDKROOT 26 | // as referened in the projet, the compiler can't find it without the second setting 27 | // when building the TIPTests.framework intermediate frameworks 28 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Extended $(SDKROOT)/../../Library/Frameworks 29 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.Test.swift.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.Test.swift.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.Test.app.xcconfig" 13 | 14 | // Swift 15 | 16 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG 17 | SWIFT_OBJC_BRIDGING_HEADER = $(TARGET_NAME)/Sample-Bridging-Header.h; 18 | SWIFT_VERSION = 5.0; 19 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.Test.tvos.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.Test.tvos.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.Test.xcconfig" 13 | 14 | // Architectures 15 | SDKROOT = appletvos 16 | 17 | // Deployment 18 | TARGETED_DEVICE_FAMILY = 3 19 | 20 | // Packaging 21 | INFOPLIST_FILE = TIPTests/Info.plist 22 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.Test.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.Test.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | // Architectures 13 | ONLY_ACTIVE_ARCH = YES 14 | 15 | // Build Options 16 | DEBUG_INFORMATION_FORMAT = dwarf 17 | 18 | // Deployment 19 | COPY_PHASE_STRIP = NO 20 | SKIP_INSTALL = YES 21 | IPHONEOS_DEPLOYMENT_TARGET = 10.0 22 | TVOS_DEPLOYMENT_TARGET = 10.0 23 | MACOSX_DEPLOYMENT_TARGET = 10.15 24 | 25 | // Linking 26 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 27 | 28 | // 1. CoreServices is not available until iOS 12 29 | // 2. in Xcode11 going forward, including MobileCoreServices in the Build Phase 30 | // `Link Binary With Libraries` results in a warning. 31 | // 32 | // workaround: remove from that Build Phase and link using this -framework MobileCoreServices arg 33 | // TODO: when min deployment target >= 12.0: delete this & place CoreServices in 'Link Binary With Libraries` 34 | OTHER_LDFLAGS = $(inherited) -framework MobileCoreServices 35 | 36 | // Packaging 37 | INFOPLIST_FILE = $(TARGET_NAME)/Info.plist 38 | PRODUCT_BUNDLE_IDENTIFIER = com.twitter.${PRODUCT_NAME:rfc1034identifier} 39 | PRODUCT_NAME = $(TARGET_NAME) 40 | 41 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.framework.ios.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.framework.ios.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.framework.xcconfig" 13 | 14 | // Architectures 15 | SDKROOT = iphoneos 16 | 17 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.framework.tvos.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.framework.tvos.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | #include "TwitterImagePipeline.framework.xcconfig" 13 | 14 | // Architectures 15 | SDKROOT = appletvos 16 | 17 | // Deployment 18 | CODE_SIGN_IDENTITY = 19 | TARGETED_DEVICE_FAMILY = 3 20 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.framework.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | // Build Options 13 | APPLICATION_EXTENSION_API_ONLY = YES 14 | 15 | // Deployment 16 | SKIP_INSTALL = YES 17 | IPHONEOS_DEPLOYMENT_TARGET = 10.0 18 | TVOS_DEPLOYMENT_TARGET = 10.0 19 | 20 | // Apple Clang - Preprocessing 21 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) TIP_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION) 22 | 23 | // Linking 24 | DYLIB_COMPATIBILITY_VERSION = 1 25 | DYLIB_CURRENT_VERSION = $(CURRENT_PROJECT_VERSION) 26 | DYLIB_INSTALL_NAME_BASE = @rpath 27 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 28 | 29 | // 1. CoreServices is not available until iOS 12 30 | // 2. in Xcode11 going forward, including MobileCoreServices in the Build Phase 31 | // `Link Binary With Libraries` results in a warning. 32 | // 33 | // workaround: remove from that Build Phase and link using this -framework MobileCoreServices arg 34 | // TODO: when min deployment target >= 12.0: delete this & place CoreServices in 'Link Binary With Libraries` 35 | OTHER_LDFLAGS = $(inherited) -framework MobileCoreServices 36 | 37 | // Packaging 38 | DEFINES_MODULE = YES 39 | INFOPLIST_FILE = $(PROJECT_NAME)/Info.plist 40 | PRODUCT_BUNDLE_IDENTIFIER = com.twitter.${PROJECT_NAME:rfc1034identifier} 41 | PRODUCT_NAME = $(PROJECT_NAME) 42 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.static-library.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.framework.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | // Architectures 13 | SDKROOT = iphoneos 14 | 15 | // Build Options 16 | APPLICATION_EXTENSION_API_ONLY = YES 17 | 18 | // Deployment 19 | IPHONEOS_DEPLOYMENT_TARGET = 10.0 20 | TVOS_DEPLOYMENT_TARGET = 10.0 21 | SKIP_INSTALL = YES 22 | 23 | // Apple Clang - Preprocessing 24 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) TIP_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION) 25 | 26 | // Packaging 27 | PRODUCT_NAME = $(TARGET_NAME) 28 | PUBLIC_HEADERS_FOLDER_PATH = include/${PRODUCT_NAME} 29 | -------------------------------------------------------------------------------- /BuildConfiguration/TwitterImagePipeline.webp.framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.webp.framework.xcconfig 3 | // TwitterImagePipeline 4 | // 5 | // Created on 9/25/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | // webp.framework as a dynamic .framework built from source is being included 9 | // in TwitterImagePipeline in order to provide support when building for mac-catalyst . 10 | // the settings in this .xcconfig are purposesly confined to "sdk=macos*" wherever the 11 | // settings UI would allow us to do so in order to emphasize this is mac-catalyst only. 12 | 13 | // Configuration settings file format documentation can be found at: 14 | // https://help.apple.com/xcode/#/dev745c5c974 15 | 16 | 17 | // Build Options 18 | APPLICATION_EXTENSION_API_ONLY = YES 19 | 20 | // Deployment 21 | SKIP_INSTALL = YES 22 | MACOSX_DEPLOYMENT_TARGET = 10.15 23 | 24 | // Apple Clang - Preprocessing 25 | GCC_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = $(inherited) HAVE_CONFIG_H=1 26 | 27 | // Search Paths 28 | HEADER_SEARCH_PATHS[sdk=macosx*] = $(PROJECT_DIR)/Extended/libwebp 29 | 30 | // Linking 31 | DYLIB_INSTALL_NAME_BASE = @rpath 32 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 33 | 34 | // Packaging 35 | DEFINES_MODULE = YES 36 | INFOPLIST_FILE[sdk=macosx*] = $(TARGET_NAME)/Info.plist 37 | 38 | PRODUCT_BUNDLE_IDENTIFIER[sdk=macosx*] = com.twitter.${TARGET_NAME:rfc1034identifier} 39 | PRODUCT_MODULE_NAME = $(TARGET_NAME:c99extidentifier) 40 | PRODUCT_NAME = $(TARGET_NAME) 41 | 42 | // Versioning 43 | CURRENT_PROJECT_VERSION = 1.0.3 44 | 45 | -------------------------------------------------------------------------------- /COCOAPODS.md: -------------------------------------------------------------------------------- 1 | # CocoaPods 2 | 3 | ## Basic Integration 4 | 5 | To integrate TIP into your iOS project using CocoaPods, simply add the following to your **Podfile**: 6 | 7 | ```ruby 8 | target 'MyApp' do 9 | pod 'TwitterImagePipeline', '~> 2.25.0' 10 | end 11 | ``` 12 | 13 | Then run a `pod install` inside your terminal, or from CocoaPods.app. 14 | 15 | ## Extended Integration 16 | 17 | TIP also has support for two additional codecs that are not included with the default installation: 18 | 19 | - WebP (Backwards compatible to iOS 10) 20 | - MP4 21 | 22 | If you wish to include these codecs, modify your **Podfile** to define the appropriate subspecs like the examples below: 23 | 24 | ```ruby 25 | target 'MyApp' do 26 | pod 'TwitterImagePipeline', '~> 2.25.0', :subspecs => ['WebPCodec/Default'] 27 | 28 | pod 'TwitterImagePipeline', '~> 2.25.0', :subspecs => ['WebPCodec/Animated'] 29 | 30 | pod 'TwitterImagePipeline', '~> 2.25.0', :subspecs => ['MP4Codec'] 31 | 32 | pod 'TwitterImagePipeline', '~> 2.25.0', :subspecs => ['WebPCodec/Animated', 'MP4'] 33 | end 34 | ``` 35 | 36 | - **`WebP/Default`**: Includes the `TIPXWebPCodec` with the WebP framework for basic WebP support. 37 | - **`WebP/Animated`**: Adds additional support to the `TIPXWebPCodec` for demuxing WebP data allowing for animated images. 38 | - **`MP4Codec`**: Includes the `TIPXMP4Codec`. 39 | 40 | **Note:** You are still required to add these codecs to the `TIPImageCodecCatalogue` manually: 41 | 42 | ```objc 43 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 44 | { 45 | TIPImageCodecCatalogue *codecCatalogue = [TIPImageCodecCatalogue sharedInstance]; 46 | 47 | [codecCatalogue setCodec:[[TIPXWebPCodec alloc] initPreservingDefaultCodecsIfPresent:NO] 48 | forImageType:TIPImageTypeWEBP]; 49 | 50 | [codecCatalogue setCodec:[[TIPMP4Codec alloc] init] 51 | forImageType:TIPXImageTypeMP4]; 52 | 53 | // ... 54 | } 55 | ``` 56 | -------------------------------------------------------------------------------- /Extended/TIPXUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // TIPXUtils.m 3 | // TwitterImagePipeline 4 | // 5 | // Created on 7/6/20. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIPXUtils.h" 10 | 11 | -------------------------------------------------------------------------------- /Extended/TIPXWebPCodec.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPXWebPCodec.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 11/9/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | Convenience codec for WebP support. 16 | Requires WebP.framework from Google (WebPDemux.framework for animation decoding). 17 | This codec is not bundled with __TIP__ to avoid bloating the framework with WebP stuff, 18 | but there's nothing preventing a consumer from using this decoder. 19 | 20 | @note WebP support was added to iOS 14, so it is preferable to use that decoder as it supports animated WebP images. 21 | @note To support Animation decoding, must be compiled with `TIPX_WEBP_ANIMATION_DECODING_ENABLED=1` 22 | */ 23 | @interface TIPXWebPCodec : NSObject 24 | /** WebP decoder */ 25 | @property (nonatomic, readonly) id tip_decoder; 26 | /** WebP encoder */ 27 | @property (nonatomic, readonly) id tip_encoder; 28 | 29 | /** 30 | Initializer 31 | @param preferredCodec Pass the default system encoder and/or decoder if possible. If they are not provided (including if a nil `tip_decoder` or `tip_encoder` are found), use the `TIPXWebPCodec` implementations. 32 | @return a new `TIPXWebPCodec` instance 33 | */ 34 | - (instancetype)initWithPreferredCodec:(nullable id)preferredCodec NS_DESIGNATED_INITIALIZER; 35 | - (instancetype)init NS_UNAVAILABLE; 36 | 37 | /** Convenience check to see if animation decoding was compiled */ 38 | + (BOOL)hasAnimationDecoding; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | 44 | -------------------------------------------------------------------------------- /Extended/WEBP_README.md: -------------------------------------------------------------------------------- 1 | # WebP in TIP 2 | 3 | ## Chromium's WebM for Photos 4 | 5 | [Google's WebP Homepage](http://developers.google.com/speed/webp) 6 | 7 | ## Integrating with TIP 8 | 9 | __TIP__ uses _WebP_ by integrating in 2 separate ways. For iOS, __TIP__ will link against a static framework already compiled by the WebP maintainers which works against all iOS architectures. For Mac (a.k.a. Mac Catalyst), __TIP__ will build from source with the latest stable source from the _WebP_ repo (configured for macOS) to create a dynamic framework to embed in any Mac Catalyst targets. 10 | 11 | ## Why 2 separate ways? 12 | 13 | ### Mac (Catalyst) 14 | 15 | Mac is now all Intel 64-bit, and thus only has 1 target architecture, making for a fast build. Additionally, configuring WebP to build for Mac Catalyst (not just Mac) is a very big challenge, and it is simplest to just compile it with __TIP__ at this point. 16 | 17 | The framework produced is `webp.framework` which is necessary to match the expected file hierarchy when building _WebP_ from source because the core headers are in the folder `webp` (which other files look for) and those same headers are used for the framework headers, making it necessary for the module name to match that folder name. Changing the framework's module name to something else would required extensive modification to the source code, which we want to avoid. 18 | 19 | ### iOS 20 | 21 | For iOS, there are 5 different architectures, which can be a lot to build over and over again for code-integration systems, so a precompiled binary that changes infrequently is ideal. 22 | 23 | The precompiled framework comes as `WebP.framework` and so we will leave it as-is to avoid any unexpected problems from modifying a precompiled framework. 24 | 25 | ### In the end... 26 | 27 | Having the 2 different frameworks named different is not ideal and, ultimately, it would be best if a Mac Catalyst binary could be produced by WebP maintainers. But for now, we have full WebP support on iOS and macOS (via Catalyst) using 2 separate ways. 28 | -------------------------------------------------------------------------------- /Extended/WebP.framework/WebP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/WebP.framework/WebP -------------------------------------------------------------------------------- /Extended/WebPDemux.framework/WebPDemux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/WebPDemux.framework/WebPDemux -------------------------------------------------------------------------------- /Extended/libwebp/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010, Google Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | * Neither the name of Google nor the names of its contributors may 16 | be used to endorse or promote products derived from this software 17 | without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | -------------------------------------------------------------------------------- /Extended/libwebp/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | SUBDIRS = src imageio man 3 | EXTRA_DIST = COPYING autogen.sh 4 | 5 | if BUILD_EXTRAS 6 | SUBDIRS += extras 7 | endif 8 | 9 | SUBDIRS += examples 10 | -------------------------------------------------------------------------------- /Extended/libwebp/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | ------------------------------------ 3 | 4 | "These implementations" means the copyrightable works that implement the WebM 5 | codecs distributed by Google as part of the WebM Project. 6 | 7 | Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, 8 | royalty-free, irrevocable (except as stated in this section) patent license to 9 | make, have made, use, offer to sell, sell, import, transfer, and otherwise 10 | run, modify and propagate the contents of these implementations of WebM, where 11 | such license applies only to those patent claims, both currently owned by 12 | Google and acquired in the future, licensable by Google that are necessarily 13 | infringed by these implementations of WebM. This grant does not include claims 14 | that would be infringed only as a consequence of further modification of these 15 | implementations. If you or your agent or exclusive licensee institute or order 16 | or agree to the institution of patent litigation or any other patent 17 | enforcement activity against any entity (including a cross-claim or 18 | counterclaim in a lawsuit) alleging that any of these implementations of WebM 19 | or any code incorporated within any of these implementations of WebM 20 | constitute direct or contributory patent infringement, or inducement of 21 | patent infringement, then any patent rights granted to you under this License 22 | for these implementations of WebM shall terminate as of the date such 23 | litigation is filed. 24 | -------------------------------------------------------------------------------- /Extended/libwebp/autogen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | exec autoreconf -fi 3 | -------------------------------------------------------------------------------- /Extended/libwebp/cmake/WebPConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(WebP_VERSION @PROJECT_VERSION@) 2 | set(WEBP_VERSION ${WebP_VERSION}) 3 | 4 | @PACKAGE_INIT@ 5 | 6 | include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") 7 | 8 | set(WebP_INCLUDE_DIRS "webp") 9 | set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS}) 10 | set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@") 11 | set(WEBP_LIBRARIES "${WebP_LIBRARIES}") 12 | -------------------------------------------------------------------------------- /Extended/libwebp/codereview.settings: -------------------------------------------------------------------------------- 1 | # This file is used by git cl to get repository specific information. 2 | GERRIT_HOST: True 3 | CODE_REVIEW_SERVER: chromium-review.googlesource.com 4 | GERRIT_SQUASH_UPLOADS: False 5 | -------------------------------------------------------------------------------- /Extended/libwebp/doc/README: -------------------------------------------------------------------------------- 1 | 2 | Generate libwebp Container Spec Docs from Text Source 3 | ===================================================== 4 | 5 | HTML generation requires kramdown [1], easily installed as a 6 | rubygem [2]. Rubygems installation should satisfy dependencies 7 | automatically. 8 | 9 | [1]: http://kramdown.rubyforge.org/ 10 | [2]: http://rubygems.org/ 11 | 12 | HTML generation can then be done from the project root: 13 | 14 | $ kramdown doc/webp-container-spec.txt --template doc/template.html > \ 15 | doc/output/webp-container-spec.html 16 | 17 | kramdown can optionally syntax highlight code blocks, using CodeRay [3], 18 | a dependency of kramdown that rubygems will install automatically. The 19 | following will apply inline CSS styling; an external stylesheet is not 20 | needed. 21 | 22 | $ kramdown doc/webp-lossless-bitstream-spec.txt --template \ 23 | doc/template.html --coderay-css style --coderay-line-numbers ' ' \ 24 | --coderay-default-lang c > \ 25 | doc/output/webp-lossless-bitstream-spec.html 26 | 27 | Optimally, use kramdown 0.13.7 or newer if syntax highlighting desired. 28 | 29 | [3]: http://coderay.rubychan.de/ 30 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/anim_diff-anim_diff.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/anim_diff-anim_util.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/anim_diff-gifdec.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/anim_dump-anim_dump.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/anim_dump-anim_util.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/anim_dump-gifdec.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/cwebp-cwebp.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/dwebp-dwebp.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/example_util.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/gif2webp-gif2webp.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/gif2webp-gifdec.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/img2webp-img2webp.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/vwebp-vwebp.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/webpinfo-webpinfo.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/.deps/webpmux-webpmux.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/examples/test.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/libwebp/examples/test.webp -------------------------------------------------------------------------------- /Extended/libwebp/examples/test_ref.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/libwebp/examples/test_ref.ppm -------------------------------------------------------------------------------- /Extended/libwebp/extras/.deps/get_disto-get_disto.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/.deps/libwebpextras_la-extras.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/.deps/libwebpextras_la-quality_estimate.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/.deps/vwebp_sdl-vwebp_sdl.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/.deps/vwebp_sdl-webp_to_sdl.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/.deps/webp_quality-webp_quality.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir) 2 | AM_CPPFLAGS += -I$(top_builddir)/src -I$(top_srcdir)/src 3 | noinst_LTLIBRARIES = libwebpextras.la 4 | 5 | noinst_HEADERS = 6 | noinst_HEADERS += ../src/webp/types.h 7 | 8 | libwebpextras_la_SOURCES = 9 | libwebpextras_la_SOURCES += extras.c extras.h quality_estimate.c 10 | 11 | libwebpextras_la_CPPFLAGS = $(AM_CPPFLAGS) 12 | libwebpextras_la_LDFLAGS = -lm 13 | libwebpextras_la_LIBADD = ../src/libwebp.la 14 | 15 | noinst_PROGRAMS = 16 | noinst_PROGRAMS += webp_quality 17 | if BUILD_DEMUX 18 | noinst_PROGRAMS += get_disto 19 | endif 20 | if BUILD_VWEBP_SDL 21 | noinst_PROGRAMS += vwebp_sdl 22 | endif 23 | 24 | get_disto_SOURCES = get_disto.c 25 | get_disto_CPPFLAGS = $(AM_CPPFLAGS) 26 | get_disto_LDADD = 27 | get_disto_LDADD += ../imageio/libimageio_util.la 28 | get_disto_LDADD += ../imageio/libimagedec.la 29 | get_disto_LDADD += ../src/libwebp.la 30 | get_disto_LDADD += $(PNG_LIBS) $(JPEG_LIBS) $(TIFF_LIBS) 31 | 32 | webp_quality_SOURCES = webp_quality.c 33 | webp_quality_CPPFLAGS = $(AM_CPPFLAGS) 34 | webp_quality_LDADD = 35 | webp_quality_LDADD += ../imageio/libimageio_util.la 36 | webp_quality_LDADD += libwebpextras.la 37 | webp_quality_LDADD += ../src/libwebp.la 38 | 39 | vwebp_sdl_SOURCES = vwebp_sdl.c webp_to_sdl.c webp_to_sdl.h 40 | vwebp_sdl_CPPFLAGS = $(AM_CPPFLAGS) $(SDL_INCLUDES) 41 | vwebp_sdl_LDADD = 42 | vwebp_sdl_LDADD += ../imageio/libimageio_util.la 43 | vwebp_sdl_LDADD += ../src/libwebp.la 44 | vwebp_sdl_LDADD += $(SDL_LIBS) 45 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/webp_quality.c: -------------------------------------------------------------------------------- 1 | // Simple tool to roughly evaluate the quality encoding of a webp bitstream 2 | // 3 | // Result is a *rough* estimation of the quality. You should just consider 4 | // the bucket it's in (q > 80? > 50? > 20?) and not take it for face value. 5 | /* 6 | gcc -o webp_quality webp_quality.c -O3 -I../ -L. -L../imageio \ 7 | -limageio_util -lwebpextras -lwebp -lm -lpthread 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "extras/extras.h" 15 | #include "imageio/imageio_util.h" 16 | #include "../examples/unicode.h" 17 | 18 | int main(int argc, const char* argv[]) { 19 | int c; 20 | int quiet = 0; 21 | int ok = 1; 22 | 23 | INIT_WARGV(argc, argv); 24 | 25 | for (c = 1; ok && c < argc; ++c) { 26 | if (!strcmp(argv[c], "-quiet")) { 27 | quiet = 1; 28 | } else if (!strcmp(argv[c], "-help") || !strcmp(argv[c], "-h")) { 29 | printf("webp_quality [-h][-quiet] webp_files...\n"); 30 | FREE_WARGV_AND_RETURN(0); 31 | } else { 32 | const char* const filename = (const char*)GET_WARGV(argv, c); 33 | const uint8_t* data = NULL; 34 | size_t data_size = 0; 35 | int q; 36 | ok = ImgIoUtilReadFile(filename, &data, &data_size); 37 | if (!ok) break; 38 | q = VP8EstimateQuality(data, data_size); 39 | if (!quiet) WPRINTF("[%s] ", (const W_CHAR*)filename); 40 | if (q < 0) { 41 | fprintf(stderr, "Not a WebP file, or not a lossy WebP file.\n"); 42 | ok = 0; 43 | } else { 44 | if (!quiet) { 45 | printf("Estimated quality factor: %d\n", q); 46 | } else { 47 | printf("%d\n", q); // just print the number 48 | } 49 | } 50 | free((void*)data); 51 | } 52 | } 53 | FREE_WARGV_AND_RETURN(ok ? 0 : 1); 54 | } 55 | -------------------------------------------------------------------------------- /Extended/libwebp/extras/webp_to_sdl.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Simple WebP-to-SDL wrapper. Useful for emscripten. 11 | // 12 | // Author: James Zern (jzern@google.com) 13 | 14 | #ifndef WEBP_EXTRAS_WEBP_TO_SDL_H_ 15 | #define WEBP_EXTRAS_WEBP_TO_SDL_H_ 16 | 17 | // Exports the method WebpToSDL(const char* data, int data_size) which decodes 18 | // a WebP bitstream into an RGBA SDL surface. 19 | // Return false on failure. 20 | extern int WebpToSDL(const char* data, unsigned int data_size); 21 | 22 | #endif // WEBP_EXTRAS_WEBP_TO_SDL_H_ 23 | -------------------------------------------------------------------------------- /Extended/libwebp/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Versions for gradle 11 | BUILD_TOOLS_VERSION=23.0.3 12 | COMPILE_SDK_VERSION=23 13 | ANDROID_GRADLE_PLUGIN_VERSION=1.5.0 14 | GRADLE_DOWNLOAD_TASK_VERSION=2.1.0 15 | -------------------------------------------------------------------------------- /Extended/libwebp/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/libwebp/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Extended/libwebp/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu May 12 17:06:25 CEST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip 7 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/imageio_util.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-image_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-jpegdec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-metadata.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-pngdec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-pnmdec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-tiffdec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-webpdec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimagedec_la-wicdec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/.deps/libimageenc_la-image_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | ################################################################################ 4 | # libimageio_util 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_SRC_FILES := \ 9 | imageio_util.c \ 10 | 11 | LOCAL_CFLAGS := $(WEBP_CFLAGS) 12 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src 13 | 14 | LOCAL_MODULE := imageio_util 15 | 16 | include $(BUILD_STATIC_LIBRARY) 17 | 18 | ################################################################################ 19 | # libimagedec 20 | 21 | include $(CLEAR_VARS) 22 | 23 | LOCAL_SRC_FILES := \ 24 | image_dec.c \ 25 | jpegdec.c \ 26 | metadata.c \ 27 | pngdec.c \ 28 | pnmdec.c \ 29 | tiffdec.c \ 30 | webpdec.c \ 31 | 32 | LOCAL_CFLAGS := $(WEBP_CFLAGS) 33 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src 34 | LOCAL_STATIC_LIBRARIES := imageio_util 35 | 36 | LOCAL_MODULE := imagedec 37 | 38 | include $(BUILD_STATIC_LIBRARY) 39 | 40 | ################################################################################ 41 | # libimageenc 42 | 43 | include $(CLEAR_VARS) 44 | 45 | LOCAL_SRC_FILES := \ 46 | image_enc.c \ 47 | 48 | LOCAL_CFLAGS := $(WEBP_CFLAGS) 49 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src 50 | LOCAL_STATIC_LIBRARIES := imageio_util 51 | 52 | LOCAL_MODULE := imageenc 53 | 54 | include $(BUILD_STATIC_LIBRARY) 55 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += -I$(top_builddir)/src -I$(top_srcdir)/src 2 | noinst_LTLIBRARIES = 3 | noinst_LTLIBRARIES += libimageio_util.la 4 | if BUILD_DEMUX 5 | noinst_LTLIBRARIES += libimagedec.la 6 | endif 7 | noinst_LTLIBRARIES += libimageenc.la 8 | 9 | noinst_HEADERS = 10 | noinst_HEADERS += ../src/webp/decode.h 11 | noinst_HEADERS += ../src/webp/types.h 12 | 13 | libimageio_util_la_SOURCES = 14 | libimageio_util_la_SOURCES += imageio_util.c imageio_util.h 15 | 16 | libimagedec_la_SOURCES = 17 | libimagedec_la_SOURCES += image_dec.c image_dec.h 18 | libimagedec_la_SOURCES += jpegdec.c jpegdec.h 19 | libimagedec_la_SOURCES += metadata.c metadata.h 20 | libimagedec_la_SOURCES += pngdec.c pngdec.h 21 | libimagedec_la_SOURCES += pnmdec.c pnmdec.h 22 | libimagedec_la_SOURCES += tiffdec.c tiffdec.h 23 | libimagedec_la_SOURCES += webpdec.c webpdec.h 24 | libimagedec_la_SOURCES += wicdec.c wicdec.h 25 | libimagedec_la_CPPFLAGS = $(JPEG_INCLUDES) $(PNG_INCLUDES) $(TIFF_INCLUDES) 26 | libimagedec_la_CPPFLAGS += $(AM_CPPFLAGS) 27 | libimagedec_la_LIBADD = ../src/demux/libwebpdemux.la 28 | 29 | libimageenc_la_SOURCES = 30 | libimageenc_la_SOURCES += image_enc.c image_enc.h 31 | libimageenc_la_CPPFLAGS = $(JPEG_INCLUDES) $(PNG_INCLUDES) $(TIFF_INCLUDES) 32 | libimageenc_la_CPPFLAGS += $(AM_CPPFLAGS) 33 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/jpegdec.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // JPEG decode. 11 | 12 | #ifndef WEBP_IMAGEIO_JPEGDEC_H_ 13 | #define WEBP_IMAGEIO_JPEGDEC_H_ 14 | 15 | #include "webp/types.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | struct Metadata; 22 | struct WebPPicture; 23 | 24 | // Reads a JPEG from 'data', returning the decoded output in 'pic'. 25 | // The output is RGB or YUV depending on pic->use_argb value. 26 | // Returns true on success. 27 | // 'keep_alpha' has no effect, but is kept for coherence with other signatures 28 | // for image readers. 29 | int ReadJPEG(const uint8_t* const data, size_t data_size, 30 | struct WebPPicture* const pic, int keep_alpha, 31 | struct Metadata* const metadata); 32 | 33 | #ifdef __cplusplus 34 | } // extern "C" 35 | #endif 36 | 37 | #endif // WEBP_IMAGEIO_JPEGDEC_H_ 38 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/metadata.c: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Metadata types and functions. 11 | // 12 | 13 | #include "./metadata.h" 14 | 15 | #include 16 | #include 17 | 18 | #include "webp/types.h" 19 | 20 | void MetadataInit(Metadata* const metadata) { 21 | if (metadata == NULL) return; 22 | memset(metadata, 0, sizeof(*metadata)); 23 | } 24 | 25 | void MetadataPayloadDelete(MetadataPayload* const payload) { 26 | if (payload == NULL) return; 27 | free(payload->bytes); 28 | payload->bytes = NULL; 29 | payload->size = 0; 30 | } 31 | 32 | void MetadataFree(Metadata* const metadata) { 33 | if (metadata == NULL) return; 34 | MetadataPayloadDelete(&metadata->exif); 35 | MetadataPayloadDelete(&metadata->iccp); 36 | MetadataPayloadDelete(&metadata->xmp); 37 | } 38 | 39 | int MetadataCopy(const char* metadata, size_t metadata_len, 40 | MetadataPayload* const payload) { 41 | if (metadata == NULL || metadata_len == 0 || payload == NULL) return 0; 42 | payload->bytes = (uint8_t*)malloc(metadata_len); 43 | if (payload->bytes == NULL) return 0; 44 | payload->size = metadata_len; 45 | memcpy(payload->bytes, metadata, metadata_len); 46 | return 1; 47 | } 48 | 49 | // ----------------------------------------------------------------------------- 50 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/metadata.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Metadata types and functions. 11 | // 12 | 13 | #ifndef WEBP_IMAGEIO_METADATA_H_ 14 | #define WEBP_IMAGEIO_METADATA_H_ 15 | 16 | #include "webp/types.h" 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | typedef struct MetadataPayload { 23 | uint8_t* bytes; 24 | size_t size; 25 | } MetadataPayload; 26 | 27 | typedef struct Metadata { 28 | MetadataPayload exif; 29 | MetadataPayload iccp; 30 | MetadataPayload xmp; 31 | } Metadata; 32 | 33 | #define METADATA_OFFSET(x) offsetof(Metadata, x) 34 | 35 | void MetadataInit(Metadata* const metadata); 36 | void MetadataPayloadDelete(MetadataPayload* const payload); 37 | void MetadataFree(Metadata* const metadata); 38 | 39 | // Stores 'metadata' to 'payload->bytes', returns false on allocation error. 40 | int MetadataCopy(const char* metadata, size_t metadata_len, 41 | MetadataPayload* const payload); 42 | 43 | #ifdef __cplusplus 44 | } // extern "C" 45 | #endif 46 | 47 | #endif // WEBP_IMAGEIO_METADATA_H_ 48 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/pngdec.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // PNG decode. 11 | 12 | #ifndef WEBP_IMAGEIO_PNGDEC_H_ 13 | #define WEBP_IMAGEIO_PNGDEC_H_ 14 | 15 | #include "webp/types.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | struct Metadata; 22 | struct WebPPicture; 23 | 24 | // Reads a PNG from 'data', returning the decoded output in 'pic'. 25 | // Output is RGBA or YUVA, depending on pic->use_argb value. 26 | // If 'keep_alpha' is true and the PNG has an alpha channel, the output is RGBA 27 | // or YUVA. Otherwise, alpha channel is dropped and output is RGB or YUV. 28 | // Returns true on success. 29 | int ReadPNG(const uint8_t* const data, size_t data_size, 30 | struct WebPPicture* const pic, 31 | int keep_alpha, struct Metadata* const metadata); 32 | 33 | #ifdef __cplusplus 34 | } // extern "C" 35 | #endif 36 | 37 | #endif // WEBP_IMAGEIO_PNGDEC_H_ 38 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/pnmdec.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // partial PNM format decoder (ppm/pgm) 11 | 12 | #ifndef WEBP_IMAGEIO_PNMDEC_H_ 13 | #define WEBP_IMAGEIO_PNMDEC_H_ 14 | 15 | #include "webp/types.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | struct Metadata; 22 | struct WebPPicture; 23 | 24 | // Reads a PNM file from 'data', returning the decoded output in 'pic'. 25 | // The output is RGB or YUV depending on pic->use_argb value. 26 | // Returns true on success. 27 | // 'metadata' has no effect, but is kept for coherence with other signatures 28 | // for image readers. 29 | int ReadPNM(const uint8_t* const data, size_t data_size, 30 | struct WebPPicture* const pic, int keep_alpha, 31 | struct Metadata* const metadata); 32 | 33 | #ifdef __cplusplus 34 | } // extern "C" 35 | #endif 36 | 37 | #endif // WEBP_IMAGEIO_PNMDEC_H_ 38 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/tiffdec.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // TIFF decode. 11 | 12 | #ifndef WEBP_IMAGEIO_TIFFDEC_H_ 13 | #define WEBP_IMAGEIO_TIFFDEC_H_ 14 | 15 | #include "webp/types.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | struct Metadata; 22 | struct WebPPicture; 23 | 24 | // Reads a TIFF from 'data', returning the decoded output in 'pic'. 25 | // Output is RGBA or YUVA, depending on pic->use_argb value. 26 | // If 'keep_alpha' is true and the TIFF has an alpha channel, the output is RGBA 27 | // or YUVA. Otherwise, alpha channel is dropped and output is RGB or YUV. 28 | // Returns true on success. 29 | int ReadTIFF(const uint8_t* const data, size_t data_size, 30 | struct WebPPicture* const pic, int keep_alpha, 31 | struct Metadata* const metadata); 32 | 33 | #ifdef __cplusplus 34 | } // extern "C" 35 | #endif 36 | 37 | #endif // WEBP_IMAGEIO_TIFFDEC_H_ 38 | -------------------------------------------------------------------------------- /Extended/libwebp/imageio/wicdec.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Windows Imaging Component (WIC) decode. 11 | 12 | #ifndef WEBP_IMAGEIO_WICDEC_H_ 13 | #define WEBP_IMAGEIO_WICDEC_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | struct Metadata; 20 | struct WebPPicture; 21 | 22 | // Reads an image from 'filename', returning the decoded output in 'pic'. 23 | // If 'keep_alpha' is true and the image has an alpha channel, the output is 24 | // RGBA otherwise it will be RGB. pic->use_argb is always forced to true. 25 | // Returns true on success. 26 | int ReadPictureWithWIC(const char* const filename, 27 | struct WebPPicture* const pic, int keep_alpha, 28 | struct Metadata* const metadata); 29 | 30 | #ifdef __cplusplus 31 | } // extern "C" 32 | #endif 33 | 34 | #endif // WEBP_IMAGEIO_WICDEC_H_ 35 | -------------------------------------------------------------------------------- /Extended/libwebp/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /Extended/libwebp/man/Makefile.am: -------------------------------------------------------------------------------- 1 | man_MANS = cwebp.1 dwebp.1 2 | if BUILD_MUX 3 | man_MANS += webpmux.1 4 | endif 5 | if BUILD_GIF2WEBP 6 | man_MANS += gif2webp.1 7 | endif 8 | if BUILD_IMG2WEBP 9 | man_MANS += img2webp.1 10 | endif 11 | if BUILD_VWEBP 12 | man_MANS += vwebp.1 13 | endif 14 | if BUILD_WEBPINFO 15 | man_MANS += webpinfo.1 16 | endif 17 | EXTRA_DIST = $(man_MANS) 18 | -------------------------------------------------------------------------------- /Extended/libwebp/src/Makefile.am: -------------------------------------------------------------------------------- 1 | # The mux and demux libraries depend on libwebp, thus the '.' to force 2 | # the build order so it's available to them. 3 | SUBDIRS = dec enc dsp utils . 4 | if BUILD_MUX 5 | SUBDIRS += mux 6 | endif 7 | if BUILD_DEMUX 8 | SUBDIRS += demux 9 | endif 10 | 11 | lib_LTLIBRARIES = libwebp.la 12 | 13 | if BUILD_LIBWEBPDECODER 14 | lib_LTLIBRARIES += libwebpdecoder.la 15 | endif 16 | 17 | common_HEADERS = 18 | common_HEADERS += webp/decode.h 19 | common_HEADERS += webp/types.h 20 | commondir = $(includedir)/webp 21 | 22 | libwebp_la_SOURCES = 23 | libwebpinclude_HEADERS = 24 | libwebpinclude_HEADERS += webp/encode.h 25 | 26 | noinst_HEADERS = 27 | noinst_HEADERS += webp/format_constants.h 28 | 29 | libwebp_la_LIBADD = 30 | libwebp_la_LIBADD += dec/libwebpdecode.la 31 | libwebp_la_LIBADD += dsp/libwebpdsp.la 32 | libwebp_la_LIBADD += enc/libwebpencode.la 33 | libwebp_la_LIBADD += utils/libwebputils.la 34 | 35 | # Use '-no-undefined' to declare that libwebp does not depend on any libraries 36 | # other than the ones listed on the command line, i.e., after linking, it will 37 | # not have unresolved symbols. Some platforms (Windows among them) require all 38 | # symbols in shared libraries to be resolved at library creation. 39 | libwebp_la_LDFLAGS = -no-undefined -version-info 8:0:1 40 | libwebpincludedir = $(includedir)/webp 41 | pkgconfig_DATA = libwebp.pc 42 | 43 | if BUILD_LIBWEBPDECODER 44 | libwebpdecoder_la_SOURCES = 45 | 46 | libwebpdecoder_la_LIBADD = 47 | libwebpdecoder_la_LIBADD += dec/libwebpdecode.la 48 | libwebpdecoder_la_LIBADD += dsp/libwebpdspdecode.la 49 | libwebpdecoder_la_LIBADD += utils/libwebputilsdecode.la 50 | 51 | libwebpdecoder_la_LDFLAGS = -no-undefined -version-info 4:0:1 52 | pkgconfig_DATA += libwebpdecoder.pc 53 | endif 54 | 55 | ${pkgconfig_DATA}: ${top_builddir}/config.status 56 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-alpha_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-buffer_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-frame_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-idec_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-io_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-quant_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-tree_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-vp8_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-vp8l_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/.deps/libwebpdecode_la-webp_dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir) 2 | noinst_LTLIBRARIES = libwebpdecode.la 3 | 4 | libwebpdecode_la_SOURCES = 5 | libwebpdecode_la_SOURCES += alpha_dec.c 6 | libwebpdecode_la_SOURCES += alphai_dec.h 7 | libwebpdecode_la_SOURCES += buffer_dec.c 8 | libwebpdecode_la_SOURCES += common_dec.h 9 | libwebpdecode_la_SOURCES += vp8_dec.h 10 | libwebpdecode_la_SOURCES += frame_dec.c 11 | libwebpdecode_la_SOURCES += idec_dec.c 12 | libwebpdecode_la_SOURCES += io_dec.c 13 | libwebpdecode_la_SOURCES += quant_dec.c 14 | libwebpdecode_la_SOURCES += tree_dec.c 15 | libwebpdecode_la_SOURCES += vp8_dec.c 16 | libwebpdecode_la_SOURCES += vp8i_dec.h 17 | libwebpdecode_la_SOURCES += vp8l_dec.c 18 | libwebpdecode_la_SOURCES += vp8li_dec.h 19 | libwebpdecode_la_SOURCES += webp_dec.c 20 | libwebpdecode_la_SOURCES += webpi_dec.h 21 | 22 | libwebpdecodeinclude_HEADERS = 23 | libwebpdecodeinclude_HEADERS += ../webp/decode.h 24 | libwebpdecodeinclude_HEADERS += ../webp/types.h 25 | noinst_HEADERS = 26 | noinst_HEADERS += ../webp/format_constants.h 27 | 28 | libwebpdecode_la_CPPFLAGS = $(AM_CPPFLAGS) 29 | libwebpdecodeincludedir = $(includedir)/webp 30 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/alphai_dec.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Alpha decoder: internal header. 11 | // 12 | // Author: Urvang (urvang@google.com) 13 | 14 | #ifndef WEBP_DEC_ALPHAI_DEC_H_ 15 | #define WEBP_DEC_ALPHAI_DEC_H_ 16 | 17 | #include "src/dec/webpi_dec.h" 18 | #include "src/utils/filters_utils.h" 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | struct VP8LDecoder; // Defined in dec/vp8li.h. 25 | 26 | typedef struct ALPHDecoder ALPHDecoder; 27 | struct ALPHDecoder { 28 | int width_; 29 | int height_; 30 | int method_; 31 | WEBP_FILTER_TYPE filter_; 32 | int pre_processing_; 33 | struct VP8LDecoder* vp8l_dec_; 34 | VP8Io io_; 35 | int use_8b_decode_; // Although alpha channel requires only 1 byte per 36 | // pixel, sometimes VP8LDecoder may need to allocate 37 | // 4 bytes per pixel internally during decode. 38 | uint8_t* output_; 39 | const uint8_t* prev_line_; // last output row (or NULL) 40 | }; 41 | 42 | //------------------------------------------------------------------------------ 43 | // internal functions. Not public. 44 | 45 | // Deallocate memory associated to dec->alpha_plane_ decoding 46 | void WebPDeallocateAlphaMemory(VP8Decoder* const dec); 47 | 48 | //------------------------------------------------------------------------------ 49 | 50 | #ifdef __cplusplus 51 | } // extern "C" 52 | #endif 53 | 54 | #endif // WEBP_DEC_ALPHAI_DEC_H_ 55 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dec/common_dec.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Definitions and macros common to encoding and decoding 11 | // 12 | // Author: Skal (pascal.massimino@gmail.com) 13 | 14 | #ifndef WEBP_DEC_COMMON_DEC_H_ 15 | #define WEBP_DEC_COMMON_DEC_H_ 16 | 17 | // intra prediction modes 18 | enum { B_DC_PRED = 0, // 4x4 modes 19 | B_TM_PRED = 1, 20 | B_VE_PRED = 2, 21 | B_HE_PRED = 3, 22 | B_RD_PRED = 4, 23 | B_VR_PRED = 5, 24 | B_LD_PRED = 6, 25 | B_VL_PRED = 7, 26 | B_HD_PRED = 8, 27 | B_HU_PRED = 9, 28 | NUM_BMODES = B_HU_PRED + 1 - B_DC_PRED, // = 10 29 | 30 | // Luma16 or UV modes 31 | DC_PRED = B_DC_PRED, V_PRED = B_VE_PRED, 32 | H_PRED = B_HE_PRED, TM_PRED = B_TM_PRED, 33 | B_PRED = NUM_BMODES, // refined I4x4 mode 34 | NUM_PRED_MODES = 4, 35 | 36 | // special modes 37 | B_DC_PRED_NOTOP = 4, 38 | B_DC_PRED_NOLEFT = 5, 39 | B_DC_PRED_NOTOPLEFT = 6, 40 | NUM_B_DC_MODES = 7 }; 41 | 42 | enum { MB_FEATURE_TREE_PROBS = 3, 43 | NUM_MB_SEGMENTS = 4, 44 | NUM_REF_LF_DELTAS = 4, 45 | NUM_MODE_LF_DELTAS = 4, // I4x4, ZERO, *, SPLIT 46 | MAX_NUM_PARTITIONS = 8, 47 | // Probabilities 48 | NUM_TYPES = 4, // 0: i16-AC, 1: i16-DC, 2:chroma-AC, 3:i4-AC 49 | NUM_BANDS = 8, 50 | NUM_CTX = 3, 51 | NUM_PROBAS = 11 52 | }; 53 | 54 | #endif // WEBP_DEC_COMMON_DEC_H_ 55 | -------------------------------------------------------------------------------- /Extended/libwebp/src/demux/.deps/anim_decode.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/demux/.deps/demux.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/demux/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir) 2 | lib_LTLIBRARIES = libwebpdemux.la 3 | 4 | libwebpdemux_la_SOURCES = 5 | libwebpdemux_la_SOURCES += anim_decode.c demux.c 6 | 7 | libwebpdemuxinclude_HEADERS = 8 | libwebpdemuxinclude_HEADERS += ../webp/decode.h 9 | libwebpdemuxinclude_HEADERS += ../webp/demux.h 10 | libwebpdemuxinclude_HEADERS += ../webp/mux_types.h 11 | libwebpdemuxinclude_HEADERS += ../webp/types.h 12 | noinst_HEADERS = 13 | noinst_HEADERS += ../webp/format_constants.h 14 | 15 | libwebpdemux_la_LIBADD = ../libwebp.la 16 | libwebpdemux_la_LDFLAGS = -no-undefined -version-info 2:6:0 17 | libwebpdemuxincludedir = $(includedir)/webp 18 | pkgconfig_DATA = libwebpdemux.pc 19 | -------------------------------------------------------------------------------- /Extended/libwebp/src/demux/libwebpdemux.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libwebpdemux 7 | Description: Library for parsing the WebP graphics format container 8 | Version: 1.1.0 9 | Requires: libwebp >= 0.2.0 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lwebpdemux 12 | -------------------------------------------------------------------------------- /Extended/libwebp/src/demux/libwebpdemux.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libwebpdemux 7 | Description: Library for parsing the WebP graphics format container 8 | Version: @PACKAGE_VERSION@ 9 | Requires: libwebp >= 0.2.0 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lwebpdemux 12 | -------------------------------------------------------------------------------- /Extended/libwebp/src/demux/libwebpdemux.rc: -------------------------------------------------------------------------------- 1 | #define APSTUDIO_READONLY_SYMBOLS 2 | #include "winres.h" 3 | #undef APSTUDIO_READONLY_SYMBOLS 4 | 5 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 6 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION 1,0,1,0 10 | PRODUCTVERSION 1,0,1,0 11 | FILEFLAGSMASK 0x3fL 12 | #ifdef _DEBUG 13 | FILEFLAGS 0x1L 14 | #else 15 | FILEFLAGS 0x0L 16 | #endif 17 | FILEOS 0x40004L 18 | FILETYPE 0x2L 19 | FILESUBTYPE 0x0L 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904b0" 24 | BEGIN 25 | VALUE "CompanyName", "Google, Inc." 26 | VALUE "FileDescription", "libwebpdemux DLL" 27 | VALUE "FileVersion", "1.1.0" 28 | VALUE "InternalName", "libwebpdemux.dll" 29 | VALUE "LegalCopyright", "Copyright (C) 2019" 30 | VALUE "OriginalFilename", "libwebpdemux.dll" 31 | VALUE "ProductName", "WebP Image Demuxer" 32 | VALUE "ProductVersion", "1.1.0" 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x409, 1200 38 | END 39 | END 40 | 41 | #endif // English (United States) resources 42 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-alpha_processing.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-cost.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-cpu.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-dec_clip_tables.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-filters.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-lossless.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-lossless_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-rescaler.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-ssim.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-upsampling.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_la-yuv.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_mips32_la-cost_mips32.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_mips32_la-enc_mips32.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_mips32_la-lossless_enc_mips32.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_mips_dsp_r2_la-cost_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_mips_dsp_r2_la-enc_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_mips_dsp_r2_la-lossless_enc_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_msa_la-enc_msa.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_msa_la-lossless_enc_msa.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_neon_la-cost_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_neon_la-enc_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_neon_la-lossless_enc_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_sse2_la-cost_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_sse2_la-enc_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_sse2_la-lossless_enc_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_sse2_la-ssim_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_sse41_la-enc_sse41.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdsp_sse41_la-lossless_enc_sse41.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-alpha_processing.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-cpu.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-dec.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-dec_clip_tables.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-filters.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-lossless.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-rescaler.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-upsampling.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_la-yuv.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips32_la-dec_mips32.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips32_la-rescaler_mips32.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips32_la-yuv_mips32.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips_dsp_r2_la-alpha_processing_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips_dsp_r2_la-dec_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips_dsp_r2_la-filters_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips_dsp_r2_la-lossless_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips_dsp_r2_la-rescaler_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips_dsp_r2_la-upsampling_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_mips_dsp_r2_la-yuv_mips_dsp_r2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_msa_la-dec_msa.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_msa_la-filters_msa.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_msa_la-lossless_msa.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_msa_la-rescaler_msa.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_msa_la-upsampling_msa.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_neon_la-alpha_processing_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_neon_la-dec_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_neon_la-filters_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_neon_la-lossless_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_neon_la-rescaler_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_neon_la-upsampling_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_neon_la-yuv_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse2_la-alpha_processing_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse2_la-dec_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse2_la-filters_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse2_la-lossless_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse2_la-rescaler_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse2_la-upsampling_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse2_la-yuv_sse2.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse41_la-alpha_processing_sse41.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse41_la-dec_sse41.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse41_la-upsampling_sse41.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/.deps/libwebpdspdecode_sse41_la-yuv_sse41.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/dsp/dec_sse41.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // SSE4 version of some decoding functions. 11 | // 12 | // Author: Skal (pascal.massimino@gmail.com) 13 | 14 | #include "src/dsp/dsp.h" 15 | 16 | #if defined(WEBP_USE_SSE41) 17 | 18 | #include 19 | #include "src/dec/vp8i_dec.h" 20 | #include "src/utils/utils.h" 21 | 22 | static void HE16_SSE41(uint8_t* dst) { // horizontal 23 | int j; 24 | const __m128i kShuffle3 = _mm_set1_epi8(3); 25 | for (j = 16; j > 0; --j) { 26 | const __m128i in = _mm_cvtsi32_si128(WebPMemToUint32(dst - 4)); 27 | const __m128i values = _mm_shuffle_epi8(in, kShuffle3); 28 | _mm_storeu_si128((__m128i*)dst, values); 29 | dst += BPS; 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // Entry point 35 | 36 | extern void VP8DspInitSSE41(void); 37 | 38 | WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitSSE41(void) { 39 | VP8PredLuma16[3] = HE16_SSE41; 40 | } 41 | 42 | #else // !WEBP_USE_SSE41 43 | 44 | WEBP_DSP_INIT_STUB(VP8DspInitSSE41) 45 | 46 | #endif // WEBP_USE_SSE41 47 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-alpha_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-analysis_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-backward_references_cost_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-backward_references_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-config_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-cost_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-filter_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-frame_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-histogram_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-iterator_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-near_lossless_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-picture_csp_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-picture_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-picture_psnr_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-picture_rescale_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-picture_tools_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-predictor_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-quant_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-syntax_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-token_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-tree_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-vp8l_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/.deps/libwebpencode_la-webp_enc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/enc/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir) 2 | noinst_LTLIBRARIES = libwebpencode.la 3 | 4 | libwebpencode_la_SOURCES = 5 | libwebpencode_la_SOURCES += alpha_enc.c 6 | libwebpencode_la_SOURCES += analysis_enc.c 7 | libwebpencode_la_SOURCES += backward_references_cost_enc.c 8 | libwebpencode_la_SOURCES += backward_references_enc.c 9 | libwebpencode_la_SOURCES += backward_references_enc.h 10 | libwebpencode_la_SOURCES += config_enc.c 11 | libwebpencode_la_SOURCES += cost_enc.c 12 | libwebpencode_la_SOURCES += cost_enc.h 13 | libwebpencode_la_SOURCES += filter_enc.c 14 | libwebpencode_la_SOURCES += frame_enc.c 15 | libwebpencode_la_SOURCES += histogram_enc.c 16 | libwebpencode_la_SOURCES += histogram_enc.h 17 | libwebpencode_la_SOURCES += iterator_enc.c 18 | libwebpencode_la_SOURCES += near_lossless_enc.c 19 | libwebpencode_la_SOURCES += picture_enc.c 20 | libwebpencode_la_SOURCES += picture_csp_enc.c 21 | libwebpencode_la_SOURCES += picture_psnr_enc.c 22 | libwebpencode_la_SOURCES += picture_rescale_enc.c 23 | libwebpencode_la_SOURCES += picture_tools_enc.c 24 | libwebpencode_la_SOURCES += predictor_enc.c 25 | libwebpencode_la_SOURCES += quant_enc.c 26 | libwebpencode_la_SOURCES += syntax_enc.c 27 | libwebpencode_la_SOURCES += token_enc.c 28 | libwebpencode_la_SOURCES += tree_enc.c 29 | libwebpencode_la_SOURCES += vp8i_enc.h 30 | libwebpencode_la_SOURCES += vp8l_enc.c 31 | libwebpencode_la_SOURCES += vp8li_enc.h 32 | libwebpencode_la_SOURCES += webp_enc.c 33 | 34 | libwebpencodeinclude_HEADERS = 35 | libwebpencodeinclude_HEADERS += ../webp/encode.h 36 | libwebpencodeinclude_HEADERS += ../webp/types.h 37 | noinst_HEADERS = 38 | noinst_HEADERS += ../webp/format_constants.h 39 | 40 | libwebpencode_la_LDFLAGS = -lm 41 | libwebpencode_la_CPPFLAGS = $(AM_CPPFLAGS) 42 | libwebpencodeincludedir = $(includedir)/webp 43 | -------------------------------------------------------------------------------- /Extended/libwebp/src/libwebp.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libwebp 7 | Description: Library for the WebP graphics format 8 | Version: 1.1.0 9 | Cflags: -I${includedir} 10 | Libs: -L${libdir} -lwebp 11 | Libs.private: -lm -D_THREAD_SAFE -pthread 12 | -------------------------------------------------------------------------------- /Extended/libwebp/src/libwebp.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libwebp 7 | Description: Library for the WebP graphics format 8 | Version: @PACKAGE_VERSION@ 9 | Cflags: -I${includedir} 10 | Libs: -L${libdir} -lwebp 11 | Libs.private: -lm @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 12 | -------------------------------------------------------------------------------- /Extended/libwebp/src/libwebp.rc: -------------------------------------------------------------------------------- 1 | #define APSTUDIO_READONLY_SYMBOLS 2 | #include "winres.h" 3 | #undef APSTUDIO_READONLY_SYMBOLS 4 | 5 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 6 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION 1,0,1,0 10 | PRODUCTVERSION 1,0,1,0 11 | FILEFLAGSMASK 0x3fL 12 | #ifdef _DEBUG 13 | FILEFLAGS 0x1L 14 | #else 15 | FILEFLAGS 0x0L 16 | #endif 17 | FILEOS 0x40004L 18 | FILETYPE 0x2L 19 | FILESUBTYPE 0x0L 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904b0" 24 | BEGIN 25 | VALUE "CompanyName", "Google, Inc." 26 | VALUE "FileDescription", "libwebp DLL" 27 | VALUE "FileVersion", "1.1.0" 28 | VALUE "InternalName", "libwebp.dll" 29 | VALUE "LegalCopyright", "Copyright (C) 2019" 30 | VALUE "OriginalFilename", "libwebp.dll" 31 | VALUE "ProductName", "WebP Image Codec" 32 | VALUE "ProductVersion", "1.1.0" 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x409, 1200 38 | END 39 | END 40 | 41 | #endif // English (United States) resources 42 | -------------------------------------------------------------------------------- /Extended/libwebp/src/libwebpdecoder.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libwebpdecoder 7 | Description: Library for the WebP graphics format (decode only) 8 | Version: 1.1.0 9 | Cflags: -I${includedir} 10 | Libs: -L${libdir} -lwebpdecoder 11 | Libs.private: -lm -D_THREAD_SAFE -pthread 12 | -------------------------------------------------------------------------------- /Extended/libwebp/src/libwebpdecoder.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libwebpdecoder 7 | Description: Library for the WebP graphics format (decode only) 8 | Version: @PACKAGE_VERSION@ 9 | Cflags: -I${includedir} 10 | Libs: -L${libdir} -lwebpdecoder 11 | Libs.private: -lm @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 12 | -------------------------------------------------------------------------------- /Extended/libwebp/src/libwebpdecoder.rc: -------------------------------------------------------------------------------- 1 | #define APSTUDIO_READONLY_SYMBOLS 2 | #include "winres.h" 3 | #undef APSTUDIO_READONLY_SYMBOLS 4 | 5 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 6 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION 1,0,1,0 10 | PRODUCTVERSION 1,0,1,0 11 | FILEFLAGSMASK 0x3fL 12 | #ifdef _DEBUG 13 | FILEFLAGS 0x1L 14 | #else 15 | FILEFLAGS 0x0L 16 | #endif 17 | FILEOS 0x40004L 18 | FILETYPE 0x2L 19 | FILESUBTYPE 0x0L 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904b0" 24 | BEGIN 25 | VALUE "CompanyName", "Google, Inc." 26 | VALUE "FileDescription", "libwebpdecoder DLL" 27 | VALUE "FileVersion", "1.1.0" 28 | VALUE "InternalName", "libwebpdecoder.dll" 29 | VALUE "LegalCopyright", "Copyright (C) 2019" 30 | VALUE "OriginalFilename", "libwebpdecoder.dll" 31 | VALUE "ProductName", "WebP Image Decoder" 32 | VALUE "ProductVersion", "1.1.0" 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x409, 1200 38 | END 39 | END 40 | 41 | #endif // English (United States) resources 42 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/.deps/anim_encode.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/.deps/muxedit.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/.deps/muxinternal.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/.deps/muxread.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir) 2 | lib_LTLIBRARIES = libwebpmux.la 3 | 4 | libwebpmux_la_SOURCES = 5 | libwebpmux_la_SOURCES += anim_encode.c 6 | libwebpmux_la_SOURCES += animi.h 7 | libwebpmux_la_SOURCES += muxedit.c 8 | libwebpmux_la_SOURCES += muxi.h 9 | libwebpmux_la_SOURCES += muxinternal.c 10 | libwebpmux_la_SOURCES += muxread.c 11 | 12 | libwebpmuxinclude_HEADERS = 13 | libwebpmuxinclude_HEADERS += ../webp/mux.h 14 | libwebpmuxinclude_HEADERS += ../webp/mux_types.h 15 | libwebpmuxinclude_HEADERS += ../webp/types.h 16 | noinst_HEADERS = 17 | noinst_HEADERS += ../webp/format_constants.h 18 | 19 | libwebpmux_la_LIBADD = ../libwebp.la 20 | libwebpmux_la_LDFLAGS = -no-undefined -version-info 3:5:0 -lm 21 | libwebpmuxincludedir = $(includedir)/webp 22 | pkgconfig_DATA = libwebpmux.pc 23 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/animi.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Internal header for animation related functions. 11 | // 12 | // Author: Hui Su (huisu@google.com) 13 | 14 | #ifndef WEBP_MUX_ANIMI_H_ 15 | #define WEBP_MUX_ANIMI_H_ 16 | 17 | #include "src/webp/mux.h" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | // Picks the optimal rectangle between two pictures, starting with initial 24 | // values of offsets and dimensions that are passed in. The initial 25 | // values will be clipped, if necessary, to make sure the rectangle is 26 | // within the canvas. "use_argb" must be true for both pictures. 27 | // Parameters: 28 | // prev_canvas, curr_canvas - (in) two input pictures to compare. 29 | // is_lossless, quality - (in) encoding settings. 30 | // x_offset, y_offset, width, height - (in/out) rectangle between the two 31 | // input pictures. 32 | // Returns true on success. 33 | int WebPAnimEncoderRefineRect( 34 | const struct WebPPicture* const prev_canvas, 35 | const struct WebPPicture* const curr_canvas, 36 | int is_lossless, float quality, int* const x_offset, int* const y_offset, 37 | int* const width, int* const height); 38 | 39 | #ifdef __cplusplus 40 | } // extern "C" 41 | #endif 42 | 43 | #endif // WEBP_MUX_ANIMI_H_ 44 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/libwebpmux.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libwebpmux 7 | Description: Library for manipulating the WebP graphics format container 8 | Version: 1.1.0 9 | Requires: libwebp >= 0.2.0 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lwebpmux 12 | Libs.private: -lm 13 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/libwebpmux.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libwebpmux 7 | Description: Library for manipulating the WebP graphics format container 8 | Version: @PACKAGE_VERSION@ 9 | Requires: libwebp >= 0.2.0 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lwebpmux 12 | Libs.private: -lm 13 | -------------------------------------------------------------------------------- /Extended/libwebp/src/mux/libwebpmux.rc: -------------------------------------------------------------------------------- 1 | #define APSTUDIO_READONLY_SYMBOLS 2 | #include "winres.h" 3 | #undef APSTUDIO_READONLY_SYMBOLS 4 | 5 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 6 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION 1,0,1,0 10 | PRODUCTVERSION 1,0,1,0 11 | FILEFLAGSMASK 0x3fL 12 | #ifdef _DEBUG 13 | FILEFLAGS 0x1L 14 | #else 15 | FILEFLAGS 0x0L 16 | #endif 17 | FILEOS 0x40004L 18 | FILETYPE 0x2L 19 | FILESUBTYPE 0x0L 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904b0" 24 | BEGIN 25 | VALUE "CompanyName", "Google, Inc." 26 | VALUE "FileDescription", "libwebpmux DLL" 27 | VALUE "FileVersion", "1.1.0" 28 | VALUE "InternalName", "libwebpmux.dll" 29 | VALUE "LegalCopyright", "Copyright (C) 2019" 30 | VALUE "OriginalFilename", "libwebpmux.dll" 31 | VALUE "ProductName", "WebP Image Muxer" 32 | VALUE "ProductVersion", "1.1.0" 33 | END 34 | END 35 | BLOCK "VarFileInfo" 36 | BEGIN 37 | VALUE "Translation", 0x409, 1200 38 | END 39 | END 40 | 41 | #endif // English (United States) resources 42 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/bit_reader_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/bit_writer_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/color_cache_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/filters_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/huffman_encode_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/huffman_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/quant_levels_dec_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/quant_levels_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/random_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/rescaler_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/thread_utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/.deps/utils.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir) 2 | noinst_LTLIBRARIES = libwebputils.la 3 | 4 | if BUILD_LIBWEBPDECODER 5 | noinst_LTLIBRARIES += libwebputilsdecode.la 6 | endif 7 | 8 | common_HEADERS = ../webp/types.h 9 | commondir = $(includedir)/webp 10 | 11 | noinst_HEADERS = 12 | noinst_HEADERS += ../dsp/dsp.h 13 | noinst_HEADERS += ../webp/decode.h 14 | noinst_HEADERS += ../webp/encode.h 15 | noinst_HEADERS += ../webp/format_constants.h 16 | 17 | COMMON_SOURCES = 18 | COMMON_SOURCES += bit_reader_utils.c 19 | COMMON_SOURCES += bit_reader_utils.h 20 | COMMON_SOURCES += bit_reader_inl_utils.h 21 | COMMON_SOURCES += color_cache_utils.c 22 | COMMON_SOURCES += color_cache_utils.h 23 | COMMON_SOURCES += endian_inl_utils.h 24 | COMMON_SOURCES += filters_utils.c 25 | COMMON_SOURCES += filters_utils.h 26 | COMMON_SOURCES += huffman_utils.c 27 | COMMON_SOURCES += huffman_utils.h 28 | COMMON_SOURCES += quant_levels_dec_utils.c 29 | COMMON_SOURCES += quant_levels_dec_utils.h 30 | COMMON_SOURCES += rescaler_utils.c 31 | COMMON_SOURCES += rescaler_utils.h 32 | COMMON_SOURCES += random_utils.c 33 | COMMON_SOURCES += random_utils.h 34 | COMMON_SOURCES += thread_utils.c 35 | COMMON_SOURCES += thread_utils.h 36 | COMMON_SOURCES += utils.c 37 | COMMON_SOURCES += utils.h 38 | 39 | ENC_SOURCES = 40 | ENC_SOURCES += bit_writer_utils.c 41 | ENC_SOURCES += bit_writer_utils.h 42 | ENC_SOURCES += huffman_encode_utils.c 43 | ENC_SOURCES += huffman_encode_utils.h 44 | ENC_SOURCES += quant_levels_utils.c 45 | ENC_SOURCES += quant_levels_utils.h 46 | 47 | libwebputils_la_SOURCES = $(COMMON_SOURCES) $(ENC_SOURCES) 48 | 49 | if BUILD_LIBWEBPDECODER 50 | libwebputilsdecode_la_SOURCES = $(COMMON_SOURCES) 51 | endif 52 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/color_cache_utils.c: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Color Cache for WebP Lossless 11 | // 12 | // Author: Jyrki Alakuijala (jyrki@google.com) 13 | 14 | #include 15 | #include 16 | #include 17 | #include "src/utils/color_cache_utils.h" 18 | #include "src/utils/utils.h" 19 | 20 | //------------------------------------------------------------------------------ 21 | // VP8LColorCache. 22 | 23 | int VP8LColorCacheInit(VP8LColorCache* const cc, int hash_bits) { 24 | const int hash_size = 1 << hash_bits; 25 | assert(cc != NULL); 26 | assert(hash_bits > 0); 27 | cc->colors_ = (uint32_t*)WebPSafeCalloc((uint64_t)hash_size, 28 | sizeof(*cc->colors_)); 29 | if (cc->colors_ == NULL) return 0; 30 | cc->hash_shift_ = 32 - hash_bits; 31 | cc->hash_bits_ = hash_bits; 32 | return 1; 33 | } 34 | 35 | void VP8LColorCacheClear(VP8LColorCache* const cc) { 36 | if (cc != NULL) { 37 | WebPSafeFree(cc->colors_); 38 | cc->colors_ = NULL; 39 | } 40 | } 41 | 42 | void VP8LColorCacheCopy(const VP8LColorCache* const src, 43 | VP8LColorCache* const dst) { 44 | assert(src != NULL); 45 | assert(dst != NULL); 46 | assert(src->hash_bits_ == dst->hash_bits_); 47 | memcpy(dst->colors_, src->colors_, 48 | ((size_t)1u << dst->hash_bits_) * sizeof(*dst->colors_)); 49 | } 50 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/filters_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Spatial prediction using various filters 11 | // 12 | // Author: Urvang (urvang@google.com) 13 | 14 | #ifndef WEBP_UTILS_FILTERS_UTILS_H_ 15 | #define WEBP_UTILS_FILTERS_UTILS_H_ 16 | 17 | #include "src/webp/types.h" 18 | #include "src/dsp/dsp.h" 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | // Fast estimate of a potentially good filter. 25 | WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, 26 | int width, int height, int stride); 27 | 28 | #ifdef __cplusplus 29 | } // extern "C" 30 | #endif 31 | 32 | #endif // WEBP_UTILS_FILTERS_UTILS_H_ 33 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/quant_levels_dec_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Alpha plane de-quantization utility 11 | // 12 | // Author: Vikas Arora (vikasa@google.com) 13 | 14 | #ifndef WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_ 15 | #define WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_ 16 | 17 | #include "src/webp/types.h" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | // Apply post-processing to input 'data' of size 'width'x'height' assuming that 24 | // the source was quantized to a reduced number of levels. 'stride' is in bytes. 25 | // Strength is in [0..100] and controls the amount of dithering applied. 26 | // Returns false in case of error (data is NULL, invalid parameters, 27 | // malloc failure, ...). 28 | int WebPDequantizeLevels(uint8_t* const data, int width, int height, int stride, 29 | int strength); 30 | 31 | #ifdef __cplusplus 32 | } // extern "C" 33 | #endif 34 | 35 | #endif // WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_ 36 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/quant_levels_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Alpha plane quantization utility 11 | // 12 | // Author: Vikas Arora (vikasa@google.com) 13 | 14 | #ifndef WEBP_UTILS_QUANT_LEVELS_UTILS_H_ 15 | #define WEBP_UTILS_QUANT_LEVELS_UTILS_H_ 16 | 17 | #include 18 | 19 | #include "src/webp/types.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | // Replace the input 'data' of size 'width'x'height' with 'num-levels' 26 | // quantized values. If not NULL, 'sse' will contain the sum of squared error. 27 | // Valid range for 'num_levels' is [2, 256]. 28 | // Returns false in case of error (data is NULL, or parameters are invalid). 29 | int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels, 30 | uint64_t* const sse); 31 | 32 | #ifdef __cplusplus 33 | } // extern "C" 34 | #endif 35 | 36 | #endif // WEBP_UTILS_QUANT_LEVELS_UTILS_H_ 37 | -------------------------------------------------------------------------------- /Extended/libwebp/src/utils/random_utils.c: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All Rights Reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the COPYING file in the root of the source 5 | // tree. An additional intellectual property rights grant can be found 6 | // in the file PATENTS. All contributing project authors may 7 | // be found in the AUTHORS file in the root of the source tree. 8 | // ----------------------------------------------------------------------------- 9 | // 10 | // Pseudo-random utilities 11 | // 12 | // Author: Skal (pascal.massimino@gmail.com) 13 | 14 | #include 15 | #include "src/utils/random_utils.h" 16 | 17 | //------------------------------------------------------------------------------ 18 | 19 | // 31b-range values 20 | static const uint32_t kRandomTable[VP8_RANDOM_TABLE_SIZE] = { 21 | 0x0de15230, 0x03b31886, 0x775faccb, 0x1c88626a, 0x68385c55, 0x14b3b828, 22 | 0x4a85fef8, 0x49ddb84b, 0x64fcf397, 0x5c550289, 0x4a290000, 0x0d7ec1da, 23 | 0x5940b7ab, 0x5492577d, 0x4e19ca72, 0x38d38c69, 0x0c01ee65, 0x32a1755f, 24 | 0x5437f652, 0x5abb2c32, 0x0faa57b1, 0x73f533e7, 0x685feeda, 0x7563cce2, 25 | 0x6e990e83, 0x4730a7ed, 0x4fc0d9c6, 0x496b153c, 0x4f1403fa, 0x541afb0c, 26 | 0x73990b32, 0x26d7cb1c, 0x6fcc3706, 0x2cbb77d8, 0x75762f2a, 0x6425ccdd, 27 | 0x24b35461, 0x0a7d8715, 0x220414a8, 0x141ebf67, 0x56b41583, 0x73e502e3, 28 | 0x44cab16f, 0x28264d42, 0x73baaefb, 0x0a50ebed, 0x1d6ab6fb, 0x0d3ad40b, 29 | 0x35db3b68, 0x2b081e83, 0x77ce6b95, 0x5181e5f0, 0x78853bbc, 0x009f9494, 30 | 0x27e5ed3c 31 | }; 32 | 33 | void VP8InitRandom(VP8Random* const rg, float dithering) { 34 | memcpy(rg->tab_, kRandomTable, sizeof(rg->tab_)); 35 | rg->index1_ = 0; 36 | rg->index2_ = 31; 37 | rg->amp_ = (dithering < 0.0) ? 0 38 | : (dithering > 1.0) ? (1 << VP8_RANDOM_DITHER_FIX) 39 | : (uint32_t)((1 << VP8_RANDOM_DITHER_FIX) * dithering); 40 | } 41 | 42 | //------------------------------------------------------------------------------ 43 | 44 | -------------------------------------------------------------------------------- /Extended/libwebp/src/webp/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for src/webp/config.h 2 | -------------------------------------------------------------------------------- /Extended/libwebp/swig/README: -------------------------------------------------------------------------------- 1 | Building: 2 | ========= 3 | 4 | JNI SWIG bindings: 5 | ------------------ 6 | $ gcc -shared -fPIC -fno-strict-aliasing -O2 \ 7 | -I/path/to/your/jdk/includes \ 8 | libwebp_java_wrap.c \ 9 | -lwebp \ 10 | -o libwebp_jni.so 11 | 12 | -------------------------------------- BEGIN PSEUDO EXAMPLE 13 | import com.google.webp.libwebp; 14 | 15 | import java.lang.reflect.Method; 16 | 17 | public class libwebp_jni_example { 18 | static { 19 | System.loadLibrary("webp_jni"); 20 | } 21 | 22 | /** 23 | * usage: java -cp libwebp.jar:. libwebp_jni_example 24 | */ 25 | public static void main(String argv[]) { 26 | final int version = libwebp.WebPGetDecoderVersion(); 27 | System.out.println("libwebp version: " + Integer.toHexString(version)); 28 | 29 | System.out.println("libwebp methods:"); 30 | final Method[] libwebpMethods = libwebp.class.getDeclaredMethods(); 31 | for (int i = 0; i < libwebpMethods.length; i++) { 32 | System.out.println(libwebpMethods[i]); 33 | } 34 | } 35 | } 36 | -------------------------------------- END PSEUDO EXAMPLE 37 | 38 | $ javac -cp libwebp.jar libwebp_jni_example.java 39 | $ java -Djava.library.path=. -cp libwebp.jar:. libwebp_jni_example 40 | 41 | Python SWIG bindings: 42 | --------------------- 43 | $ python setup.py build_ext 44 | $ python setup.py install --prefix=pylocal 45 | 46 | -------------------------------------- BEGIN PSEUDO EXAMPLE 47 | import glob 48 | import sys 49 | sys.path.append(glob.glob('pylocal/lib/python*/site-packages')[0]) 50 | 51 | from com.google.webp import libwebp 52 | print "libwebp decoder version: %x" % libwebp.WebPGetDecoderVersion() 53 | 54 | print "libwebp attributes:" 55 | for attr in dir(libwebp): print attr 56 | -------------------------------------- END PSEUDO EXAMPLE 57 | -------------------------------------------------------------------------------- /Extended/libwebp/swig/libwebp.go: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 2.0.10 4 | * 5 | * This file is not intended to be easily readable and contains a number of 6 | * coding conventions designed to improve portability and efficiency. Do not make 7 | * changes to this file unless you know what you are doing--modify the SWIG 8 | * interface file instead. 9 | * ----------------------------------------------------------------------------- */ 10 | 11 | package libwebp 12 | 13 | import _ "runtime/cgo" 14 | import "unsafe" 15 | 16 | type _ unsafe.Pointer 17 | 18 | type _swig_fnptr *byte 19 | type _swig_memberptr *byte 20 | 21 | //extern libwebpSwigCgocall 22 | func SwigCgocall() 23 | 24 | //extern libwebpSwigCgocallDone 25 | func SwigCgocallDone() 26 | 27 | //extern libwebpSwigCgocallBack 28 | func SwigCgocallBack() 29 | 30 | //extern libwebpSwigCgocallBackDone 31 | func SwigCgocallBackDone() 32 | 33 | func WebPGetDecoderVersion() int 34 | func Wrapped_WebPGetInfo(string, []int, []int) int 35 | 36 | // WebPGetInfo has 2 output parameters, provide a version in the more natural 37 | // go idiom: 38 | func WebPGetInfo(webp []byte) (ok bool, width int, height int) { 39 | w := []int{0} 40 | h := []int{0} 41 | ok = Wrapped_WebPGetInfo(string(webp), w, h) != 0 42 | width = w[0] 43 | height = h[0] 44 | return 45 | } 46 | -------------------------------------------------------------------------------- /Extended/libwebp/swig/libwebp.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/libwebp/swig/libwebp.jar -------------------------------------------------------------------------------- /Extended/libwebp/swig/libwebp_gc.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 2.0.10 4 | * 5 | * This file is not intended to be easily readable and contains a number of 6 | * coding conventions designed to improve portability and efficiency. Do not make 7 | * changes to this file unless you know what you are doing--modify the SWIG 8 | * interface file instead. 9 | * ----------------------------------------------------------------------------- */ 10 | 11 | /* This file should be compiled with 6c/8c. */ 12 | #pragma dynimport _ _ "libwebp_go.so" 13 | 14 | #include "runtime.h" 15 | #include "cgocall.h" 16 | 17 | #ifdef _64BIT 18 | #define SWIG_PARM_SIZE 8 19 | #else 20 | #define SWIG_PARM_SIZE 4 21 | #endif 22 | 23 | #pragma dynimport _wrap_WebPGetDecoderVersion _wrap_WebPGetDecoderVersion "" 24 | extern void (*_wrap_WebPGetDecoderVersion)(void*); 25 | static void (*x_wrap_WebPGetDecoderVersion)(void*) = _wrap_WebPGetDecoderVersion; 26 | 27 | void 28 | ·WebPGetDecoderVersion(struct { 29 | uint8 x[SWIG_PARM_SIZE]; 30 | } p) 31 | 32 | { 33 | runtime·cgocall(x_wrap_WebPGetDecoderVersion, &p); 34 | } 35 | 36 | 37 | 38 | #pragma dynimport _wrap_wrapped_WebPGetInfo _wrap_wrapped_WebPGetInfo "" 39 | extern void (*_wrap_wrapped_WebPGetInfo)(void*); 40 | static void (*x_wrap_wrapped_WebPGetInfo)(void*) = _wrap_wrapped_WebPGetInfo; 41 | 42 | void 43 | ·Wrapped_WebPGetInfo(struct { 44 | uint8 x[(2 * SWIG_PARM_SIZE) + (3 * SWIG_PARM_SIZE) + (3 * SWIG_PARM_SIZE) + SWIG_PARM_SIZE]; 45 | } p) 46 | 47 | { 48 | runtime·cgocall(x_wrap_wrapped_WebPGetInfo, &p); 49 | } 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Extended/libwebp/swig/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | """distutils script for libwebp python module.""" 4 | 5 | from distutils.core import setup 6 | from distutils.extension import Extension 7 | import os 8 | import shutil 9 | import tempfile 10 | 11 | tmpdir = tempfile.mkdtemp() 12 | package = "com.google.webp" 13 | package_path = os.path.join(tmpdir, *package.split(".")) 14 | os.makedirs(package_path) 15 | 16 | # Create __init_.py files along the package path. 17 | initpy_path = tmpdir 18 | for d in package.split("."): 19 | initpy_path = os.path.join(initpy_path, d) 20 | open(os.path.join(initpy_path, "__init__.py"), "w").close() 21 | 22 | shutil.copy2("libwebp.py", package_path) 23 | setup(name="libwebp", 24 | version="0.0", 25 | description="libwebp python wrapper", 26 | long_description="Provides access to 'simple' libwebp decode interface", 27 | license="BSD", 28 | url="http://developers.google.com/speed/webp", 29 | ext_package=package, 30 | ext_modules=[Extension("_libwebp", 31 | ["libwebp_python_wrap.c"], 32 | libraries=["webp"], 33 | ), 34 | ], 35 | package_dir={"": tmpdir}, 36 | packages=["com", "com.google", "com.google.webp"], 37 | py_modules=[package + ".libwebp"], 38 | ) 39 | 40 | shutil.rmtree(tmpdir) 41 | -------------------------------------------------------------------------------- /Extended/libwebp/webp_js/test_webp_js.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/libwebp/webp_js/test_webp_js.webp -------------------------------------------------------------------------------- /Extended/libwebp/webp_js/test_webp_wasm.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/Extended/libwebp/webp_js/test_webp_wasm.webp -------------------------------------------------------------------------------- /GraphicsRendererSpeed/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GraphicsRendererSpeed 4 | // 5 | // Copyright © 2020 Twitter. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | @property (strong, nonatomic) UIWindow *window; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /GraphicsRendererSpeed/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // GraphicsRendererSpeed 4 | // 5 | // Copyright © 2020 Twitter. All rights reserved. 6 | // 7 | 8 | #import "AppDelegate.h" 9 | 10 | @interface AppDelegate () 11 | @end 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | // Override point for customization after application launch. 18 | return YES; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /GraphicsRendererSpeed/GraphicsRendererSpeed.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/carnival.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/carnival.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/carnival_less_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/carnival_less_color.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/carnival_less_color_alpha_pixels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/carnival_less_color_alpha_pixels.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/carnival_less_color_transparent_pixels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/carnival_less_color_transparent_pixels.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/iceland_P3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/iceland_P3.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/iceland_png8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/iceland_png8.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/iceland_sRGB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/iceland_sRGB.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/italy_P3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/italy_P3.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/italy_sRGB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/italy_sRGB.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/parrot_png8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/parrot_png8.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/parrot_srgb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/parrot_srgb.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/parrot_wide.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/parrot_wide.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/shoes_adobeRGB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/shoes_adobeRGB.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/shoes_sRGB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/shoes_sRGB.jpg -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/webkit_P3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/webkit_P3.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/Supporting Files/webkit_sRGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/GraphicsRendererSpeed/Supporting Files/webkit_sRGB.png -------------------------------------------------------------------------------- /GraphicsRendererSpeed/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // GraphicsRendererSpeed 4 | // 5 | // Copyright © 2020 Twitter. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface ViewController : UIViewController 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /GraphicsRendererSpeed/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GraphicsRendererSpeed 4 | // 5 | // Created on 4/17/18. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ImageSpeedComparison/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ImageSpeedComparison 4 | // 5 | // Created on 9/4/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ImageSpeedComparison/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ImageSpeedComparison 4 | // 5 | // Created on 9/4/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | #import "TIPXWebPCodec.h" 13 | 14 | @interface AppDelegate () 15 | @end 16 | 17 | @interface AppDelegate (Logger) 18 | @end 19 | 20 | @implementation AppDelegate 21 | 22 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 23 | { 24 | [TIPGlobalConfiguration sharedInstance].logger = self; 25 | [[TIPImageCodecCatalogue sharedInstance] replaceCodecForImageType:TIPImageTypeWEBP usingBlock:^id _Nonnull(id _Nullable existingCodec) { 26 | return [[TIPXWebPCodec alloc] initWithPreferredCodec:nil];//existingCodec]; 27 | }]; 28 | return YES; 29 | } 30 | 31 | - (void)tip_logWithLevel:(TIPLogLevel)level file:(NSString *)file function:(NSString *)function line:(int)line message:(NSString *)message 32 | { 33 | NSString *levelString = nil; 34 | switch (level) { 35 | case TIPLogLevelEmergency: 36 | case TIPLogLevelAlert: 37 | case TIPLogLevelCritical: 38 | case TIPLogLevelError: 39 | levelString = @"ERR"; 40 | break; 41 | case TIPLogLevelWarning: 42 | levelString = @"WRN"; 43 | break; 44 | case TIPLogLevelNotice: 45 | case TIPLogLevelInformation: 46 | levelString = @"INF"; 47 | break; 48 | case TIPLogLevelDebug: 49 | levelString = @"DBG"; 50 | break; 51 | } 52 | 53 | NSLog(@"[%@]: %@", levelString, message); 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /ImageSpeedComparison/ImageSpeedComparison.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ImageSpeedComparison/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /ImageSpeedComparison/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ImageSpeedComparison/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ImageSpeedComparison 4 | // 5 | // Created on 9/4/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /ImageSpeedComparison/fireworks_original.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/fireworks_original.gif -------------------------------------------------------------------------------- /ImageSpeedComparison/fireworks_original.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/fireworks_original.webp -------------------------------------------------------------------------------- /ImageSpeedComparison/interlace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/interlace.png -------------------------------------------------------------------------------- /ImageSpeedComparison/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ImageSpeedComparison 4 | // 5 | // Created on 9/4/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ImageSpeedComparison/no-interlace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/no-interlace.png -------------------------------------------------------------------------------- /ImageSpeedComparison/starfield_animation.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/starfield_animation.heic -------------------------------------------------------------------------------- /ImageSpeedComparison/tenor_test.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/tenor_test.webp -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.RLCP.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.RLCP.jp2 -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.RPCL.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.RPCL.jp2 -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.heic -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.jp2 -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.jpg -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.pjpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.pjpg -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.png -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.small.pjpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.small.pjpg -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.tiff -------------------------------------------------------------------------------- /ImageSpeedComparison/twitterfied.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/ImageSpeedComparison/twitterfied.webp -------------------------------------------------------------------------------- /Resources/module.modulemap: -------------------------------------------------------------------------------- 1 | module TwitterImagePipeline { 2 | umbrella "." 3 | 4 | export * 5 | module * { 6 | export * 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /TIP Sample App/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TIP Sample App 4 | // 5 | // Created on 2/3/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TIPImagePipeline; 12 | 13 | #define APP_DELEGATE ((AppDelegate *)[UIApplication sharedApplication].delegate) 14 | 15 | @interface AppDelegate : UIResponder 16 | 17 | @property (strong, nonatomic) UIWindow *window; 18 | @property (strong, nonatomic) UITabBarController *tabBarController; 19 | @property (strong, nonatomic, readonly) TIPImagePipeline *imagePipeline; 20 | 21 | // Mutable settings 22 | 23 | @property (nonatomic) NSUInteger searchCount; 24 | @property (nonatomic) BOOL searchWebP; 25 | @property (nonatomic) BOOL usePlaceholder; 26 | @property (nonatomic, getter=isDebugInfoVisible) BOOL debugInfoVisible; 27 | 28 | // Methods 29 | 30 | - (void)incrementNetworkOperations; 31 | - (void)decrementNetworkOperations; 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /TIP Sample App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /TIP Sample App/Assets.xcassets/first.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "first.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /TIP Sample App/Assets.xcassets/first.imageset/first.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIP Sample App/Assets.xcassets/first.imageset/first.pdf -------------------------------------------------------------------------------- /TIP Sample App/Assets.xcassets/second.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "second.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /TIP Sample App/Assets.xcassets/second.imageset/second.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIP Sample App/Assets.xcassets/second.imageset/second.pdf -------------------------------------------------------------------------------- /TIP Sample App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TIP Sample App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UIStatusBarTintParameters 30 | 31 | UINavigationBar 32 | 33 | Style 34 | UIBarStyleDefault 35 | Translucent 36 | 37 | 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /TIP Sample App/InspectorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // InspectorViewController.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 2/20/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface InspectorViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TIP Sample App/PipelineCacheInspectionResultsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PipelineCacheInspectionResultsViewController.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 2/21/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TIPImagePipeline; 12 | @protocol TIPImagePipelineInspectionResultEntry; 13 | 14 | @interface PipelineCacheInspectionResultsViewController : UIViewController 15 | 16 | @property (nonatomic, readonly) BOOL didClearAnyEntries; 17 | 18 | - (instancetype)initWithResults:(NSArray> *)results pipeline:(TIPImagePipeline *)pipeline; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /TIP Sample App/PipelineInspectorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PipelineInspectorViewController.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 2/21/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TIPImagePipelineInspectionResult; 12 | 13 | @interface PipelineInspectorViewController : UIViewController 14 | 15 | - (instancetype)initWithPipelineInspectionResult:(TIPImagePipelineInspectionResult *)result; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /TIP Sample App/SettingsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsViewController.h 3 | // TIP Sample App 4 | // 5 | // Created on 2/3/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SettingsViewController : UIViewController 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /TIP Sample App/TIP Sample App.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TIP Sample App/TweetImageFetchRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // TweetImageFetchRequest.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 2/11/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TweetImageInfo; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface TweetImageFetchRequest : NSObject 16 | @property (nonatomic) BOOL forcePlaceholder; 17 | - (instancetype)initWithTweetImage:(TweetImageInfo *)tweet targetView:(nullable UIView *)view; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /TIP Sample App/TwitterAPI.h: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterAPI.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 2/3/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface TweetImageInfo : NSObject 15 | 16 | @property (nonatomic, readonly, copy) NSString *baseURLString; 17 | @property (nonatomic, readonly, copy) NSString *format; 18 | @property (nonatomic, readonly) CGSize originalDimensions; 19 | 20 | @end 21 | 22 | @interface TweetInfo : NSObject 23 | 24 | @property (nonatomic, readonly, copy) NSString *handle; 25 | @property (nonatomic, readonly, copy) NSString *text; 26 | @property (nonatomic, readonly, copy) NSArray *images; 27 | 28 | @end 29 | 30 | @protocol TwitterAPIDelegate; 31 | 32 | @interface TwitterAPI : NSObject 33 | 34 | @property (nonatomic, weak) id delegate; 35 | 36 | + (instancetype)sharedInstance; 37 | 38 | - (void)searchForTerm:(NSString *)term count:(NSUInteger)count complete:(void (^)(NSArray *, NSError *))complete; 39 | 40 | @end 41 | 42 | @protocol TwitterAPIDelegate 43 | 44 | @optional 45 | - (void)APIWorkStarted:(TwitterAPI *)api; 46 | - (void)APIWorkFinished:(TwitterAPI *)api; 47 | 48 | @end 49 | 50 | FOUNDATION_EXTERN NSString *TweetImageDetermineVariant(CGSize aspectRatio, const CGSize targetDimensions, UIViewContentMode targetContentMode); 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /TIP Sample App/TwitterSearchViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterSearchViewController.h 3 | // TIP Sample App 4 | // 5 | // Created on 2/3/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TwitterSearchViewController : UIViewController 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /TIP Sample App/ZoomingTweetImageViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZoomingTweetImageViewController.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 2/11/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TweetImageInfo; 12 | 13 | @interface ZoomingTweetImageViewController : UIViewController 14 | 15 | - (instancetype)initWithTweetImage:(TweetImageInfo *)imageInfo; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /TIP Sample App/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TIP Sample App 4 | // 5 | // Created on 2/3/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /TIP Swift Sample App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /TIP Swift Sample App/Assets.xcassets/first.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "first.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /TIP Swift Sample App/Assets.xcassets/first.imageset/first.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIP Swift Sample App/Assets.xcassets/first.imageset/first.pdf -------------------------------------------------------------------------------- /TIP Swift Sample App/Assets.xcassets/second.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "second.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /TIP Swift Sample App/Assets.xcassets/second.imageset/second.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIP Swift Sample App/Assets.xcassets/second.imageset/second.pdf -------------------------------------------------------------------------------- /TIP Swift Sample App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TIP Swift Sample App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UIStatusBarTintParameters 30 | 31 | UINavigationBar 32 | 33 | Style 34 | UIBarStyleDefault 35 | Translucent 36 | 37 | 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /TIP Swift Sample App/Sample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sample-Bridging-Header.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 3/2/17. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import "InspectorViewController.h" 10 | #import "SettingsViewController.h" 11 | #import "TIPXWebPCodec.h" 12 | #import "TwitterAPI.h" 13 | -------------------------------------------------------------------------------- /TIP Swift Sample App/TIP Swift Sample App.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TIPTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /TIPTestsResources.bundle/1538x2048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/1538x2048.jpg -------------------------------------------------------------------------------- /TIPTestsResources.bundle/200w.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/200w.mp4 -------------------------------------------------------------------------------- /TIPTestsResources.bundle/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/Info.plist -------------------------------------------------------------------------------- /TIPTestsResources.bundle/allAlpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/allAlpha.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.bmp -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.heic -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.jp2 -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.jpg -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.pjpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.pjpg -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.tga -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival.tiff -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival_less_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival_less_color.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival_less_color_alpha_pixels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival_less_color_alpha_pixels.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/carnival_less_color_transparent_pixels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/carnival_less_color_transparent_pixels.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/fireworks.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/fireworks.gif -------------------------------------------------------------------------------- /TIPTestsResources.bundle/fireworks_original.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/fireworks_original.gif -------------------------------------------------------------------------------- /TIPTestsResources.bundle/fireworks_original.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/fireworks_original.heic -------------------------------------------------------------------------------- /TIPTestsResources.bundle/fireworks_original.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/fireworks_original.webp -------------------------------------------------------------------------------- /TIPTestsResources.bundle/jpeg2k.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/jpeg2k.jp2 -------------------------------------------------------------------------------- /TIPTestsResources.bundle/logo_only_final_reasonably_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/logo_only_final_reasonably_small.jpg -------------------------------------------------------------------------------- /TIPTestsResources.bundle/noAlpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/noAlpha.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/pink_outfit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/pink_outfit.jpg -------------------------------------------------------------------------------- /TIPTestsResources.bundle/sample.cr2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/sample.cr2 -------------------------------------------------------------------------------- /TIPTestsResources.bundle/sample.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/sample.icns -------------------------------------------------------------------------------- /TIPTestsResources.bundle/sample.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/sample.ico -------------------------------------------------------------------------------- /TIPTestsResources.bundle/sample.pict: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/sample.pict -------------------------------------------------------------------------------- /TIPTestsResources.bundle/sample.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/sample.webp -------------------------------------------------------------------------------- /TIPTestsResources.bundle/single_frame.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/single_frame.gif -------------------------------------------------------------------------------- /TIPTestsResources.bundle/someAlpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/someAlpha.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/tenor_test.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/tenor_test.webp -------------------------------------------------------------------------------- /TIPTestsResources.bundle/tenor_test2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/tenor_test2.webp -------------------------------------------------------------------------------- /TIPTestsResources.bundle/twitterfied.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/twitterfied.heic -------------------------------------------------------------------------------- /TIPTestsResources.bundle/twitterfied.jp2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/twitterfied.jp2 -------------------------------------------------------------------------------- /TIPTestsResources.bundle/twitterfied.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/twitterfied.jpg -------------------------------------------------------------------------------- /TIPTestsResources.bundle/twitterfied.pjpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/twitterfied.pjpg -------------------------------------------------------------------------------- /TIPTestsResources.bundle/twitterfied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/twitterfied.png -------------------------------------------------------------------------------- /TIPTestsResources.bundle/twitterfied.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/twitterfied.tiff -------------------------------------------------------------------------------- /TIPTestsResources.bundle/twitterfied.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/twitterfied.webp -------------------------------------------------------------------------------- /TIPTestsResources.bundle/weird_dpi_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/TIPTestsResources.bundle/weird_dpi_image.jpg -------------------------------------------------------------------------------- /TwitterImagePipeline.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'TwitterImagePipeline' 3 | s.version = '2.25.0' 4 | s.compiler_flags = '-DTIP_PROJECT_VERSION=2.25' 5 | s.summary = 'Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS' 6 | s.description = 'Twitter created a framework for image loading/caching in order to fulfill the numerous needs of Twitter for iOS including being fast, safe, modular and versatile.' 7 | s.homepage = 'https://github.com/twitter/ios-twitter-image-pipeline' 8 | s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } 9 | s.author = { 'Twitter' => 'opensource@twitter.com' } 10 | s.source = { :git => 'https://github.com/twitter/ios-twitter-image-pipeline.git', :tag => s.version.to_s } 11 | s.ios.deployment_target = '10.0' 12 | s.swift_versions = [ 5.0 ] 13 | 14 | s.subspec 'Default' do |sp| 15 | sp.source_files = 'TwitterImagePipeline/**/*.{h,m}' 16 | sp.public_header_files = 'TwitterImagePipeline/*.h' 17 | end 18 | 19 | s.subspec 'WebPCodec' do |sp| 20 | sp.subspec 'Default' do |ssp| 21 | ssp.source_files = 'Extended/TIPXWebPCodec.{h,m}', 'Extended/TIPXUtils.{h,m}' 22 | ssp.public_header_files = 'Extended/TIPXWebPCodec.h' 23 | ssp.vendored_frameworks = 'Extended/WebP.framework' 24 | ssp.dependency 'TwitterImagePipeline/Default' 25 | end 26 | 27 | sp.subspec 'Animated' do |ssp| 28 | ssp.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'TIPX_WEBP_ANIMATION_DECODING_ENABLED=1' } 29 | ssp.vendored_frameworks = 'Extended/WebPDemux.framework' 30 | ssp.dependency 'TwitterImagePipeline/WebPCodec/Default' 31 | end 32 | end 33 | 34 | s.subspec 'MP4Codec' do |sp| 35 | sp.source_files = 'Extended/TIPXMP4Codec.{h,m}', 'Extended/TIPXUtils.{h,m}' 36 | sp.public_header_files = 'Extended/TIPXMP4Codec.h' 37 | sp.dependency 'TwitterImagePipeline/Default' 38 | end 39 | 40 | s.default_subspec = 'Default' 41 | end 42 | -------------------------------------------------------------------------------- /TwitterImagePipeline.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(CURRENT_PROJECT_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/NSData+TIPAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+TIPAdditions.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 9/9/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSData (TIPAdditions) 14 | - (NSData *)tip_safeSubdataNoCopyWithRange:(NSRange)subRange; // throws `NSRangeException` 15 | - (nullable NSData *)tip_safeSubdataNoCopyWithRange:(NSRange)subRange error:(out NSError * __nullable * __nullable)outError; 16 | - (NSString *)tip_hexStringValue; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | 21 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/NSDictionary+TIPAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+TIPAdditions.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 9/9/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSDictionary (TIPAdditions) 14 | 15 | - (nullable NSArray *)tip_objectsForCaseInsensitiveKey:(NSString *)key; 16 | - (nullable id)tip_objectForCaseInsensitiveKey:(NSString *)key; 17 | - (nullable NSSet *)tip_keysMatchingCaseInsensitiveKey:(NSString *)key; 18 | - (id)tip_copyWithLowercaseKeys; 19 | - (id)tip_copyWithUppercaseKeys; 20 | - (id)tip_mutableCopyWithLowercaseKeys; 21 | - (id)tip_mutableCopyWithUppercaseKeys; 22 | 23 | @end 24 | 25 | @interface NSMutableDictionary (TIPAdditions) 26 | 27 | - (void)tip_removeObjectsForCaseInsensitiveKey:(NSString *)key; 28 | - (void)tip_setObject:(id)object forCaseInsensitiveKey:(NSString *)key; 29 | - (void)tip_makeAllKeysLowercase; 30 | - (void)tip_makeAllKeysUppercase; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | 36 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPDefaultImageCodecs.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPDefaultImageCodecs.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 11/7/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIPImageCodecs.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | #pragma mark - Codecs 14 | 15 | @interface TIPBasicCGImageSourceCodec : NSObject 16 | 17 | @property (nonatomic, readonly) id tip_decoder; 18 | @property (nullable, nonatomic, readonly) id tip_encoder; 19 | @property (nonatomic, readonly) BOOL tip_isAnimated; 20 | 21 | + (nullable instancetype)codecWithImageType:(NSString *)imageType; 22 | 23 | - (instancetype)init NS_UNAVAILABLE; 24 | + (instancetype)new NS_UNAVAILABLE; 25 | 26 | @end 27 | 28 | #pragma mark - Decoders 29 | 30 | @interface TIPBasicCGImageSourceDecoder : NSObject 31 | @end 32 | 33 | @interface TIPJPEGCGImageSourceDecoder : TIPBasicCGImageSourceDecoder 34 | @end 35 | 36 | #pragma mark - Encoders 37 | 38 | @interface TIPBasicCGImageSourceEncoder : NSObject 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImageCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImageCache.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 10/5/15. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TIPLRUCache; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | typedef NS_ENUM(NSInteger, TIPImageCacheType) 16 | { 17 | TIPImageCacheTypeRendered, 18 | TIPImageCacheTypeMemory, 19 | TIPImageCacheTypeDisk, 20 | }; 21 | 22 | #pragma mark - TIPImageCache 23 | 24 | @protocol TIPImageCache 25 | @property (nonatomic, readonly) TIPImageCacheType cacheType; 26 | @property (nonatomic, readonly) TIPLRUCache *manifest; 27 | @property (nonatomic, readonly) NSUInteger totalCost; // not thread safe!! Be careful...should only be used for debugging/testing 28 | - (void)clearAllImages:(nullable void (^)(void))completion; 29 | - (void)clearImageWithIdentifier:(NSString *)identifier; 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImageDiskCacheTemporaryFile.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImageDiskCacheTemporaryFile.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 3/6/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "TIPImageCacheEntry.h" 12 | 13 | @class TIPImageDiskCache; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | TIP_OBJC_DIRECT_MEMBERS 18 | @interface TIPImageDiskCacheTemporaryFile : NSObject 19 | 20 | @property (nonatomic, readonly, copy) NSString *imageIdentifier; 21 | 22 | - (NSUInteger)appendData:(nullable NSData *)data; 23 | - (void)finalizeWithContext:(TIPImageCacheEntryContext *)context; 24 | 25 | + (instancetype)new NS_UNAVAILABLE; 26 | - (instancetype)init NS_UNAVAILABLE; 27 | 28 | @end 29 | 30 | #pragma mark - Private 31 | 32 | @interface TIPImageDiskCacheTemporaryFile (DiskCache) 33 | @property (nonatomic, readonly, copy) NSString *temporaryPath; 34 | @property (nonatomic, readonly, copy) NSString *finalPath; 35 | - (instancetype)initWithIdentifier:(NSString *)identifier 36 | temporaryPath:(NSString *)tempPath 37 | finalPath:(NSString *)finalPath 38 | diskCache:(nullable TIPImageDiskCache *)diskCache; 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImageFetchDownloadInternal.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImageFetchDownloadInternal.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 8/24/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIPImageFetchDownload.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface TIPImageFetchDownloadInternal : NSObject 14 | - (NSURLSession *)URLSession; 15 | - (instancetype)initWithContext:(id)context; 16 | @end 17 | 18 | @interface TIPImageFetchDownloadProviderInternal : NSObject 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImageFetchMetrics+Project.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImageFetchMetrics+Project.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 6/19/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIP_Project.h" 10 | #import "TIPImageFetchMetrics.h" 11 | 12 | @class TIPPartialImage; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | TIP_OBJC_DIRECT_MEMBERS 17 | @interface TIPImageFetchMetrics () 18 | 19 | - (instancetype)initProject; 20 | 21 | - (void)startWithSource:(TIPImageLoadSource)source; 22 | - (void)endSource; 23 | - (void)cancelSource; 24 | 25 | - (void)convertNetworkMetricsToResumedNetworkMetrics; 26 | - (void)addNetworkMetrics:(nullable id)metrics 27 | forRequest:(NSURLRequest *)request 28 | imageType:(nullable NSString *)imageType 29 | imageSizeInBytes:(NSUInteger)sizeInBytes 30 | imageDimensions:(CGSize)dimensions; 31 | 32 | - (void)previewWasHit:(NSTimeInterval)renderLatency; 33 | - (void)progressiveFrameWasHit:(NSTimeInterval)renderLatency; 34 | - (void)finalWasHit:(NSTimeInterval)renderLatency synchronously:(BOOL)sync; 35 | 36 | @end 37 | 38 | TIP_OBJC_DIRECT_MEMBERS 39 | @interface TIPImageFetchMetricInfo () 40 | 41 | - (instancetype)initWithSource:(TIPImageLoadSource)source startTime:(uint64_t)startMachTime; 42 | 43 | - (void)end; 44 | - (void)cancel; 45 | - (void)hit:(TIPImageFetchLoadResult)result 46 | renderLatency:(NSTimeInterval)renderLatency 47 | synchronously:(BOOL)sync; 48 | - (void)addNetworkMetrics:(nullable id)metrics 49 | forRequest:(NSURLRequest *)request 50 | imageType:(nullable NSString *)imageType 51 | imageSizeInBytes:(NSUInteger)sizeInBytes 52 | imageDimensions:(CGSize)dimensions; 53 | - (void)flipLoadSourceFromNetworkToNetworkResumed; 54 | 55 | @end 56 | 57 | NS_ASSUME_NONNULL_END 58 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImageFetchOperation+Project.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImageFetchOperation+Project.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 3/6/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIPImageDownloader.h" 10 | #import "TIPImageFetchOperation.h" 11 | 12 | @class TIPImagePipeline; 13 | @class TIPImageCacheEntry; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface TIPImageFetchOperation (Project) 18 | 19 | @property (nonatomic, readonly, nullable, copy) NSString *imageIdentifier; 20 | @property (nonatomic, readonly, nullable) NSURL *imageURL; 21 | @property (nonatomic, readonly, nullable, copy) NSString *transformerIdentifier; 22 | 23 | - (instancetype)initWithImagePipeline:(TIPImagePipeline *)pipeline 24 | request:(id)request 25 | delegate:(id)delegate; 26 | 27 | - (void)completeOperationEarlyWithImageEntry:(TIPImageCacheEntry *)entry 28 | transformed:(BOOL)transformed 29 | sourceImageDimensions:(CGSize)sourceDims; 30 | - (void)handleEarlyLoadOfDirtyImageEntry:(TIPImageCacheEntry *)entry 31 | transformed:(BOOL)transformed 32 | sourceImageDimensions:(CGSize)sourceDims; 33 | 34 | - (void)willEnqueue; 35 | - (BOOL)supportsLoadingFromSource:(TIPImageLoadSource)source; 36 | - (BOOL)supportsLoadingFromRenderedCache; 37 | 38 | @end 39 | 40 | @interface TIPImageFetchOperation (Testing) 41 | - (id)associatedDownloadContext; 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImageMemoryCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImageMemoryCache.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 3/3/15. 6 | // Copyright (c) 2015 Twitter, Inc. All rights reserved. 7 | // 8 | 9 | #import "TIPInspectableCache.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface TIPImageMemoryCache : NSObject 14 | 15 | - (nullable TIPImageMemoryCacheEntry *)imageEntryForIdentifier:(NSString *)identifier 16 | targetDimensions:(CGSize)targetDimensions 17 | targetContentMode:(UIViewContentMode)targetContentMode 18 | decoderConfigMap:(nullable NSDictionary *)configMap TIP_OBJC_DIRECT; 19 | - (void)updateImageEntry:(TIPImageCacheEntry *)entry 20 | forciblyReplaceExisting:(BOOL)force TIP_OBJC_DIRECT; 21 | - (void)touchImageWithIdentifier:(NSString *)identifier TIP_OBJC_DIRECT; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImagePipeline+Project.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImagePipeline+Project.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 3/6/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIPImageCacheEntry.h" 10 | #import "TIPImageFetchDelegate.h" 11 | #import "TIPImagePipeline.h" 12 | 13 | @class TIPImageDiskCache; 14 | @class TIPImageMemoryCache; 15 | @class TIPImageRenderedCache; 16 | @class TIPImageDownloader; 17 | @class TIPImageStoreOperation; 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | FOUNDATION_EXTERN NSString * const TIPImagePipelineDidStandUpImagePipelineNotification; 22 | FOUNDATION_EXTERN NSString * const TIPImagePipelineDidTearDownImagePipelineNotification; // object will be nil 23 | 24 | @interface TIPImagePipeline () 25 | 26 | @property (tip_nonatomic_direct, readonly, nullable) TIPImageRenderedCache *renderedCache; 27 | @property (tip_nonatomic_direct, readonly, nullable) TIPImageMemoryCache *memoryCache; 28 | @property (tip_nonatomic_direct, readonly, nullable) TIPImageDiskCache *diskCache; 29 | @property (tip_nonatomic_direct, readonly, nullable) TIPImageDownloader *downloader; 30 | 31 | - (TIPImageStoreOperation *)storeOperationWithRequest:(id)request 32 | completion:(nullable TIPImagePipelineOperationCompletionBlock)completion TIP_OBJC_DIRECT; 33 | - (void)postCompletedEntry:(TIPImageCacheEntry *)entry 34 | manual:(BOOL)manual TIP_OBJC_DIRECT; 35 | 36 | - (nullable id)cacheOfType:(TIPImageCacheType)type; 37 | + (NSDictionary *)allRegisteredImagePipelines; 38 | 39 | @end 40 | 41 | @interface TIPSimpleImageFetchDelegate : NSObject 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImagePipelineInspectionResult+Project.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImagePipelineInspectionResult+Project.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 6/15/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIP_Project.h" 10 | #import "TIPImagePipelineInspectionResult.h" 11 | 12 | @class TIPImageCacheEntry; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | TIP_OBJC_DIRECT_MEMBERS 17 | @interface TIPImagePipelineInspectionResult (Project) 18 | 19 | - (nullable instancetype)initWithImagePipeline:(TIPImagePipeline *)imagePipeline; 20 | 21 | - (void)addEntries:(NSArray> *)entries; 22 | - (void)addEntry:(id)entry; 23 | 24 | @end 25 | 26 | @interface TIPImagePipelineInspectionResultEntry : NSObject 27 | 28 | // Protocol properties 29 | @property (nonatomic, copy, nullable) NSString *identifier; 30 | @property (nonatomic, nullable) NSURL *URL; 31 | @property (nonatomic) CGSize dimensions; 32 | @property (nonatomic) unsigned long long bytesUsed; 33 | @property (nonatomic) float progress; 34 | @property (nonatomic, nullable) UIImage *image; 35 | 36 | + (nullable instancetype)entryWithCacheEntry:(TIPImageCacheEntry *)cacheEntry 37 | class:(Class)class TIP_OBJC_DIRECT; 38 | 39 | @end 40 | 41 | @interface TIPImagePipelineInspectionResultRenderedEntry : TIPImagePipelineInspectionResultEntry 42 | @end 43 | 44 | @interface TIPImagePipelineInspectionResultCompleteMemoryEntry : TIPImagePipelineInspectionResultEntry 45 | @end 46 | 47 | @interface TIPImagePipelineInspectionResultCompleteDiskEntry : TIPImagePipelineInspectionResultEntry 48 | @end 49 | 50 | @interface TIPImagePipelineInspectionResultPartialMemoryEntry : TIPImagePipelineInspectionResultEntry 51 | @end 52 | 53 | @interface TIPImagePipelineInspectionResultPartialDiskEntry : TIPImagePipelineInspectionResultEntry 54 | @end 55 | 56 | NS_ASSUME_NONNULL_END 57 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPImageRenderedCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPImageRenderedCache.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 4/6/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import "TIPInspectableCache.h" 13 | 14 | @class TIPImageCacheEntry; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface TIPImageRenderedCache : NSObject 19 | 20 | - (nullable TIPImageCacheEntry *)imageEntryWithIdentifier:(NSString *)identifier 21 | transformerIdentifier:(nullable NSString *)transformerIdentifier 22 | targetDimensions:(CGSize)size 23 | targetContentMode:(UIViewContentMode)mode 24 | sourceImageDimensions:(out CGSize * __nullable)sourceDimsOut 25 | dirty:(out BOOL * __nullable)dirtyOut TIP_OBJC_DIRECT; // main thread only 26 | - (void)storeImageEntry:(TIPImageCacheEntry *)entry 27 | transformerIdentifier:(nullable NSString *)transformerIdentifier 28 | sourceImageDimensions:(CGSize)sourceDims TIP_OBJC_DIRECT; 29 | - (void)dirtyImageWithIdentifier:(NSString *)identifier TIP_OBJC_DIRECT; 30 | - (void)weakifyEntries TIP_OBJC_DIRECT; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPInspectableCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPInspectableCache.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 6/15/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TIPImagePipelineInspectionResult; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | typedef void(^TIPInspectableCacheCallback)(NSArray * __nullable completedEntries, NSArray * __nullable partialEntries); 16 | 17 | @protocol TIPInspectableCache 18 | 19 | @required 20 | - (void)inspect:(TIPInspectableCacheCallback)callback; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPLRUCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPLRUCache.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 10/27/15. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol TIPLRUCacheDelegate; 12 | @protocol TIPLRUEntry; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface TIPLRUCache : NSObject 17 | 18 | @property (nonatomic, weak, nullable) id delegate; 19 | @property (nonatomic, readonly, nullable) id headEntry; 20 | @property (nonatomic, readonly, nullable) id tailEntry; 21 | 22 | - (NSUInteger)numberOfEntries; 23 | 24 | - (instancetype)initWithEntries:(nullable NSArray> *)arrayOfLRUEntries delegate:(nullable id)delegate NS_DESIGNATED_INITIALIZER; 25 | 26 | - (nullable id)entryWithIdentifier:(NSString *)identifier canMutate:(BOOL)moveToHead; 27 | 28 | - (nullable id)entryWithIdentifier:(NSString *)identifier; 29 | 30 | - (NSArray> *)allEntries; 31 | 32 | - (void)addEntry:(id)entry; 33 | 34 | - (void)appendEntry:(id)entry; 35 | 36 | - (void)removeEntry:(nullable id)entry; 37 | 38 | - (nullable id)removeTailEntry; 39 | 40 | - (void)clearAllEntries; 41 | 42 | @end 43 | 44 | @protocol TIPLRUCacheDelegate 45 | 46 | @optional 47 | - (void)tip_cache:(TIPLRUCache *)cache didEvictEntry:(id)entry; 48 | - (BOOL)tip_cache:(TIPLRUCache *)cache canEvictEntry:(id)entry; 49 | 50 | @end 51 | 52 | 53 | @protocol TIPLRUEntry 54 | 55 | @required 56 | 57 | - (NSString *)LRUEntryIdentifier; 58 | - (BOOL)shouldAccessMoveLRUEntryToHead; 59 | @property (nonatomic, nullable) id nextLRUEntry; 60 | @property (nonatomic, nullable, weak) id previousLRUEntry; 61 | 62 | @end 63 | 64 | NS_ASSUME_NONNULL_END 65 | 66 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPTiming.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPTiming.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 5/12/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | FOUNDATION_EXTERN uint64_t TIPAbsoluteToNanoseconds(uint64_t absolute); 14 | FOUNDATION_EXTERN uint64_t TIPAbsoluteFromNanoseconds(uint64_t nano); 15 | 16 | FOUNDATION_EXTERN NSTimeInterval TIPAbsoluteToTimeInterval(uint64_t absolute); 17 | FOUNDATION_EXTERN uint64_t TIPAbsoluteFromTimeInterval(NSTimeInterval ti); 18 | 19 | static const NSTimeInterval kTIPTimeEpsilon = 0.0005; 20 | 21 | // If endTime is 0, mach_absolute_time() will be used in the calculation 22 | FOUNDATION_EXTERN NSTimeInterval TIPComputeDuration(uint64_t startTime, uint64_t endTime); 23 | 24 | NS_ASSUME_NONNULL_END 25 | 26 | -------------------------------------------------------------------------------- /TwitterImagePipeline/Project/TIPURLStringCoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPURLStringCoding.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 8/12/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | FOUNDATION_EXTERN NSString * __nullable TIPURLEncodeString(NSString * __nullable string); 14 | FOUNDATION_EXTERN NSString * __nullable TIPURLDecodeString(NSString * __nullable string, BOOL replacePlussesWithSpaces); 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /TwitterImagePipeline/TIPLogger.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPLogger.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 7/14/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 14 | Syslog compatible log levels for use with *TIPLogger*. 15 | */ 16 | typedef NS_ENUM(NSInteger, TIPLogLevel) 17 | { 18 | /** Present for syslog compatability */ 19 | TIPLogLevelEmergency, 20 | /** Present for syslog compatability */ 21 | TIPLogLevelAlert, 22 | /** Present for syslog compatability */ 23 | TIPLogLevelCritical, 24 | /** The _ERROR_ log level */ 25 | TIPLogLevelError, 26 | /** The _WARNING_ log level */ 27 | TIPLogLevelWarning, 28 | /** Present for syslog compatability */ 29 | TIPLogLevelNotice, 30 | /** The _INFORMATION_ log level */ 31 | TIPLogLevelInformation, 32 | /** The _DEBUG_ log level */ 33 | TIPLogLevelDebug 34 | }; 35 | 36 | /** 37 | Protocol for supporting log statements from *TwitterImagePipeline* 38 | See `[TIPGlobalConfiguration logger]` 39 | */ 40 | @protocol TIPLogger 41 | 42 | @required 43 | 44 | /** 45 | Method called when logging a message from *TwitterImagePipeline* 46 | */ 47 | - (void)tip_logWithLevel:(TIPLogLevel)level file:(NSString *)file function:(NSString *)function line:(int)line message:(NSString *)message; 48 | 49 | @optional 50 | 51 | /** 52 | Optional method to determine if a message should be logged as an optimization to avoid argument 53 | execution of the log message. 54 | 55 | Default == `YES` 56 | */ 57 | - (BOOL)tip_canLogWithLevel:(TIPLogLevel)level; 58 | 59 | @end 60 | 61 | NS_ASSUME_NONNULL_END 62 | -------------------------------------------------------------------------------- /TwitterImagePipeline/TIPSafeOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPSafeOperation.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 6/1/17 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 14 | `TIPSafeOperation` works to encapsulate fixes for `NSOperation`. 15 | 16 | Specifically: 17 | - `NSOperation` is supposed to clear the `completionBlock` after it has been called. It does do this on macOS, but not on all versions of iOS. `TIPSafeOperation` fixes this. 18 | */ 19 | @interface TIPSafeOperation : NSOperation 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | 24 | -------------------------------------------------------------------------------- /TwitterImagePipeline/TIPSafeOperation.m: -------------------------------------------------------------------------------- 1 | // 2 | // TIPSafeOperation.m 3 | // TwitterImagePipeline 4 | // 5 | // Created on 6/1/17 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIP_Project.h" 10 | #import "TIPSafeOperation.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | static BOOL _NSOperationHasCompletionBlockBug(void) 15 | { 16 | static BOOL sHasBug = NO; 17 | static dispatch_once_t onceToken; 18 | dispatch_once(&onceToken, ^{ 19 | #if TARGET_OS_OSX 20 | // no bug on macOS 21 | sHasBug = NO; 22 | #else 23 | // bug fixed iOS 11 24 | if (tip_available_ios_11) { 25 | sHasBug = NO; 26 | } else { 27 | sHasBug = YES; 28 | } 29 | #endif 30 | }); 31 | return sHasBug; 32 | } 33 | 34 | @implementation TIPSafeOperation 35 | 36 | - (void)setCompletionBlock:(nullable void (^)(void))completionBlock 37 | { 38 | if (!_NSOperationHasCompletionBlockBug()) { 39 | [super setCompletionBlock:completionBlock]; 40 | return; 41 | } 42 | 43 | #pragma clang diagnostic push 44 | #pragma clang diagnostic ignored "-Warc-retain-cycles" 45 | [super setCompletionBlock:^{ 46 | if (completionBlock) { 47 | completionBlock(); 48 | } 49 | 50 | [self tip_clearCompletionBlock]; 51 | }]; 52 | #pragma clang diagnostic pop 53 | } 54 | 55 | - (void)tip_clearCompletionBlock 56 | { 57 | [super setCompletionBlock:nil]; 58 | } 59 | 60 | @end 61 | 62 | NS_ASSUME_NONNULL_END 63 | 64 | 65 | -------------------------------------------------------------------------------- /TwitterImagePipeline/TwitterImagePipeline.h: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipeline.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 3/4/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #pragma mark TIP Headers 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | 36 | #pragma mark TIP Categories 37 | 38 | #import 39 | #import 40 | -------------------------------------------------------------------------------- /TwitterImagePipeline/UIView+TIPImageFetchable.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+TIPImageFetchable.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 3/19/15. 6 | // Copyright (c) 2015 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class TIPImageViewFetchHelper; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Convenience category for `UIView` for associating a `TIPImageViewFetchHelper` 18 | */ 19 | @interface UIView (TIPImageFetchable) 20 | 21 | /** 22 | An `TIPImageViewFetchHelper` for loading `TIPImageFetchRequests` into this view. 23 | 24 | Setting this value for the first time will add an invisible "observer" 25 | subview to this view for observing events that `TIPImageViewFetchHelper` needs 26 | in order to work properly. 27 | 28 | @warning the `tip_fetchHelper` may only be set on `UIView` instances that adopt 29 | `TIPImageFetchable`. To extend fetch helper support to a new `UIView` subclass, 30 | implement a category for that object that implements `TIPImageFetchable`. 31 | */ 32 | @property (nullable, nonatomic) TIPImageViewFetchHelper *tip_fetchHelper; 33 | 34 | @end 35 | 36 | /** 37 | Convenience category for `UIImageView` for adopting `TIPImageFetchable`. 38 | Just maps `tip_fetchedImage` property to `image` property, easy. 39 | */ 40 | @interface UIImageView (TIPImageFetchable) 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /TwitterImagePipelineTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TwitterImagePipelineTests/TIPFileUtilsTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // TIPFileUtilsTest.m 3 | // TwitterImagePipelineTests 4 | // 5 | // Created on 5/3/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #include 12 | 13 | @interface TIPFileUtilsTest : XCTestCase 14 | 15 | @end 16 | 17 | @implementation TIPFileUtilsTest 18 | 19 | // Our use of getxattr relies on this property 20 | - (void)testLargerThanDoubleXAttrReturnsErrorCode 21 | { 22 | XCTAssert(sizeof(long double) > sizeof(double)); //the test is invalid otherwise 23 | long double ldNumber = 1.23456; 24 | 25 | NSError *error = nil; 26 | NSString *tmpDir = NSTemporaryDirectory(); 27 | XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:tmpDir isDirectory:NULL]); 28 | 29 | NSString *tmpFile = [tmpDir stringByAppendingPathComponent:@"tip_xattr_test"]; 30 | [[NSFileManager defaultManager] removeItemAtPath:tmpFile error:nil]; 31 | XCTAssertFalse([[NSFileManager defaultManager] fileExistsAtPath:tmpFile isDirectory:NULL]); 32 | 33 | [@"testFile" writeToFile:tmpFile atomically:YES encoding:NSUTF8StringEncoding error:&error]; 34 | XCTAssertNil(error); 35 | 36 | char *xAttrName = "tip_xattr_test_attr_name"; 37 | const char *cStringPath = [tmpFile cStringUsingEncoding:NSUTF8StringEncoding]; 38 | 39 | int writeReturnCode = setxattr(cStringPath, xAttrName, &ldNumber, sizeof(long double), 0, 0); 40 | XCTAssertEqual(writeReturnCode, 0); 41 | 42 | double readValue; 43 | ssize_t getReturnCode = getxattr(cStringPath, xAttrName, &readValue, sizeof(double), 0, 0); 44 | XCTAssertLessThan(getReturnCode, (ssize_t)0); 45 | XCTAssertEqual(errno, ERANGE); 46 | 47 | //Make sure tmpFile doesn't get deallocated before cStringUsingEncoding can be used 48 | NSLog(@"%@", tmpFile); 49 | 50 | [[NSFileManager defaultManager] removeItemAtPath:tmpFile error:&error]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /TwitterImagePipelineTests/TIPTestImageFetchDownloadInternalWithStubbing.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPTestImageFetchDownloadInternalWithStubbing.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 8/28/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIPImageFetchDownloadInternal.h" 10 | 11 | @interface TIPTestImageFetchDownloadInternalWithStubbing : TIPImageFetchDownloadInternal 12 | - (instancetype)initWithContext:(id)context NS_UNAVAILABLE; 13 | - (instancetype)initWithContext:(id)context stub:(BOOL)stub; 14 | @end 15 | 16 | @interface TIPTestImageFetchDownloadProviderInternalWithStubbing : NSObject 17 | @property (nonatomic, readwrite) BOOL downloadStubbingEnabled; 18 | @end 19 | -------------------------------------------------------------------------------- /TwitterImagePipelineTests/TIPTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // TIPTests.h 3 | // TwitterImagePipeline 4 | // 5 | // Created on 8/31/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #define kTIPTestsImageFetchDownloadProviderClassKey @"TIP_TESTS_IMAGE_FETCH_DOWNLOAD_PROVIDER_CLASS" 13 | 14 | FOUNDATION_EXTERN Class TIPTestsImageFetchDownloadProviderOverrideClass(void); 15 | FOUNDATION_EXTERN NSBundle *TIPTestsResourceBundle(void); 16 | 17 | // Need something to be compiled into the unit tests bundle or else there's no binary to run! 18 | // Put TIP_TESTS_IMPLEMENT_DUMMY in a code file for the consuming unit tests 19 | 20 | #define TIP_TESTS_IMPLEMENT_DUMMY \ 21 | void TwitterImagePipelineTestsDummyFunction(void); \ 22 | void TwitterImagePipelineTestsDummyFunction(void) \ 23 | { \ 24 | NSLog(@"TwitterImagePipelineTestsDummyFunction"); \ 25 | } 26 | -------------------------------------------------------------------------------- /TwitterImagePipelineTests/TwitterImagePipelineTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TwitterImagePipelineTests.m 3 | // TwitterImagePipeline 4 | // 5 | // Created on 8/31/16. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import "TIPTests.h" 10 | 11 | TIP_TESTS_IMPLEMENT_DUMMY; 12 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | function ci_lib() { 6 | NAME=$1 7 | xcodebuild -project TwitterImagePipeline.xcodeproj \ 8 | -scheme "TwitterImagePipeline.framework" \ 9 | -destination "platform=iOS Simulator,name=${NAME}" \ 10 | -sdk iphonesimulator \ 11 | build test 12 | } 13 | 14 | function ci_demo() { 15 | NAME=$1 16 | xcodebuild -project TwitterImagePipeline.xcodeproj \ 17 | -scheme "TIP Sample App" \ 18 | -destination "platform=iOS Simulator,name=${NAME}" \ 19 | -sdk iphonesimulator \ 20 | build 21 | } 22 | 23 | 24 | ci_lib "iPhone 8" && ci_demo "iPhone 8" 25 | -------------------------------------------------------------------------------- /placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twitter/ios-twitter-image-pipeline/fca0596d90fbc70baecfc600643a1d9f5deb4d74/placeholder.jpg -------------------------------------------------------------------------------- /webp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /webp/webp.h: -------------------------------------------------------------------------------- 1 | // 2 | // webp.h 3 | // webp 4 | // 5 | // Created on 9/24/19. 6 | // Copyright © 2020 Twitter. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | --------------------------------------------------------------------------------