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,558 @@
|
|
1
|
+
/*
|
2
|
+
* wrbmp.c
|
3
|
+
*
|
4
|
+
* This file was part of the Independent JPEG Group's software:
|
5
|
+
* Copyright (C) 1994-1996, Thomas G. Lane.
|
6
|
+
* libjpeg-turbo Modifications:
|
7
|
+
* Copyright (C) 2013, Linaro Limited.
|
8
|
+
* Copyright (C) 2014-2015, 2017, 2019, D. R. Commander.
|
9
|
+
* For conditions of distribution and use, see the accompanying README.ijg
|
10
|
+
* file.
|
11
|
+
*
|
12
|
+
* This file contains routines to write output images in Microsoft "BMP"
|
13
|
+
* format (MS Windows 3.x and OS/2 1.x flavors).
|
14
|
+
* Either 8-bit colormapped or 24-bit full-color format can be written.
|
15
|
+
* No compression is supported.
|
16
|
+
*
|
17
|
+
* These routines may need modification for non-Unix environments or
|
18
|
+
* specialized applications. As they stand, they assume output to
|
19
|
+
* an ordinary stdio stream.
|
20
|
+
*
|
21
|
+
* This code contributed by James Arthur Boucher.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#include "cmyk.h"
|
25
|
+
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
26
|
+
#include "jconfigint.h"
|
27
|
+
|
28
|
+
#ifdef BMP_SUPPORTED
|
29
|
+
|
30
|
+
|
31
|
+
/*
|
32
|
+
* To support 12-bit JPEG data, we'd have to scale output down to 8 bits.
|
33
|
+
* This is not yet implemented.
|
34
|
+
*/
|
35
|
+
|
36
|
+
#if BITS_IN_JSAMPLE != 8
|
37
|
+
Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
|
38
|
+
#endif
|
39
|
+
|
40
|
+
/*
|
41
|
+
* Since BMP stores scanlines bottom-to-top, we have to invert the image
|
42
|
+
* from JPEG's top-to-bottom order. To do this, we save the outgoing data
|
43
|
+
* in a virtual array during put_pixel_row calls, then actually emit the
|
44
|
+
* BMP file during finish_output. The virtual array contains one JSAMPLE per
|
45
|
+
* pixel if the output is grayscale or colormapped, three if it is full color.
|
46
|
+
*/
|
47
|
+
|
48
|
+
/* Private version of data destination object */
|
49
|
+
|
50
|
+
typedef struct {
|
51
|
+
struct djpeg_dest_struct pub; /* public fields */
|
52
|
+
|
53
|
+
boolean is_os2; /* saves the OS2 format request flag */
|
54
|
+
|
55
|
+
jvirt_sarray_ptr whole_image; /* needed to reverse row order */
|
56
|
+
JDIMENSION data_width; /* JSAMPLEs per row */
|
57
|
+
JDIMENSION row_width; /* physical width of one row in the BMP file */
|
58
|
+
int pad_bytes; /* number of padding bytes needed per row */
|
59
|
+
JDIMENSION cur_output_row; /* next row# to write to virtual array */
|
60
|
+
|
61
|
+
boolean use_inversion_array; /* TRUE = buffer the whole image, which is
|
62
|
+
stored to disk in bottom-up order, and
|
63
|
+
receive rows from the calling program in
|
64
|
+
top-down order
|
65
|
+
|
66
|
+
FALSE = the calling program will maintain
|
67
|
+
its own image buffer and write the rows in
|
68
|
+
bottom-up order */
|
69
|
+
|
70
|
+
JSAMPLE *iobuffer; /* I/O buffer (used to buffer a single row to
|
71
|
+
disk if use_inversion_array == FALSE) */
|
72
|
+
} bmp_dest_struct;
|
73
|
+
|
74
|
+
typedef bmp_dest_struct *bmp_dest_ptr;
|
75
|
+
|
76
|
+
|
77
|
+
/* Forward declarations */
|
78
|
+
LOCAL(void) write_colormap(j_decompress_ptr cinfo, bmp_dest_ptr dest,
|
79
|
+
int map_colors, int map_entry_size);
|
80
|
+
|
81
|
+
|
82
|
+
static INLINE boolean is_big_endian(void)
|
83
|
+
{
|
84
|
+
int test_value = 1;
|
85
|
+
if (*(char *)&test_value != 1)
|
86
|
+
return TRUE;
|
87
|
+
return FALSE;
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
/*
|
92
|
+
* Write some pixel data.
|
93
|
+
* In this module rows_supplied will always be 1.
|
94
|
+
*/
|
95
|
+
|
96
|
+
METHODDEF(void)
|
97
|
+
put_pixel_rows(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
98
|
+
JDIMENSION rows_supplied)
|
99
|
+
/* This version is for writing 24-bit pixels */
|
100
|
+
{
|
101
|
+
bmp_dest_ptr dest = (bmp_dest_ptr)dinfo;
|
102
|
+
JSAMPARRAY image_ptr;
|
103
|
+
register JSAMPROW inptr, outptr;
|
104
|
+
register JDIMENSION col;
|
105
|
+
int pad;
|
106
|
+
|
107
|
+
if (dest->use_inversion_array) {
|
108
|
+
/* Access next row in virtual array */
|
109
|
+
image_ptr = (*cinfo->mem->access_virt_sarray)
|
110
|
+
((j_common_ptr)cinfo, dest->whole_image,
|
111
|
+
dest->cur_output_row, (JDIMENSION)1, TRUE);
|
112
|
+
dest->cur_output_row++;
|
113
|
+
outptr = image_ptr[0];
|
114
|
+
} else {
|
115
|
+
outptr = dest->iobuffer;
|
116
|
+
}
|
117
|
+
|
118
|
+
/* Transfer data. Note destination values must be in BGR order
|
119
|
+
* (even though Microsoft's own documents say the opposite).
|
120
|
+
*/
|
121
|
+
inptr = dest->pub.buffer[0];
|
122
|
+
|
123
|
+
if (cinfo->out_color_space == JCS_EXT_BGR) {
|
124
|
+
MEMCOPY(outptr, inptr, dest->row_width);
|
125
|
+
outptr += cinfo->output_width * 3;
|
126
|
+
} else if (cinfo->out_color_space == JCS_RGB565) {
|
127
|
+
boolean big_endian = is_big_endian();
|
128
|
+
unsigned short *inptr2 = (unsigned short *)inptr;
|
129
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
130
|
+
if (big_endian) {
|
131
|
+
outptr[0] = (*inptr2 >> 5) & 0xF8;
|
132
|
+
outptr[1] = ((*inptr2 << 5) & 0xE0) | ((*inptr2 >> 11) & 0x1C);
|
133
|
+
outptr[2] = *inptr2 & 0xF8;
|
134
|
+
} else {
|
135
|
+
outptr[0] = (*inptr2 << 3) & 0xF8;
|
136
|
+
outptr[1] = (*inptr2 >> 3) & 0xFC;
|
137
|
+
outptr[2] = (*inptr2 >> 8) & 0xF8;
|
138
|
+
}
|
139
|
+
outptr += 3;
|
140
|
+
inptr2++;
|
141
|
+
}
|
142
|
+
} else if (cinfo->out_color_space == JCS_CMYK) {
|
143
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
144
|
+
/* can omit GETJSAMPLE() safely */
|
145
|
+
JSAMPLE c = *inptr++, m = *inptr++, y = *inptr++, k = *inptr++;
|
146
|
+
cmyk_to_rgb(c, m, y, k, outptr + 2, outptr + 1, outptr);
|
147
|
+
outptr += 3;
|
148
|
+
}
|
149
|
+
} else {
|
150
|
+
register int rindex = rgb_red[cinfo->out_color_space];
|
151
|
+
register int gindex = rgb_green[cinfo->out_color_space];
|
152
|
+
register int bindex = rgb_blue[cinfo->out_color_space];
|
153
|
+
register int ps = rgb_pixelsize[cinfo->out_color_space];
|
154
|
+
|
155
|
+
for (col = cinfo->output_width; col > 0; col--) {
|
156
|
+
/* can omit GETJSAMPLE() safely */
|
157
|
+
outptr[0] = inptr[bindex];
|
158
|
+
outptr[1] = inptr[gindex];
|
159
|
+
outptr[2] = inptr[rindex];
|
160
|
+
outptr += 3; inptr += ps;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
/* Zero out the pad bytes. */
|
165
|
+
pad = dest->pad_bytes;
|
166
|
+
while (--pad >= 0)
|
167
|
+
*outptr++ = 0;
|
168
|
+
|
169
|
+
if (!dest->use_inversion_array)
|
170
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->row_width);
|
171
|
+
}
|
172
|
+
|
173
|
+
METHODDEF(void)
|
174
|
+
put_gray_rows(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
175
|
+
JDIMENSION rows_supplied)
|
176
|
+
/* This version is for grayscale OR quantized color output */
|
177
|
+
{
|
178
|
+
bmp_dest_ptr dest = (bmp_dest_ptr)dinfo;
|
179
|
+
JSAMPARRAY image_ptr;
|
180
|
+
register JSAMPROW inptr, outptr;
|
181
|
+
int pad;
|
182
|
+
|
183
|
+
if (dest->use_inversion_array) {
|
184
|
+
/* Access next row in virtual array */
|
185
|
+
image_ptr = (*cinfo->mem->access_virt_sarray)
|
186
|
+
((j_common_ptr)cinfo, dest->whole_image,
|
187
|
+
dest->cur_output_row, (JDIMENSION)1, TRUE);
|
188
|
+
dest->cur_output_row++;
|
189
|
+
outptr = image_ptr[0];
|
190
|
+
} else {
|
191
|
+
outptr = dest->iobuffer;
|
192
|
+
}
|
193
|
+
|
194
|
+
/* Transfer data. */
|
195
|
+
inptr = dest->pub.buffer[0];
|
196
|
+
MEMCOPY(outptr, inptr, cinfo->output_width);
|
197
|
+
outptr += cinfo->output_width;
|
198
|
+
|
199
|
+
/* Zero out the pad bytes. */
|
200
|
+
pad = dest->pad_bytes;
|
201
|
+
while (--pad >= 0)
|
202
|
+
*outptr++ = 0;
|
203
|
+
|
204
|
+
if (!dest->use_inversion_array)
|
205
|
+
(void)JFWRITE(dest->pub.output_file, dest->iobuffer, dest->row_width);
|
206
|
+
}
|
207
|
+
|
208
|
+
|
209
|
+
/*
|
210
|
+
* Finish up at the end of the file.
|
211
|
+
*
|
212
|
+
* Here is where we really output the BMP file.
|
213
|
+
*
|
214
|
+
* First, routines to write the Windows and OS/2 variants of the file header.
|
215
|
+
*/
|
216
|
+
|
217
|
+
LOCAL(void)
|
218
|
+
write_bmp_header(j_decompress_ptr cinfo, bmp_dest_ptr dest)
|
219
|
+
/* Write a Windows-style BMP file header, including colormap if needed */
|
220
|
+
{
|
221
|
+
char bmpfileheader[14];
|
222
|
+
char bmpinfoheader[40];
|
223
|
+
|
224
|
+
#define PUT_2B(array, offset, value) \
|
225
|
+
(array[offset] = (char)((value) & 0xFF), \
|
226
|
+
array[offset + 1] = (char)(((value) >> 8) & 0xFF))
|
227
|
+
#define PUT_4B(array, offset, value) \
|
228
|
+
(array[offset] = (char)((value) & 0xFF), \
|
229
|
+
array[offset + 1] = (char)(((value) >> 8) & 0xFF), \
|
230
|
+
array[offset + 2] = (char)(((value) >> 16) & 0xFF), \
|
231
|
+
array[offset + 3] = (char)(((value) >> 24) & 0xFF))
|
232
|
+
|
233
|
+
long headersize, bfSize;
|
234
|
+
int bits_per_pixel, cmap_entries;
|
235
|
+
|
236
|
+
/* Compute colormap size and total file size */
|
237
|
+
if (IsExtRGB(cinfo->out_color_space)) {
|
238
|
+
if (cinfo->quantize_colors) {
|
239
|
+
/* Colormapped RGB */
|
240
|
+
bits_per_pixel = 8;
|
241
|
+
cmap_entries = 256;
|
242
|
+
} else {
|
243
|
+
/* Unquantized, full color RGB */
|
244
|
+
bits_per_pixel = 24;
|
245
|
+
cmap_entries = 0;
|
246
|
+
}
|
247
|
+
} else if (cinfo->out_color_space == JCS_RGB565 ||
|
248
|
+
cinfo->out_color_space == JCS_CMYK) {
|
249
|
+
bits_per_pixel = 24;
|
250
|
+
cmap_entries = 0;
|
251
|
+
} else {
|
252
|
+
/* Grayscale output. We need to fake a 256-entry colormap. */
|
253
|
+
bits_per_pixel = 8;
|
254
|
+
cmap_entries = 256;
|
255
|
+
}
|
256
|
+
/* File size */
|
257
|
+
headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */
|
258
|
+
bfSize = headersize + (long)dest->row_width * (long)cinfo->output_height;
|
259
|
+
|
260
|
+
/* Set unused fields of header to 0 */
|
261
|
+
MEMZERO(bmpfileheader, sizeof(bmpfileheader));
|
262
|
+
MEMZERO(bmpinfoheader, sizeof(bmpinfoheader));
|
263
|
+
|
264
|
+
/* Fill the file header */
|
265
|
+
bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */
|
266
|
+
bmpfileheader[1] = 0x4D;
|
267
|
+
PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */
|
268
|
+
/* we leave bfReserved1 & bfReserved2 = 0 */
|
269
|
+
PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */
|
270
|
+
|
271
|
+
/* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */
|
272
|
+
PUT_2B(bmpinfoheader, 0, 40); /* biSize */
|
273
|
+
PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */
|
274
|
+
PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */
|
275
|
+
PUT_2B(bmpinfoheader, 12, 1); /* biPlanes - must be 1 */
|
276
|
+
PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */
|
277
|
+
/* we leave biCompression = 0, for none */
|
278
|
+
/* we leave biSizeImage = 0; this is correct for uncompressed data */
|
279
|
+
if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */
|
280
|
+
PUT_4B(bmpinfoheader, 24, (long)(cinfo->X_density * 100)); /* XPels/M */
|
281
|
+
PUT_4B(bmpinfoheader, 28, (long)(cinfo->Y_density * 100)); /* XPels/M */
|
282
|
+
}
|
283
|
+
PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */
|
284
|
+
/* we leave biClrImportant = 0 */
|
285
|
+
|
286
|
+
if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t)14)
|
287
|
+
ERREXIT(cinfo, JERR_FILE_WRITE);
|
288
|
+
if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t)40)
|
289
|
+
ERREXIT(cinfo, JERR_FILE_WRITE);
|
290
|
+
|
291
|
+
if (cmap_entries > 0)
|
292
|
+
write_colormap(cinfo, dest, cmap_entries, 4);
|
293
|
+
}
|
294
|
+
|
295
|
+
|
296
|
+
LOCAL(void)
|
297
|
+
write_os2_header(j_decompress_ptr cinfo, bmp_dest_ptr dest)
|
298
|
+
/* Write an OS2-style BMP file header, including colormap if needed */
|
299
|
+
{
|
300
|
+
char bmpfileheader[14];
|
301
|
+
char bmpcoreheader[12];
|
302
|
+
long headersize, bfSize;
|
303
|
+
int bits_per_pixel, cmap_entries;
|
304
|
+
|
305
|
+
/* Compute colormap size and total file size */
|
306
|
+
if (IsExtRGB(cinfo->out_color_space)) {
|
307
|
+
if (cinfo->quantize_colors) {
|
308
|
+
/* Colormapped RGB */
|
309
|
+
bits_per_pixel = 8;
|
310
|
+
cmap_entries = 256;
|
311
|
+
} else {
|
312
|
+
/* Unquantized, full color RGB */
|
313
|
+
bits_per_pixel = 24;
|
314
|
+
cmap_entries = 0;
|
315
|
+
}
|
316
|
+
} else if (cinfo->out_color_space == JCS_RGB565 ||
|
317
|
+
cinfo->out_color_space == JCS_CMYK) {
|
318
|
+
bits_per_pixel = 24;
|
319
|
+
cmap_entries = 0;
|
320
|
+
} else {
|
321
|
+
/* Grayscale output. We need to fake a 256-entry colormap. */
|
322
|
+
bits_per_pixel = 8;
|
323
|
+
cmap_entries = 256;
|
324
|
+
}
|
325
|
+
/* File size */
|
326
|
+
headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */
|
327
|
+
bfSize = headersize + (long)dest->row_width * (long)cinfo->output_height;
|
328
|
+
|
329
|
+
/* Set unused fields of header to 0 */
|
330
|
+
MEMZERO(bmpfileheader, sizeof(bmpfileheader));
|
331
|
+
MEMZERO(bmpcoreheader, sizeof(bmpcoreheader));
|
332
|
+
|
333
|
+
/* Fill the file header */
|
334
|
+
bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */
|
335
|
+
bmpfileheader[1] = 0x4D;
|
336
|
+
PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */
|
337
|
+
/* we leave bfReserved1 & bfReserved2 = 0 */
|
338
|
+
PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */
|
339
|
+
|
340
|
+
/* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */
|
341
|
+
PUT_2B(bmpcoreheader, 0, 12); /* bcSize */
|
342
|
+
PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */
|
343
|
+
PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */
|
344
|
+
PUT_2B(bmpcoreheader, 8, 1); /* bcPlanes - must be 1 */
|
345
|
+
PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */
|
346
|
+
|
347
|
+
if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t)14)
|
348
|
+
ERREXIT(cinfo, JERR_FILE_WRITE);
|
349
|
+
if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t)12)
|
350
|
+
ERREXIT(cinfo, JERR_FILE_WRITE);
|
351
|
+
|
352
|
+
if (cmap_entries > 0)
|
353
|
+
write_colormap(cinfo, dest, cmap_entries, 3);
|
354
|
+
}
|
355
|
+
|
356
|
+
|
357
|
+
/*
|
358
|
+
* Write the colormap.
|
359
|
+
* Windows uses BGR0 map entries; OS/2 uses BGR entries.
|
360
|
+
*/
|
361
|
+
|
362
|
+
LOCAL(void)
|
363
|
+
write_colormap(j_decompress_ptr cinfo, bmp_dest_ptr dest, int map_colors,
|
364
|
+
int map_entry_size)
|
365
|
+
{
|
366
|
+
JSAMPARRAY colormap = cinfo->colormap;
|
367
|
+
int num_colors = cinfo->actual_number_of_colors;
|
368
|
+
FILE *outfile = dest->pub.output_file;
|
369
|
+
int i;
|
370
|
+
|
371
|
+
if (colormap != NULL) {
|
372
|
+
if (cinfo->out_color_components == 3) {
|
373
|
+
/* Normal case with RGB colormap */
|
374
|
+
for (i = 0; i < num_colors; i++) {
|
375
|
+
putc(GETJSAMPLE(colormap[2][i]), outfile);
|
376
|
+
putc(GETJSAMPLE(colormap[1][i]), outfile);
|
377
|
+
putc(GETJSAMPLE(colormap[0][i]), outfile);
|
378
|
+
if (map_entry_size == 4)
|
379
|
+
putc(0, outfile);
|
380
|
+
}
|
381
|
+
} else {
|
382
|
+
/* Grayscale colormap (only happens with grayscale quantization) */
|
383
|
+
for (i = 0; i < num_colors; i++) {
|
384
|
+
putc(GETJSAMPLE(colormap[0][i]), outfile);
|
385
|
+
putc(GETJSAMPLE(colormap[0][i]), outfile);
|
386
|
+
putc(GETJSAMPLE(colormap[0][i]), outfile);
|
387
|
+
if (map_entry_size == 4)
|
388
|
+
putc(0, outfile);
|
389
|
+
}
|
390
|
+
}
|
391
|
+
} else {
|
392
|
+
/* If no colormap, must be grayscale data. Generate a linear "map". */
|
393
|
+
for (i = 0; i < 256; i++) {
|
394
|
+
putc(i, outfile);
|
395
|
+
putc(i, outfile);
|
396
|
+
putc(i, outfile);
|
397
|
+
if (map_entry_size == 4)
|
398
|
+
putc(0, outfile);
|
399
|
+
}
|
400
|
+
}
|
401
|
+
/* Pad colormap with zeros to ensure specified number of colormap entries */
|
402
|
+
if (i > map_colors)
|
403
|
+
ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i);
|
404
|
+
for (; i < map_colors; i++) {
|
405
|
+
putc(0, outfile);
|
406
|
+
putc(0, outfile);
|
407
|
+
putc(0, outfile);
|
408
|
+
if (map_entry_size == 4)
|
409
|
+
putc(0, outfile);
|
410
|
+
}
|
411
|
+
}
|
412
|
+
|
413
|
+
|
414
|
+
/*
|
415
|
+
* Startup: write the file header unless the inversion array is being used.
|
416
|
+
*/
|
417
|
+
|
418
|
+
METHODDEF(void)
|
419
|
+
start_output_bmp(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
|
420
|
+
{
|
421
|
+
bmp_dest_ptr dest = (bmp_dest_ptr)dinfo;
|
422
|
+
|
423
|
+
if (!dest->use_inversion_array) {
|
424
|
+
/* Write the header and colormap */
|
425
|
+
if (dest->is_os2)
|
426
|
+
write_os2_header(cinfo, dest);
|
427
|
+
else
|
428
|
+
write_bmp_header(cinfo, dest);
|
429
|
+
}
|
430
|
+
}
|
431
|
+
|
432
|
+
|
433
|
+
METHODDEF(void)
|
434
|
+
finish_output_bmp(j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
|
435
|
+
{
|
436
|
+
bmp_dest_ptr dest = (bmp_dest_ptr)dinfo;
|
437
|
+
register FILE *outfile = dest->pub.output_file;
|
438
|
+
JSAMPARRAY image_ptr;
|
439
|
+
register JSAMPROW data_ptr;
|
440
|
+
JDIMENSION row;
|
441
|
+
register JDIMENSION col;
|
442
|
+
cd_progress_ptr progress = (cd_progress_ptr)cinfo->progress;
|
443
|
+
|
444
|
+
if (dest->use_inversion_array) {
|
445
|
+
/* Write the header and colormap */
|
446
|
+
if (dest->is_os2)
|
447
|
+
write_os2_header(cinfo, dest);
|
448
|
+
else
|
449
|
+
write_bmp_header(cinfo, dest);
|
450
|
+
|
451
|
+
/* Write the file body from our virtual array */
|
452
|
+
for (row = cinfo->output_height; row > 0; row--) {
|
453
|
+
if (progress != NULL) {
|
454
|
+
progress->pub.pass_counter = (long)(cinfo->output_height - row);
|
455
|
+
progress->pub.pass_limit = (long)cinfo->output_height;
|
456
|
+
(*progress->pub.progress_monitor) ((j_common_ptr)cinfo);
|
457
|
+
}
|
458
|
+
image_ptr = (*cinfo->mem->access_virt_sarray)
|
459
|
+
((j_common_ptr)cinfo, dest->whole_image, row - 1, (JDIMENSION)1,
|
460
|
+
FALSE);
|
461
|
+
data_ptr = image_ptr[0];
|
462
|
+
for (col = dest->row_width; col > 0; col--) {
|
463
|
+
putc(GETJSAMPLE(*data_ptr), outfile);
|
464
|
+
data_ptr++;
|
465
|
+
}
|
466
|
+
}
|
467
|
+
if (progress != NULL)
|
468
|
+
progress->completed_extra_passes++;
|
469
|
+
}
|
470
|
+
|
471
|
+
/* Make sure we wrote the output file OK */
|
472
|
+
fflush(outfile);
|
473
|
+
if (ferror(outfile))
|
474
|
+
ERREXIT(cinfo, JERR_FILE_WRITE);
|
475
|
+
}
|
476
|
+
|
477
|
+
|
478
|
+
/*
|
479
|
+
* The module selection routine for BMP format output.
|
480
|
+
*/
|
481
|
+
|
482
|
+
GLOBAL(djpeg_dest_ptr)
|
483
|
+
jinit_write_bmp(j_decompress_ptr cinfo, boolean is_os2,
|
484
|
+
boolean use_inversion_array)
|
485
|
+
{
|
486
|
+
bmp_dest_ptr dest;
|
487
|
+
JDIMENSION row_width;
|
488
|
+
|
489
|
+
/* Create module interface object, fill in method pointers */
|
490
|
+
dest = (bmp_dest_ptr)
|
491
|
+
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
|
492
|
+
sizeof(bmp_dest_struct));
|
493
|
+
dest->pub.start_output = start_output_bmp;
|
494
|
+
dest->pub.finish_output = finish_output_bmp;
|
495
|
+
dest->pub.calc_buffer_dimensions = NULL;
|
496
|
+
dest->is_os2 = is_os2;
|
497
|
+
|
498
|
+
if (cinfo->out_color_space == JCS_GRAYSCALE) {
|
499
|
+
dest->pub.put_pixel_rows = put_gray_rows;
|
500
|
+
} else if (IsExtRGB(cinfo->out_color_space)) {
|
501
|
+
if (cinfo->quantize_colors)
|
502
|
+
dest->pub.put_pixel_rows = put_gray_rows;
|
503
|
+
else
|
504
|
+
dest->pub.put_pixel_rows = put_pixel_rows;
|
505
|
+
} else if (!cinfo->quantize_colors &&
|
506
|
+
(cinfo->out_color_space == JCS_RGB565 ||
|
507
|
+
cinfo->out_color_space == JCS_CMYK)) {
|
508
|
+
dest->pub.put_pixel_rows = put_pixel_rows;
|
509
|
+
} else {
|
510
|
+
ERREXIT(cinfo, JERR_BMP_COLORSPACE);
|
511
|
+
}
|
512
|
+
|
513
|
+
/* Calculate output image dimensions so we can allocate space */
|
514
|
+
jpeg_calc_output_dimensions(cinfo);
|
515
|
+
|
516
|
+
/* Determine width of rows in the BMP file (padded to 4-byte boundary). */
|
517
|
+
if (cinfo->out_color_space == JCS_RGB565) {
|
518
|
+
row_width = cinfo->output_width * 2;
|
519
|
+
dest->row_width = dest->data_width = cinfo->output_width * 3;
|
520
|
+
while ((row_width & 3) != 0) row_width++;
|
521
|
+
} else if (!cinfo->quantize_colors &&
|
522
|
+
(IsExtRGB(cinfo->out_color_space) ||
|
523
|
+
cinfo->out_color_space == JCS_CMYK)) {
|
524
|
+
row_width = cinfo->output_width * cinfo->output_components;
|
525
|
+
dest->row_width = dest->data_width = cinfo->output_width * 3;
|
526
|
+
} else {
|
527
|
+
row_width = cinfo->output_width * cinfo->output_components;
|
528
|
+
dest->row_width = dest->data_width = row_width;
|
529
|
+
}
|
530
|
+
while ((dest->row_width & 3) != 0) dest->row_width++;
|
531
|
+
dest->pad_bytes = (int)(dest->row_width - dest->data_width);
|
532
|
+
|
533
|
+
|
534
|
+
if (use_inversion_array) {
|
535
|
+
/* Allocate space for inversion array, prepare for write pass */
|
536
|
+
dest->whole_image = (*cinfo->mem->request_virt_sarray)
|
537
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE, FALSE,
|
538
|
+
dest->row_width, cinfo->output_height, (JDIMENSION)1);
|
539
|
+
dest->cur_output_row = 0;
|
540
|
+
if (cinfo->progress != NULL) {
|
541
|
+
cd_progress_ptr progress = (cd_progress_ptr)cinfo->progress;
|
542
|
+
progress->total_extra_passes++; /* count file input as separate pass */
|
543
|
+
}
|
544
|
+
} else {
|
545
|
+
dest->iobuffer = (JSAMPLE *)(*cinfo->mem->alloc_small)
|
546
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE, dest->row_width);
|
547
|
+
}
|
548
|
+
dest->use_inversion_array = use_inversion_array;
|
549
|
+
|
550
|
+
/* Create decompressor output buffer. */
|
551
|
+
dest->pub.buffer = (*cinfo->mem->alloc_sarray)
|
552
|
+
((j_common_ptr)cinfo, JPOOL_IMAGE, row_width, (JDIMENSION)1);
|
553
|
+
dest->pub.buffer_height = 1;
|
554
|
+
|
555
|
+
return (djpeg_dest_ptr)dest;
|
556
|
+
}
|
557
|
+
|
558
|
+
#endif /* BMP_SUPPORTED */
|