rfreeimage 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +1 -0
- data/Rakefile +34 -0
- data/ext/rfreeimage/extconf.rb +35 -0
- data/ext/rfreeimage/rfi_main.c +389 -0
- data/lib/rfreeimage/image.rb +26 -0
- data/lib/rfreeimage/version.rb +3 -0
- data/lib/rfreeimage.rb +3 -0
- data/rfreeimage.gemspec +32 -0
- data/vendor/FreeImage/Makefile +34 -0
- data/vendor/FreeImage/Makefile.cygwin +74 -0
- data/vendor/FreeImage/Makefile.fip +84 -0
- data/vendor/FreeImage/Makefile.gnu +83 -0
- data/vendor/FreeImage/Makefile.iphone +96 -0
- data/vendor/FreeImage/Makefile.mingw +136 -0
- data/vendor/FreeImage/Makefile.osx +115 -0
- data/vendor/FreeImage/Makefile.solaris +66 -0
- data/vendor/FreeImage/Makefile.srcs +6 -0
- data/vendor/FreeImage/README.iphone +19 -0
- data/vendor/FreeImage/README.linux +50 -0
- data/vendor/FreeImage/README.minGW +236 -0
- data/vendor/FreeImage/README.osx +44 -0
- data/vendor/FreeImage/README.solaris +67 -0
- data/vendor/FreeImage/Source/CacheFile.h +92 -0
- data/vendor/FreeImage/Source/DeprecationManager/Deprecated.cpp +36 -0
- data/vendor/FreeImage/Source/DeprecationManager/DeprecationMgr.cpp +103 -0
- data/vendor/FreeImage/Source/DeprecationManager/DeprecationMgr.h +83 -0
- data/vendor/FreeImage/Source/FreeImage/BitmapAccess.cpp +1573 -0
- data/vendor/FreeImage/Source/FreeImage/CacheFile.cpp +271 -0
- data/vendor/FreeImage/Source/FreeImage/ColorLookup.cpp +785 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion.cpp +551 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion16_555.cpp +209 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion16_565.cpp +204 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion24.cpp +252 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion32.cpp +345 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion4.cpp +246 -0
- data/vendor/FreeImage/Source/FreeImage/Conversion8.cpp +305 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionFloat.cpp +194 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGB16.cpp +144 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGBA16.cpp +147 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGBAF.cpp +250 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionRGBF.cpp +243 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionType.cpp +699 -0
- data/vendor/FreeImage/Source/FreeImage/ConversionUINT16.cpp +134 -0
- data/vendor/FreeImage/Source/FreeImage/FreeImage.cpp +226 -0
- data/vendor/FreeImage/Source/FreeImage/FreeImageC.c +22 -0
- data/vendor/FreeImage/Source/FreeImage/FreeImageIO.cpp +175 -0
- data/vendor/FreeImage/Source/FreeImage/GetType.cpp +92 -0
- data/vendor/FreeImage/Source/FreeImage/Halftoning.cpp +474 -0
- data/vendor/FreeImage/Source/FreeImage/J2KHelper.cpp +591 -0
- data/vendor/FreeImage/Source/FreeImage/J2KHelper.h +36 -0
- data/vendor/FreeImage/Source/FreeImage/LFPQuantizer.cpp +208 -0
- data/vendor/FreeImage/Source/FreeImage/MNGHelper.cpp +1320 -0
- data/vendor/FreeImage/Source/FreeImage/MemoryIO.cpp +237 -0
- data/vendor/FreeImage/Source/FreeImage/MultiPage.cpp +974 -0
- data/vendor/FreeImage/Source/FreeImage/NNQuantizer.cpp +507 -0
- data/vendor/FreeImage/Source/FreeImage/PSDParser.cpp +1057 -0
- data/vendor/FreeImage/Source/FreeImage/PSDParser.h +271 -0
- data/vendor/FreeImage/Source/FreeImage/PixelAccess.cpp +197 -0
- data/vendor/FreeImage/Source/FreeImage/Plugin.cpp +822 -0
- data/vendor/FreeImage/Source/FreeImage/PluginBMP.cpp +1494 -0
- data/vendor/FreeImage/Source/FreeImage/PluginCUT.cpp +240 -0
- data/vendor/FreeImage/Source/FreeImage/PluginDDS.cpp +655 -0
- data/vendor/FreeImage/Source/FreeImage/PluginEXR.cpp +773 -0
- data/vendor/FreeImage/Source/FreeImage/PluginG3.cpp +433 -0
- data/vendor/FreeImage/Source/FreeImage/PluginGIF.cpp +1407 -0
- data/vendor/FreeImage/Source/FreeImage/PluginHDR.cpp +722 -0
- data/vendor/FreeImage/Source/FreeImage/PluginICO.cpp +824 -0
- data/vendor/FreeImage/Source/FreeImage/PluginIFF.cpp +459 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJ2K.cpp +328 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJNG.cpp +162 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJP2.cpp +328 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJPEG.cpp +1706 -0
- data/vendor/FreeImage/Source/FreeImage/PluginJXR.cpp +1475 -0
- data/vendor/FreeImage/Source/FreeImage/PluginKOALA.cpp +243 -0
- data/vendor/FreeImage/Source/FreeImage/PluginMNG.cpp +153 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPCD.cpp +251 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPCX.cpp +659 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPFM.cpp +409 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPICT.cpp +1343 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPNG.cpp +1115 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPNM.cpp +838 -0
- data/vendor/FreeImage/Source/FreeImage/PluginPSD.cpp +131 -0
- data/vendor/FreeImage/Source/FreeImage/PluginRAS.cpp +512 -0
- data/vendor/FreeImage/Source/FreeImage/PluginRAW.cpp +793 -0
- data/vendor/FreeImage/Source/FreeImage/PluginSGI.cpp +425 -0
- data/vendor/FreeImage/Source/FreeImage/PluginTARGA.cpp +1591 -0
- data/vendor/FreeImage/Source/FreeImage/PluginTIFF.cpp +2631 -0
- data/vendor/FreeImage/Source/FreeImage/PluginWBMP.cpp +372 -0
- data/vendor/FreeImage/Source/FreeImage/PluginWebP.cpp +698 -0
- data/vendor/FreeImage/Source/FreeImage/PluginXBM.cpp +399 -0
- data/vendor/FreeImage/Source/FreeImage/PluginXPM.cpp +487 -0
- data/vendor/FreeImage/Source/FreeImage/TIFFLogLuv.cpp +65 -0
- data/vendor/FreeImage/Source/FreeImage/ToneMapping.cpp +75 -0
- data/vendor/FreeImage/Source/FreeImage/WuQuantizer.cpp +559 -0
- data/vendor/FreeImage/Source/FreeImage/ZLibInterface.cpp +223 -0
- data/vendor/FreeImage/Source/FreeImage/tmoColorConvert.cpp +479 -0
- data/vendor/FreeImage/Source/FreeImage/tmoDrago03.cpp +295 -0
- data/vendor/FreeImage/Source/FreeImage/tmoFattal02.cpp +689 -0
- data/vendor/FreeImage/Source/FreeImage/tmoReinhard05.cpp +260 -0
- data/vendor/FreeImage/Source/FreeImage.h +1153 -0
- data/vendor/FreeImage/Source/FreeImageIO.h +63 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/BSplineRotate.cpp +730 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Background.cpp +895 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Channels.cpp +488 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp +917 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Colors.cpp +967 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp +861 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Display.cpp +230 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Filters.h +287 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Flip.cpp +166 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp +623 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp +505 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Rescale.cpp +192 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Resize.cpp +2116 -0
- data/vendor/FreeImage/Source/FreeImageToolkit/Resize.h +196 -0
- data/vendor/FreeImage/Source/LibJPEG/ansi2knr.c +739 -0
- data/vendor/FreeImage/Source/LibJPEG/cderror.h +134 -0
- data/vendor/FreeImage/Source/LibJPEG/cdjpeg.c +181 -0
- data/vendor/FreeImage/Source/LibJPEG/cdjpeg.h +187 -0
- data/vendor/FreeImage/Source/LibJPEG/cjpeg.c +664 -0
- data/vendor/FreeImage/Source/LibJPEG/ckconfig.c +402 -0
- data/vendor/FreeImage/Source/LibJPEG/djpeg.c +617 -0
- data/vendor/FreeImage/Source/LibJPEG/example.c +433 -0
- data/vendor/FreeImage/Source/LibJPEG/jaricom.c +153 -0
- data/vendor/FreeImage/Source/LibJPEG/jcapimin.c +288 -0
- data/vendor/FreeImage/Source/LibJPEG/jcapistd.c +162 -0
- data/vendor/FreeImage/Source/LibJPEG/jcarith.c +944 -0
- data/vendor/FreeImage/Source/LibJPEG/jccoefct.c +454 -0
- data/vendor/FreeImage/Source/LibJPEG/jccolor.c +604 -0
- data/vendor/FreeImage/Source/LibJPEG/jcdctmgr.c +477 -0
- data/vendor/FreeImage/Source/LibJPEG/jchuff.c +1573 -0
- data/vendor/FreeImage/Source/LibJPEG/jcinit.c +84 -0
- data/vendor/FreeImage/Source/LibJPEG/jcmainct.c +297 -0
- data/vendor/FreeImage/Source/LibJPEG/jcmarker.c +719 -0
- data/vendor/FreeImage/Source/LibJPEG/jcmaster.c +856 -0
- data/vendor/FreeImage/Source/LibJPEG/jcomapi.c +106 -0
- data/vendor/FreeImage/Source/LibJPEG/jconfig.h +161 -0
- data/vendor/FreeImage/Source/LibJPEG/jcparam.c +675 -0
- data/vendor/FreeImage/Source/LibJPEG/jcprepct.c +358 -0
- data/vendor/FreeImage/Source/LibJPEG/jcsample.c +545 -0
- data/vendor/FreeImage/Source/LibJPEG/jctrans.c +385 -0
- data/vendor/FreeImage/Source/LibJPEG/jdapimin.c +399 -0
- data/vendor/FreeImage/Source/LibJPEG/jdapistd.c +276 -0
- data/vendor/FreeImage/Source/LibJPEG/jdarith.c +796 -0
- data/vendor/FreeImage/Source/LibJPEG/jdatadst.c +270 -0
- data/vendor/FreeImage/Source/LibJPEG/jdatasrc.c +275 -0
- data/vendor/FreeImage/Source/LibJPEG/jdcoefct.c +741 -0
- data/vendor/FreeImage/Source/LibJPEG/jdcolor.c +748 -0
- data/vendor/FreeImage/Source/LibJPEG/jdct.h +393 -0
- data/vendor/FreeImage/Source/LibJPEG/jddctmgr.c +384 -0
- data/vendor/FreeImage/Source/LibJPEG/jdhuff.c +1554 -0
- data/vendor/FreeImage/Source/LibJPEG/jdinput.c +662 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmainct.c +513 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmarker.c +1511 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmaster.c +543 -0
- data/vendor/FreeImage/Source/LibJPEG/jdmerge.c +401 -0
- data/vendor/FreeImage/Source/LibJPEG/jdpostct.c +290 -0
- data/vendor/FreeImage/Source/LibJPEG/jdsample.c +361 -0
- data/vendor/FreeImage/Source/LibJPEG/jdtrans.c +140 -0
- data/vendor/FreeImage/Source/LibJPEG/jerror.c +253 -0
- data/vendor/FreeImage/Source/LibJPEG/jerror.h +304 -0
- data/vendor/FreeImage/Source/LibJPEG/jfdctflt.c +174 -0
- data/vendor/FreeImage/Source/LibJPEG/jfdctfst.c +230 -0
- data/vendor/FreeImage/Source/LibJPEG/jfdctint.c +4406 -0
- data/vendor/FreeImage/Source/LibJPEG/jidctflt.c +235 -0
- data/vendor/FreeImage/Source/LibJPEG/jidctfst.c +368 -0
- data/vendor/FreeImage/Source/LibJPEG/jidctint.c +5179 -0
- data/vendor/FreeImage/Source/LibJPEG/jinclude.h +91 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemansi.c +167 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemdos.c +638 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemmac.c +289 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemmgr.c +1119 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemname.c +276 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemnobs.c +109 -0
- data/vendor/FreeImage/Source/LibJPEG/jmemsys.h +198 -0
- data/vendor/FreeImage/Source/LibJPEG/jmorecfg.h +442 -0
- data/vendor/FreeImage/Source/LibJPEG/jpegint.h +426 -0
- data/vendor/FreeImage/Source/LibJPEG/jpeglib.h +1180 -0
- data/vendor/FreeImage/Source/LibJPEG/jpegtran.c +577 -0
- data/vendor/FreeImage/Source/LibJPEG/jquant1.c +857 -0
- data/vendor/FreeImage/Source/LibJPEG/jquant2.c +1311 -0
- data/vendor/FreeImage/Source/LibJPEG/jutils.c +227 -0
- data/vendor/FreeImage/Source/LibJPEG/jversion.h +14 -0
- data/vendor/FreeImage/Source/LibJPEG/rdbmp.c +480 -0
- data/vendor/FreeImage/Source/LibJPEG/rdcolmap.c +253 -0
- data/vendor/FreeImage/Source/LibJPEG/rdgif.c +38 -0
- data/vendor/FreeImage/Source/LibJPEG/rdjpgcom.c +515 -0
- data/vendor/FreeImage/Source/LibJPEG/rdppm.c +459 -0
- data/vendor/FreeImage/Source/LibJPEG/rdrle.c +387 -0
- data/vendor/FreeImage/Source/LibJPEG/rdswitch.c +365 -0
- data/vendor/FreeImage/Source/LibJPEG/rdtarga.c +500 -0
- data/vendor/FreeImage/Source/LibJPEG/transupp.c +1763 -0
- data/vendor/FreeImage/Source/LibJPEG/transupp.h +219 -0
- data/vendor/FreeImage/Source/LibJPEG/wrbmp.c +442 -0
- data/vendor/FreeImage/Source/LibJPEG/wrgif.c +399 -0
- data/vendor/FreeImage/Source/LibJPEG/wrjpgcom.c +583 -0
- data/vendor/FreeImage/Source/LibJPEG/wrppm.c +269 -0
- data/vendor/FreeImage/Source/LibJPEG/wrrle.c +305 -0
- data/vendor/FreeImage/Source/LibJPEG/wrtarga.c +253 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/guiddef.h +230 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmsal.h +757 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstring.h +342 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstrings_adt.h +71 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstrings_strict.h +1096 -0
- data/vendor/FreeImage/Source/LibJXR/common/include/wmspecstrings_undef.h +406 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/JXRTranscode.c +987 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/decode.c +200 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/decode.h +143 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/postprocess.c +288 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/segdec.c +1205 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strInvTransform.c +1888 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strPredQuantDec.c +539 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strdec.c +3628 -0
- data/vendor/FreeImage/Source/LibJXR/image/decode/strdec_x86.c +1640 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/encode.c +144 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/encode.h +113 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/segenc.c +1186 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strFwdTransform.c +1111 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strPredQuantEnc.c +511 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strenc.c +2370 -0
- data/vendor/FreeImage/Source/LibJXR/image/encode/strenc_x86.c +409 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/adapthuff.c +511 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/ansi.h +61 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/common.h +131 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/image.c +183 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/perfTimer.h +115 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/perfTimerANSI.c +274 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strPredQuant.c +306 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strTransform.c +85 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strTransform.h +50 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strcodec.c +1251 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/strcodec.h +681 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/windowsmediaphoto.h +515 -0
- data/vendor/FreeImage/Source/LibJXR/image/sys/xplatform_image.h +84 -0
- data/vendor/FreeImage/Source/LibJXR/image/x86/x86.h +58 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGlue.c +930 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGlue.h +636 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGlueJxr.c +2246 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRGluePFC.c +2338 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRMeta.c +905 -0
- data/vendor/FreeImage/Source/LibJXR/jxrgluelib/JXRMeta.h +258 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/bio.c +188 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/bio.h +128 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cidx_manager.c +239 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cidx_manager.h +68 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cio.c +644 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/cio.h +393 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/dwt.c +919 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/dwt.h +116 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/event.c +141 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/event.h +97 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/function_list.c +114 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/function_list.h +126 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/image.c +235 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/image.h +63 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/indexbox_manager.h +148 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/invert.c +289 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/invert.h +59 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/j2k.c +10238 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/j2k.h +838 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/jp2.c +2776 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/jp2.h +490 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mct.c +319 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mct.h +149 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mqc.c +604 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/mqc.h +201 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/openjpeg.c +955 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/openjpeg.h +1475 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_clock.c +59 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_clock.h +54 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_codec.h +160 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_config.h +9 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_config_private.h +16 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_includes.h +175 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_intmath.h +172 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_inttypes.h +43 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_malloc.h +180 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/opj_stdint.h +47 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/phix_manager.c +191 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/pi.c +1870 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/pi.h +182 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/ppix_manager.c +194 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/raw.c +89 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/raw.h +100 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1.c +1751 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1.h +157 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1_generate_luts.c +276 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t1_luts.h +143 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t2.c +1334 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/t2.h +127 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tcd.c +2123 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tcd.h +348 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tgt.c +331 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tgt.h +140 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/thix_manager.c +134 -0
- data/vendor/FreeImage/Source/LibOpenJPEG/tpix_manager.c +185 -0
- data/vendor/FreeImage/Source/LibPNG/example.c +1061 -0
- data/vendor/FreeImage/Source/LibPNG/png.c +4493 -0
- data/vendor/FreeImage/Source/LibPNG/png.h +3282 -0
- data/vendor/FreeImage/Source/LibPNG/pngconf.h +644 -0
- data/vendor/FreeImage/Source/LibPNG/pngdebug.h +154 -0
- data/vendor/FreeImage/Source/LibPNG/pngerror.c +963 -0
- data/vendor/FreeImage/Source/LibPNG/pngget.c +1213 -0
- data/vendor/FreeImage/Source/LibPNG/pnginfo.h +260 -0
- data/vendor/FreeImage/Source/LibPNG/pnglibconf.h +218 -0
- data/vendor/FreeImage/Source/LibPNG/pngmem.c +281 -0
- data/vendor/FreeImage/Source/LibPNG/pngpread.c +1168 -0
- data/vendor/FreeImage/Source/LibPNG/pngpriv.h +1944 -0
- data/vendor/FreeImage/Source/LibPNG/pngread.c +4121 -0
- data/vendor/FreeImage/Source/LibPNG/pngrio.c +120 -0
- data/vendor/FreeImage/Source/LibPNG/pngrtran.c +4994 -0
- data/vendor/FreeImage/Source/LibPNG/pngrutil.c +4474 -0
- data/vendor/FreeImage/Source/LibPNG/pngset.c +1611 -0
- data/vendor/FreeImage/Source/LibPNG/pngstruct.h +489 -0
- data/vendor/FreeImage/Source/LibPNG/pngtest.c +2011 -0
- data/vendor/FreeImage/Source/LibPNG/pngtrans.c +849 -0
- data/vendor/FreeImage/Source/LibPNG/pngwio.c +168 -0
- data/vendor/FreeImage/Source/LibPNG/pngwrite.c +2455 -0
- data/vendor/FreeImage/Source/LibPNG/pngwtran.c +574 -0
- data/vendor/FreeImage/Source/LibPNG/pngwutil.c +3029 -0
- data/vendor/FreeImage/Source/LibRawLite/dcraw/dcraw.c +15462 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/aahd_demosaic.cpp +706 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dcb_demosaicing.c +710 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dcraw_common.cpp +13593 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dcraw_fileio.cpp +240 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/defines.h +167 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/demosaic_packs.cpp +99 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/dht_demosaic.cpp +873 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/libraw_internal_funcs.h +282 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/libraw_x3f.cpp +1919 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/var_defines.h +216 -0
- data/vendor/FreeImage/Source/LibRawLite/internal/wf_filtering.cpp +1950 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw.h +338 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_alloc.h +99 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_const.h +233 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_datastream.h +238 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_internal.h +225 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_types.h +442 -0
- data/vendor/FreeImage/Source/LibRawLite/libraw/libraw_version.h +62 -0
- data/vendor/FreeImage/Source/LibRawLite/src/libraw_c_api.cpp +230 -0
- data/vendor/FreeImage/Source/LibRawLite/src/libraw_cxx.cpp +4533 -0
- data/vendor/FreeImage/Source/LibRawLite/src/libraw_datastream.cpp +703 -0
- data/vendor/FreeImage/Source/LibTIFF4/mkg3states.c +451 -0
- data/vendor/FreeImage/Source/LibTIFF4/mkspans.c +82 -0
- data/vendor/FreeImage/Source/LibTIFF4/t4.h +292 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_aux.c +358 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_close.c +140 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_codec.c +166 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_color.c +287 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_compress.c +304 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_config.h +97 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_config.vc.h +74 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_config.wince.h +71 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dir.c +1700 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dir.h +308 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dirinfo.c +959 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dirread.c +5640 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dirwrite.c +2910 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_dumpmode.c +143 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_error.c +80 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_extension.c +118 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_fax3.c +1595 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_fax3.h +538 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_fax3sm.c +1260 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_flush.c +118 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_getimage.c +2890 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_jbig.c +213 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_jpeg.c +2354 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_jpeg_12.c +65 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_luv.c +1683 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_lzma.c +495 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_lzw.c +1169 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_next.c +181 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_ojpeg.c +2501 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_open.c +725 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_packbits.c +300 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_pixarlog.c +1442 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_predict.c +764 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_predict.h +77 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_print.c +716 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_read.c +1086 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_strip.c +383 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_swab.c +310 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_thunder.c +207 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_tile.c +299 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_unix.c +325 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_version.c +40 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_vms.c +603 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_warning.c +81 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_win32.c +443 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_wince.c +293 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_write.c +771 -0
- data/vendor/FreeImage/Source/LibTIFF4/tif_zip.c +472 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiff.h +681 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffconf.h +170 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffconf.vc.h +160 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffconf.wince.h +121 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffio.h +557 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffiop.h +367 -0
- data/vendor/FreeImage/Source/LibTIFF4/tiffvers.h +9 -0
- data/vendor/FreeImage/Source/LibTIFF4/uvcode.h +180 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/alphai.h +55 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.alpha.c +167 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.buffer.c +249 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.frame.c +827 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.idec.c +857 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.io.c +640 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.quant.c +110 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.tree.c +525 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.vp8.c +663 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.vp8l.c +1584 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/dec.webp.c +834 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/decode_vp8.h +185 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/vp8i.h +353 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/vp8li.h +136 -0
- data/vendor/FreeImage/Source/LibWebP/src/dec/webpi.h +120 -0
- data/vendor/FreeImage/Source/LibWebP/src/demux/demux.demux.c +957 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.alpha_processing.c +377 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.alpha_processing_mips_dsp_r2.c +139 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.alpha_processing_sse2.c +296 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.argb.c +68 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.argb_mips_dsp_r2.c +108 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.argb_sse2.c +62 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost.c +412 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost_mips32.c +154 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost_mips_dsp_r2.c +107 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cost_sse2.c +121 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.cpu.c +138 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec.c +760 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_clip_tables.c +366 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_mips32.c +585 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c +992 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_neon.c +1489 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.dec_sse2.c +1284 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc.c +788 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_avx2.c +24 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_mips32.c +670 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c +1510 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_neon.c +932 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.enc_sse2.c +940 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.filters.c +240 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c +404 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.filters_sse2.c +349 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.h +434 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless.c +1838 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_mips32.c +416 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c +921 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_neon.c +357 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.lossless_sse2.c +535 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.rescaler.c +115 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.rescaler_mips32.c +192 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.rescaler_mips_dsp_r2.c +210 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling.c +252 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c +280 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_neon.c +267 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.upsampling_sse2.c +214 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv.c +166 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv_mips32.c +100 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c +131 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/dsp.yuv_sse2.c +322 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/lossless.h +313 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/mips_macro.h +200 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/neon.h +82 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/yuv.h +321 -0
- data/vendor/FreeImage/Source/LibWebP/src/dsp/yuv_tables_sse2.h +536 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/backward_references.h +202 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/cost.h +69 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.alpha.c +440 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.analysis.c +501 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.backward_references.c +1076 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.config.c +163 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.cost.c +355 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.filter.c +296 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.frame.c +850 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.histogram.c +897 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.iterator.c +456 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.near_lossless.c +160 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture.c +290 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_csp.c +1100 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_psnr.c +150 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_rescale.c +285 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.picture_tools.c +206 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.quant.c +1191 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.syntax.c +383 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.token.c +285 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.tree.c +504 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.vp8l.c +1437 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/enc.webpenc.c +379 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/histogram.h +114 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/vp8enci.h +551 -0
- data/vendor/FreeImage/Source/LibWebP/src/enc/vp8li.h +78 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.anim_encode.c +1241 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.muxedit.c +696 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.muxinternal.c +551 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/mux.muxread.c +544 -0
- data/vendor/FreeImage/Source/LibWebP/src/mux/muxi.h +232 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/bit_reader.h +168 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/bit_reader_inl.h +172 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/bit_writer.h +120 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/color_cache.h +74 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/endian_inl.h +100 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/filters.h +32 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/huffman.h +67 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/huffman_encode.h +60 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/quant_levels.h +36 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/quant_levels_dec.h +35 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/random.h +63 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/rescaler.h +78 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/thread.h +93 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.bit_reader.c +208 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.bit_writer.c +308 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.color_cache.c +49 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.filters.c +76 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.h +121 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.huffman.c +205 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.huffman_encode.c +417 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.quant_levels.c +140 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.quant_levels_dec.c +279 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.random.c +43 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.rescaler.c +82 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.thread.c +309 -0
- data/vendor/FreeImage/Source/LibWebP/src/utils/utils.utils.c +211 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/decode.h +493 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/demux.h +224 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/encode.h +515 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/format_constants.h +88 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/mux.h +507 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/mux_types.h +97 -0
- data/vendor/FreeImage/Source/LibWebP/src/webp/types.h +52 -0
- data/vendor/FreeImage/Source/MapIntrospector.h +212 -0
- data/vendor/FreeImage/Source/Metadata/Exif.cpp +1253 -0
- data/vendor/FreeImage/Source/Metadata/FIRational.cpp +176 -0
- data/vendor/FreeImage/Source/Metadata/FIRational.h +108 -0
- data/vendor/FreeImage/Source/Metadata/FreeImageTag.cpp +353 -0
- data/vendor/FreeImage/Source/Metadata/FreeImageTag.h +500 -0
- data/vendor/FreeImage/Source/Metadata/IPTC.cpp +342 -0
- data/vendor/FreeImage/Source/Metadata/TagConversion.cpp +1094 -0
- data/vendor/FreeImage/Source/Metadata/TagLib.cpp +1618 -0
- data/vendor/FreeImage/Source/Metadata/XTIFF.cpp +766 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/eLut.cpp +114 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/eLut.h +71 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/half.cpp +310 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/half.h +757 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/halfExport.h +27 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/halfFunction.h +179 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/halfLimits.h +102 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/toFloat.cpp +164 -0
- data/vendor/FreeImage/Source/OpenEXR/Half/toFloat.h +16391 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/Iex.h +60 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexBaseExc.cpp +156 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexBaseExc.h +264 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexErrnoExc.h +208 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexExport.h +51 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexForward.h +229 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexMacros.h +170 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexMathExc.h +57 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexNamespace.h +112 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp +873 -0
- data/vendor/FreeImage/Source/OpenEXR/Iex/IexThrowErrnoExc.h +97 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.cpp +113 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFloatExc.h +146 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.cpp +530 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathFpu.h +91 -0
- data/vendor/FreeImage/Source/OpenEXR/IexMath/IexMathIeeeExc.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmBaseConfig.h +61 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.cpp +633 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAcesFile.h +324 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfArray.h +285 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.cpp +158 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAttribute.h +407 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfAutoArray.h +95 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.cpp +1072 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfB44Compressor.h +118 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp +111 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfBoxAttribute.h +87 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp +1438 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCRgbaFile.h +555 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.cpp +322 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelList.h +436 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp +150 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChannelListAttribute.h +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h +163 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.cpp +151 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticities.h +131 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp +87 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h +73 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp +591 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.h +142 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompression.h +84 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressionAttribute.h +64 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.cpp +226 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfCompressor.h +265 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.cpp +143 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfConvert.h +107 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp +110 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepCompositing.h +132 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.cpp +230 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.h +339 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageState.h +96 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp +2025 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h +276 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp +149 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.h +181 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp +1552 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.h +244 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp +107 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.h +168 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp +1979 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h +437 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp +273 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.h +362 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp +2055 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.h +475 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp +250 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.h +394 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp +57 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDoubleAttribute.h +59 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp +3424 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressor.h +210 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfDwaCompressorSimd.h +2145 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.cpp +335 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmap.h +336 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfExport.h +46 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.cpp +768 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFastHuf.h +148 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp +57 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatAttribute.h +58 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp +84 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.h +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfForward.h +127 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp +228 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFrameBuffer.h +386 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfFramesPerSecond.h +94 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp +76 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericInputFile.h +58 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp +112 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfGenericOutputFile.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.cpp +1283 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHeader.h +699 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.cpp +1114 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfHuf.h +82 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIO.cpp +110 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIO.h +255 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.cpp +895 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputFile.h +240 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.cpp +114 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPart.h +84 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.cpp +51 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputPartData.h +69 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInputStreamMutex.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfInt64.h +56 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.cpp +57 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfIntAttribute.h +58 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.cpp +217 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCode.h +167 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp +99 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h +73 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrder.h +69 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h +72 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLut.cpp +178 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfLut.h +188 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp +263 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMatrixAttribute.h +83 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.cpp +1872 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMisc.h +466 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp +783 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h +128 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp +519 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.h +118 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.cpp +435 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfMultiView.h +187 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfName.h +150 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfNamespace.h +115 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp +126 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h +110 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOptimizedPixelReading.h +646 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.cpp +1378 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputFile.h +263 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.cpp +105 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPart.h +77 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.cpp +52 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputPartData.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfOutputStreamMutex.h +70 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPartHelper.h +262 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPartType.cpp +63 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPartType.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPixelType.h +67 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.cpp +667 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPizCompressor.h +117 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.cpp +104 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImage.h +135 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp +103 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h +70 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp +553 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfPxr24Compressor.h +109 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRational.cpp +127 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRational.h +98 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRationalAttribute.h +69 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgba.h +109 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.cpp +1405 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaFile.h +346 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.cpp +497 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRgbaYca.h +259 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRle.cpp +157 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRle.h +63 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.cpp +220 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfRleCompressor.h +80 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp +1702 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h +210 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfSimd.h +59 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp +125 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStandardAttributes.h +382 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.cpp +242 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStdIO.h +160 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.cpp +80 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringAttribute.h +71 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp +100 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp +129 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfSystemSpecific.h +172 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.cpp +216 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTestFile.h +97 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.cpp +62 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfThreading.h +95 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescription.h +107 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp +86 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h +72 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp +552 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTileOffsets.h +125 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp +1533 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputFile.h +401 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp +208 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledInputPart.h +100 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.cpp +389 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledMisc.h +106 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp +1841 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputFile.h +495 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp +228 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledOutputPart.h +105 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp +1163 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h +482 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.cpp +431 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCode.h +242 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp +79 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h +74 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.cpp +217 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVecAttribute.h +100 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.cpp +60 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfVersion.h +136 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfWav.cpp +391 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfWav.h +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfXdr.h +927 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZip.cpp +196 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZip.h +78 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.cpp +127 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/ImfZipCompressor.h +89 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.cpp +136 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/b44ExpLogTable.h +16396 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.cpp +573 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmImf/dwaLookups.h +98334 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThread.cpp +80 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThread.h +143 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadExport.h +46 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadForward.h +52 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.cpp +59 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutex.h +160 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexPosix.cpp +85 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadMutexWin32.cpp +79 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadNamespace.h +114 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.cpp +483 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPool.h +160 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadPosix.cpp +98 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp +60 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphore.h +112 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosix.cpp +106 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphorePosixCompat.cpp +155 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadSemaphoreWin32.cpp +153 -0
- data/vendor/FreeImage/Source/OpenEXR/IlmThread/IlmThreadWin32.cpp +100 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathBox.cpp +37 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathBox.h +849 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathBoxAlgo.h +1016 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathColor.h +736 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.cpp +178 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathColorAlgo.h +257 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathEuler.h +926 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathExc.h +73 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathExport.h +46 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathForward.h +72 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFrame.h +192 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFrustum.h +741 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFrustumTest.h +417 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFun.cpp +181 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathFun.h +269 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathGL.h +166 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathGLU.h +54 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathHalfLimits.h +68 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathInt64.h +62 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathInterval.h +226 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathLimits.h +268 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathLine.h +185 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathLineAlgo.h +288 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMath.h +208 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMatrix.h +3441 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.cpp +1252 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathMatrixAlgo.h +1425 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathNamespace.h +115 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathPlane.h +257 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathPlatform.h +112 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathQuat.h +964 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathRandom.cpp +194 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathRandom.h +401 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathRoots.h +219 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathShear.cpp +54 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathShear.h +656 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathSphere.h +177 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathVec.cpp +583 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathVec.h +2227 -0
- data/vendor/FreeImage/Source/OpenEXR/Imath/ImathVecAlgo.h +147 -0
- data/vendor/FreeImage/Source/OpenEXR/OpenEXRConfig.h +72 -0
- data/vendor/FreeImage/Source/Plugin.h +144 -0
- data/vendor/FreeImage/Source/Quantizers.h +354 -0
- data/vendor/FreeImage/Source/ToneMapping.h +44 -0
- data/vendor/FreeImage/Source/Utilities.h +516 -0
- data/vendor/FreeImage/Source/ZLib/adler32.c +179 -0
- data/vendor/FreeImage/Source/ZLib/compress.c +80 -0
- data/vendor/FreeImage/Source/ZLib/crc32.c +425 -0
- data/vendor/FreeImage/Source/ZLib/crc32.h +441 -0
- data/vendor/FreeImage/Source/ZLib/deflate.c +1967 -0
- data/vendor/FreeImage/Source/ZLib/deflate.h +346 -0
- data/vendor/FreeImage/Source/ZLib/gzclose.c +25 -0
- data/vendor/FreeImage/Source/ZLib/gzguts.h +209 -0
- data/vendor/FreeImage/Source/ZLib/gzlib.c +634 -0
- data/vendor/FreeImage/Source/ZLib/gzread.c +594 -0
- data/vendor/FreeImage/Source/ZLib/gzwrite.c +577 -0
- data/vendor/FreeImage/Source/ZLib/infback.c +640 -0
- data/vendor/FreeImage/Source/ZLib/inffast.c +340 -0
- data/vendor/FreeImage/Source/ZLib/inffast.h +11 -0
- data/vendor/FreeImage/Source/ZLib/inffixed.h +94 -0
- data/vendor/FreeImage/Source/ZLib/inflate.c +1512 -0
- data/vendor/FreeImage/Source/ZLib/inflate.h +122 -0
- data/vendor/FreeImage/Source/ZLib/inftrees.c +306 -0
- data/vendor/FreeImage/Source/ZLib/inftrees.h +62 -0
- data/vendor/FreeImage/Source/ZLib/trees.c +1226 -0
- data/vendor/FreeImage/Source/ZLib/trees.h +128 -0
- data/vendor/FreeImage/Source/ZLib/uncompr.c +59 -0
- data/vendor/FreeImage/Source/ZLib/zconf.h +511 -0
- data/vendor/FreeImage/Source/ZLib/zlib.h +1768 -0
- data/vendor/FreeImage/Source/ZLib/zutil.c +324 -0
- data/vendor/FreeImage/Source/ZLib/zutil.h +253 -0
- metadata +931 -0
@@ -0,0 +1,974 @@
|
|
1
|
+
// ==========================================================
|
2
|
+
// Multi-Page functions
|
3
|
+
//
|
4
|
+
// Design and implementation by
|
5
|
+
// - Floris van den Berg (flvdberg@wxs.nl)
|
6
|
+
// - Laurent Rocher (rocherl@club-internet.fr)
|
7
|
+
// - Steve Johnson (steve@parisgroup.net)
|
8
|
+
// - Petr Pytelka (pyta@lightcomp.com)
|
9
|
+
// - Herv� Drolon (drolon@infonie.fr)
|
10
|
+
// - Vadim Alexandrov (vadimalexandrov@users.sourceforge.net
|
11
|
+
// - Martin Dyring-Andersen (mda@spamfighter.com)
|
12
|
+
// - Volodymyr Goncharov (volodymyr.goncharov@gmail.com)
|
13
|
+
//
|
14
|
+
// This file is part of FreeImage 3
|
15
|
+
//
|
16
|
+
// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
|
17
|
+
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
|
18
|
+
// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
|
19
|
+
// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
|
20
|
+
// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
|
21
|
+
// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
|
22
|
+
// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
|
23
|
+
// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
24
|
+
// THIS DISCLAIMER.
|
25
|
+
//
|
26
|
+
// Use at your own risk!
|
27
|
+
// ==========================================================
|
28
|
+
|
29
|
+
#ifdef _MSC_VER
|
30
|
+
#pragma warning (disable : 4786) // identifier was truncated to 'number' characters
|
31
|
+
#endif
|
32
|
+
|
33
|
+
#include "CacheFile.h"
|
34
|
+
#include "FreeImageIO.h"
|
35
|
+
#include "Plugin.h"
|
36
|
+
#include "Utilities.h"
|
37
|
+
#include "FreeImage.h"
|
38
|
+
|
39
|
+
// ----------------------------------------------------------
|
40
|
+
|
41
|
+
enum BlockType { BLOCK_CONTINUEUS, BLOCK_REFERENCE };
|
42
|
+
|
43
|
+
// ----------------------------------------------------------
|
44
|
+
|
45
|
+
struct BlockTypeS {
|
46
|
+
BlockType m_type;
|
47
|
+
|
48
|
+
BlockTypeS(BlockType type) : m_type(type) {
|
49
|
+
}
|
50
|
+
virtual ~BlockTypeS() {}
|
51
|
+
};
|
52
|
+
|
53
|
+
struct BlockContinueus : public BlockTypeS {
|
54
|
+
int m_start;
|
55
|
+
int m_end;
|
56
|
+
|
57
|
+
BlockContinueus(int s, int e) : BlockTypeS(BLOCK_CONTINUEUS),
|
58
|
+
m_start(s),
|
59
|
+
m_end(e) {
|
60
|
+
}
|
61
|
+
};
|
62
|
+
|
63
|
+
struct BlockReference : public BlockTypeS {
|
64
|
+
int m_reference;
|
65
|
+
int m_size;
|
66
|
+
|
67
|
+
BlockReference(int r, int size) : BlockTypeS(BLOCK_REFERENCE),
|
68
|
+
m_reference(r),
|
69
|
+
m_size(size) {
|
70
|
+
}
|
71
|
+
};
|
72
|
+
|
73
|
+
// ----------------------------------------------------------
|
74
|
+
|
75
|
+
typedef std::list<BlockTypeS *> BlockList;
|
76
|
+
typedef std::list<BlockTypeS *>::iterator BlockListIterator;
|
77
|
+
|
78
|
+
// ----------------------------------------------------------
|
79
|
+
|
80
|
+
FI_STRUCT (MULTIBITMAPHEADER) {
|
81
|
+
PluginNode *node;
|
82
|
+
FREE_IMAGE_FORMAT fif;
|
83
|
+
FreeImageIO *io;
|
84
|
+
fi_handle handle;
|
85
|
+
CacheFile *m_cachefile;
|
86
|
+
std::map<FIBITMAP *, int> locked_pages;
|
87
|
+
BOOL changed;
|
88
|
+
int page_count;
|
89
|
+
BlockList m_blocks;
|
90
|
+
char *m_filename;
|
91
|
+
BOOL read_only;
|
92
|
+
FREE_IMAGE_FORMAT cache_fif;
|
93
|
+
int load_flags;
|
94
|
+
};
|
95
|
+
|
96
|
+
// =====================================================================
|
97
|
+
// Helper functions
|
98
|
+
// =====================================================================
|
99
|
+
|
100
|
+
inline void
|
101
|
+
ReplaceExtension(std::string& dst_filename, const std::string& src_filename, const std::string& dst_extension) {
|
102
|
+
size_t lastDot = src_filename.find_last_of('.');
|
103
|
+
if (lastDot == std::string::npos) {
|
104
|
+
dst_filename = src_filename;
|
105
|
+
dst_filename += ".";
|
106
|
+
dst_filename += dst_extension;
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
dst_filename = src_filename.substr(0, lastDot + 1);
|
110
|
+
dst_filename += dst_extension;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
// =====================================================================
|
115
|
+
// Internal Multipage functions
|
116
|
+
// =====================================================================
|
117
|
+
|
118
|
+
inline MULTIBITMAPHEADER *
|
119
|
+
FreeImage_GetMultiBitmapHeader(FIMULTIBITMAP *bitmap) {
|
120
|
+
return (MULTIBITMAPHEADER *)bitmap->data;
|
121
|
+
}
|
122
|
+
|
123
|
+
static BlockListIterator DLL_CALLCONV
|
124
|
+
FreeImage_FindBlock(FIMULTIBITMAP *bitmap, int position) {
|
125
|
+
assert(NULL != bitmap);
|
126
|
+
|
127
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
128
|
+
|
129
|
+
// step 1: find the block that matches the given position
|
130
|
+
|
131
|
+
int prev_count = 0;
|
132
|
+
int count = 0;
|
133
|
+
BlockListIterator i;
|
134
|
+
BlockTypeS *current_block = NULL;
|
135
|
+
|
136
|
+
for (i = header->m_blocks.begin(); i != header->m_blocks.end(); ++i) {
|
137
|
+
prev_count = count;
|
138
|
+
|
139
|
+
switch((*i)->m_type) {
|
140
|
+
case BLOCK_CONTINUEUS :
|
141
|
+
count += ((BlockContinueus *)(*i))->m_end - ((BlockContinueus *)(*i))->m_start + 1;
|
142
|
+
break;
|
143
|
+
|
144
|
+
case BLOCK_REFERENCE :
|
145
|
+
count++;
|
146
|
+
break;
|
147
|
+
}
|
148
|
+
|
149
|
+
current_block = *i;
|
150
|
+
|
151
|
+
if (count > position)
|
152
|
+
break;
|
153
|
+
}
|
154
|
+
|
155
|
+
// step 2: make sure we found the node. from here it gets a little complicated:
|
156
|
+
// * if the block is there, just return it
|
157
|
+
// * if the block is a series of blocks, split it in max 3 new blocks
|
158
|
+
// and return the splitted block
|
159
|
+
|
160
|
+
if ((current_block) && (count > position)) {
|
161
|
+
switch(current_block->m_type) {
|
162
|
+
case BLOCK_REFERENCE :
|
163
|
+
return i;
|
164
|
+
|
165
|
+
case BLOCK_CONTINUEUS :
|
166
|
+
{
|
167
|
+
BlockContinueus *block = (BlockContinueus *)current_block;
|
168
|
+
|
169
|
+
if (block->m_start != block->m_end) {
|
170
|
+
int item = block->m_start + (position - prev_count);
|
171
|
+
|
172
|
+
// left part
|
173
|
+
|
174
|
+
if (item != block->m_start) {
|
175
|
+
BlockContinueus *block_a = new BlockContinueus(block->m_start, item - 1);
|
176
|
+
header->m_blocks.insert(i, (BlockTypeS *)block_a);
|
177
|
+
}
|
178
|
+
|
179
|
+
// middle part
|
180
|
+
|
181
|
+
BlockContinueus *block_b = new BlockContinueus(item, item);
|
182
|
+
BlockListIterator block_target = header->m_blocks.insert(i, (BlockTypeS *)block_b);
|
183
|
+
|
184
|
+
// right part
|
185
|
+
|
186
|
+
if (item != block->m_end) {
|
187
|
+
BlockContinueus *block_c = new BlockContinueus(item + 1, block->m_end);
|
188
|
+
header->m_blocks.insert(i, (BlockTypeS *)block_c);
|
189
|
+
}
|
190
|
+
|
191
|
+
// remove the old block that was just splitted
|
192
|
+
|
193
|
+
header->m_blocks.remove((BlockTypeS *)block);
|
194
|
+
delete block;
|
195
|
+
|
196
|
+
// return the splitted block
|
197
|
+
|
198
|
+
return block_target;
|
199
|
+
}
|
200
|
+
|
201
|
+
return i;
|
202
|
+
}
|
203
|
+
}
|
204
|
+
}
|
205
|
+
// we should never go here ...
|
206
|
+
assert(false);
|
207
|
+
return header->m_blocks.end();
|
208
|
+
}
|
209
|
+
|
210
|
+
int DLL_CALLCONV
|
211
|
+
FreeImage_InternalGetPageCount(FIMULTIBITMAP *bitmap) {
|
212
|
+
if (bitmap) {
|
213
|
+
if (((MULTIBITMAPHEADER *)bitmap->data)->handle) {
|
214
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
215
|
+
|
216
|
+
header->io->seek_proc(header->handle, 0, SEEK_SET);
|
217
|
+
|
218
|
+
void *data = FreeImage_Open(header->node, header->io, header->handle, TRUE);
|
219
|
+
|
220
|
+
int page_count = (header->node->m_plugin->pagecount_proc != NULL) ? header->node->m_plugin->pagecount_proc(header->io, header->handle, data) : 1;
|
221
|
+
|
222
|
+
FreeImage_Close(header->node, header->io, header->handle, data);
|
223
|
+
|
224
|
+
return page_count;
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
return 0;
|
229
|
+
}
|
230
|
+
|
231
|
+
// =====================================================================
|
232
|
+
// Multipage functions
|
233
|
+
// =====================================================================
|
234
|
+
|
235
|
+
FIMULTIBITMAP * DLL_CALLCONV
|
236
|
+
FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory, int flags) {
|
237
|
+
|
238
|
+
FILE *handle = NULL;
|
239
|
+
try {
|
240
|
+
// sanity check on the parameters
|
241
|
+
|
242
|
+
if (create_new) {
|
243
|
+
read_only = FALSE;
|
244
|
+
}
|
245
|
+
|
246
|
+
// retrieve the plugin list to find the node belonging to this plugin
|
247
|
+
|
248
|
+
PluginList *list = FreeImage_GetPluginList();
|
249
|
+
|
250
|
+
if (list) {
|
251
|
+
PluginNode *node = list->FindNodeFromFIF(fif);
|
252
|
+
|
253
|
+
if (node) {
|
254
|
+
std::auto_ptr<FreeImageIO> io (new FreeImageIO);
|
255
|
+
|
256
|
+
SetDefaultIO(io.get());
|
257
|
+
|
258
|
+
if (!create_new) {
|
259
|
+
handle = fopen(filename, "rb");
|
260
|
+
if (handle == NULL) {
|
261
|
+
return NULL;
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
265
|
+
std::auto_ptr<FIMULTIBITMAP> bitmap (new FIMULTIBITMAP);
|
266
|
+
std::auto_ptr<MULTIBITMAPHEADER> header (new MULTIBITMAPHEADER);
|
267
|
+
header->m_filename = new char[strlen(filename) + 1];
|
268
|
+
strcpy(header->m_filename, filename);
|
269
|
+
header->node = node;
|
270
|
+
header->fif = fif;
|
271
|
+
header->io = io.get ();
|
272
|
+
header->handle = handle;
|
273
|
+
header->changed = FALSE;
|
274
|
+
header->read_only = read_only;
|
275
|
+
header->m_cachefile = NULL;
|
276
|
+
header->cache_fif = fif;
|
277
|
+
header->load_flags = flags;
|
278
|
+
|
279
|
+
// store the MULTIBITMAPHEADER in the surrounding FIMULTIBITMAP structure
|
280
|
+
|
281
|
+
bitmap->data = header.get();
|
282
|
+
|
283
|
+
// cache the page count
|
284
|
+
|
285
|
+
header->page_count = FreeImage_InternalGetPageCount(bitmap.get());
|
286
|
+
|
287
|
+
// allocate a continueus block to describe the bitmap
|
288
|
+
|
289
|
+
if (!create_new) {
|
290
|
+
header->m_blocks.push_back((BlockTypeS *)new BlockContinueus(0, header->page_count - 1));
|
291
|
+
}
|
292
|
+
|
293
|
+
// set up the cache
|
294
|
+
|
295
|
+
if (!read_only) {
|
296
|
+
std::string cache_name;
|
297
|
+
ReplaceExtension(cache_name, filename, "ficache");
|
298
|
+
|
299
|
+
std::auto_ptr<CacheFile> cache_file (new CacheFile(cache_name, keep_cache_in_memory));
|
300
|
+
|
301
|
+
if (cache_file->open()) {
|
302
|
+
// we can use release() as std::bad_alloc won't be thrown from here on
|
303
|
+
header->m_cachefile = cache_file.release();
|
304
|
+
} else {
|
305
|
+
// an error occured ...
|
306
|
+
fclose(handle);
|
307
|
+
return NULL;
|
308
|
+
}
|
309
|
+
}
|
310
|
+
// return the multibitmap
|
311
|
+
// std::bad_alloc won't be thrown from here on
|
312
|
+
header.release(); // now owned by bitmap
|
313
|
+
io.release(); // now owned by bitmap
|
314
|
+
return bitmap.release(); // now owned by caller
|
315
|
+
}
|
316
|
+
}
|
317
|
+
} catch (std::bad_alloc &) {
|
318
|
+
/** @todo report error */
|
319
|
+
}
|
320
|
+
if (handle)
|
321
|
+
fclose(handle);
|
322
|
+
return NULL;
|
323
|
+
}
|
324
|
+
|
325
|
+
FIMULTIBITMAP * DLL_CALLCONV
|
326
|
+
FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags) {
|
327
|
+
try {
|
328
|
+
BOOL read_only = FALSE; // modifications (if any) will be stored into the memory cache
|
329
|
+
|
330
|
+
if (io && handle) {
|
331
|
+
|
332
|
+
// retrieve the plugin list to find the node belonging to this plugin
|
333
|
+
PluginList *list = FreeImage_GetPluginList();
|
334
|
+
|
335
|
+
if (list) {
|
336
|
+
PluginNode *node = list->FindNodeFromFIF(fif);
|
337
|
+
|
338
|
+
if (node) {
|
339
|
+
std::auto_ptr<FIMULTIBITMAP> bitmap (new FIMULTIBITMAP);
|
340
|
+
std::auto_ptr<MULTIBITMAPHEADER> header (new MULTIBITMAPHEADER);
|
341
|
+
std::auto_ptr<FreeImageIO> tmp_io (new FreeImageIO (*io));
|
342
|
+
header->io = tmp_io.get();
|
343
|
+
header->m_filename = NULL;
|
344
|
+
header->node = node;
|
345
|
+
header->fif = fif;
|
346
|
+
header->handle = handle;
|
347
|
+
header->changed = FALSE;
|
348
|
+
header->read_only = read_only;
|
349
|
+
header->m_cachefile = NULL;
|
350
|
+
header->cache_fif = fif;
|
351
|
+
header->load_flags = flags;
|
352
|
+
|
353
|
+
// store the MULTIBITMAPHEADER in the surrounding FIMULTIBITMAP structure
|
354
|
+
|
355
|
+
bitmap->data = header.get();
|
356
|
+
|
357
|
+
// cache the page count
|
358
|
+
|
359
|
+
header->page_count = FreeImage_InternalGetPageCount(bitmap.get());
|
360
|
+
|
361
|
+
// allocate a continueus block to describe the bitmap
|
362
|
+
|
363
|
+
header->m_blocks.push_back((BlockTypeS *)new BlockContinueus(0, header->page_count - 1));
|
364
|
+
|
365
|
+
if (!read_only) {
|
366
|
+
// set up the cache
|
367
|
+
std::auto_ptr<CacheFile> cache_file (new CacheFile("", TRUE));
|
368
|
+
|
369
|
+
if (cache_file->open()) {
|
370
|
+
header->m_cachefile = cache_file.release();
|
371
|
+
}
|
372
|
+
}
|
373
|
+
tmp_io.release();
|
374
|
+
header.release();
|
375
|
+
return bitmap.release();
|
376
|
+
}
|
377
|
+
}
|
378
|
+
}
|
379
|
+
} catch (std::bad_alloc &) {
|
380
|
+
/** @todo report error */
|
381
|
+
}
|
382
|
+
return NULL;
|
383
|
+
}
|
384
|
+
|
385
|
+
BOOL DLL_CALLCONV
|
386
|
+
FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags) {
|
387
|
+
if(!bitmap || !bitmap->data || !io || !handle) {
|
388
|
+
return FALSE;
|
389
|
+
}
|
390
|
+
|
391
|
+
BOOL success = TRUE;
|
392
|
+
|
393
|
+
// retrieve the plugin list to find the node belonging to this plugin
|
394
|
+
PluginList *list = FreeImage_GetPluginList();
|
395
|
+
|
396
|
+
if (list) {
|
397
|
+
PluginNode *node = list->FindNodeFromFIF(fif);
|
398
|
+
|
399
|
+
if(node) {
|
400
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
401
|
+
|
402
|
+
// dst data
|
403
|
+
void *data = FreeImage_Open(node, io, handle, FALSE);
|
404
|
+
// src data
|
405
|
+
void *data_read = NULL;
|
406
|
+
|
407
|
+
if(header->handle) {
|
408
|
+
// open src
|
409
|
+
header->io->seek_proc(header->handle, 0, SEEK_SET);
|
410
|
+
data_read = FreeImage_Open(header->node, header->io, header->handle, TRUE);
|
411
|
+
}
|
412
|
+
|
413
|
+
// write all the pages to the file using handle and io
|
414
|
+
|
415
|
+
int count = 0;
|
416
|
+
|
417
|
+
for (BlockListIterator i = header->m_blocks.begin(); i != header->m_blocks.end(); i++) {
|
418
|
+
if (success) {
|
419
|
+
switch((*i)->m_type) {
|
420
|
+
case BLOCK_CONTINUEUS:
|
421
|
+
{
|
422
|
+
BlockContinueus *block = (BlockContinueus *)(*i);
|
423
|
+
|
424
|
+
for (int j = block->m_start; j <= block->m_end; j++) {
|
425
|
+
|
426
|
+
// load the original source data
|
427
|
+
FIBITMAP *dib = header->node->m_plugin->load_proc(header->io, header->handle, j, header->load_flags, data_read);
|
428
|
+
|
429
|
+
// save the data
|
430
|
+
success = node->m_plugin->save_proc(io, dib, handle, count, flags, data);
|
431
|
+
count++;
|
432
|
+
|
433
|
+
FreeImage_Unload(dib);
|
434
|
+
}
|
435
|
+
|
436
|
+
break;
|
437
|
+
}
|
438
|
+
|
439
|
+
case BLOCK_REFERENCE:
|
440
|
+
{
|
441
|
+
BlockReference *ref = (BlockReference *)(*i);
|
442
|
+
|
443
|
+
// read the compressed data
|
444
|
+
|
445
|
+
BYTE *compressed_data = (BYTE*)malloc(ref->m_size * sizeof(BYTE));
|
446
|
+
|
447
|
+
header->m_cachefile->readFile((BYTE *)compressed_data, ref->m_reference, ref->m_size);
|
448
|
+
|
449
|
+
// uncompress the data
|
450
|
+
|
451
|
+
FIMEMORY *hmem = FreeImage_OpenMemory(compressed_data, ref->m_size);
|
452
|
+
FIBITMAP *dib = FreeImage_LoadFromMemory(header->cache_fif, hmem, 0);
|
453
|
+
FreeImage_CloseMemory(hmem);
|
454
|
+
|
455
|
+
// get rid of the buffer
|
456
|
+
free(compressed_data);
|
457
|
+
|
458
|
+
// save the data
|
459
|
+
|
460
|
+
success = node->m_plugin->save_proc(io, dib, handle, count, flags, data);
|
461
|
+
count++;
|
462
|
+
|
463
|
+
// unload the dib
|
464
|
+
|
465
|
+
FreeImage_Unload(dib);
|
466
|
+
|
467
|
+
break;
|
468
|
+
}
|
469
|
+
}
|
470
|
+
} else {
|
471
|
+
break;
|
472
|
+
}
|
473
|
+
}
|
474
|
+
|
475
|
+
// close the files
|
476
|
+
|
477
|
+
FreeImage_Close(header->node, header->io, header->handle, data_read);
|
478
|
+
|
479
|
+
FreeImage_Close(node, io, handle, data);
|
480
|
+
|
481
|
+
return success;
|
482
|
+
}
|
483
|
+
}
|
484
|
+
|
485
|
+
return FALSE;
|
486
|
+
}
|
487
|
+
|
488
|
+
|
489
|
+
BOOL DLL_CALLCONV
|
490
|
+
FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags) {
|
491
|
+
if (bitmap) {
|
492
|
+
BOOL success = TRUE;
|
493
|
+
|
494
|
+
if (bitmap->data) {
|
495
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
496
|
+
|
497
|
+
// saves changes only of images loaded directly from a file
|
498
|
+
if (header->changed && header->m_filename) {
|
499
|
+
try {
|
500
|
+
// open a temp file
|
501
|
+
|
502
|
+
std::string spool_name;
|
503
|
+
|
504
|
+
ReplaceExtension(spool_name, header->m_filename, "fispool");
|
505
|
+
|
506
|
+
// open the spool file and the source file
|
507
|
+
|
508
|
+
FILE *f = fopen(spool_name.c_str(), "w+b");
|
509
|
+
|
510
|
+
// saves changes
|
511
|
+
if (f == NULL) {
|
512
|
+
FreeImage_OutputMessageProc(header->fif, "Failed to open %s, %s", spool_name.c_str(), strerror(errno));
|
513
|
+
success = FALSE;
|
514
|
+
} else {
|
515
|
+
success = FreeImage_SaveMultiBitmapToHandle(header->fif, bitmap, header->io, (fi_handle)f, flags);
|
516
|
+
|
517
|
+
// close the files
|
518
|
+
|
519
|
+
if (fclose(f) != 0) {
|
520
|
+
success = FALSE;
|
521
|
+
FreeImage_OutputMessageProc(header->fif, "Failed to close %s, %s", spool_name.c_str(), strerror(errno));
|
522
|
+
}
|
523
|
+
}
|
524
|
+
if (header->handle) {
|
525
|
+
fclose((FILE *)header->handle);
|
526
|
+
}
|
527
|
+
|
528
|
+
// applies changes to the destination file
|
529
|
+
|
530
|
+
if (success) {
|
531
|
+
remove(header->m_filename);
|
532
|
+
success = (rename(spool_name.c_str(), header->m_filename) == 0) ? TRUE:FALSE;
|
533
|
+
if(!success) {
|
534
|
+
FreeImage_OutputMessageProc(header->fif, "Failed to rename %s to %s", spool_name.c_str(), header->m_filename);
|
535
|
+
}
|
536
|
+
} else {
|
537
|
+
remove(spool_name.c_str());
|
538
|
+
}
|
539
|
+
} catch (std::bad_alloc &) {
|
540
|
+
success = FALSE;
|
541
|
+
}
|
542
|
+
|
543
|
+
} else {
|
544
|
+
if (header->handle && header->m_filename) {
|
545
|
+
fclose((FILE *)header->handle);
|
546
|
+
}
|
547
|
+
}
|
548
|
+
|
549
|
+
// clear the blocks list
|
550
|
+
|
551
|
+
for (BlockListIterator i = header->m_blocks.begin(); i != header->m_blocks.end(); ++i) {
|
552
|
+
delete *i;
|
553
|
+
}
|
554
|
+
|
555
|
+
// flush and dispose the cache
|
556
|
+
|
557
|
+
if (header->m_cachefile) {
|
558
|
+
header->m_cachefile->close();
|
559
|
+
delete header->m_cachefile;
|
560
|
+
}
|
561
|
+
|
562
|
+
// delete the last open bitmaps
|
563
|
+
|
564
|
+
while (!header->locked_pages.empty()) {
|
565
|
+
FreeImage_Unload(header->locked_pages.begin()->first);
|
566
|
+
|
567
|
+
header->locked_pages.erase(header->locked_pages.begin()->first);
|
568
|
+
}
|
569
|
+
|
570
|
+
// get rid of the IO structure
|
571
|
+
|
572
|
+
delete header->io;
|
573
|
+
|
574
|
+
// delete the filename
|
575
|
+
|
576
|
+
if(header->m_filename) {
|
577
|
+
delete[] header->m_filename;
|
578
|
+
}
|
579
|
+
|
580
|
+
// delete the FIMULTIBITMAPHEADER
|
581
|
+
|
582
|
+
delete header;
|
583
|
+
}
|
584
|
+
|
585
|
+
delete bitmap;
|
586
|
+
|
587
|
+
return success;
|
588
|
+
}
|
589
|
+
|
590
|
+
return FALSE;
|
591
|
+
}
|
592
|
+
|
593
|
+
int DLL_CALLCONV
|
594
|
+
FreeImage_GetPageCount(FIMULTIBITMAP *bitmap) {
|
595
|
+
if (bitmap) {
|
596
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
597
|
+
|
598
|
+
if (header->page_count == -1) {
|
599
|
+
header->page_count = 0;
|
600
|
+
|
601
|
+
for (BlockListIterator i = header->m_blocks.begin(); i != header->m_blocks.end(); ++i) {
|
602
|
+
switch((*i)->m_type) {
|
603
|
+
case BLOCK_CONTINUEUS :
|
604
|
+
header->page_count += ((BlockContinueus *)(*i))->m_end - ((BlockContinueus *)(*i))->m_start + 1;
|
605
|
+
break;
|
606
|
+
|
607
|
+
case BLOCK_REFERENCE :
|
608
|
+
header->page_count++;
|
609
|
+
break;
|
610
|
+
}
|
611
|
+
}
|
612
|
+
}
|
613
|
+
|
614
|
+
return header->page_count;
|
615
|
+
}
|
616
|
+
|
617
|
+
return 0;
|
618
|
+
}
|
619
|
+
|
620
|
+
static BlockReference*
|
621
|
+
FreeImage_SavePageToBlock(MULTIBITMAPHEADER *header, FIBITMAP *data) {
|
622
|
+
if (header->read_only || !header->locked_pages.empty())
|
623
|
+
return NULL;
|
624
|
+
|
625
|
+
DWORD compressed_size = 0;
|
626
|
+
BYTE *compressed_data = NULL;
|
627
|
+
|
628
|
+
// compress the bitmap data
|
629
|
+
|
630
|
+
// open a memory handle
|
631
|
+
FIMEMORY *hmem = FreeImage_OpenMemory();
|
632
|
+
if(hmem==NULL) return NULL;
|
633
|
+
// save the file to memory
|
634
|
+
if(!FreeImage_SaveToMemory(header->cache_fif, data, hmem, 0)) {
|
635
|
+
FreeImage_CloseMemory(hmem);
|
636
|
+
return NULL;
|
637
|
+
}
|
638
|
+
// get the buffer from the memory stream
|
639
|
+
if(!FreeImage_AcquireMemory(hmem, &compressed_data, &compressed_size)) {
|
640
|
+
FreeImage_CloseMemory(hmem);
|
641
|
+
return NULL;
|
642
|
+
}
|
643
|
+
|
644
|
+
// write the compressed data to the cache
|
645
|
+
int ref = header->m_cachefile->writeFile(compressed_data, compressed_size);
|
646
|
+
// get rid of the compressed data
|
647
|
+
FreeImage_CloseMemory(hmem);
|
648
|
+
|
649
|
+
return new(std::nothrow) BlockReference(ref, compressed_size);
|
650
|
+
}
|
651
|
+
|
652
|
+
void DLL_CALLCONV
|
653
|
+
FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data) {
|
654
|
+
if (!bitmap || !data)
|
655
|
+
return;
|
656
|
+
|
657
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
658
|
+
|
659
|
+
BlockReference *block = FreeImage_SavePageToBlock(header, data);
|
660
|
+
if(block==NULL) return;
|
661
|
+
|
662
|
+
// add the block
|
663
|
+
header->m_blocks.push_back((BlockTypeS *)block);
|
664
|
+
header->changed = TRUE;
|
665
|
+
header->page_count = -1;
|
666
|
+
}
|
667
|
+
|
668
|
+
void DLL_CALLCONV
|
669
|
+
FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data) {
|
670
|
+
if (!bitmap || !data)
|
671
|
+
return;
|
672
|
+
|
673
|
+
if (page >= FreeImage_GetPageCount(bitmap))
|
674
|
+
return;
|
675
|
+
|
676
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
677
|
+
|
678
|
+
BlockReference *block = FreeImage_SavePageToBlock(header, data);
|
679
|
+
if(block==NULL) return;
|
680
|
+
|
681
|
+
// add a block
|
682
|
+
if (page > 0) {
|
683
|
+
BlockListIterator block_source = FreeImage_FindBlock(bitmap, page);
|
684
|
+
|
685
|
+
header->m_blocks.insert(block_source, (BlockTypeS *)block);
|
686
|
+
} else {
|
687
|
+
header->m_blocks.push_front((BlockTypeS *)block);
|
688
|
+
}
|
689
|
+
|
690
|
+
header->changed = TRUE;
|
691
|
+
header->page_count = -1;
|
692
|
+
}
|
693
|
+
|
694
|
+
void DLL_CALLCONV
|
695
|
+
FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page) {
|
696
|
+
if (bitmap) {
|
697
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
698
|
+
|
699
|
+
if ((!header->read_only) && (header->locked_pages.empty())) {
|
700
|
+
if (FreeImage_GetPageCount(bitmap) > 1) {
|
701
|
+
BlockListIterator i = FreeImage_FindBlock(bitmap, page);
|
702
|
+
|
703
|
+
if (i != header->m_blocks.end()) {
|
704
|
+
switch((*i)->m_type) {
|
705
|
+
case BLOCK_CONTINUEUS :
|
706
|
+
delete *i;
|
707
|
+
header->m_blocks.erase(i);
|
708
|
+
break;
|
709
|
+
|
710
|
+
case BLOCK_REFERENCE :
|
711
|
+
header->m_cachefile->deleteFile(((BlockReference *)(*i))->m_reference);
|
712
|
+
delete *i;
|
713
|
+
header->m_blocks.erase(i);
|
714
|
+
break;
|
715
|
+
}
|
716
|
+
|
717
|
+
header->changed = TRUE;
|
718
|
+
header->page_count = -1;
|
719
|
+
}
|
720
|
+
}
|
721
|
+
}
|
722
|
+
}
|
723
|
+
}
|
724
|
+
|
725
|
+
|
726
|
+
FIBITMAP * DLL_CALLCONV
|
727
|
+
FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page) {
|
728
|
+
if (bitmap) {
|
729
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
730
|
+
|
731
|
+
// only lock if the page wasn't locked before...
|
732
|
+
|
733
|
+
for (std::map<FIBITMAP *, int>::iterator i = header->locked_pages.begin(); i != header->locked_pages.end(); ++i) {
|
734
|
+
if (i->second == page) {
|
735
|
+
return NULL;
|
736
|
+
}
|
737
|
+
}
|
738
|
+
|
739
|
+
// open the bitmap
|
740
|
+
|
741
|
+
header->io->seek_proc(header->handle, 0, SEEK_SET);
|
742
|
+
|
743
|
+
void *data = FreeImage_Open(header->node, header->io, header->handle, TRUE);
|
744
|
+
|
745
|
+
// load the bitmap data
|
746
|
+
|
747
|
+
if (data != NULL) {
|
748
|
+
FIBITMAP *dib = (header->node->m_plugin->load_proc != NULL) ? header->node->m_plugin->load_proc(header->io, header->handle, page, header->load_flags, data) : NULL;
|
749
|
+
|
750
|
+
// close the file
|
751
|
+
|
752
|
+
FreeImage_Close(header->node, header->io, header->handle, data);
|
753
|
+
|
754
|
+
// if there was still another bitmap open, get rid of it
|
755
|
+
|
756
|
+
if (dib) {
|
757
|
+
header->locked_pages[dib] = page;
|
758
|
+
|
759
|
+
return dib;
|
760
|
+
}
|
761
|
+
|
762
|
+
return NULL;
|
763
|
+
}
|
764
|
+
}
|
765
|
+
|
766
|
+
return NULL;
|
767
|
+
}
|
768
|
+
|
769
|
+
void DLL_CALLCONV
|
770
|
+
FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *page, BOOL changed) {
|
771
|
+
if ((bitmap) && (page)) {
|
772
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
773
|
+
|
774
|
+
// find out if the page we try to unlock is actually locked...
|
775
|
+
|
776
|
+
if (header->locked_pages.find(page) != header->locked_pages.end()) {
|
777
|
+
// store the bitmap compressed in the cache for later writing
|
778
|
+
|
779
|
+
if (changed && !header->read_only) {
|
780
|
+
header->changed = TRUE;
|
781
|
+
|
782
|
+
// cut loose the block from the rest
|
783
|
+
|
784
|
+
BlockListIterator i = FreeImage_FindBlock(bitmap, header->locked_pages[page]);
|
785
|
+
|
786
|
+
// compress the data
|
787
|
+
|
788
|
+
DWORD compressed_size = 0;
|
789
|
+
BYTE *compressed_data = NULL;
|
790
|
+
|
791
|
+
// open a memory handle
|
792
|
+
FIMEMORY *hmem = FreeImage_OpenMemory();
|
793
|
+
// save the page to memory
|
794
|
+
FreeImage_SaveToMemory(header->cache_fif, page, hmem, 0);
|
795
|
+
// get the buffer from the memory stream
|
796
|
+
FreeImage_AcquireMemory(hmem, &compressed_data, &compressed_size);
|
797
|
+
|
798
|
+
// write the data to the cache
|
799
|
+
|
800
|
+
switch ((*i)->m_type) {
|
801
|
+
case BLOCK_CONTINUEUS :
|
802
|
+
{
|
803
|
+
int iPage = header->m_cachefile->writeFile(compressed_data, compressed_size);
|
804
|
+
|
805
|
+
delete (*i);
|
806
|
+
|
807
|
+
*i = (BlockTypeS *)new BlockReference(iPage, compressed_size);
|
808
|
+
|
809
|
+
break;
|
810
|
+
}
|
811
|
+
|
812
|
+
case BLOCK_REFERENCE :
|
813
|
+
{
|
814
|
+
BlockReference *reference = (BlockReference *)(*i);
|
815
|
+
|
816
|
+
header->m_cachefile->deleteFile(reference->m_reference);
|
817
|
+
|
818
|
+
delete (*i);
|
819
|
+
|
820
|
+
int iPage = header->m_cachefile->writeFile(compressed_data, compressed_size);
|
821
|
+
|
822
|
+
*i = (BlockTypeS *)new BlockReference(iPage, compressed_size);
|
823
|
+
|
824
|
+
break;
|
825
|
+
}
|
826
|
+
}
|
827
|
+
|
828
|
+
// get rid of the compressed data
|
829
|
+
|
830
|
+
FreeImage_CloseMemory(hmem);
|
831
|
+
}
|
832
|
+
|
833
|
+
// reset the locked page so that another page can be locked
|
834
|
+
|
835
|
+
FreeImage_Unload(page);
|
836
|
+
|
837
|
+
header->locked_pages.erase(page);
|
838
|
+
}
|
839
|
+
}
|
840
|
+
}
|
841
|
+
|
842
|
+
BOOL DLL_CALLCONV
|
843
|
+
FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source) {
|
844
|
+
if (bitmap) {
|
845
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
846
|
+
|
847
|
+
if ((!header->read_only) && (header->locked_pages.empty())) {
|
848
|
+
if ((target != source) && ((target >= 0) && (target < FreeImage_GetPageCount(bitmap))) && ((source >= 0) && (source < FreeImage_GetPageCount(bitmap)))) {
|
849
|
+
BlockListIterator block_source = FreeImage_FindBlock(bitmap, target);
|
850
|
+
BlockListIterator block_target = FreeImage_FindBlock(bitmap, source);
|
851
|
+
|
852
|
+
header->m_blocks.insert(block_target, *block_source);
|
853
|
+
header->m_blocks.erase(block_source);
|
854
|
+
|
855
|
+
header->changed = TRUE;
|
856
|
+
|
857
|
+
return TRUE;
|
858
|
+
}
|
859
|
+
}
|
860
|
+
}
|
861
|
+
|
862
|
+
return FALSE;
|
863
|
+
}
|
864
|
+
|
865
|
+
BOOL DLL_CALLCONV
|
866
|
+
FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count) {
|
867
|
+
if ((bitmap) && (count)) {
|
868
|
+
MULTIBITMAPHEADER *header = FreeImage_GetMultiBitmapHeader(bitmap);
|
869
|
+
|
870
|
+
if ((pages == NULL) || (*count == 0)) {
|
871
|
+
*count = (int)header->locked_pages.size();
|
872
|
+
} else {
|
873
|
+
int c = 0;
|
874
|
+
|
875
|
+
for (std::map<FIBITMAP *, int>::iterator i = header->locked_pages.begin(); i != header->locked_pages.end(); ++i) {
|
876
|
+
pages[c] = i->second;
|
877
|
+
|
878
|
+
c++;
|
879
|
+
|
880
|
+
if (c == *count)
|
881
|
+
break;
|
882
|
+
}
|
883
|
+
}
|
884
|
+
|
885
|
+
return TRUE;
|
886
|
+
}
|
887
|
+
|
888
|
+
return FALSE;
|
889
|
+
}
|
890
|
+
|
891
|
+
// =====================================================================
|
892
|
+
// Memory IO Multipage functions
|
893
|
+
// =====================================================================
|
894
|
+
|
895
|
+
FIMULTIBITMAP * DLL_CALLCONV
|
896
|
+
FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags) {
|
897
|
+
BOOL read_only = FALSE; // modifications (if any) will be stored into the memory cache
|
898
|
+
|
899
|
+
// retrieve the plugin list to find the node belonging to this plugin
|
900
|
+
|
901
|
+
PluginList *list = FreeImage_GetPluginList();
|
902
|
+
|
903
|
+
if (list) {
|
904
|
+
PluginNode *node = list->FindNodeFromFIF(fif);
|
905
|
+
|
906
|
+
if (node) {
|
907
|
+
FreeImageIO *io = new(std::nothrow) FreeImageIO;
|
908
|
+
|
909
|
+
if (io) {
|
910
|
+
SetMemoryIO(io);
|
911
|
+
|
912
|
+
FIMULTIBITMAP *bitmap = new(std::nothrow) FIMULTIBITMAP;
|
913
|
+
|
914
|
+
if (bitmap) {
|
915
|
+
MULTIBITMAPHEADER *header = new(std::nothrow) MULTIBITMAPHEADER;
|
916
|
+
|
917
|
+
if (header) {
|
918
|
+
header->m_filename = NULL;
|
919
|
+
header->node = node;
|
920
|
+
header->fif = fif;
|
921
|
+
header->io = io;
|
922
|
+
header->handle = (fi_handle)stream;
|
923
|
+
header->changed = FALSE;
|
924
|
+
header->read_only = read_only;
|
925
|
+
header->m_cachefile = NULL;
|
926
|
+
header->cache_fif = fif;
|
927
|
+
header->load_flags = flags;
|
928
|
+
|
929
|
+
// store the MULTIBITMAPHEADER in the surrounding FIMULTIBITMAP structure
|
930
|
+
|
931
|
+
bitmap->data = header;
|
932
|
+
|
933
|
+
// cache the page count
|
934
|
+
|
935
|
+
header->page_count = FreeImage_InternalGetPageCount(bitmap);
|
936
|
+
|
937
|
+
// allocate a continueus block to describe the bitmap
|
938
|
+
|
939
|
+
header->m_blocks.push_back((BlockTypeS *)new BlockContinueus(0, header->page_count - 1));
|
940
|
+
|
941
|
+
if (!read_only) {
|
942
|
+
// set up the cache
|
943
|
+
CacheFile *cache_file = new(std::nothrow) CacheFile("", TRUE);
|
944
|
+
|
945
|
+
if (cache_file && cache_file->open()) {
|
946
|
+
header->m_cachefile = cache_file;
|
947
|
+
}
|
948
|
+
}
|
949
|
+
|
950
|
+
return bitmap;
|
951
|
+
}
|
952
|
+
|
953
|
+
delete bitmap;
|
954
|
+
}
|
955
|
+
|
956
|
+
delete io;
|
957
|
+
}
|
958
|
+
}
|
959
|
+
}
|
960
|
+
|
961
|
+
return NULL;
|
962
|
+
}
|
963
|
+
|
964
|
+
BOOL DLL_CALLCONV
|
965
|
+
FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags) {
|
966
|
+
if (stream && stream->data) {
|
967
|
+
FreeImageIO io;
|
968
|
+
SetMemoryIO(&io);
|
969
|
+
|
970
|
+
return FreeImage_SaveMultiBitmapToHandle(fif, bitmap, &io, (fi_handle)stream, flags);
|
971
|
+
}
|
972
|
+
|
973
|
+
return FALSE;
|
974
|
+
}
|