epeg 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/MANIFEST +5 -0
- data/TODO +1 -0
- data/epeg/.dockerignore +4 -0
- data/epeg/.gitignore +5 -0
- data/epeg/CMakeLists.txt +30 -0
- data/epeg/Dockerfile +23 -0
- data/epeg/Epeg.h +90 -0
- data/epeg/README.md +42 -0
- data/epeg/epeg_main.c +1642 -0
- data/epeg/epeg_private.h +85 -0
- data/epeg/example/.gitignore +1 -0
- data/epeg/example/CMakeLists.txt +20 -0
- data/epeg/example/example.jpg +0 -0
- data/epeg/example/rotatetest.c +29 -0
- data/epeg/example/scaletest.c +48 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/BUILDING.md +828 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/CMakeLists.txt +1420 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/ChangeLog.md +1494 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/LICENSE.md +132 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/README.ijg +277 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/README.md +356 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cderror.h +137 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cdjpeg.c +145 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cdjpeg.h +157 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/change.log +315 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cjpeg.1 +354 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cjpeg.c +695 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/BuildPackages.cmake +182 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/GNUInstallDirs.cmake +416 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/cmake_uninstall.cmake.in +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmakescripts/testclean.cmake +41 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/cmyk.h +61 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/coderules.txt +78 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/djpeg.1 +296 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/djpeg.c +822 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/annotated.html +104 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/bc_s.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/bdwn.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/classes.html +106 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/closed.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/doxygen-extra.css +3 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/doxygen.css +1184 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/doxygen.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/dynsections.js +97 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2blank.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2cl.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2doc.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2folderclosed.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2folderopen.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2lastnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2link.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2mlastnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2mnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2mo.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2node.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2ns.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2plastnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2pnode.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2splitbar.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/ftv2vertline.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/functions.html +134 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/functions_vars.html +134 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/group___turbo_j_p_e_g.html +2775 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/index.html +90 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/jquery.js +8 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/modules.html +95 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/nav_f.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/nav_g.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/nav_h.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/open.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_63.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_63.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_64.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_64.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_68.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_68.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6e.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6e.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6f.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_6f.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_72.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_72.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_74.js +102 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_77.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_77.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_78.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_78.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_79.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/all_79.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/classes_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/classes_74.js +6 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/close.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enums_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enums_74.js +8 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enumvalues_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/enumvalues_74.js +37 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/functions_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/functions_74.js +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/groups_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/groups_74.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/mag_sel.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/nomatches.html +12 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search.css +271 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search.js +809 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search_l.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search_m.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/search_r.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/typedefs_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/typedefs_74.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_63.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_63.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_64.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_64.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_68.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_68.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6e.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6e.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6f.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_6f.js +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_72.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_72.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_74.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_74.js +10 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_77.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_77.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_78.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_78.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_79.html +26 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/search/variables_79.js +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/structtjregion.html +186 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/structtjscalingfactor.html +148 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/structtjtransform.html +212 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/sync_off.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/sync_on.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_a.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_b.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_h.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tab_s.png +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doc/html/tabs.css +60 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doxygen-extra.css +3 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/doxygen.config +16 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/example.txt +464 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jaricom.c +157 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/CMakeLists.txt +88 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/MANIFEST.MF +2 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/README +52 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/TJBench.java +1021 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/TJExample.java +405 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/TJUnitTest.java +960 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/allclasses-frame.html +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/allclasses-noframe.html +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/constant-values.html +532 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/deprecated-list.html +252 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/help-doc.html +210 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/index-all.html +1029 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/index.html +71 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJ.html +1356 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html +926 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html +241 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +1255 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJException.html +340 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html +343 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html +751 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html +421 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/YUVImage.html +765 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/package-frame.html +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/package-summary.html +202 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/org/libjpegturbo/turbojpeg/package-tree.html +160 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/overview-tree.html +164 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/package-list +1 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/background.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/tab.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/titlebar.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/resources/titlebar_end.gif +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/script.js +30 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/serialized-form.html +176 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/doc/stylesheet.css +474 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJ.java +584 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJCompressor.java +677 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJCustomFilter.java +76 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJDecompressor.java +931 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJException.java +78 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJLoader-unix.java.in +59 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJLoader-win.java.in +35 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJScalingFactor.java +115 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJTransform.java +227 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/TJTransformer.java +163 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org/libjpegturbo/turbojpeg/YUVImage.java +445 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJ.h +129 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJCompressor.h +101 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJDecompressor.h +101 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/java/org_libjpegturbo_turbojpeg_TJTransformer.h +29 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcapimin.c +295 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcapistd.c +162 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcarith.c +932 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jccoefct.c +449 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jccolext.c +144 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jccolor.c +710 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcdctmgr.c +721 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jchuff.c +1096 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jchuff.h +42 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcicc.c +105 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcinit.c +77 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcmainct.c +162 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcmarker.c +664 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcmaster.c +640 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcomapi.c +109 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jconfig.h.in +73 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jconfig.txt +143 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jconfigint.h.in +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcparam.c +541 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcphuff.c +1105 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcprepct.c +351 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcsample.c +539 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jcstest.c +126 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jctrans.c +400 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdapimin.c +407 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdapistd.c +639 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdarith.c +773 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatadst-tj.c +203 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatadst.c +293 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatasrc-tj.c +194 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdatasrc.c +295 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcoefct.c +692 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcoefct.h +82 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcol565.c +384 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcolext.c +143 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdcolor.c +883 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdct.h +208 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jddctmgr.c +352 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdhuff.c +831 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdhuff.h +238 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdicc.c +171 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdinput.c +408 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmainct.c +460 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmainct.h +71 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmarker.c +1377 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmaster.c +737 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmaster.h +28 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmerge.c +617 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmrg565.c +354 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdmrgext.c +184 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdphuff.c +687 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdpostct.c +294 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdsample.c +518 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdsample.h +50 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jdtrans.c +155 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jerror.c +251 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jerror.h +316 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jfdctflt.c +169 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jfdctfst.c +227 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jfdctint.c +288 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctflt.c +240 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctfst.c +371 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctint.c +2627 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jidctred.c +409 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jinclude.h +88 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmemmgr.c +1179 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmemnobs.c +115 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmemsys.h +178 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jmorecfg.h +421 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpeg_nbits_table.h +4098 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegcomp.h +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegint.h +368 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpeglib.h +1132 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegtran.1 +295 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jpegtran.c +601 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jquant1.c +859 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jquant2.c +1285 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jsimd.h +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jsimd_none.c +418 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jsimddct.h +70 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jstdhuff.c +143 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jutils.c +133 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/jversion.h +52 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/libjpeg.map.in +11 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/libjpeg.txt +3144 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/CMakeLists.txt +1 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5.c +275 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5.h +57 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5cmp.c +59 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/md5/md5hl.c +125 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdbmp.c +689 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdcolmap.c +254 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdgif.c +39 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdjpgcom.1 +63 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdjpgcom.c +510 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdppm.c +766 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdrle.c +389 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdswitch.c +424 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/rdtarga.c +509 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/Distribution.xml.in +24 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/License.rtf +20 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/ReadMe.txt +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/Welcome.rtf +17 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/deb-control.in +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/installer.nsi.in +191 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/libjpeg.pc.in +10 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/libturbojpeg.pc.in +10 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makecygwinpkg.in +66 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makedpkg.in +115 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makemacpkg.in +284 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makerpm.in +30 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/makesrpm.in +48 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/maketarball.in +51 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/rpm.spec.in +221 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/release/uninstall.in +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/sharedlib/CMakeLists.txt +99 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/CMakeLists.txt +385 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm/jsimd.c +721 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm/jsimd_neon.S +2878 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm64/jsimd.c +798 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/arm64/jsimd_neon.S +3433 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/gas-preprocessor.in +1 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolext-avx2.asm +578 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolext-mmx.asm +476 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolext-sse2.asm +503 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolor-avx2.asm +121 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolor-mmx.asm +121 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jccolor-sse2.asm +120 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgray-avx2.asm +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgray-mmx.asm +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgray-sse2.asm +112 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgryext-avx2.asm +457 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgryext-mmx.asm +355 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcgryext-sse2.asm +382 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jchuff-sse2.asm +424 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcphuff-sse2.asm +660 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcsample-avx2.asm +388 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcsample-mmx.asm +324 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jcsample-sse2.asm +351 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolext-avx2.asm +515 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolext-mmx.asm +404 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolext-sse2.asm +458 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolor-avx2.asm +118 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolor-mmx.asm +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdcolor-sse2.asm +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmerge-avx2.asm +136 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmerge-mmx.asm +123 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmerge-sse2.asm +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmrgext-avx2.asm +575 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmrgext-mmx.asm +460 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdmrgext-sse2.asm +517 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdsample-avx2.asm +760 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdsample-mmx.asm +731 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jdsample-sse2.asm +724 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctflt-3dn.asm +318 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctflt-sse.asm +369 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctfst-mmx.asm +395 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctfst-sse2.asm +403 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctint-avx2.asm +331 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctint-mmx.asm +620 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jfdctint-sse2.asm +633 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctflt-3dn.asm +451 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctflt-sse.asm +571 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctflt-sse2.asm +497 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctfst-mmx.asm +499 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctfst-sse2.asm +501 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctint-avx2.asm +453 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctint-mmx.asm +851 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctint-sse2.asm +858 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctred-mmx.asm +704 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jidctred-sse2.asm +592 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquant-3dn.asm +230 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquant-mmx.asm +276 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquant-sse.asm +208 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquantf-sse2.asm +168 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquanti-avx2.asm +188 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jquanti-sse2.asm +201 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jsimd.c +1253 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/i386/jsimdcpu.asm +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/jsimd.h +1083 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jccolext-mmi.c +483 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jccolor-mmi.c +148 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jcsample-mmi.c +100 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jcsample.h +28 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jdcolext-mmi.c +424 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jdcolor-mmi.c +139 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jdsample-mmi.c +245 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jfdctint-mmi.c +398 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jidctint-mmi.c +571 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jquanti-mmi.c +130 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jsimd.c +610 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/jsimd_mmi.h +57 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/loongson/loongson-mmintrin.h +1324 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/mips/jsimd.c +1123 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/mips/jsimd_dspr2.S +4479 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/mips/jsimd_dspr2_asm.h +292 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jcolsamp.inc +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jdct.inc +31 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jpeg_nbits_table.inc +4097 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jsimdcfg.inc +93 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jsimdcfg.inc.h +131 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/nasm/jsimdext.inc +479 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jccolext-altivec.c +269 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jccolor-altivec.c +116 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcgray-altivec.c +111 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcgryext-altivec.c +228 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcsample-altivec.c +159 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jcsample.h +28 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdcolext-altivec.c +276 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdcolor-altivec.c +106 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdmerge-altivec.c +130 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdmrgext-altivec.c +329 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jdsample-altivec.c +400 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jfdctfst-altivec.c +154 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jfdctint-altivec.c +258 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jidctfst-altivec.c +255 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jidctint-altivec.c +357 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jquanti-altivec.c +250 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jsimd.c +872 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/powerpc/jsimd_altivec.h +98 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolext-avx2.asm +558 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolext-sse2.asm +483 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolor-avx2.asm +121 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jccolor-sse2.asm +120 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgray-avx2.asm +113 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgray-sse2.asm +112 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgryext-avx2.asm +437 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcgryext-sse2.asm +362 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jchuff-sse2.asm +346 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcphuff-sse2.asm +637 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcsample-avx2.asm +366 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jcsample-sse2.asm +329 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolext-avx2.asm +495 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolext-sse2.asm +438 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolor-avx2.asm +118 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdcolor-sse2.asm +117 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmerge-avx2.asm +136 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmerge-sse2.asm +135 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmrgext-avx2.asm +593 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdmrgext-sse2.asm +535 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdsample-avx2.asm +695 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jdsample-sse2.asm +664 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctflt-sse.asm +355 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctfst-sse2.asm +389 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctint-avx2.asm +320 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jfdctint-sse2.asm +619 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctflt-sse2.asm +481 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctfst-sse2.asm +490 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctint-avx2.asm +417 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctint-sse2.asm +846 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jidctred-sse2.asm +573 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jquantf-sse2.asm +154 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jquanti-avx2.asm +162 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jquanti-sse2.asm +187 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jsimd.c +1076 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/simd/x86_64/jsimdcpu.asm +86 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/structure.txt +904 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/nightshot_iso_100.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/nightshot_iso_100.txt +25 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test.scan +5 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test1.icc +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test1.icc.txt +20 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test2.icc +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/test2.icc.txt +20 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testimgari.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testimgint.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testorig.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testorig.ppm +4 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/testorig12.jpg +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/vgl_5674_0098.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/vgl_6434_0018a.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/testimages/vgl_6548_0026a.bmp +0 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjbench.c +1031 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjbenchtest.in +256 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjbenchtest.java.in +215 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjexample.c +396 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjexampletest.in +149 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjexampletest.java.in +151 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjunittest.c +931 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjutil.c +70 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/tjutil.h +47 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/transupp.c +1628 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/transupp.h +210 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg-jni.c +1246 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg-mapfile +65 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg-mapfile.jni +101 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg.c +2152 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/turbojpeg.h +1744 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/usage.txt +635 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jconfig.h.in +34 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg62-memsrcdst.def +108 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg62.def +106 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg7-memsrcdst.def +110 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg7.def +108 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/win/jpeg8.def +111 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wizard.txt +212 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrbmp.c +558 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrgif.c +413 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrjpgcom.1 +103 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrjpgcom.c +591 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrppm.c +365 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrrle.c +309 -0
- data/epeg/vendor/libjpeg-turbo-2.0.4/wrtarga.c +261 -0
- data/epeg.c +131 -0
- data/epeg.gemspec +18 -0
- data/extconf.rb +80 -0
- data/test.jpg +0 -0
- data/test.rb +42 -0
- metadata +546 -0
@@ -0,0 +1,601 @@
|
|
1
|
+
/*
|
2
|
+
* jpegtran.c
|
3
|
+
*
|
4
|
+
* This file was part of the Independent JPEG Group's software:
|
5
|
+
* Copyright (C) 1995-2010, Thomas G. Lane, Guido Vollbeding.
|
6
|
+
* libjpeg-turbo Modifications:
|
7
|
+
* Copyright (C) 2010, 2014, 2017, D. R. Commander.
|
8
|
+
* For conditions of distribution and use, see the accompanying README.ijg
|
9
|
+
* file.
|
10
|
+
*
|
11
|
+
* This file contains a command-line user interface for JPEG transcoding.
|
12
|
+
* It is very similar to cjpeg.c, and partly to djpeg.c, but provides
|
13
|
+
* lossless transcoding between different JPEG file formats. It also
|
14
|
+
* provides some lossless and sort-of-lossless transformations of JPEG data.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
18
|
+
#include "transupp.h" /* Support routines for jpegtran */
|
19
|
+
#include "jversion.h" /* for version message */
|
20
|
+
#include "jconfigint.h"
|
21
|
+
|
22
|
+
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
23
|
+
#ifdef __MWERKS__
|
24
|
+
#include <SIOUX.h> /* Metrowerks needs this */
|
25
|
+
#include <console.h> /* ... and this */
|
26
|
+
#endif
|
27
|
+
#ifdef THINK_C
|
28
|
+
#include <console.h> /* Think declares it here */
|
29
|
+
#endif
|
30
|
+
#endif
|
31
|
+
|
32
|
+
|
33
|
+
/*
|
34
|
+
* Argument-parsing code.
|
35
|
+
* The switch parser is designed to be useful with DOS-style command line
|
36
|
+
* syntax, ie, intermixed switches and file names, where only the switches
|
37
|
+
* to the left of a given file name affect processing of that file.
|
38
|
+
* The main program in this file doesn't actually use this capability...
|
39
|
+
*/
|
40
|
+
|
41
|
+
|
42
|
+
static const char *progname; /* program name for error messages */
|
43
|
+
static char *icc_filename; /* for -icc switch */
|
44
|
+
static char *outfilename; /* for -outfile switch */
|
45
|
+
static JCOPY_OPTION copyoption; /* -copy switch */
|
46
|
+
static jpeg_transform_info transformoption; /* image transformation options */
|
47
|
+
|
48
|
+
|
49
|
+
LOCAL(void)
|
50
|
+
usage(void)
|
51
|
+
/* complain about bad command line */
|
52
|
+
{
|
53
|
+
fprintf(stderr, "usage: %s [switches] ", progname);
|
54
|
+
#ifdef TWO_FILE_COMMANDLINE
|
55
|
+
fprintf(stderr, "inputfile outputfile\n");
|
56
|
+
#else
|
57
|
+
fprintf(stderr, "[inputfile]\n");
|
58
|
+
#endif
|
59
|
+
|
60
|
+
fprintf(stderr, "Switches (names may be abbreviated):\n");
|
61
|
+
fprintf(stderr, " -copy none Copy no extra markers from source file\n");
|
62
|
+
fprintf(stderr, " -copy comments Copy only comment markers (default)\n");
|
63
|
+
fprintf(stderr, " -copy all Copy all extra markers\n");
|
64
|
+
#ifdef ENTROPY_OPT_SUPPORTED
|
65
|
+
fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
|
66
|
+
#endif
|
67
|
+
#ifdef C_PROGRESSIVE_SUPPORTED
|
68
|
+
fprintf(stderr, " -progressive Create progressive JPEG file\n");
|
69
|
+
#endif
|
70
|
+
fprintf(stderr, "Switches for modifying the image:\n");
|
71
|
+
#if TRANSFORMS_SUPPORTED
|
72
|
+
fprintf(stderr, " -crop WxH+X+Y Crop to a rectangular subarea\n");
|
73
|
+
fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n");
|
74
|
+
fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n");
|
75
|
+
fprintf(stderr, " -perfect Fail if there is non-transformable edge blocks\n");
|
76
|
+
fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n");
|
77
|
+
#endif
|
78
|
+
#if TRANSFORMS_SUPPORTED
|
79
|
+
fprintf(stderr, " -transpose Transpose image\n");
|
80
|
+
fprintf(stderr, " -transverse Transverse transpose image\n");
|
81
|
+
fprintf(stderr, " -trim Drop non-transformable edge blocks\n");
|
82
|
+
#endif
|
83
|
+
fprintf(stderr, "Switches for advanced users:\n");
|
84
|
+
#ifdef C_ARITH_CODING_SUPPORTED
|
85
|
+
fprintf(stderr, " -arithmetic Use arithmetic coding\n");
|
86
|
+
#endif
|
87
|
+
fprintf(stderr, " -icc FILE Embed ICC profile contained in FILE\n");
|
88
|
+
fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
|
89
|
+
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
90
|
+
fprintf(stderr, " -outfile name Specify name for output file\n");
|
91
|
+
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
92
|
+
fprintf(stderr, " -version Print version information and exit\n");
|
93
|
+
fprintf(stderr, "Switches for wizards:\n");
|
94
|
+
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
95
|
+
fprintf(stderr, " -scans FILE Create multi-scan JPEG per script FILE\n");
|
96
|
+
#endif
|
97
|
+
exit(EXIT_FAILURE);
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
LOCAL(void)
|
102
|
+
select_transform(JXFORM_CODE transform)
|
103
|
+
/* Silly little routine to detect multiple transform options,
|
104
|
+
* which we can't handle.
|
105
|
+
*/
|
106
|
+
{
|
107
|
+
#if TRANSFORMS_SUPPORTED
|
108
|
+
if (transformoption.transform == JXFORM_NONE ||
|
109
|
+
transformoption.transform == transform) {
|
110
|
+
transformoption.transform = transform;
|
111
|
+
} else {
|
112
|
+
fprintf(stderr, "%s: can only do one image transformation at a time\n",
|
113
|
+
progname);
|
114
|
+
usage();
|
115
|
+
}
|
116
|
+
#else
|
117
|
+
fprintf(stderr, "%s: sorry, image transformation was not compiled\n",
|
118
|
+
progname);
|
119
|
+
exit(EXIT_FAILURE);
|
120
|
+
#endif
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
LOCAL(int)
|
125
|
+
parse_switches(j_compress_ptr cinfo, int argc, char **argv,
|
126
|
+
int last_file_arg_seen, boolean for_real)
|
127
|
+
/* Parse optional switches.
|
128
|
+
* Returns argv[] index of first file-name argument (== argc if none).
|
129
|
+
* Any file names with indexes <= last_file_arg_seen are ignored;
|
130
|
+
* they have presumably been processed in a previous iteration.
|
131
|
+
* (Pass 0 for last_file_arg_seen on the first or only iteration.)
|
132
|
+
* for_real is FALSE on the first (dummy) pass; we may skip any expensive
|
133
|
+
* processing.
|
134
|
+
*/
|
135
|
+
{
|
136
|
+
int argn;
|
137
|
+
char *arg;
|
138
|
+
boolean simple_progressive;
|
139
|
+
char *scansarg = NULL; /* saves -scans parm if any */
|
140
|
+
|
141
|
+
/* Set up default JPEG parameters. */
|
142
|
+
simple_progressive = FALSE;
|
143
|
+
icc_filename = NULL;
|
144
|
+
outfilename = NULL;
|
145
|
+
copyoption = JCOPYOPT_DEFAULT;
|
146
|
+
transformoption.transform = JXFORM_NONE;
|
147
|
+
transformoption.perfect = FALSE;
|
148
|
+
transformoption.trim = FALSE;
|
149
|
+
transformoption.force_grayscale = FALSE;
|
150
|
+
transformoption.crop = FALSE;
|
151
|
+
transformoption.slow_hflip = FALSE;
|
152
|
+
cinfo->err->trace_level = 0;
|
153
|
+
|
154
|
+
/* Scan command line options, adjust parameters */
|
155
|
+
|
156
|
+
for (argn = 1; argn < argc; argn++) {
|
157
|
+
arg = argv[argn];
|
158
|
+
if (*arg != '-') {
|
159
|
+
/* Not a switch, must be a file name argument */
|
160
|
+
if (argn <= last_file_arg_seen) {
|
161
|
+
outfilename = NULL; /* -outfile applies to just one input file */
|
162
|
+
continue; /* ignore this name if previously processed */
|
163
|
+
}
|
164
|
+
break; /* else done parsing switches */
|
165
|
+
}
|
166
|
+
arg++; /* advance past switch marker character */
|
167
|
+
|
168
|
+
if (keymatch(arg, "arithmetic", 1)) {
|
169
|
+
/* Use arithmetic coding. */
|
170
|
+
#ifdef C_ARITH_CODING_SUPPORTED
|
171
|
+
cinfo->arith_code = TRUE;
|
172
|
+
#else
|
173
|
+
fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
|
174
|
+
progname);
|
175
|
+
exit(EXIT_FAILURE);
|
176
|
+
#endif
|
177
|
+
|
178
|
+
} else if (keymatch(arg, "copy", 2)) {
|
179
|
+
/* Select which extra markers to copy. */
|
180
|
+
if (++argn >= argc) /* advance to next argument */
|
181
|
+
usage();
|
182
|
+
if (keymatch(argv[argn], "none", 1)) {
|
183
|
+
copyoption = JCOPYOPT_NONE;
|
184
|
+
} else if (keymatch(argv[argn], "comments", 1)) {
|
185
|
+
copyoption = JCOPYOPT_COMMENTS;
|
186
|
+
} else if (keymatch(argv[argn], "all", 1)) {
|
187
|
+
copyoption = JCOPYOPT_ALL;
|
188
|
+
} else
|
189
|
+
usage();
|
190
|
+
|
191
|
+
} else if (keymatch(arg, "crop", 2)) {
|
192
|
+
/* Perform lossless cropping. */
|
193
|
+
#if TRANSFORMS_SUPPORTED
|
194
|
+
if (++argn >= argc) /* advance to next argument */
|
195
|
+
usage();
|
196
|
+
if (!jtransform_parse_crop_spec(&transformoption, argv[argn])) {
|
197
|
+
fprintf(stderr, "%s: bogus -crop argument '%s'\n",
|
198
|
+
progname, argv[argn]);
|
199
|
+
exit(EXIT_FAILURE);
|
200
|
+
}
|
201
|
+
#else
|
202
|
+
select_transform(JXFORM_NONE); /* force an error */
|
203
|
+
#endif
|
204
|
+
|
205
|
+
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
206
|
+
/* Enable debug printouts. */
|
207
|
+
/* On first -d, print version identification */
|
208
|
+
static boolean printed_version = FALSE;
|
209
|
+
|
210
|
+
if (!printed_version) {
|
211
|
+
fprintf(stderr, "%s version %s (build %s)\n",
|
212
|
+
PACKAGE_NAME, VERSION, BUILD);
|
213
|
+
fprintf(stderr, "%s\n\n", JCOPYRIGHT);
|
214
|
+
fprintf(stderr, "Emulating The Independent JPEG Group's software, version %s\n\n",
|
215
|
+
JVERSION);
|
216
|
+
printed_version = TRUE;
|
217
|
+
}
|
218
|
+
cinfo->err->trace_level++;
|
219
|
+
|
220
|
+
} else if (keymatch(arg, "version", 4)) {
|
221
|
+
fprintf(stderr, "%s version %s (build %s)\n",
|
222
|
+
PACKAGE_NAME, VERSION, BUILD);
|
223
|
+
exit(EXIT_SUCCESS);
|
224
|
+
|
225
|
+
} else if (keymatch(arg, "flip", 1)) {
|
226
|
+
/* Mirror left-right or top-bottom. */
|
227
|
+
if (++argn >= argc) /* advance to next argument */
|
228
|
+
usage();
|
229
|
+
if (keymatch(argv[argn], "horizontal", 1))
|
230
|
+
select_transform(JXFORM_FLIP_H);
|
231
|
+
else if (keymatch(argv[argn], "vertical", 1))
|
232
|
+
select_transform(JXFORM_FLIP_V);
|
233
|
+
else
|
234
|
+
usage();
|
235
|
+
|
236
|
+
} else if (keymatch(arg, "grayscale", 1) ||
|
237
|
+
keymatch(arg, "greyscale", 1)) {
|
238
|
+
/* Force to grayscale. */
|
239
|
+
#if TRANSFORMS_SUPPORTED
|
240
|
+
transformoption.force_grayscale = TRUE;
|
241
|
+
#else
|
242
|
+
select_transform(JXFORM_NONE); /* force an error */
|
243
|
+
#endif
|
244
|
+
|
245
|
+
} else if (keymatch(arg, "icc", 1)) {
|
246
|
+
/* Set ICC filename. */
|
247
|
+
if (++argn >= argc) /* advance to next argument */
|
248
|
+
usage();
|
249
|
+
icc_filename = argv[argn];
|
250
|
+
|
251
|
+
} else if (keymatch(arg, "maxmemory", 3)) {
|
252
|
+
/* Maximum memory in Kb (or Mb with 'm'). */
|
253
|
+
long lval;
|
254
|
+
char ch = 'x';
|
255
|
+
|
256
|
+
if (++argn >= argc) /* advance to next argument */
|
257
|
+
usage();
|
258
|
+
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
259
|
+
usage();
|
260
|
+
if (ch == 'm' || ch == 'M')
|
261
|
+
lval *= 1000L;
|
262
|
+
cinfo->mem->max_memory_to_use = lval * 1000L;
|
263
|
+
|
264
|
+
} else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
|
265
|
+
/* Enable entropy parm optimization. */
|
266
|
+
#ifdef ENTROPY_OPT_SUPPORTED
|
267
|
+
cinfo->optimize_coding = TRUE;
|
268
|
+
#else
|
269
|
+
fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
|
270
|
+
progname);
|
271
|
+
exit(EXIT_FAILURE);
|
272
|
+
#endif
|
273
|
+
|
274
|
+
} else if (keymatch(arg, "outfile", 4)) {
|
275
|
+
/* Set output file name. */
|
276
|
+
if (++argn >= argc) /* advance to next argument */
|
277
|
+
usage();
|
278
|
+
outfilename = argv[argn]; /* save it away for later use */
|
279
|
+
|
280
|
+
} else if (keymatch(arg, "perfect", 2)) {
|
281
|
+
/* Fail if there is any partial edge MCUs that the transform can't
|
282
|
+
* handle. */
|
283
|
+
transformoption.perfect = TRUE;
|
284
|
+
|
285
|
+
} else if (keymatch(arg, "progressive", 2)) {
|
286
|
+
/* Select simple progressive mode. */
|
287
|
+
#ifdef C_PROGRESSIVE_SUPPORTED
|
288
|
+
simple_progressive = TRUE;
|
289
|
+
/* We must postpone execution until num_components is known. */
|
290
|
+
#else
|
291
|
+
fprintf(stderr, "%s: sorry, progressive output was not compiled\n",
|
292
|
+
progname);
|
293
|
+
exit(EXIT_FAILURE);
|
294
|
+
#endif
|
295
|
+
|
296
|
+
} else if (keymatch(arg, "restart", 1)) {
|
297
|
+
/* Restart interval in MCU rows (or in MCUs with 'b'). */
|
298
|
+
long lval;
|
299
|
+
char ch = 'x';
|
300
|
+
|
301
|
+
if (++argn >= argc) /* advance to next argument */
|
302
|
+
usage();
|
303
|
+
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
304
|
+
usage();
|
305
|
+
if (lval < 0 || lval > 65535L)
|
306
|
+
usage();
|
307
|
+
if (ch == 'b' || ch == 'B') {
|
308
|
+
cinfo->restart_interval = (unsigned int)lval;
|
309
|
+
cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
|
310
|
+
} else {
|
311
|
+
cinfo->restart_in_rows = (int)lval;
|
312
|
+
/* restart_interval will be computed during startup */
|
313
|
+
}
|
314
|
+
|
315
|
+
} else if (keymatch(arg, "rotate", 2)) {
|
316
|
+
/* Rotate 90, 180, or 270 degrees (measured clockwise). */
|
317
|
+
if (++argn >= argc) /* advance to next argument */
|
318
|
+
usage();
|
319
|
+
if (keymatch(argv[argn], "90", 2))
|
320
|
+
select_transform(JXFORM_ROT_90);
|
321
|
+
else if (keymatch(argv[argn], "180", 3))
|
322
|
+
select_transform(JXFORM_ROT_180);
|
323
|
+
else if (keymatch(argv[argn], "270", 3))
|
324
|
+
select_transform(JXFORM_ROT_270);
|
325
|
+
else
|
326
|
+
usage();
|
327
|
+
|
328
|
+
} else if (keymatch(arg, "scans", 1)) {
|
329
|
+
/* Set scan script. */
|
330
|
+
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
331
|
+
if (++argn >= argc) /* advance to next argument */
|
332
|
+
usage();
|
333
|
+
scansarg = argv[argn];
|
334
|
+
/* We must postpone reading the file in case -progressive appears. */
|
335
|
+
#else
|
336
|
+
fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
|
337
|
+
progname);
|
338
|
+
exit(EXIT_FAILURE);
|
339
|
+
#endif
|
340
|
+
|
341
|
+
} else if (keymatch(arg, "transpose", 1)) {
|
342
|
+
/* Transpose (across UL-to-LR axis). */
|
343
|
+
select_transform(JXFORM_TRANSPOSE);
|
344
|
+
|
345
|
+
} else if (keymatch(arg, "transverse", 6)) {
|
346
|
+
/* Transverse transpose (across UR-to-LL axis). */
|
347
|
+
select_transform(JXFORM_TRANSVERSE);
|
348
|
+
|
349
|
+
} else if (keymatch(arg, "trim", 3)) {
|
350
|
+
/* Trim off any partial edge MCUs that the transform can't handle. */
|
351
|
+
transformoption.trim = TRUE;
|
352
|
+
|
353
|
+
} else {
|
354
|
+
usage(); /* bogus switch */
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
/* Post-switch-scanning cleanup */
|
359
|
+
|
360
|
+
if (for_real) {
|
361
|
+
|
362
|
+
#ifdef C_PROGRESSIVE_SUPPORTED
|
363
|
+
if (simple_progressive) /* process -progressive; -scans can override */
|
364
|
+
jpeg_simple_progression(cinfo);
|
365
|
+
#endif
|
366
|
+
|
367
|
+
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
368
|
+
if (scansarg != NULL) /* process -scans if it was present */
|
369
|
+
if (!read_scan_script(cinfo, scansarg))
|
370
|
+
usage();
|
371
|
+
#endif
|
372
|
+
}
|
373
|
+
|
374
|
+
return argn; /* return index of next arg (file name) */
|
375
|
+
}
|
376
|
+
|
377
|
+
|
378
|
+
/*
|
379
|
+
* The main program.
|
380
|
+
*/
|
381
|
+
|
382
|
+
int
|
383
|
+
main(int argc, char **argv)
|
384
|
+
{
|
385
|
+
struct jpeg_decompress_struct srcinfo;
|
386
|
+
struct jpeg_compress_struct dstinfo;
|
387
|
+
struct jpeg_error_mgr jsrcerr, jdsterr;
|
388
|
+
#ifdef PROGRESS_REPORT
|
389
|
+
struct cdjpeg_progress_mgr progress;
|
390
|
+
#endif
|
391
|
+
jvirt_barray_ptr *src_coef_arrays;
|
392
|
+
jvirt_barray_ptr *dst_coef_arrays;
|
393
|
+
int file_index;
|
394
|
+
/* We assume all-in-memory processing and can therefore use only a
|
395
|
+
* single file pointer for sequential input and output operation.
|
396
|
+
*/
|
397
|
+
FILE *fp;
|
398
|
+
FILE *icc_file;
|
399
|
+
JOCTET *icc_profile = NULL;
|
400
|
+
long icc_len = 0;
|
401
|
+
|
402
|
+
/* On Mac, fetch a command line. */
|
403
|
+
#ifdef USE_CCOMMAND
|
404
|
+
argc = ccommand(&argv);
|
405
|
+
#endif
|
406
|
+
|
407
|
+
progname = argv[0];
|
408
|
+
if (progname == NULL || progname[0] == 0)
|
409
|
+
progname = "jpegtran"; /* in case C library doesn't provide it */
|
410
|
+
|
411
|
+
/* Initialize the JPEG decompression object with default error handling. */
|
412
|
+
srcinfo.err = jpeg_std_error(&jsrcerr);
|
413
|
+
jpeg_create_decompress(&srcinfo);
|
414
|
+
/* Initialize the JPEG compression object with default error handling. */
|
415
|
+
dstinfo.err = jpeg_std_error(&jdsterr);
|
416
|
+
jpeg_create_compress(&dstinfo);
|
417
|
+
|
418
|
+
/* Scan command line to find file names.
|
419
|
+
* It is convenient to use just one switch-parsing routine, but the switch
|
420
|
+
* values read here are mostly ignored; we will rescan the switches after
|
421
|
+
* opening the input file. Also note that most of the switches affect the
|
422
|
+
* destination JPEG object, so we parse into that and then copy over what
|
423
|
+
* needs to affects the source too.
|
424
|
+
*/
|
425
|
+
|
426
|
+
file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE);
|
427
|
+
jsrcerr.trace_level = jdsterr.trace_level;
|
428
|
+
srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use;
|
429
|
+
|
430
|
+
#ifdef TWO_FILE_COMMANDLINE
|
431
|
+
/* Must have either -outfile switch or explicit output file name */
|
432
|
+
if (outfilename == NULL) {
|
433
|
+
if (file_index != argc - 2) {
|
434
|
+
fprintf(stderr, "%s: must name one input and one output file\n",
|
435
|
+
progname);
|
436
|
+
usage();
|
437
|
+
}
|
438
|
+
outfilename = argv[file_index + 1];
|
439
|
+
} else {
|
440
|
+
if (file_index != argc - 1) {
|
441
|
+
fprintf(stderr, "%s: must name one input and one output file\n",
|
442
|
+
progname);
|
443
|
+
usage();
|
444
|
+
}
|
445
|
+
}
|
446
|
+
#else
|
447
|
+
/* Unix style: expect zero or one file name */
|
448
|
+
if (file_index < argc - 1) {
|
449
|
+
fprintf(stderr, "%s: only one input file\n", progname);
|
450
|
+
usage();
|
451
|
+
}
|
452
|
+
#endif /* TWO_FILE_COMMANDLINE */
|
453
|
+
|
454
|
+
/* Open the input file. */
|
455
|
+
if (file_index < argc) {
|
456
|
+
if ((fp = fopen(argv[file_index], READ_BINARY)) == NULL) {
|
457
|
+
fprintf(stderr, "%s: can't open %s for reading\n", progname,
|
458
|
+
argv[file_index]);
|
459
|
+
exit(EXIT_FAILURE);
|
460
|
+
}
|
461
|
+
} else {
|
462
|
+
/* default input file is stdin */
|
463
|
+
fp = read_stdin();
|
464
|
+
}
|
465
|
+
|
466
|
+
if (icc_filename != NULL) {
|
467
|
+
if ((icc_file = fopen(icc_filename, READ_BINARY)) == NULL) {
|
468
|
+
fprintf(stderr, "%s: can't open %s\n", progname, icc_filename);
|
469
|
+
exit(EXIT_FAILURE);
|
470
|
+
}
|
471
|
+
if (fseek(icc_file, 0, SEEK_END) < 0 ||
|
472
|
+
(icc_len = ftell(icc_file)) < 1 ||
|
473
|
+
fseek(icc_file, 0, SEEK_SET) < 0) {
|
474
|
+
fprintf(stderr, "%s: can't determine size of %s\n", progname,
|
475
|
+
icc_filename);
|
476
|
+
exit(EXIT_FAILURE);
|
477
|
+
}
|
478
|
+
if ((icc_profile = (JOCTET *)malloc(icc_len)) == NULL) {
|
479
|
+
fprintf(stderr, "%s: can't allocate memory for ICC profile\n", progname);
|
480
|
+
fclose(icc_file);
|
481
|
+
exit(EXIT_FAILURE);
|
482
|
+
}
|
483
|
+
if (fread(icc_profile, icc_len, 1, icc_file) < 1) {
|
484
|
+
fprintf(stderr, "%s: can't read ICC profile from %s\n", progname,
|
485
|
+
icc_filename);
|
486
|
+
free(icc_profile);
|
487
|
+
fclose(icc_file);
|
488
|
+
exit(EXIT_FAILURE);
|
489
|
+
}
|
490
|
+
fclose(icc_file);
|
491
|
+
if (copyoption == JCOPYOPT_ALL)
|
492
|
+
copyoption = JCOPYOPT_ALL_EXCEPT_ICC;
|
493
|
+
}
|
494
|
+
|
495
|
+
#ifdef PROGRESS_REPORT
|
496
|
+
start_progress_monitor((j_common_ptr)&dstinfo, &progress);
|
497
|
+
#endif
|
498
|
+
|
499
|
+
/* Specify data source for decompression */
|
500
|
+
jpeg_stdio_src(&srcinfo, fp);
|
501
|
+
|
502
|
+
/* Enable saving of extra markers that we want to copy */
|
503
|
+
jcopy_markers_setup(&srcinfo, copyoption);
|
504
|
+
|
505
|
+
/* Read file header */
|
506
|
+
(void)jpeg_read_header(&srcinfo, TRUE);
|
507
|
+
|
508
|
+
/* Any space needed by a transform option must be requested before
|
509
|
+
* jpeg_read_coefficients so that memory allocation will be done right.
|
510
|
+
*/
|
511
|
+
#if TRANSFORMS_SUPPORTED
|
512
|
+
/* Fail right away if -perfect is given and transformation is not perfect.
|
513
|
+
*/
|
514
|
+
if (!jtransform_request_workspace(&srcinfo, &transformoption)) {
|
515
|
+
fprintf(stderr, "%s: transformation is not perfect\n", progname);
|
516
|
+
exit(EXIT_FAILURE);
|
517
|
+
}
|
518
|
+
#endif
|
519
|
+
|
520
|
+
/* Read source file as DCT coefficients */
|
521
|
+
src_coef_arrays = jpeg_read_coefficients(&srcinfo);
|
522
|
+
|
523
|
+
/* Initialize destination compression parameters from source values */
|
524
|
+
jpeg_copy_critical_parameters(&srcinfo, &dstinfo);
|
525
|
+
|
526
|
+
/* Adjust destination parameters if required by transform options;
|
527
|
+
* also find out which set of coefficient arrays will hold the output.
|
528
|
+
*/
|
529
|
+
#if TRANSFORMS_SUPPORTED
|
530
|
+
dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo,
|
531
|
+
src_coef_arrays,
|
532
|
+
&transformoption);
|
533
|
+
#else
|
534
|
+
dst_coef_arrays = src_coef_arrays;
|
535
|
+
#endif
|
536
|
+
|
537
|
+
/* Close input file, if we opened it.
|
538
|
+
* Note: we assume that jpeg_read_coefficients consumed all input
|
539
|
+
* until JPEG_REACHED_EOI, and that jpeg_finish_decompress will
|
540
|
+
* only consume more while (!cinfo->inputctl->eoi_reached).
|
541
|
+
* We cannot call jpeg_finish_decompress here since we still need the
|
542
|
+
* virtual arrays allocated from the source object for processing.
|
543
|
+
*/
|
544
|
+
if (fp != stdin)
|
545
|
+
fclose(fp);
|
546
|
+
|
547
|
+
/* Open the output file. */
|
548
|
+
if (outfilename != NULL) {
|
549
|
+
if ((fp = fopen(outfilename, WRITE_BINARY)) == NULL) {
|
550
|
+
fprintf(stderr, "%s: can't open %s for writing\n", progname,
|
551
|
+
outfilename);
|
552
|
+
exit(EXIT_FAILURE);
|
553
|
+
}
|
554
|
+
} else {
|
555
|
+
/* default output file is stdout */
|
556
|
+
fp = write_stdout();
|
557
|
+
}
|
558
|
+
|
559
|
+
/* Adjust default compression parameters by re-parsing the options */
|
560
|
+
file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE);
|
561
|
+
|
562
|
+
/* Specify data destination for compression */
|
563
|
+
jpeg_stdio_dest(&dstinfo, fp);
|
564
|
+
|
565
|
+
/* Start compressor (note no image data is actually written here) */
|
566
|
+
jpeg_write_coefficients(&dstinfo, dst_coef_arrays);
|
567
|
+
|
568
|
+
/* Copy to the output file any extra markers that we want to preserve */
|
569
|
+
jcopy_markers_execute(&srcinfo, &dstinfo, copyoption);
|
570
|
+
|
571
|
+
if (icc_profile != NULL)
|
572
|
+
jpeg_write_icc_profile(&dstinfo, icc_profile, (unsigned int)icc_len);
|
573
|
+
|
574
|
+
/* Execute image transformation, if any */
|
575
|
+
#if TRANSFORMS_SUPPORTED
|
576
|
+
jtransform_execute_transformation(&srcinfo, &dstinfo, src_coef_arrays,
|
577
|
+
&transformoption);
|
578
|
+
#endif
|
579
|
+
|
580
|
+
/* Finish compression and release memory */
|
581
|
+
jpeg_finish_compress(&dstinfo);
|
582
|
+
jpeg_destroy_compress(&dstinfo);
|
583
|
+
(void)jpeg_finish_decompress(&srcinfo);
|
584
|
+
jpeg_destroy_decompress(&srcinfo);
|
585
|
+
|
586
|
+
/* Close output file, if we opened it */
|
587
|
+
if (fp != stdout)
|
588
|
+
fclose(fp);
|
589
|
+
|
590
|
+
#ifdef PROGRESS_REPORT
|
591
|
+
end_progress_monitor((j_common_ptr)&dstinfo);
|
592
|
+
#endif
|
593
|
+
|
594
|
+
if (icc_profile != NULL)
|
595
|
+
free(icc_profile);
|
596
|
+
|
597
|
+
/* All done. */
|
598
|
+
exit(jsrcerr.num_warnings + jdsterr.num_warnings ?
|
599
|
+
EXIT_WARNING : EXIT_SUCCESS);
|
600
|
+
return 0; /* suppress no-return-value warnings */
|
601
|
+
}
|