master 05b455b32a77 cached
513 files
6.1 MB
1.6M tokens
1842 symbols
1 requests
Download .txt
Showing preview only (6,543K chars total). Download the full file or copy to clipboard to get everything.
Repository: Beyka/Android-TiffBitmapFactory
Branch: master
Commit: 05b455b32a77
Files: 513
Total size: 6.1 MB

Directory structure:
gitextract_fbcwkp2b/

├── .gitignore
├── CHANGELOG.txt
├── README.md
├── build.gradle
├── license.txt
├── proguard-rules.pro
└── src/
    ├── androidTest/
    │   └── java/
    │       └── org/
    │           └── beyka/
    │               └── tiffbitmapfactory/
    │                   └── ApplicationTest.java
    └── main/
        ├── .gitignore
        ├── AndroidManifest.xml
        ├── java/
        │   └── org/
        │       └── beyka/
        │           └── tiffbitmapfactory/
        │               ├── CompressionScheme.java
        │               ├── DecodeArea.java
        │               ├── FillOrder.java
        │               ├── IProgressListener.java
        │               ├── ImageFormat.java
        │               ├── Orientation.java
        │               ├── Photometric.java
        │               ├── PlanarConfig.java
        │               ├── ResolutionUnit.java
        │               ├── TiffBitmapFactory.java
        │               ├── TiffConverter.java
        │               ├── TiffSaver.java
        │               └── exceptions/
        │                   ├── CantOpenFileException.java
        │                   ├── DecodeTiffException.java
        │                   └── NotEnoughtMemoryException.java
        ├── jni/
        │   ├── Android.mk
        │   ├── Application.mk
        │   ├── BMP.h
        │   ├── BaseTiffConverter.cpp
        │   ├── BaseTiffConverter.h
        │   ├── BitmapReader.cpp
        │   ├── BitmapReader.h
        │   ├── BmpToTiffConverter.cpp
        │   ├── BmpToTiffConverter.h
        │   ├── JpgToTiffConverter.cpp
        │   ├── JpgToTiffConverter.h
        │   ├── NativeDecoder.cpp
        │   ├── NativeDecoder.h
        │   ├── NativeExceptions.cpp
        │   ├── NativeExceptions.h
        │   ├── NativeTiffBitmapFactory.cpp
        │   ├── NativeTiffBitmapFactory.h
        │   ├── NativeTiffConverter.cpp
        │   ├── NativeTiffConverter.h
        │   ├── NativeTiffSaver.cpp
        │   ├── NativeTiffSaver.h
        │   ├── PngToTiffConverter.cpp
        │   ├── PngToTiffConverter.h
        │   ├── TiffToBmpConverter.cpp
        │   ├── TiffToBmpConverter.h
        │   ├── TiffToJpgConverter.cpp
        │   ├── TiffToJpgConverter.h
        │   ├── TiffToPngConverter.cpp
        │   ├── TiffToPngConverter.h
        │   ├── jpeg/
        │   │   ├── jconfig.h
        │   │   ├── jerror.h
        │   │   ├── jmorecfg.h
        │   │   └── jpeglib.h
        │   ├── libs/
        │   │   ├── arm64-v8a/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── armeabi/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── armeabi-v7a/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── mips/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── mips64/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── x86/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   └── x86_64/
        │   │       ├── libjpeg.a
        │   │       └── libpng.a
        │   ├── png/
        │   │   ├── config.h
        │   │   ├── png.h
        │   │   ├── pngconf.h
        │   │   └── pngpriv.h
        │   ├── tiff/
        │   │   ├── Android.mk
        │   │   ├── COPYRIGHT
        │   │   ├── ChangeLog
        │   │   ├── HOWTO-RELEASE
        │   │   ├── Makefile.am
        │   │   ├── Makefile.in
        │   │   ├── Makefile.vc
        │   │   ├── README
        │   │   ├── README.android
        │   │   ├── README.vms
        │   │   ├── RELEASE-DATE
        │   │   ├── SConstruct
        │   │   ├── TODO
        │   │   ├── VERSION
        │   │   ├── aclocal.m4
        │   │   ├── autogen.sh
        │   │   ├── build/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   └── README
        │   │   ├── config/
        │   │   │   ├── compile
        │   │   │   ├── config.guess
        │   │   │   ├── config.sub
        │   │   │   ├── depcomp
        │   │   │   ├── install-sh
        │   │   │   ├── ltmain.sh
        │   │   │   ├── missing
        │   │   │   └── mkinstalldirs
        │   │   ├── configure
        │   │   ├── configure.ac
        │   │   ├── configure.com
        │   │   ├── contrib/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── README
        │   │   │   ├── acorn/
        │   │   │   │   ├── Makefile.acorn
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── ReadMe
        │   │   │   │   ├── SetVars
        │   │   │   │   ├── cleanlib
        │   │   │   │   ├── convert
        │   │   │   │   └── install
        │   │   │   ├── addtiffo/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── Makefile.vc
        │   │   │   │   ├── README
        │   │   │   │   ├── addtiffo.c
        │   │   │   │   ├── tif_overview.c
        │   │   │   │   ├── tif_ovrcache.c
        │   │   │   │   └── tif_ovrcache.h
        │   │   │   ├── dbs/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── tiff-bi.c
        │   │   │   │   ├── tiff-grayscale.c
        │   │   │   │   ├── tiff-palette.c
        │   │   │   │   ├── tiff-rgb.c
        │   │   │   │   └── xtiff/
        │   │   │   │       ├── Makefile.am
        │   │   │   │       ├── Makefile.in
        │   │   │   │       ├── README
        │   │   │   │       ├── patchlevel.h
        │   │   │   │       ├── xtiff.c
        │   │   │   │       └── xtifficon.h
        │   │   │   ├── iptcutil/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── iptcutil.c
        │   │   │   │   ├── test.iptc
        │   │   │   │   └── test.txt
        │   │   │   ├── mac-cw/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── Makefile.script
        │   │   │   │   ├── README
        │   │   │   │   ├── mac_main.c
        │   │   │   │   ├── mac_main.h
        │   │   │   │   ├── metrowerks.note
        │   │   │   │   ├── mkg3_main.c
        │   │   │   │   └── version.h
        │   │   │   ├── mac-mpw/
        │   │   │   │   ├── BUILD.mpw
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── libtiff.make
        │   │   │   │   ├── mactrans.c
        │   │   │   │   ├── port.make
        │   │   │   │   ├── tools.make
        │   │   │   │   └── top.make
        │   │   │   ├── mfs/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   └── mfs_file.c
        │   │   │   ├── pds/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── tif_imageiter.c
        │   │   │   │   ├── tif_imageiter.h
        │   │   │   │   ├── tif_pdsdirread.c
        │   │   │   │   └── tif_pdsdirwrite.c
        │   │   │   ├── ras/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── ras2tif.c
        │   │   │   │   └── tif2ras.c
        │   │   │   ├── stream/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── tiffstream.cpp
        │   │   │   │   └── tiffstream.h
        │   │   │   ├── tags/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── listtif.c
        │   │   │   │   ├── maketif.c
        │   │   │   │   ├── xtif_dir.c
        │   │   │   │   ├── xtiffio.h
        │   │   │   │   └── xtiffiop.h
        │   │   │   └── win_dib/
        │   │   │       ├── Makefile.am
        │   │   │       ├── Makefile.in
        │   │   │       ├── Makefile.w95
        │   │   │       ├── README.Tiffile
        │   │   │       ├── README.tiff2dib
        │   │   │       ├── Tiffile.cpp
        │   │   │       └── tiff2dib.c
        │   │   ├── html/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── TIFFTechNote2.html
        │   │   │   ├── addingtags.html
        │   │   │   ├── bugs.html
        │   │   │   ├── build.html
        │   │   │   ├── contrib.html
        │   │   │   ├── document.html
        │   │   │   ├── images/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   └── Makefile.in
        │   │   │   ├── images.html
        │   │   │   ├── index.html
        │   │   │   ├── internals.html
        │   │   │   ├── intro.html
        │   │   │   ├── libtiff.html
        │   │   │   ├── man/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── TIFFClose.3tiff.html
        │   │   │   │   ├── TIFFDataWidth.3tiff.html
        │   │   │   │   ├── TIFFError.3tiff.html
        │   │   │   │   ├── TIFFFlush.3tiff.html
        │   │   │   │   ├── TIFFGetField.3tiff.html
        │   │   │   │   ├── TIFFOpen.3tiff.html
        │   │   │   │   ├── TIFFPrintDirectory.3tiff.html
        │   │   │   │   ├── TIFFRGBAImage.3tiff.html
        │   │   │   │   ├── TIFFReadDirectory.3tiff.html
        │   │   │   │   ├── TIFFReadEncodedStrip.3tiff.html
        │   │   │   │   ├── TIFFReadEncodedTile.3tiff.html
        │   │   │   │   ├── TIFFReadRGBAImage.3tiff.html
        │   │   │   │   ├── TIFFReadRGBAStrip.3tiff.html
        │   │   │   │   ├── TIFFReadRGBATile.3tiff.html
        │   │   │   │   ├── TIFFReadRawStrip.3tiff.html
        │   │   │   │   ├── TIFFReadRawTile.3tiff.html
        │   │   │   │   ├── TIFFReadScanline.3tiff.html
        │   │   │   │   ├── TIFFReadTile.3tiff.html
        │   │   │   │   ├── TIFFSetDirectory.3tiff.html
        │   │   │   │   ├── TIFFSetField.3tiff.html
        │   │   │   │   ├── TIFFWarning.3tiff.html
        │   │   │   │   ├── TIFFWriteDirectory.3tiff.html
        │   │   │   │   ├── TIFFWriteEncodedStrip.3tiff.html
        │   │   │   │   ├── TIFFWriteEncodedTile.3tiff.html
        │   │   │   │   ├── TIFFWriteRawStrip.3tiff.html
        │   │   │   │   ├── TIFFWriteRawTile.3tiff.html
        │   │   │   │   ├── TIFFWriteScanline.3tiff.html
        │   │   │   │   ├── TIFFWriteTile.3tiff.html
        │   │   │   │   ├── TIFFbuffer.3tiff.html
        │   │   │   │   ├── TIFFcodec.3tiff.html
        │   │   │   │   ├── TIFFcolor.3tiff.html
        │   │   │   │   ├── TIFFmemory.3tiff.html
        │   │   │   │   ├── TIFFquery.3tiff.html
        │   │   │   │   ├── TIFFsize.3tiff.html
        │   │   │   │   ├── TIFFstrip.3tiff.html
        │   │   │   │   ├── TIFFswab.3tiff.html
        │   │   │   │   ├── TIFFtile.3tiff.html
        │   │   │   │   ├── fax2ps.1.html
        │   │   │   │   ├── fax2tiff.1.html
        │   │   │   │   ├── gif2tiff.1.html
        │   │   │   │   ├── index.html
        │   │   │   │   ├── libtiff.3tiff.html
        │   │   │   │   ├── pal2rgb.1.html
        │   │   │   │   ├── ppm2tiff.1.html
        │   │   │   │   ├── ras2tiff.1.html
        │   │   │   │   ├── raw2tiff.1.html
        │   │   │   │   ├── rgb2ycbcr.1.html
        │   │   │   │   ├── sgi2tiff.1.html
        │   │   │   │   ├── thumbnail.1.html
        │   │   │   │   ├── tiff2bw.1.html
        │   │   │   │   ├── tiff2pdf.1.html
        │   │   │   │   ├── tiff2ps.1.html
        │   │   │   │   ├── tiff2rgba.1.html
        │   │   │   │   ├── tiffcmp.1.html
        │   │   │   │   ├── tiffcp.1.html
        │   │   │   │   ├── tiffcrop.1.html
        │   │   │   │   ├── tiffdither.1.html
        │   │   │   │   ├── tiffdump.1.html
        │   │   │   │   ├── tiffgt.1.html
        │   │   │   │   ├── tiffinfo.1.html
        │   │   │   │   ├── tiffmedian.1.html
        │   │   │   │   ├── tiffset.1.html
        │   │   │   │   ├── tiffsplit.1.html
        │   │   │   │   └── tiffsv.1.html
        │   │   │   ├── misc.html
        │   │   │   ├── support.html
        │   │   │   ├── tools.html
        │   │   │   ├── v3.4beta007.html
        │   │   │   ├── v3.4beta016.html
        │   │   │   ├── v3.4beta018.html
        │   │   │   ├── v3.4beta024.html
        │   │   │   ├── v3.4beta028.html
        │   │   │   ├── v3.4beta029.html
        │   │   │   ├── v3.4beta031.html
        │   │   │   ├── v3.4beta032.html
        │   │   │   ├── v3.4beta033.html
        │   │   │   ├── v3.4beta034.html
        │   │   │   ├── v3.4beta035.html
        │   │   │   ├── v3.4beta036.html
        │   │   │   ├── v3.5.1.html
        │   │   │   ├── v3.5.2.html
        │   │   │   ├── v3.5.3.html
        │   │   │   ├── v3.5.4.html
        │   │   │   ├── v3.5.5.html
        │   │   │   ├── v3.5.6-beta.html
        │   │   │   ├── v3.5.7.html
        │   │   │   ├── v3.6.0.html
        │   │   │   ├── v3.6.1.html
        │   │   │   ├── v3.7.0.html
        │   │   │   ├── v3.7.0alpha.html
        │   │   │   ├── v3.7.0beta.html
        │   │   │   ├── v3.7.0beta2.html
        │   │   │   ├── v3.7.1.html
        │   │   │   ├── v3.7.2.html
        │   │   │   ├── v3.7.3.html
        │   │   │   ├── v3.7.4.html
        │   │   │   ├── v3.8.0.html
        │   │   │   ├── v3.8.1.html
        │   │   │   ├── v3.8.2.html
        │   │   │   ├── v3.9.0beta.html
        │   │   │   ├── v3.9.1.html
        │   │   │   └── v3.9.2.html
        │   │   ├── libtiff/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── Makefile.vc
        │   │   │   ├── SConstruct
        │   │   │   ├── libtiff.def
        │   │   │   ├── mkg3states.c
        │   │   │   ├── t4.h
        │   │   │   ├── tif_acorn.c
        │   │   │   ├── tif_apple.c
        │   │   │   ├── tif_atari.c
        │   │   │   ├── tif_aux.c
        │   │   │   ├── tif_close.c
        │   │   │   ├── tif_codec.c
        │   │   │   ├── tif_color.c
        │   │   │   ├── tif_compress.c
        │   │   │   ├── tif_config.h
        │   │   │   ├── tif_config.h-vms
        │   │   │   ├── tif_config.h.in
        │   │   │   ├── tif_config.vc.h
        │   │   │   ├── tif_config.wince.h
        │   │   │   ├── tif_dir.c
        │   │   │   ├── tif_dir.h
        │   │   │   ├── tif_dirinfo.c
        │   │   │   ├── tif_dirread.c
        │   │   │   ├── tif_dirwrite.c
        │   │   │   ├── tif_dumpmode.c
        │   │   │   ├── tif_error.c
        │   │   │   ├── tif_extension.c
        │   │   │   ├── tif_fax3.c
        │   │   │   ├── tif_fax3.h
        │   │   │   ├── tif_fax3sm.c
        │   │   │   ├── tif_flush.c
        │   │   │   ├── tif_getimage.c
        │   │   │   ├── tif_jbig.c
        │   │   │   ├── tif_jpeg.c
        │   │   │   ├── tif_luv.c
        │   │   │   ├── tif_lzw.c
        │   │   │   ├── tif_msdos.c
        │   │   │   ├── tif_next.c
        │   │   │   ├── tif_ojpeg.c
        │   │   │   ├── tif_open.c
        │   │   │   ├── tif_packbits.c
        │   │   │   ├── tif_pixarlog.c
        │   │   │   ├── tif_predict.c
        │   │   │   ├── tif_predict.h
        │   │   │   ├── tif_print.c
        │   │   │   ├── tif_read.c
        │   │   │   ├── tif_stream.cxx
        │   │   │   ├── tif_strip.c
        │   │   │   ├── tif_swab.c
        │   │   │   ├── tif_thunder.c
        │   │   │   ├── tif_tile.c
        │   │   │   ├── tif_unix.c
        │   │   │   ├── tif_version.c
        │   │   │   ├── tif_warning.c
        │   │   │   ├── tif_win3.c
        │   │   │   ├── tif_win32.c
        │   │   │   ├── tif_write.c
        │   │   │   ├── tif_zip.c
        │   │   │   ├── tiff.h
        │   │   │   ├── tiffconf.h
        │   │   │   ├── tiffconf.h.in
        │   │   │   ├── tiffconf.vc.h
        │   │   │   ├── tiffconf.wince.h
        │   │   │   ├── tiffio.h
        │   │   │   ├── tiffio.hxx
        │   │   │   ├── tiffiop.h
        │   │   │   ├── tiffvers.h
        │   │   │   └── uvcode.h
        │   │   ├── m4/
        │   │   │   ├── acinclude.m4
        │   │   │   ├── libtool.m4
        │   │   │   ├── ltoptions.m4
        │   │   │   ├── ltsugar.m4
        │   │   │   ├── ltversion.m4
        │   │   │   └── lt~obsolete.m4
        │   │   ├── man/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── TIFFClose.3tiff
        │   │   │   ├── TIFFDataWidth.3tiff
        │   │   │   ├── TIFFError.3tiff
        │   │   │   ├── TIFFFlush.3tiff
        │   │   │   ├── TIFFGetField.3tiff
        │   │   │   ├── TIFFOpen.3tiff
        │   │   │   ├── TIFFPrintDirectory.3tiff
        │   │   │   ├── TIFFRGBAImage.3tiff
        │   │   │   ├── TIFFReadDirectory.3tiff
        │   │   │   ├── TIFFReadEncodedStrip.3tiff
        │   │   │   ├── TIFFReadEncodedTile.3tiff
        │   │   │   ├── TIFFReadRGBAImage.3tiff
        │   │   │   ├── TIFFReadRGBAStrip.3tiff
        │   │   │   ├── TIFFReadRGBATile.3tiff
        │   │   │   ├── TIFFReadRawStrip.3tiff
        │   │   │   ├── TIFFReadRawTile.3tiff
        │   │   │   ├── TIFFReadScanline.3tiff
        │   │   │   ├── TIFFReadTile.3tiff
        │   │   │   ├── TIFFSetDirectory.3tiff
        │   │   │   ├── TIFFSetField.3tiff
        │   │   │   ├── TIFFWarning.3tiff
        │   │   │   ├── TIFFWriteDirectory.3tiff
        │   │   │   ├── TIFFWriteEncodedStrip.3tiff
        │   │   │   ├── TIFFWriteEncodedTile.3tiff
        │   │   │   ├── TIFFWriteRawStrip.3tiff
        │   │   │   ├── TIFFWriteRawTile.3tiff
        │   │   │   ├── TIFFWriteScanline.3tiff
        │   │   │   ├── TIFFWriteTile.3tiff
        │   │   │   ├── TIFFbuffer.3tiff
        │   │   │   ├── TIFFcodec.3tiff
        │   │   │   ├── TIFFcolor.3tiff
        │   │   │   ├── TIFFmemory.3tiff
        │   │   │   ├── TIFFquery.3tiff
        │   │   │   ├── TIFFsize.3tiff
        │   │   │   ├── TIFFstrip.3tiff
        │   │   │   ├── TIFFswab.3tiff
        │   │   │   ├── TIFFtile.3tiff
        │   │   │   ├── bmp2tiff.1
        │   │   │   ├── fax2ps.1
        │   │   │   ├── fax2tiff.1
        │   │   │   ├── gif2tiff.1
        │   │   │   ├── libtiff.3tiff
        │   │   │   ├── pal2rgb.1
        │   │   │   ├── ppm2tiff.1
        │   │   │   ├── ras2tiff.1
        │   │   │   ├── raw2tiff.1
        │   │   │   ├── rgb2ycbcr.1
        │   │   │   ├── sgi2tiff.1
        │   │   │   ├── thumbnail.1
        │   │   │   ├── tiff2bw.1
        │   │   │   ├── tiff2pdf.1
        │   │   │   ├── tiff2ps.1
        │   │   │   ├── tiff2rgba.1
        │   │   │   ├── tiffcmp.1
        │   │   │   ├── tiffcp.1
        │   │   │   ├── tiffcrop.1
        │   │   │   ├── tiffdither.1
        │   │   │   ├── tiffdump.1
        │   │   │   ├── tiffgt.1
        │   │   │   ├── tiffinfo.1
        │   │   │   ├── tiffmedian.1
        │   │   │   ├── tiffset.1
        │   │   │   ├── tiffsplit.1
        │   │   │   └── tiffsv.1
        │   │   ├── nmake.opt
        │   │   ├── port/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── Makefile.vc
        │   │   │   ├── dummy.c
        │   │   │   ├── getopt.c
        │   │   │   ├── lfind.c
        │   │   │   ├── libport.h
        │   │   │   ├── strcasecmp.c
        │   │   │   └── strtoul.c
        │   │   ├── test/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── ascii_tag.c
        │   │   │   ├── check_tag.c
        │   │   │   ├── long_tag.c
        │   │   │   ├── short_tag.c
        │   │   │   ├── strip.c
        │   │   │   ├── strip_rw.c
        │   │   │   ├── test_arrays.c
        │   │   │   └── test_arrays.h
        │   │   └── tools/
        │   │       ├── Makefile.am
        │   │       ├── Makefile.in
        │   │       ├── Makefile.vc
        │   │       ├── bmp2tiff.c
        │   │       ├── fax2ps.c
        │   │       ├── fax2tiff.c
        │   │       ├── gif2tiff.c
        │   │       ├── pal2rgb.c
        │   │       ├── ppm2tiff.c
        │   │       ├── ras2tiff.c
        │   │       ├── rasterfile.h
        │   │       ├── raw2tiff.c
        │   │       ├── rgb2ycbcr.c
        │   │       ├── sgi2tiff.c
        │   │       ├── sgisv.c
        │   │       ├── thumbnail.c
        │   │       ├── tiff2bw.c
        │   │       ├── tiff2pdf.c
        │   │       ├── tiff2ps.c
        │   │       ├── tiff2rgba.c
        │   │       ├── tiffcmp.c
        │   │       ├── tiffcp.c
        │   │       ├── tiffcrop.c
        │   │       ├── tiffdither.c
        │   │       ├── tiffdump.c
        │   │       ├── tiffgt.c
        │   │       ├── tiffinfo.c
        │   │       ├── tiffmedian.c
        │   │       ├── tiffset.c
        │   │       ├── tiffsplit.c
        │   │       └── ycbcr.c
        │   ├── tiff.h
        │   ├── tiffconf.h
        │   ├── tiffio.h
        │   └── tiffvers.h
        └── res/
            └── values/
                └── strings.xml

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
/build
*.o
*.o.d
*.so
*.iml


================================================
FILE: CHANGELOG.txt
================================================
0.9.9.0
- Added support for decoding and converting files from file descriptors

0.9.8.7
- Fixed converting from JPG to TIFF with CCITTRLE, CCITTFAX3, CCITTFAX4 compression schemes

0.9.8.6
- Changed binary files (rebuild)

0.9.8.5
- Added signal handling of SIGSEGV signal before open tiff images to prevent many silent crashes from libtiff

0.9.8.4
- Added possibility to cancel background processing by interrupting of worker thread as usual in Java

0.9.8.3
-Fixed impossibility to convert full image without bounds

0.9.8.2
-Added handling of SIGSEGV crashes from libtiff

0.9.8
-Added support for dirrect converting files to TIFF and from TIFF
-Fixed bug causing crashing while saving tiff

0.9.7.6
-Added support for CCITT modified Huffman RLE (CCITTRLE) compression scheme

0.9.7.5
- Returned previous version of write bitmap to tiff algorithm with some improvements. This changes is due to an error of writing tiff data with bottom orientations

0.9.7.4
- Add converter utils
- Improved write and read algorithms

0.9.7.3
- Add possibility to decode part of image by specify decode area

0.9.7.2
- Changed saving algorithm to use android native bitmap
- Add progress listener for decoding process

0.9.7.1
- Added reading of various tiff tags
- Changed enums

0.9.7
- Added possibility to stop decoding that runs in separate thread
- Fixed crashing when decoding images with bad metadata

0.9.6.2
- Added support for TIFFTAG_XRESOLUTION, TIFFTAG_YRESOLUTION, TIFFTAG_RESOLUTIONUNIT

0.9.6
- Added support for CCITT Group 3 and CCITT Group 4 compression schemes

0.9.5.1
- Fixed decoding algorithm for stripped images

0.9.5 
- Added algorithms for efficient memory usage
- Added switchers for throwing exceptions and using of tiff tag orientation



================================================
FILE: README.md
================================================
# Android-TiffBitmapFactory
TiffBitmapFactory is an Android library that allows opening and saving images in *.tif format (See [Wikipedia](https://en.wikipedia.org/wiki/Tagged_Image_File_Format)) on Android devices.

For decoding and encoding *.tif files it uses the native library [libtiff](https://github.com/dumganhar/libtiff). Also for images that compressed with jpeg compression scheme used [libjpeg9 for android](https://github.com/Suvitruf/libjpeg-version-9-android) (the IJG code). For converting from PNG to TIFF and from TIFF to PNG used library [libpng-android](https://github.com/julienr/libpng-android).

Just now it has possibility to open tif image as mutable bitmap, read count of directory in file, apply sample rate for bitmap decoding and choose directory to decode.
While saving there is available few(most popular) compression mods and some additiona fields that can be writen to file, like author or copyright.

Minimum Android API level 16

Supported architectures: all

### Installation
Just add to your gradle dependencies :
```
implementation 'io.github.beyka:Android-TiffBitmapFactory:0.9.9.1'
```
And do not forget to add WRITE_EXTERNAL_STORAGE permission to main project manifest

### Build from sources
To build native part of library use [Android-NDK-bundle](https://developer.android.com/tools/sdk/ndk/index.html).
<p>To start build go to tiffbitmapfactory folder and run</p>

``` Gradle
ndk-build NDK_PROJECT_PATH=src/main
```

### Usage
#### Opening tiff file
Starting Android-Q we can't open any file from sdcar, just files from scoped storage of application
If you need open file somewhere in sdcardm you should use [Storage Access Framework](https://android-doc.github.io/guide/topics/providers/document-provider.html)

Request document chooser(Android system don't know image/tiff type so using */*):
```Java
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("*/*");
startActivityForResult(intent, requestCode);
```
Getting answer from chooser:
```Java
@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == REQUEST_CODE) {
            try {
                ParcelFileDescriptor parcelFileDescriptor = getContentResolver().openFileDescriptor(data.getData(), "r");
                Bitmap bmp = TiffBitmapFactory.decodeFileDescriptor(parcelFileDescriptor.getFd());
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
    }
```
Same method used also for TiffSaver and TiffConverter classes

For pre Q devices and for scoped storage you can use old api:
```Java
File file = new File("/sdcard/image.tif");

//Read data about image to Options object
TiffBitmapFactory.Options options = new TiffBitmapFactory.Options();
options.inJustDecodeBounds = true;
TiffBitmapFactory.decodeFile(file, options);

int dirCount = options.outDirectoryCount;

//Read and process all images in file
for (int i = 0; i < dirCount; i++) {
    options.inDirectoryNumber = i;
    TiffBitmapFactory.decodeFile(file, options);
    int curDir = options.outCurDirectoryNumber;
    int width = options.outWidth;
    int height = options.outHeight;
    //Change sample size if width or height bigger than required width or height
    int inSampleSize = 1;
    if (height > reqHeight || width > reqWidth) {

        final int halfHeight = height / 2;
        final int halfWidth = width / 2;

        // Calculate the largest inSampleSize value that is a power of 2 and keeps both
        // height and width larger than the requested height and width.
        while ((halfHeight / inSampleSize) > reqHeight
                        && (halfWidth / inSampleSize) > reqWidth) {
            inSampleSize *= 2;
        }
    }
    options.inJustDecodeBounds = false;
    options.inSampleSize = inSampleSize;
    
    // Specify the amount of memory available for the final bitmap and temporary storage.
    options.inAvailableMemory = 20000000; // bytes
    
    Bitmap bmp = TiffBitmapFactory.decodeFile(file, options);
    processBitmap(bmp);
}
```

##### Memory processing
While decoding images library use native memory mechanism, so it could use all memory available for operating system. This could produce crash of your app and close other applications which are running on the device. Also in some cases it could crash operating system. 
Also in case of using more than one thread for decoding images every thread could try to use all device memory.
For avoiding of memory errors, library now has option called inAvailableMemory. Default value for this variable is 8000x8000x4 that equal to 244Mb. -1 means that decoder could use all available memory, but also it could be root of application crashes. Each separate thread that decoding tiff image will estimate how many memory it will use in decoding process. If estimate memory is less than available memory, decoder will decode image. Otherwise decoder will throw error or just return NULL(see inThrowException option).


#### Stop decoding that runs in separate thread
```Java
//Running decoding of big image in separate thread
Thread thread = new Thread(new Runnable() {
        @Override
        public void run() {
            Bitmap bitmap = TiffBitmapFactory.decodePath("/sdcard/big_tiff_image.tif");
        }
    });
thread.start();
//To stop thread just interrupt thread as usual
thread.interrupt();
```

#### Saving tiff file
```Java
//Open some image
Bitmap bitmap = BitmapFactory.decodeFile("sdcard/image.png");
//Create options for saving
TiffSaver.SaveOptions options = new TiffSaver.SaveOptions();
//By default compression mode is none
options.compressionScheme = CompressionScheme.COMPRESSION_LZW;
//By default orientation is top left
options.orientation = Orientation.ORIENTATION_LEFTTOP;
//Add author tag to output file
options.author = "beyka";
//Add copyright tag to output file
options.copyright = "Some copyright";
//Save image as tif. If image saved succesfull true will be returned
boolean saved = TiffSaver.saveBitmap("/sdcard/out.tif", bitmap, options);
```

#### Adding page to existing tiff file
```Java
//Open some image
Bitmap bitmap = BitmapFactory.decodeFile("sdcard/image.png");
//Create options for saving
TiffSaver.SaveOptions options = new TiffSaver.SaveOptions();
//By default compression mode is none
options.compressionScheme = CompressionScheme.COMPRESSION_LZW;
//By default orientation is top left
options.orientation = Orientation.ORIENTATION_LEFTTOP;
//Add author tag to output file
options.author = "beyka";
//Add copyright tag to output file
options.copyright = "Some copyright";
//Add new directory to existing file or create new file. If image saved succesfull true will be returned
boolean saved = TiffSaver.appendBitmap("/sdcard/out.tif", bitmap, options);
```
Every new page will be added as new directory to the end of file. If you trying to append directory to non-exisiting file - new file will be created


#### Converting to tiff
There is possibility for dirrect convert from some formats to TIFF. This method uses as less memory as possible. Use this method if you want create TIFF form realy big image file.
```Java
TiffConverter.ConverterOptions options = new TiffConverter.ConverterOptions();
options.throwExceptions = false; //Set to true if you want use java exception mechanism;
options.availableMemory = 128 * 1024 * 1024; //Available 128Mb for work;
options.compressionScheme = CompressionScheme.LZW; //compression scheme for tiff
options.appendTiff = false;//If set to true - will be created one more tiff directory, otherwise file will be overwritten
TiffConverter.convertToTiff("/sdcard/some_image.jpg", "/sdcard/out.tif", options, progressListener);
```

If you need convert tiff to some other format:
```Java
TiffConverter.ConverterOptions options = new TiffConverter.ConverterOptions();
options.throwExceptions = false; //Set to true if you want use java exception mechanism;
options.availableMemory = 128 * 1024 * 1024; //Available 128Mb for work;
options.readTiffDirectory = 1; //Number of tiff directory to convert;
        
//Convert to JPEG
TiffConverter.convertTiffJpg("/sdcard/in.tif", "/sdcard/out.jpg", options, progressListener);
//Convert to PNG
TiffConverter.convertTiffPng("/sdcard/in.tif", "/sdcard/out.png", options, progressListener);
//Convert to BMP
TiffConverter.convertTiffBmp("/sdcard/in.tif", "/sdcard/out.bmp", options, progressListener);
```
For now library support JPEG, PNG and BMP formats for converting.


#### Progress listener
All operations(read, create, convert) have support for progress reporting.
```Java
IProgressListener progressListener = new IProgressListener() {
    @Override
    public void reportProgress(long processedPixels, long totalPixels) {
        Log.v("Progress reporter", String.format("Processed %d pixels from %d", processedPixels, totalPixels);
    }
};
```

### Proguard
If you use proguard add this to you config file:
```Gradle
-keep class org.beyka.tiffbitmapfactory.**{ *; }
```

### 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Special thanks to [dennis508](https://github.com/dennis508)    for providing of incremental reading of TIFF file


### Applications that use library:
* [B Tiff Viewer](https://play.google.com/store/apps/details?id=com.beyka.btiffviewer)
* Image Converter [[GitHub](https://github.com/vbresan/Image_Converter)] [[Google Play](https://play.google.com/store/apps/details?id=biz.binarysolutions.imageconverter.ggl)]


================================================
FILE: build.gradle
================================================
plugins {
    id "com.android.library"
}

android {
    compileSdkVersion 30
    buildToolsVersion '30.0.3'

    def softwareName

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 30
        versionCode 987
        versionName "0.9.9.0"

        softwareName = "\"" + project.name + "-" + versionName + "\""
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField("String", "softwarename", softwareName)
        }
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField("String", "softwarename", softwareName)
        }
    }

    ndkVersion "21.3.6528147"

    sourceSets.main {
        jni.srcDirs = []
        jniLibs.srcDir 'src/main/libs'
    }
}

android {
    lintOptions {
        abortOnError false
    }
}

dependencies {
}

ext {
    PUBLISH_GROUP_ID = 'io.github.beyka'
    PUBLISH_VERSION = '0.9.9.0'
    PUBLISH_ARTIFACT_ID = 'Android-TiffBitmapFactory'
}
apply from: "${rootProject.projectDir}/publish-module.gradle"


================================================
FILE: license.txt
================================================
The MIT License (MIT)

Copyright © «2018» «Oleksii Bei aka Beyka»

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/alexeyba/android-sdk-linux/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}


================================================
FILE: src/androidTest/java/org/beyka/tiffbitmapfactory/ApplicationTest.java
================================================
package org.beyka.tiffbitmapfactory;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
public class ApplicationTest extends ApplicationTestCase<Application> {
    public ApplicationTest() {
        super(Application.class);
    }
}

================================================
FILE: src/main/.gitignore
================================================
/obj/


================================================
FILE: src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.beyka.tiffbitmapfactory">

    <application android:label="@string/app_name">

    </application>

</manifest>


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/CompressionScheme.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 5.1.17.
 */

public enum CompressionScheme {
    /**
     * No compression
     */
    NONE(1),
    /**
     * CCITT modified Huffman RLE
     */
    CCITTRLE(2),
    /**
     * CCITT Group 3 fax encoding
     */
    CCITTFAX3(3),
    /**
     * CCITT Group 4 fax encoding
     */
    CCITTFAX4(4),
    /**
     * LZW
     */
    LZW(5),
    /**
     * JPEG ('new-style' JPEG)
     */
    JPEG(7),
    PACKBITS(32773),
    DEFLATE(32946),
    ADOBE_DEFLATE(8),
    /**
     * All other compression schemes
     */
    OTHER(0);

    final int ordinal;

    CompressionScheme(int ordinal) {
        this.ordinal = ordinal;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/DecodeArea.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 10/24/17.
 */

/**
 * Holder for points of decode area
 */
public class DecodeArea {
    public int x;
    public int y;
    public int width;
    public int height;

    public DecodeArea(){}

    public DecodeArea(int x, int y, int width, int height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/FillOrder.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 4/16/17.
 */

public enum FillOrder {

    /**
     * Pixels with lower column values are stored in the higher-order bits of the byte.
     */
    MSB2LSB(1),

    /**
     * Pixels with lower column values are stored in the lower-order bits of the byte.
     */
    LSB2MSB(2);

    final int ordinal;

    FillOrder(int ordinal) {
        this.ordinal = ordinal;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/IProgressListener.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 4/26/17.
 */

public interface IProgressListener {
    public void reportProgress(long processedPixels, long totalPixels);
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/ImageFormat.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Supported image formats
 */

public enum ImageFormat {
    UNKNOWN(0),
    JPEG(1),
    PNG(2),
    TIFF(4),
    BMP(5);

    final int ordinal;

    ImageFormat(int ordinal) {
        this.ordinal = ordinal;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/Orientation.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 5.1.17.
 */

public enum Orientation {
    TOP_LEFT(1),
    TOP_RIGHT(2),
    BOT_RIGHT(3),
    BOT_LEFT(4),
    LEFT_TOP(5),
    RIGHT_TOP(6),
    RIGHT_BOT(7),
    LEFT_BOT(8),
    UNAVAILABLE(0);

    final int ordinal;

    Orientation(int ordinal) {
        this.ordinal = ordinal;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/Photometric.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 4/16/17.
 */

public enum Photometric {

    /**
     * WhiteIsZero. For bilevel and grayscale images: 0 is imaged as white.
     */
    MINISWHITE(0),

    /**
     * BlackIsZero. For bilevel and grayscale images: 0 is imaged as black.
     */
    MINISBLACK(1),

    /**
     * RGB value of (0,0,0) represents black, and (255,255,255) represents white, assuming 8-bit components. The components are stored in the indicated order: first Red, then Green, then Blue.
     */
    RGB(2),

    /**
     * Palette color. In this model, a color is described with a single component. The value of the component is used as an index into the red, green and blue curves in the ColorMap field to retrieve an RGB triplet that defines the color. When PhotometricInterpretation=3 is used, ColorMap must be present and SamplesPerPixel must be 1.
     */
    PALETTE(3),

    /**
     * Transparency Mask. This means that the image is used to define an irregularly shaped region of another image in the same TIFF file. SamplesPerPixel and BitsPerSample must be 1. PackBits compression is recommended. The 1-bits define the interior of the region; the 0-bits define the exterior of the region.
     */
    MASK(4),

    /**
     * Seperated, usually CMYK.
     */
    SEPARATED(5),

    /**
     * YCbCr
     */
    YCBCR(6),

    /**
     * CIE L*a*b*
     */
    CIELAB(8),

    /**
     * CIE L*a*b*, alternate encoding also known as ICC L*a*b*
     */
    ICCLAB(9),

    /**
     * CIE L*a*b*, alternate encoding also known as ITU L*a*b*, defined in ITU-T Rec. T.42, used in the TIFF-F and TIFF-FX standard (RFC 2301). The Decode tag, if present, holds information about this particular CIE L*a*b* encoding.
     */
    ITULAB(10),

    /**
     * LOGL
     */
    LOGL(32844),

    /**
     * LOGLUV
     */
    LOGLUV(32845),

    /**
     * Some unknown photometric
     */
    OTHER(-1);

    final int ordinal;

    Photometric(int ordinal) {
        this.ordinal = ordinal;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/PlanarConfig.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 4/16/17.
 */

public enum PlanarConfig {
    CONTIG(1),
    SEPARATE(2);

    final int ordinal;

    PlanarConfig(int ordinal) {
        this.ordinal = ordinal;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/ResolutionUnit.java
================================================
package org.beyka.tiffbitmapfactory;

/**
 * Created by beyka on 13.3.17.
 */

public enum ResolutionUnit {
    NONE(1),
    INCH(2),
    CENTIMETER(3);

    final int ordinal;

    ResolutionUnit(int ordinal) {
        this.ordinal = ordinal;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/TiffBitmapFactory.java
================================================
package org.beyka.tiffbitmapfactory;

import android.graphics.Bitmap;
import android.util.Log;

import org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException;
import org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException;
import org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException;

import java.io.File;

/**
 * Created by alexeyba on 7/17/15.
 */
public class TiffBitmapFactory {

    static {
        System.loadLibrary("tiff");
        System.loadLibrary("tifffactory");
    }

    public enum ImageConfig {
        /**
         * Each pixel is stored on 4 bytes. Each channel (RGB and alpha
         * for translucency) is stored with 8 bits of precision (256
         * possible values.)
         *
         * This configuration is very flexible and offers the best
         * quality. It should be used whenever possible.
         */
        ARGB_8888 (2),
        /**
         * Each pixel is stored on 2 bytes and only the RGB channels are
         * encoded: red is stored with 5 bits of precision (32 possible
         * values), green is stored with 6 bits of precision (64 possible
         * values) and blue is stored with 5 bits of precision.
         *
         * This configuration can produce slight visual artifacts depending
         * on the configuration of the source. For instance, without
         * dithering, the result might show a greenish tint. To get better
         * results dithering should be applied.
         *
         * This configuration may be useful when using opaque bitmaps
         * that do not require high color fidelity.
         */
        RGB_565 (4),
        /**
         * Each pixel is stored as a single translucency (alpha) channel.
         * This is very useful to efficiently store masks for instance.
         * No color information is stored.
         * With this configuration, each pixel requires 1 byte of memory.
         */
        ALPHA_8 (8);


        final int ordinal;
        ImageConfig(int ordinal) {
            this.ordinal = ordinal;
        }
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffBitmapFactory#decodeFileDescriptor(int)}.
     * <p></p>
     * Decode file to bitmap with default options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param file - file to decode
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded
     *
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when for decoding of image system need more memory than {@link Options#inAvailableMemory} or default value
     */
    public static Bitmap decodeFile(File file) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        return decodeFile(file, new Options(), null);
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffBitmapFactory#decodeFileDescriptor(int, Options)}.
     * <p></p>
     * Decode file to bitmap with specified options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param file - file to decode
     * @param options - options for decoding
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded, or, if options is non-null, if options requested only the
     *         size be returned (in {@link Options#outWidth}, {@link Options#outHeight}, {@link Options#outDirectoryCount})
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when {@link Options#inAvailableMemory} not enought to decode image
     */
    public static Bitmap decodeFile(File file, Options options) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        return decodeFile(file, options, null);
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffBitmapFactory#decodeFileDescriptor(int, Options, IProgressListener)}.
     * <p></p>
     * Decode file to bitmap with specified options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param file - file to decode
     * @param options - options for decoding
     * @param listener - listener which will receive decoding progress
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded, or, if options is non-null, if options requested only the
     *         size be returned (in {@link Options#outWidth}, {@link Options#outHeight}, {@link Options#outDirectoryCount})
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when {@link Options#inAvailableMemory} not enought to decode image
     */
    public static Bitmap decodeFile(File file, Options options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        long time = System.currentTimeMillis();
        Log.i("THREAD", "Starting decode " + file.getAbsolutePath());
        Bitmap mbp = nativeDecodePath(file.getAbsolutePath(), options, listener);
        Log.w("THREAD", "elapsed ms: " + (System.currentTimeMillis() - time) + " for " + file.getAbsolutePath());
        return mbp;
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffBitmapFactory#decodeFileDescriptor(int)}.
     * <p></p>
     * Decode path to bitmap with default options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param path - file to decode
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded
     *
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when for decoding of image system need more memory than {@link Options#inAvailableMemory} or default value
     */
    public static Bitmap decodePath(String path) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        return decodePath(path, new Options(), null);
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffBitmapFactory#decodeFileDescriptor(int, Options)}.
     * <p></p>
     * Decode path to bitmap with specified options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param path - file to decode
     * @param options - options for decoding
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded, or, if options is non-null, if options requested only the
     *         size be returned (in {@link Options#outWidth}, {@link Options#outHeight}, {@link Options#outDirectoryCount})
     *
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when for decoding of image system need more memory than {@link Options#inAvailableMemory} or default value
     */
    public static Bitmap decodePath(String path, Options options) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        return decodePath(path, options);
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffBitmapFactory#decodeFileDescriptor(int, Options, IProgressListener)}.
     * <p></p>
     * Decode path to bitmap with specified options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param path - file to decode
     * @param options - options for decoding
     * @param listener - listener which will receive decoding progress
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded, or, if options is non-null, if options requested only the
     *         size be returned (in {@link Options#outWidth}, {@link Options#outHeight}, {@link Options#outDirectoryCount})
     *
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when for decoding of image system need more memory than {@link Options#inAvailableMemory} or default value
     */
    public static Bitmap decodePath(String path, Options options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        long time = System.currentTimeMillis();
        Log.i("THREAD", "Starting decode " + path);
        Bitmap mbp = nativeDecodePath(path, options, listener);
        Log.w("THREAD", "elapsed ms: " + (System.currentTimeMillis() - time) + " for " + path);
        return mbp;
    }

    /**
     * Decode file descriptor to bitmap with specified options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param fileDescriptor - file descriptor that represent file to decode
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded, or, if options is non-null, if options requested only the
     *         size be returned (in {@link Options#outWidth}, {@link Options#outHeight}, {@link Options#outDirectoryCount})
     *
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when for decoding of image system need more memory than {@link Options#inAvailableMemory} or default value
     */
    public static Bitmap decodeFileDescriptor(int fileDescriptor) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        return decodeFileDescriptor(fileDescriptor, new Options(), null);
    }

    /**
     * Decode file descriptor to bitmap with specified options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param fileDescriptor - file descriptor that represent file to decode
     * @param options - options for decoding
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded, or, if options is non-null, if options requested only the
     *         size be returned (in {@link Options#outWidth}, {@link Options#outHeight}, {@link Options#outDirectoryCount})
     *
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when for decoding of image system need more memory than {@link Options#inAvailableMemory} or default value
     */
    public static Bitmap decodeFileDescriptor(int fileDescriptor, Options options) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        return decodeFileDescriptor(fileDescriptor, options, null);
    }

    /**
     * Decode file descriptor to bitmap with specified options. If the specified file name is null,
     * or cannot be decoded into a bitmap, the function returns null.
     * @param fileDescriptor - file descriptor that represent file to decode
     * @param options - options for decoding
     * @param listener - listener which will receive decoding progress
     * @return The decoded bitmap, or null if the image data could not be
     *         decoded, or, if options is non-null, if options requested only the
     *         size be returned (in {@link Options#outWidth}, {@link Options#outHeight}, {@link Options#outDirectoryCount})
     *
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while decoding image
     * @throws org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException when {@code file} not exist or {@code file} is not tiff image
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when for decoding of image system need more memory than {@link Options#inAvailableMemory} or default value
     */
    public static Bitmap decodeFileDescriptor(int fileDescriptor, Options options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        long time = System.currentTimeMillis();
        Log.i("THREAD", "Starting decode descriptor " + fileDescriptor);
        Bitmap mbp = nativeDecodeFD(fileDescriptor, options, listener);
        Log.w("THREAD", "elapsed ms: " + (System.currentTimeMillis() - time) + " for descriptor " + fileDescriptor);
        return mbp;
    }

    private static native Bitmap nativeDecodePath(String path, Options options, IProgressListener listener);

    private static native Bitmap nativeDecodeFD(int fd, Options options, IProgressListener listener);

    /**
     * Close detached file descriptor
     * @param fd
     */
    public static native void closeFd(int fd);

    /**
     * Options class to specify decoding parameterMs
     */
    public static final class Options {

        /**
         * Create a default Options object, which if left unchanged will give
         * the same result from the decoder as if null were passed.
         */
        public Options() {
            isStoped = false;

            inThrowException = false;
            inUseOrientationTag = false;
            inSwapRedBlueColors = false;
            inJustDecodeBounds = false;
            inSampleSize = 1;
            inDirectoryNumber = 0;
            inAvailableMemory = 8000*8000*4;

            outWidth = -1;
            outHeight = -1;
            outDirectoryCount = -1;
            outImageOrientation = Orientation.UNAVAILABLE;
        }

        /**
         * Uses for stoping of native thread
         * @deprecated As of release 0.9.8.4, replaced by {@link Thread#interrupt()}
         */
        private volatile boolean isStoped;

        /**
         * Stop native decoding thread
         * If decoding is started in any thread except main, calling of this method will cause force stop of decoding and returning of null object.
         * @deprecated As of release 0.9.8.4, replaced by {@link Thread#interrupt()}
         */
        public void stop() {
            isStoped = true;
        }

        /**
         * If set to true decoder will rotate and flip image according to TIFFTAG_ORIENTATION.
         * Otherwise image will be returned as it decoded.
         * <p>The specification considers this a baseline tag, but does add that support for orientations other than 1 is not a Baseline TIFF requirement.</p>
         * So for almost all cases this variable may be false.
         * <p>Default value is false</p>
         */
        public boolean inUseOrientationTag;

        /**
         * If set to true, decoder will throw exceptions if some errors appeared while decoding.
         * Otherwise  decoder will just return null.
         * Default value is false
         */
        public boolean inThrowException;

        /**
         * If set to true, the decoder will swap red and blue colors.
         * <p>Note: If you use this option then your image has wrong encoding</p>
         * <p>Default value is false</p>
         */
        public boolean inSwapRedBlueColors;

        /**
         * If set to true, the decoder will return null (no bitmap), but
         * the out... fields will still be set, allowing the caller to query
         * the bitmap without having to allocate the memory for its pixels.
         */
        public boolean inJustDecodeBounds;

        /**
         * If set to a value &gt; 1, requests the decoder to subsample the original
         * image, returning a smaller image to save memory. The sample size is
         * the number of pixels in either dimension that correspond to a single
         * pixel in the decoded bitmap. For example, inSampleSize == 4 returns
         * an image that is 1/4 the width/height of the original, and 1/16 the
         * number of pixels. Any value &lt;= 1 is treated the same as 1. Note: the
         * decoder uses a final value based on powers of 2, any other value will
         * be rounded down to the nearest power of 2.
         */
        public int inSampleSize;

        /**
         * Set directory to extract from image. Default value is 0.
         * To get number of directories in file see {@link #outDirectoryCount}
         */
        public int inDirectoryNumber;
        
        /**
         * Number of bytes that may be allocated during the Tiff file operations.
         * <p>-1 means memory is unlimited.</p>
         * <p>Default value is 244Mb</p>
         */
        public long inAvailableMemory;

        /**
         * If this is non-null, the decoder will try to decode into this
         * internal configuration. If it is null, or the request cannot be met,
         * the decoder will use {@link ImageConfig#ARGB_8888} configuration.
         *
         * <p>Numeration starts with 0</p>
         *
         * <p>Image are loaded with the {@link ImageConfig#ARGB_8888} config by
         * default.</p>
         *
         * <p>In current version supported are {@link ImageConfig#ARGB_8888}, {@link ImageConfig#ALPHA_8} and {@link ImageConfig#RGB_565}</p>
         */
        public ImageConfig inPreferredConfig = ImageConfig.ARGB_8888;

        /**
         * If this field is non-null - Decoder will decode and return only area specified in {@link DecodeArea} object
         * For decoding not full bitmap, but only part of it - create new {@link DecodeArea} object and specify:
         * <p>{@link DecodeArea#x x}, {@link DecodeArea#y y} - left top corner of decoding area </p>
         * <p>{@link DecodeArea#width width} - width of decoding area </p>
         * <p>{@link DecodeArea#height height} - height of decoding area </p>
         */
        public DecodeArea inDecodeArea;

        /**
         * The resulting width of the bitmap. If {@link #inJustDecodeBounds} is
         * set to false, this will be width of the output bitmap after any
         * scaling is applied. If true, it will be the width of the input image
         * without any accounting for scaling.
         *
         * <p>outWidth will be set to -1 if there is an error trying to decode.</p>
         */
        public int outWidth;

        /**
         * The resulting height of the bitmap. If {@link #inJustDecodeBounds} is
         * set to false, this will be height of the output bitmap after any
         * scaling is applied. If true, it will be the height of the input image
         * without any accounting for scaling.
         *
         * <p>outHeight will be set to -1 if there is an error trying to decode.</p>
         */
        public int outHeight;

        /**
         * The number of current directory.
         * <p>curDirectoryNumber will be set to -1 if there is an error trying to decode.</p>
         */
        public int outCurDirectoryNumber;

        /**
         * The count of directory in image file.
         * <p>outDirectoryCount will be set to -1 if there is an error trying to decode.</p>
         */
        public int outDirectoryCount;

        /**
         * This parameter returns orientation of decoded image
         * <p>For storing orientation uses {@link org.beyka.tiffbitmapfactory.Orientation ImageOrientation} enum</p>
         * <p>If image wasn't decoded successful this parameter will be equal to {@link Orientation#UNAVAILABLE}</p>
         * <p>This parameter is link to TIFFTAG_ORIENTATION tag</p>
         */
        public Orientation outImageOrientation;

        /**
         * This parameter returns compression scheme of decoded image
         * <p>For storing compression mode uses {@link CompressionScheme CompressionScheme} enum</p>
         * <p>This parameter is link to TIFFTAG_COMPRESSION tag</p>
         */
        public CompressionScheme outCompressionScheme;

        /**
         * How the components of each pixel are stored.
         * <p>The specification defines these values:</p>
         * <ul>
         *  <li>1 = Chunky format. The component values for each pixel are stored contiguously. For example, for RGB data, the data is stored as RGBRGBRGB</li>
         *  <li>2 = Planar format. The components are stored in separate component planes. For example, RGB data is stored with the Red components in one component plane, the Green in another, and the Blue in another.</li>
         * </ul>
         * <p>This parameter is link to TIFFTAG_PLANARCONFIG tag</p>
         */
        public PlanarConfig outPlanarConfig;

        /**
         * The number of components per pixel.
         * <p>SamplesPerPixel is usually 1 for bilevel, grayscale, and palette-color images. SamplesPerPixel is usually 3 for RGB images. If this value is higher, ExtraSamples should give an indication of the meaning of the additional channels.</p>
         */
        public int outSamplePerPixel;

        /**
         * Number of bits per component.
         */
        public int outBitsPerSample;

        /**
         * The number of pixels per {@link org.beyka.tiffbitmapfactory.TiffBitmapFactory.Options#outResolutionUnit} in the ImageWidth direction.
         */
        public float outXResolution;

        /**
         * The number of pixels per {@link org.beyka.tiffbitmapfactory.TiffBitmapFactory.Options#outResolutionUnit} in the ImageHeight direction.
         */
        public float outYResolution;

        /**
         * The unit of measurement for XResolution and YResolution.
         * <p>The specification defines these values: </p>
         * <ul>
         *     <li>RESUNIT_NONE</li>
         *     <li>RESUNIT_INCH</li>
         *     <li>RESUNIT_CENTIMETER</li>
         * </ul>
         * <p>This parameter is link to TIFFTAG_RESOLUTIONUNIT tag</p>
         */
        public ResolutionUnit outResolutionUnit;

        /**
         * The tile width in pixels. This is the number of columns in each tile.
         */
        public int outTileWidth;

        /**
         * The tile height in pixels. This is the number of rows in each tile.
         */
        public int outTileHeight;

        /**
         * The number of rows per strip.
         * <p>RowsPerStrip and ImageLength together tell us the number of strips in the entire image.</p>
         */
        public int outRowPerStrip;

        /**
         * Size for a strip of data in bytes.
         */
        public int outStripSize;

        /**
         * Number of strips in the image.
         */
        public int outNumberOfStrips;

        /**
         * The color space of the image data.
         * <p>This parameter is link to TIFFTAG_PHOTOMETRIC tag</p>
         */
        public Photometric outPhotometric;

        /**
         *  The logical order of bits within a byte.
         * <p>The specification defines these values:</p>
         * <ul>
         *  <li>1 = Pixels with lower column values are stored in the higher-order bits of the byte.</li>
         *  <li>2 = Pixels with lower column values are stored in the lower-order bits of the byte.</li>
         * </ul>
         * <p>This parameter is link to TIFFTAG_PLANARCONFIG tag</p>
         */
        public FillOrder outFillOrder;

        /**
         * Author of file.
         * <p>This parameter is link to TIFFTAG_ARTIST tag</p>
         */
        public String outAuthor = "";

        /**
         * Copyright of file
         * <p>This parameter is link to TIFFTAG_COPYRIGHT tag</p>
         */
        public String outCopyright = "";

        /**
         * A string that describes the subject of the image.
         * <p>This parameter is link to TIFFTAG_IMAGEDESCRIPTION tag</p>
         */
        public String outImageDescription = "";

        /**
         * Name and version number of the software package(s) used to create the image.
         * <p>This parameter is link to TIFFTAG_SOFTWARE tag</p>
         */
        public String outSoftware = "";

        /**
         * Date and time of image creation. The format is: "YYYY:MM:DD HH:MM:SS", with hours like those on a 24-hour clock.
         * <p>This parameter is link to TIFFTAG_DATETIME tag</p>
         */
        public String outDatetime = "";

        /**
         * The computer and/or operating system in use at the time of image creation.
         * <p>This parameter is link to TIFFTAG_HOSTCOMPUTER tag</p>
         */
        public String outHostComputer = "";

    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/TiffConverter.java
================================================
package org.beyka.tiffbitmapfactory;

import org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException;
import org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException;
import org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException;

import java.io.File;

/**
 * Created by beyka on 5/9/17.
 */

public class TiffConverter {
    static {
        System.loadLibrary("tiff");
        System.loadLibrary("tiffconverter");
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertToTiff(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert any of supported formats from {@link ImageFormat} to tiff
     * @param inFile path to income tiff file
     * @param outFile path to outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     *
     * @return true if convert process have been successful
     */
    public static boolean convertToTiff(File inFile, File outFile, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        return convertToTiff(inFile.getAbsolutePath(), outFile.getAbsolutePath(), options, listener);
    }

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertToTiff(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert any of supported formats from {@link ImageFormat} to tiff
     * @param inPath path to income tiff file
     * @param outPath path to outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     *
     * @return true if convert process have been successful
     */
    public static boolean convertToTiff(String inPath, String outPath, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        switch (getImageType(inPath)) {
            case JPEG:
                return convertJpgTiff(inPath, outPath, options, listener);
            case PNG:
                return convertPngTiff(inPath, outPath, options, listener);
            case BMP:
                return convertBmpTiff(inPath, outPath, options, listener);
            case TIFF:
                // TODO: 9/19/17 make convert tiff to tiff method
                break;
        }
        return false;
    }

    /**
     * Convert any of supported formats from {@link ImageFormat} to tiff
     * This method don't close file descriptor
     * @param inFd file descriptor that represent income file
     * @param outFd file descriptor that represent outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     *
     * @return true if convert process have been successful
     */
    public static boolean convertToTiff(int inFd, int outFd, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException {
        switch (getImageTypeFd(inFd)) {
            case JPEG:
                return convertJpgTiffFd(inFd, outFd, options, listener);
            case PNG:
                return convertPngTiffFd(inFd, outFd, options, listener);
            case BMP:
                return convertBmpTiffFd(inFd, outFd, options, listener);
            case TIFF:
                // TODO: 9/19/17 make convert tiff to tiff method
                break;
        }
        return false;
    }


    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertTiffPngFd(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert tiff to png file. Uses direct data read method, that decrease memory usage
     * @param tiff path to income tiff file
     * @param png path to outcome png file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertTiffPng(String tiff, String png, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * Convert tiff to png file. Uses direct data read method, that decrease memory usage
     * @param tiff file descriptor that represent income tiff file
     * @param png file descriptor that represent outcome png file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertTiffPngFd(int tiff, int png, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertPngTiffFd(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert png to tiff file. Uses direct data read method, that decrease memory usage.
     * @param png path to income png file
     * @param tiff path to outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertPngTiff(String png, String tiff, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * Convert png to tiff file. Uses direct data read method, that decrease memory usage.
     * This method don't close file descriptor
     * @param png file descriptor that represent income png file
     * @param tiff file descriptor that represent outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertPngTiffFd(int png, int tiff, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertTiffJpgFd(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert tiff to jpeg file. Uses direct data read method, that decrease memory usage
     * @param tiff path to income tiff file
     * @param jpg path to outcome jpeg file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertTiffJpg(String tiff, String jpg, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * Convert tiff to jpg file. Uses direct data read method, that decrease memory usage
     * @param tiff file descriptor that represent income tiff file
     * @param jpg file descriptor that represent outcome jpg file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertTiffJpgFd(int tiff, int jpg, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertJpgTiffFd(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert jpeg to tiff file. Uses direct data read method, that decrease memory usage.
     * @param jpg path to income jpeg file
     * @param tiff path to outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertJpgTiff(String jpg, String tiff, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * Convert jpeg to tiff file. Uses direct data read method, that decrease memory usage.
     * This method don't close file descriptor
     * @param jpg file descriptor that represent income jpeg file
     * @param tiff file descriptor that represent outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertJpgTiffFd(int jpg, int tiff, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertTiffBmpFd(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert tiff to bmp file. Uses direct data read method, that decrease memory usage
     * @param tiff path to income tiff file
     * @param bmp path to outcome jpeg file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertTiffBmp(String tiff, String bmp, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * Convert tiff to bmp file. Uses direct data read method, that decrease memory usage
     * @param tiff file descriptor that represent income tiff file
     * @param bmp file descriptor that represent outcome bmp file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertTiffBmpFd(int tiff, int bmp, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#convertBmpTiffFd(int, int, ConverterOptions, IProgressListener)}.
     * <p></p>
     * Convert bmp to tiff file. Uses direct data read method, that decrease memory usage.
     * @param bmp path to income bmp file
     * @param tiff path to outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertBmpTiff(String bmp, String tiff, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * Convert bmp to tiff file. Uses direct data read method, that decrease memory usage.
     * This method don't close file descriptor
     * @param bmp file descriptor that represent income bmp file
     * @param tiff file descriptor that represent outcome tiff file
     * @param options converter options
     * @param listener listener which will receive converting progress
     * @return true if convert process have been successful
     */
    public static native boolean convertBmpTiffFd(int bmp, int tiff, ConverterOptions options, IProgressListener listener) throws CantOpenFileException, DecodeTiffException, NotEnoughtMemoryException;

    /**
     * @deprecated Since Android Q is released. You can use this method with scoped storage.
     * Otherwise use {@link TiffConverter#getImageTypeFd(int)}.
     * <p></p>
     * Return type of file.
     * @param path - file path
     * @return one of {@link ImageFormat} or {@link ImageFormat#UNKNOWN}
     */
    public static native ImageFormat getImageType(String path);

    /**
     * Return type of file. This method don't close file descriptor
     * @param fd - file descriptor for file
     * @return one of {@link ImageFormat} or {@link ImageFormat#UNKNOWN}
     */
    public static native ImageFormat getImageTypeFd(int fd);

    /**
     * Close detached file descriptor
     * @param fd
     */
    public static native void closeFd(int fd);

    public static final class ConverterOptions {

        public ConverterOptions() {
            availableMemory = 8000*8000*4;
            appendTiff = false;
            resUnit = ResolutionUnit.NONE;
            compressionScheme = CompressionScheme.NONE;
            //orientation = Orientation.TOP_LEFT;
            throwExceptions = false;
            isStoped = false;
        }

        /**
         * Uses for stoping of native thread
         * @deprecated As of release 0.9.8.4, replaced by {@link Thread#interrupt()}
         */
        private volatile boolean isStoped;

        /**
         * Stop native convert thread
         * If converting is started in any thread except main, calling of this method will cause force stop of converting and returning of false.
         * @deprecated As of release 0.9.8.4, replaced by {@link Thread#interrupt()}
         */
        public void stop() {
            isStoped = true;
        }

        /**
         * Number of bytes that may be allocated during the file operations.
         * <p>-1 means memory is unlimited.</p>
         * <p>Default value is 244Mb</p>
         */
        public long availableMemory;

        /**
         * If set to true, converter will throw exceptions if some errors appeared while converting.
         * Otherwise converter will just return false.
         * Default value is false
         */
        public boolean throwExceptions;

        /**
         * <b>For converting from TIFF to ANY cases</b>
         * <p>Tiff directory that should be converted</p>
         */
        public int readTiffDirectory;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * <p>If this value set to true while converting any to tiff - new tiff directory will be created
         * and added to existed tiff file.</p>
         * Otherwise file will be overwritten.
         * <p>Default value is false</p>
         */
        public boolean appendTiff;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * Compression scheme used on the image data.
         * <p>Default value is {@link CompressionScheme#NONE COMPRESSION_NONE}</p>
         * <p>This parameter is link to TIFFTAG_COMPRESSION tag</p>
         */
        public CompressionScheme compressionScheme;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * {@link org.beyka.tiffbitmapfactory.Orientation Orientation} that will used for saving image
         * <p>By default uses {@link org.beyka.tiffbitmapfactory.Orientation#TOP_LEFT ORIENTATION_TOPLEFT} </p>
         * <p>This parameter is link to TIFFTAG_ORIENTATION tag</p>
         */
        //public Orientation orientation;

        /**
         * If this field is non-null - Converter will use only area specified in {@link DecodeArea} object to convert.
         * <p><b>This field works only when convert from TIFF.</b></p>
         * <p>For decoding not full bitmap, but only part of it - create new {@link DecodeArea} object and specify:</p>
         * <p>{@link DecodeArea#x x}, {@link DecodeArea#y y} - left top corner of decoding area </p>
         * <p>{@link DecodeArea#width width} - width of decoding area </p>
         * <p>{@link DecodeArea#height height} - height of decoding area </p>
         */
        public DecodeArea inTiffDecodeArea;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * The number of pixels per {@link org.beyka.tiffbitmapfactory.TiffConverter.ConverterOptions#resUnit} in the ImageWidth direction.
         * <p> It is not mandatory that the image be actually displayed or printed at the size implied by this parameter.
         * It is up to the application to use this information as it wishes.</p>
         * <p>Defualt value is 0</p>
         */
        public float xResolution;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * The number of pixels per {@link org.beyka.tiffbitmapfactory.TiffConverter.ConverterOptions#resUnit} in the ImageHeight direction.
         * <p> It is not mandatory that the image be actually displayed or printed at the size implied by this parameter.
         * It is up to the application to use this information as it wishes.</p>
         * <p>Defualt value is 0</p>
         */
        public float yResolution;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * The unit of measurement for XResolution and YResolution.
         * <p>To be used with xResolution and yResolution. </p>
         * <p>The specification defines these values: </p>
         * <ul>
         *     <li>RESUNIT_NONE</li>
         *     <li>RESUNIT_INCH</li>
         *     <li>RESUNIT_CENTIMETER</li>
         * </ul>
         * <p>Default value is {@link org.beyka.tiffbitmapfactory.ResolutionUnit#NONE}</p>
         */
        public ResolutionUnit resUnit;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * A string that describes the subject of the image.
         * <p>This parameter is link to TIFFTAG_IMAGEDESCRIPTION tag</p>
         */
        public String imageDescription;

        /**
         * <b>For converting from ANY to TIFF cases</b>
         * Software that used for creating of image.
         * <p>This parameter is link to TIFFTAG_SOFTWARE tag</p>
         */
        public String software;

    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/TiffSaver.java
================================================
package org.beyka.tiffbitmapfactory;

import android.graphics.Bitmap;

import org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException;
import org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException;

import java.io.File;

/**
 * Created by beyka on 18.2.16.
 */
public class TiffSaver {

    static {
        System.loadLibrary("tiff");
        System.loadLibrary("tiffsaver");
    }

    /**
     * Save bitmap to file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param destination - file to write bitmap
     * @param bmp         - Bitmap for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destination} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean saveBitmap(File destination, Bitmap bmp) throws CantOpenFileException, NotEnoughtMemoryException {
        return saveBitmap(destination.getAbsolutePath(), bmp, new SaveOptions());
    }

    /**
     * Save bitmap to file.
     *
     * @param destination - file to write bitmap
     * @param bmp         - Bitmap for saving
     * @param options     - options for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destinationPath} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean saveBitmap(File destination, Bitmap bmp, SaveOptions options) throws CantOpenFileException {
        return saveBitmap(destination.getAbsolutePath(), bmp, options);
    }

    /**
     * Save bitmap to file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param destinationPath - file path to write bitmap
     * @param bmp             - Bitmap for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destinationPath} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean saveBitmap(String destinationPath, Bitmap bmp) throws CantOpenFileException {
        return saveBitmap(destinationPath, bmp, new SaveOptions());
    }

    /**
     * Save bitmap to file.
     *
     * @param destinationPath - file path to write bitmap
     * @param bmp             - Bitmap for saving
     * @param options         - options for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destinationPath} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean saveBitmap(String destinationPath, Bitmap bmp, SaveOptions options) throws CantOpenFileException {
//        int pixels[] = new int[bmp.getWidth() * bmp.getHeight()];
//        bmp.getPixels(pixels, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight());

        return save(destinationPath, -1, bmp, options, false);
    }

    /**
     * Append bitmap to the end of existing file or create new file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param destination - file to write bitmap
     * @param bmp         - Bitmap for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destination} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean appendBitmap(File destination, Bitmap bmp) throws CantOpenFileException, NotEnoughtMemoryException {
        return appendBitmap(destination.getAbsolutePath(), bmp, new SaveOptions());
    }

    /**
     * append bitmap to the end of existing file or create new file.
     *
     * @param destination - file to write bitmap
     * @param bmp         - Bitmap for saving
     * @param options     - options for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destinationPath} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean appendBitmap(File destination, Bitmap bmp, SaveOptions options) throws CantOpenFileException {
        return appendBitmap(destination.getAbsolutePath(), bmp, options);
    }

    /**
     * append bitmap to the end of existing file or create new file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param destinationPath - file path to write bitmap
     * @param bmp             - Bitmap for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destinationPath} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean appendBitmap(String destinationPath, int page, Bitmap bmp) throws CantOpenFileException {
        return appendBitmap(destinationPath, bmp, new SaveOptions());
    }

    /**
     * append bitmap to the end of existing file or create new file.
     *
     * @param destinationPath - file path to write bitmap
     * @param bmp             - Bitmap for saving
     * @param options         - options for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destinationPath} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean appendBitmap(String destinationPath, Bitmap bmp,SaveOptions options) throws CantOpenFileException {
//        int pixels[] = new int[bmp.getWidth() * bmp.getHeight()];
//        bmp.getPixels(pixels, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight());

        return save(destinationPath, -1, bmp, options, true);
    }

    /**
     * Save bitmap to file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param fileDescriptor - file descriptor that represent file to write bitmap
     * @param bmp         - Bitmap for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destination} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean saveBitmap(int fileDescriptor, Bitmap bmp) throws CantOpenFileException, NotEnoughtMemoryException {
        return saveBitmap(fileDescriptor, bmp, new SaveOptions());
    }

    /**
     * Save bitmap to file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param fileDescriptor - file descriptor that represent file to write bitmap
     * @param bmp         - Bitmap for saving
     * @param options     - options for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destination} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean saveBitmap(int fileDescriptor, Bitmap bmp, SaveOptions options) throws CantOpenFileException, NotEnoughtMemoryException {
        return save(null, fileDescriptor, bmp, options, false);
    }

    /**
     * Save bitmap to file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param fileDescriptor - file descriptor that represent file to write bitmap
     * @param bmp         - Bitmap for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destination} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean appendBitmap(int fileDescriptor, Bitmap bmp) throws CantOpenFileException, NotEnoughtMemoryException {
        return appendBitmap(fileDescriptor, bmp, new SaveOptions());
    }

    /**
     * Save bitmap to file with default {@link TiffSaver.SaveOptions options}.
     *
     * @param fileDescriptor - file descriptor that represent file to write bitmap
     * @param bmp         - Bitmap for saving
     * @param options     - options for saving
     * @return true if bitmap was saved successful or false otherwise
     * @throws CantOpenFileException when {@code destination} not exist or can't be opened for writing
     * @throws org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException when there is no avalable memory for processing bitmap
     * @throws org.beyka.tiffbitmapfactory.exceptions.DecodeTiffException when error occure while saving image
     */
    public static boolean appendBitmap(int fileDescriptor, Bitmap bmp, SaveOptions options) throws CantOpenFileException, NotEnoughtMemoryException {
        return save(null, fileDescriptor, bmp, options, true);
    }

    private static synchronized native boolean save(String filePath, int fileDescriptor, Bitmap bmp, SaveOptions options, boolean append);

    /**
     * Close detached file descriptor
     * @param fd
     */
    public static native void closeFd(int fd);

    /**
     * Options class to specify saving parameters
     */
    public static final class SaveOptions {

        public SaveOptions() {
            inAvailableMemory = 8000*8000*4;
            inThrowException = false;
            compressionScheme = CompressionScheme.NONE;
            orientation = Orientation.TOP_LEFT;
            xResolution = 0;
            yResolution = 0;
            resUnit = ResolutionUnit.NONE;
        }

        /**
         * Number of bytes that may be allocated during the Tiff file operations.
         * <p>-1 means memory is unlimited.</p>
         * <p>Default value is 244Mb</p>
         */
        public long inAvailableMemory;

        /**
         * If set to true, saver will throw exceptions if some errors appeared while writing tiff.
         * Otherwise  saver will just return false.
         * Default value is false
         */
        public boolean inThrowException;

        /**
         * Compression scheme used on the image data.
         * <p>Default value is {@link CompressionScheme#NONE COMPRESSION_NONE}</p>
         * <p>This parameter is link to TIFFTAG_COMPRESSION tag</p>
         */
        public CompressionScheme compressionScheme;

        /**
         * {@link org.beyka.tiffbitmapfactory.Orientation Orientation} that will used for saving image
         * <p>By default uses {@link org.beyka.tiffbitmapfactory.Orientation#TOP_LEFT ORIENTATION_TOPLEFT} </p>
         * <p>This parameter is link to TIFFTAG_ORIENTATION tag</p>
         */
        public Orientation orientation;

        /**
         * The number of pixels per {@link org.beyka.tiffbitmapfactory.TiffSaver.SaveOptions#resUnit} in the ImageWidth direction.
         * <p> It is not mandatory that the image be actually displayed or printed at the size implied by this parameter.
         * It is up to the application to use this information as it wishes.</p>
         * <p>Defualt value is 0</p>
         */
        public float xResolution;

        /**
         * The number of pixels per {@link org.beyka.tiffbitmapfactory.TiffSaver.SaveOptions#resUnit} in the ImageHeight direction.
         * <p> It is not mandatory that the image be actually displayed or printed at the size implied by this parameter.
         * It is up to the application to use this information as it wishes.</p>
         * <p>Defualt value is 0</p>
         */
        public float yResolution;

        /**
         * The unit of measurement for XResolution and YResolution.
         * <p>To be used with xResolution and yResolution. </p>
         * <p>The specification defines these values: </p>
         * <ul>
         *     <li>RESUNIT_NONE</li>
         *     <li>RESUNIT_INCH</li>
         *     <li>RESUNIT_CENTIMETER</li>
         * </ul>
         * <p>Default value is {@link org.beyka.tiffbitmapfactory.ResolutionUnit#NONE}</p>
         */
        public ResolutionUnit resUnit;

        /**
         * Author for writing to file.
         * <p>This parameter is link to TIFFTAG_ARTIST tag</p>
         */
        public String author;

        /**
         * Copyright for writing to file
         * <p>This parameter is link to TIFFTAG_COPYRIGHT tag</p>
         */
        public String copyright;

        /**
         * A string that describes the subject of the image.
         * <p>This parameter is link to TIFFTAG_IMAGEDESCRIPTION tag</p>
         */
        public String imageDescription;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/exceptions/CantOpenFileException.java
================================================
package org.beyka.tiffbitmapfactory.exceptions;

/**
 * Created by alexeyba on 09.11.15.
 */
public class CantOpenFileException extends RuntimeException {
    private String fileName;
    private int fileDescriptor = -1;

    public CantOpenFileException(String fileName){
        super("Can\'t open file " + fileName);
        this.fileName = fileName;
    }

    public CantOpenFileException(int fileDescriptor){
        super("Can\'t open file with file descriptor " + fileDescriptor);
        this.fileDescriptor = fileDescriptor;
    }

    public String getFileName(){
        return fileName;
    }

    public int getFileDescriptor() {
        return fileDescriptor;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/exceptions/DecodeTiffException.java
================================================
package org.beyka.tiffbitmapfactory.exceptions;

/**
 * Created by alexeyba on 09.11.15.
 */
public class DecodeTiffException extends RuntimeException {

    private String fileName;
    private String aditionalInfo;
    private int fileDescriptor = -1;

    public DecodeTiffException(String fileName){
        super("Could not decode tiff file " + fileName);
        this.fileName = fileName;
    }

    public DecodeTiffException(int fileDescriptor) {
        super("Could not decode tiff file with file descriptor " + fileDescriptor);
        this.fileDescriptor = fileDescriptor;
    }

    public DecodeTiffException(String fileName, String aditionaInfo){
        super("Could not decode tiff file " + fileName + "\n" + aditionaInfo);
        this.fileName = fileName;
        this.aditionalInfo = aditionaInfo;
    }

    public DecodeTiffException(int fileDescriptor, String aditionaInfo){
        super("Could not decode tiff file with file descriptor" + fileDescriptor + "\n" + aditionaInfo);
        this.fileDescriptor = fileDescriptor;
        this.aditionalInfo = aditionaInfo;
    }

    public String getFileName(){
        return fileName;
    }

    public String getAditionalInfo() {
        return aditionalInfo;
    }

    public int getFileDescriptor() {
        return fileDescriptor;
    }
}


================================================
FILE: src/main/java/org/beyka/tiffbitmapfactory/exceptions/NotEnoughtMemoryException.java
================================================
package org.beyka.tiffbitmapfactory.exceptions;

/**
 * Created by alexeyba on 09.11.15.
 */
public class NotEnoughtMemoryException extends RuntimeException {

    private int availableMemory;
    private int needMemory;

    public NotEnoughtMemoryException(int availableMemory, int needMemory){
        super("Available memory is not enought to decode image. Available " + availableMemory + " bytes. Need " + needMemory + " bytes.");
        this.availableMemory = availableMemory;
        this.needMemory = needMemory;
    }

    public int getAvailableMemory() {
        return availableMemory;
    }

    public int getNeedMemory() {
        return needMemory;
    }
}


================================================
FILE: src/main/jni/Android.mk
================================================
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_ARM_MODE := arm

LOCAL_TIFF_SRC_FILES := \
	tiff/libtiff/tif_dirread.c \
	tiff/libtiff/tif_zip.c \
	tiff/libtiff/tif_flush.c \
	tiff/libtiff/tif_next.c \
	tiff/libtiff/tif_ojpeg.c \
	tiff/libtiff/tif_dirwrite.c \
	tiff/libtiff/tif_dirinfo.c \
	tiff/libtiff/tif_dir.c \
	tiff/libtiff/tif_compress.c \
	tiff/libtiff/tif_close.c \
	tiff/libtiff/tif_tile.c \
	tiff/libtiff/tif_open.c \
	tiff/libtiff/tif_getimage.c \
	tiff/libtiff/tif_pixarlog.c \
	tiff/libtiff/tif_warning.c \
	tiff/libtiff/tif_dumpmode.c \
	tiff/libtiff/tif_jpeg.c \
	tiff/libtiff/tif_jbig.c \
	tiff/libtiff/tif_predict.c \
	tiff/libtiff/mkg3states.c \
	tiff/libtiff/tif_write.c \
	tiff/libtiff/tif_error.c \
	tiff/libtiff/tif_version.c \
	tiff/libtiff/tif_print.c \
	tiff/libtiff/tif_color.c \
	tiff/libtiff/tif_read.c \
	tiff/libtiff/tif_extension.c \
	tiff/libtiff/tif_thunder.c \
	tiff/libtiff/tif_lzw.c \
	tiff/libtiff/tif_fax3.c \
	tiff/libtiff/tif_luv.c \
	tiff/libtiff/tif_codec.c \
	tiff/libtiff/tif_unix.c \
	tiff/libtiff/tif_packbits.c \
	tiff/libtiff/tif_aux.c \
	tiff/libtiff/tif_fax3sm.c \
	tiff/libtiff/tif_swab.c \
	tiff/libtiff/tif_strip.c

LOCAL_TIFF_SRC_FILES += tiff/port/lfind.c 
#######################LIBTIFF#################################

LOCAL_SRC_FILES:= $(LOCAL_TIFF_SRC_FILES)
LOCAL_C_INCLUDES += \
					$(LOCAL_PATH)/tiff/libtiff \
					$(LOCAL_PATH)/jpeg


LOCAL_CFLAGS += -DAVOID_TABLES
LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
LOCAL_MODULE:= libtiff
LOCAL_LDLIBS := -lz

LOCAL_LDLIBS += $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libjpeg.a

include $(BUILD_SHARED_LIBRARY)
###############################################################
include $(CLEAR_VARS)
LOCAL_MODULE := libpng
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libpng.a
include $(PREBUILT_STATIC_LIBRARY)
###############################################################
include $(CLEAR_VARS)
LOCAL_MODULE := libjpeg
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libjpeg.a
include $(PREBUILT_STATIC_LIBRARY)
###############################################################
include $(CLEAR_VARS)
LOCAL_MODULE := tifffactory
LOCAL_CFLAGS := -DANDROID_NDK
LOCAL_SRC_FILES := \
	NativeExceptions.cpp \
	NativeTiffBitmapFactory.cpp \
	NativeDecoder.cpp
LOCAL_LDLIBS := -ldl -llog -ljnigraphics
LOCAL_LDFLAGS +=-ljnigraphics
LOCAL_SHARED_LIBRARIES := tiff
include $(BUILD_SHARED_LIBRARY)

###############################################################
include $(CLEAR_VARS)
LOCAL_MODULE := tiffsaver
LOCAL_CFLAGS := -DANDROID_NDK
LOCAL_SRC_FILES := \
	NativeExceptions.cpp \
	NativeTiffSaver.cpp
LOCAL_LDLIBS := -ldl -llog -ljnigraphics
LOCAL_LDFLAGS +=-ljnigraphics
LOCAL_SHARED_LIBRARIES := tiff
include $(BUILD_SHARED_LIBRARY)

###############################################################
include $(CLEAR_VARS)
LOCAL_MODULE := tiffconverter
LOCAL_CFLAGS := -DANDROID_NDK
LOCAL_SRC_FILES := \
	NativeExceptions.cpp \
	NativeTiffConverter.cpp \
	TiffToPngConverter.cpp \
	TiffToJpgConverter.cpp \
	BaseTiffConverter.cpp \
	PngToTiffConverter.cpp \
	JpgToTiffConverter.cpp \
	BmpToTiffConverter.cpp \
	TiffToBmpConverter.cpp \
	BitmapReader.cpp

#LOCAL_C_INCLUDES := libs/$(TARGET_ARCH_ABI)/libpng.a
LOCAL_C_INCLUDES := \
					$(LOCAL_PATH)/png \
					$(LOCAL_PATH)/jpeg

LOCAL_LDLIBS := -lz -ldl -llog -ljnigraphics
LOCAL_LDFLAGS +=-ljnigraphics
LOCAL_STATIC_LIBRARIES := png
LOCAL_STATIC_LIBRARIES += jpeg
LOCAL_SHARED_LIBRARIES := tiff
include $(BUILD_SHARED_LIBRARY)

================================================
FILE: src/main/jni/Application.mk
================================================
APP_STL := c++_static

APP_MODULES      := tiff png jpeg tifffactory tiffsaver tiffconverter

APP_PLATFORM=android-16

APP_ABI := arm64-v8a, armeabi-v7a

#APP_OPTIM := debug

================================================
FILE: src/main/jni/BMP.h
================================================
//
// Created by beyka on 9/21/17.
//

#ifndef __BMP_H_INCLUDED__   // if x.h hasn't been included yet...
#define __BMP_H_INCLUDED__

#pragma pack(2)
typedef struct BITMAPFILEHEADER
{
    BITMAPFILEHEADER() : bfReserved1(0), bfReserved2(0) {}
    unsigned char bfType[2];
    unsigned int   bfSize;
    unsigned short bfReserved1;
    unsigned short bfReserved2;
    unsigned int   bfOffBits;
} BITMAPFILEHEADER;

typedef struct                       /**** BMP file info structure ****/
{
    unsigned int   biSize;           /* Size of info header */
    int            biWidth;          /* Width of image */
    int            biHeight;         /* Height of image */
    unsigned short biPlanes;         /* Number of color planes */
    unsigned short biBitCount;       /* Number of bits per pixel */
    unsigned int   biCompression;    /* Type of compression to use 0 - none, 1 - rle 8 bit, 2 - rle 4 but, 3 - bi_bitfields*/
    unsigned int   biSizeImage;      /* Size of image data */
    int            biXPelsPerMeter;  /* X pixels per meter */
    int            biYPelsPerMeter;  /* Y pixels per meter */
    unsigned int   biClrUsed;        /* Number of colors used */
    unsigned int   biClrImportant;   /* Number of important colors */
    unsigned int biPalete[3] ;
    unsigned char reserved[56];
    /* Palete (masks for 16 bit bmps)*/
    /*a 5-5-5 16-bit image, where the blue mask is 0x001f, the green mask is 0x03e0, and the red mask is 0x7c00; and a 5-6-5 16-bit image, where the blue mask is 0x001f, the green mask is 0x07e0, and the red mask is 0xf800*/
} BITMAPINFOHEADER;


#pragma pack()

#endif

================================================
FILE: src/main/jni/BaseTiffConverter.cpp
================================================
//
// Created by beyka on 5/11/17.
//

#include "BaseTiffConverter.h"

BaseTiffConverter::BaseTiffConverter(JNIEnv *e, jclass clazz, jstring in, jstring out, jobject opts, jobject listener)
{
    boundX = boundY = boundWidth = boundHeight = -1;
    hasBounds = 0;
    availableMemory = 8000 * 8000 * 4;
    env = e;
    inPath = in;
    outPath = out;
    optionsObj = opts;
    this->listener = listener;
    throwException = JNI_FALSE;
    appendTiff = JNI_FALSE;
    tiffDirectory = 0;
    jIProgressListenerClass = env->FindClass("org/beyka/tiffbitmapfactory/IProgressListener");
    jConvertOptionsClass = env->FindClass("org/beyka/tiffbitmapfactory/TiffConverter$ConverterOptions");
    jThreadClass = env->FindClass("java/lang/Thread");

    compressionInt = 5;

    inFd = -1;
    outFd = -1;
}

BaseTiffConverter::BaseTiffConverter(JNIEnv *e, jclass clazz, jint in, jint out, jobject opts, jobject listener)
{
    boundX = boundY = boundWidth = boundHeight = -1;
    hasBounds = 0;
    availableMemory = 8000 * 8000 * 4;
    env = e;
    inFd = in;
    outFd = out;
    optionsObj = opts;
    this->listener = listener;
    throwException = JNI_FALSE;
    appendTiff = JNI_FALSE;
    tiffDirectory = 0;
    jIProgressListenerClass = env->FindClass("org/beyka/tiffbitmapfactory/IProgressListener");
    jConvertOptionsClass = env->FindClass("org/beyka/tiffbitmapfactory/TiffConverter$ConverterOptions");
    jThreadClass = env->FindClass("java/lang/Thread");

    compressionInt = 5;
}

BaseTiffConverter::~BaseTiffConverter()
{
    LOGI("base destructor");

    if (cdescription) {
        env->ReleaseStringUTFChars(description, cdescription);
    }

    if (csoftware) {
        env->ReleaseStringUTFChars(software, csoftware);
    }

    if (jIProgressListenerClass) {
        env->DeleteLocalRef(jIProgressListenerClass);
        jIProgressListenerClass = NULL;
    }

    if (jThreadClass) {
        env->DeleteLocalRef(jThreadClass);
        jThreadClass = NULL;
    }
}

void BaseTiffConverter::readOptions()
{
    if (optionsObj == NULL) return;

    jfieldID tiffdirfield = env->GetFieldID(jConvertOptionsClass, "readTiffDirectory", "I");
    tiffDirectory = env->GetIntField(optionsObj, tiffdirfield);

    jfieldID availablememfield = env->GetFieldID(jConvertOptionsClass, "availableMemory", "J");
    jlong am = env->GetLongField(optionsObj, availablememfield);
    if (am > 0 || am == -1) availableMemory = am;

    jfieldID throwexceptionsfield = env->GetFieldID(jConvertOptionsClass, "throwExceptions", "Z");
    throwException = env->GetBooleanField(optionsObj, throwexceptionsfield);

    jfieldID appentifffield = env->GetFieldID(jConvertOptionsClass, "appendTiff", "Z");
    appendTiff = env->GetBooleanField(optionsObj, appentifffield);

    //read compression
    jfieldID gOptions_CompressionModeFieldID = env->GetFieldID(jConvertOptionsClass,
            "compressionScheme",
            "Lorg/beyka/tiffbitmapfactory/CompressionScheme;");
    jobject compressionMode = env->GetObjectField(optionsObj, gOptions_CompressionModeFieldID);
    jclass compressionModeClass = env->FindClass("org/beyka/tiffbitmapfactory/CompressionScheme");
    jfieldID ordinalFieldID = env->GetFieldID(compressionModeClass, "ordinal", "I");
    jint ci = env->GetIntField(compressionMode, ordinalFieldID);
    LOGII("ci", ci);
    //check is compression scheme is right. if not - set default LZW
    if (ci == 1 || ci == 2 || ci == 3 || ci == 4 || ci == 5 || ci == 7 || ci == 8 || ci == 32773 || ci == 32946)
        compressionInt = ci;
    else
        compressionInt = 5;

    LOGII("compressionInt ", compressionInt );
    env->DeleteLocalRef(compressionModeClass);

    //Get image orientation from options object
    /*jfieldID orientationFieldID = env->GetFieldID(jConvertOptionsClass,
            "orientation",
            "Lorg/beyka/tiffbitmapfactory/Orientation;");
    jobject orientation = env->GetObjectField(optionsObj, orientationFieldID);

    jclass orientationClass = env->FindClass("org/beyka/tiffbitmapfactory/Orientation");
    jfieldID orientationOrdinalFieldID = env->GetFieldID(orientationClass, "ordinal", "I");
    orientationInt = env->GetIntField(orientation, orientationOrdinalFieldID);
    env->DeleteLocalRef(orientationClass);*/
    orientationInt = ORIENTATION_TOPLEFT;

    //Get image description field if exist
    jfieldID imgDescrFieldID = env->GetFieldID(jConvertOptionsClass, "imageDescription", "Ljava/lang/String;");
    description = (jstring)env->GetObjectField(optionsObj, imgDescrFieldID);
    if (description) {
        cdescription = env->GetStringUTFChars(description, 0);
        LOGIS("Image Description: ", cdescription);
    }

    //Get software field if exist
    jfieldID softwareFieldID = env->GetFieldID(jConvertOptionsClass, "software", "Ljava/lang/String;");
    software = (jstring)env->GetObjectField(optionsObj, softwareFieldID);
    if (software) {
        csoftware = env->GetStringUTFChars(software, 0);
        LOGIS("Software tag: ", csoftware);
    }

    // variables for resolution
    jfieldID gOptions_xResolutionFieldID = env->GetFieldID(jConvertOptionsClass, "xResolution", "F");
    xRes = env->GetFloatField(optionsObj, gOptions_xResolutionFieldID);
    jfieldID gOptions_yResolutionFieldID = env->GetFieldID(jConvertOptionsClass, "yResolution", "F");
    yRes = env->GetFloatField(optionsObj, gOptions_yResolutionFieldID);
    jfieldID gOptions_resUnitFieldID = env->GetFieldID(jConvertOptionsClass,
                                                       "resUnit",
                                                       "Lorg/beyka/tiffbitmapfactory/ResolutionUnit;");
    jobject resUnitObject = env->GetObjectField(optionsObj, gOptions_resUnitFieldID);
    //Get res int from resUnitObject
    jclass resolutionUnitClass = env->FindClass("org/beyka/tiffbitmapfactory/ResolutionUnit");
    jfieldID resUnitOrdinalFieldID = env->GetFieldID(resolutionUnitClass, "ordinal", "I");
    resUnit = env->GetIntField(resUnitObject, resUnitOrdinalFieldID);
    env->DeleteLocalRef(resolutionUnitClass);

    //Get decode are
    jfieldID gOptions_decodeAreaFieldID = env->GetFieldID(jConvertOptionsClass,
                                                           "inTiffDecodeArea",
                                                           "Lorg/beyka/tiffbitmapfactory/DecodeArea;");
    jobject decodeAreaObj = env->GetObjectField(optionsObj, gOptions_decodeAreaFieldID);
    if (decodeAreaObj) {
        LOGI("Decode bounds present");
        jclass decodeAreaClass = env->FindClass("org/beyka/tiffbitmapfactory/DecodeArea");
        jfieldID xFieldID = env->GetFieldID(decodeAreaClass, "x", "I");
        jfieldID yFieldID = env->GetFieldID(decodeAreaClass, "y", "I");
        jfieldID widthFieldID = env->GetFieldID(decodeAreaClass, "width", "I");
        jfieldID heightFieldID = env->GetFieldID(decodeAreaClass, "height", "I");

        boundX = env->GetIntField(decodeAreaObj, xFieldID);
        boundY = env->GetIntField(decodeAreaObj, yFieldID);
        boundWidth = env->GetIntField(decodeAreaObj, widthFieldID);
        boundHeight = env->GetIntField(decodeAreaObj, heightFieldID);


        LOGII("Decode X", boundX);
        LOGII("Decode Y", boundY);
        LOGII("Decode width", boundWidth);
        LOGII("Decode height", boundHeight);

        hasBounds = 1;
        env->DeleteLocalRef(decodeAreaClass);
    }
}

char BaseTiffConverter::normalizeDecodeArea() {
    if (hasBounds) {
        if (boundX >= width-1) {
                const char *message = "X of left top corner of decode area should be less than image width";
                LOGE(*message);
                if (throwException) {
                    jstring adinf = env->NewStringUTF(message);
                    if (inPath) {
                        throw_decode_file_exception(env, inPath, adinf);
                    } else {
                        throw_decode_file_exception_fd(env, inFd, adinf);
                    }
                    env->DeleteLocalRef(adinf);
                }
                return 0;
            }
            if (boundY >= height-1) {
                const char *message = "Y of left top corner of decode area should be less than image height";
                LOGE(*message);
                if (throwException) {
                    jstring adinf = env->NewStringUTF(message);
                    if (inPath) {
                        throw_decode_file_exception(env, inPath, adinf);
                    } else {
                        throw_decode_file_exception_fd(env, inFd, adinf);
                    }
                    env->DeleteLocalRef(adinf);
                }
                return 0;
            }

            if (boundX < 0) boundX = 0;
            if (boundY < 0) boundY = 0;
            if (boundX + boundWidth >= width) boundWidth = width - boundX -1;
            if (boundY + boundHeight >= height) boundHeight = height - boundY -1;

            if (boundWidth < 1) {
                const char *message = "Width of decode area can\'t be less than 1";
                LOGE(*message);
                if (throwException) {
                    jstring adinf = env->NewStringUTF(message);
                    if (inPath) {
                        throw_decode_file_exception(env, inPath, adinf);
                    } else {
                        throw_decode_file_exception_fd(env, inFd, adinf);
                    }
                    env->DeleteLocalRef(adinf);
                }
                return 0;
            }
            if (boundHeight < 1) {
                const char *message = "Height of decode area can\'t be less than 1";
                LOGE(*message);
                if (throwException) {
                    jstring adinf = env->NewStringUTF(message);
                    if (inPath) {
                        throw_decode_file_exception(env, inPath, adinf);
                    } else {
                        throw_decode_file_exception_fd(env, inFd, adinf);
                    }
                    env->DeleteLocalRef(adinf);
                }
                return 0;
            }

            outWidth = boundWidth;
            outHeight = boundHeight;
            outStartX = boundX;
            outStartY = boundY;

            return 1;
    } else {
            outWidth = width;
            outHeight = height;
            outStartX = 0;
            outStartY = 0;

            return 1;
    }
}

char *BaseTiffConverter::getCreationDate() {
    char * datestr = (char *) malloc(sizeof(char) * 20);
    time_t rawtime;
    struct tm * timeinfo;
    time (&rawtime);
    timeinfo = localtime (&rawtime);
    strftime (datestr,20,/*"Now it's %I:%M%p."*/"%Y:%m:%d %H:%M:%S",timeinfo);

    return datestr;
}

void BaseTiffConverter::sendProgress(jlong current, jlong total) {
    if (listener != NULL) {
        jmethodID methodid = env->GetMethodID(jIProgressListenerClass, "reportProgress", "(JJ)V");
        env->CallVoidMethod(listener, methodid, current, total);
    }
}

jboolean BaseTiffConverter::checkStop() {
    jmethodID methodID = env->GetStaticMethodID(jThreadClass, "interrupted", "()Z");
    jboolean interupted = env->CallStaticBooleanMethod(jThreadClass, methodID);

    jboolean stop;

    if (optionsObj) {
        jfieldID stopFieldId = env->GetFieldID(jConvertOptionsClass,
                                               "isStoped",
                                               "Z");
        stop = env->GetBooleanField(optionsObj, stopFieldId);

    } else {
        stop = JNI_FALSE;
    }

    return interupted || stop;
}

void BaseTiffConverter::rotateTileLinesVertical(uint32 tileHeight, uint32 tileWidth, uint32* whatRotate, uint32 *bufferLine) {
    for (int line = 0; line < tileHeight / 2; line++) {
        unsigned int  *top_line, *bottom_line;
        top_line = whatRotate + tileWidth * line;
        bottom_line = whatRotate + tileWidth * (tileHeight - line -1);
        _TIFFmemcpy(bufferLine, top_line, sizeof(unsigned int) * tileWidth);
        _TIFFmemcpy(top_line, bottom_line, sizeof(unsigned int) * tileWidth);
        _TIFFmemcpy(bottom_line, bufferLine, sizeof(unsigned int) * tileWidth);
    }
}

void BaseTiffConverter::rotateTileLinesHorizontal(uint32 tileHeight, uint32 tileWidth, uint32* whatRotate, uint32 *bufferLine) {
    uint32 buf;
    for (int y = 0; y < tileHeight; y++) {
        for (int x = 0; x < tileWidth / 2; x++) {
            buf = whatRotate[y * tileWidth + x];
            whatRotate[y * tileWidth + x] = whatRotate[y * tileWidth + tileWidth - x - 1];
            whatRotate[y * tileWidth + tileWidth - x - 1] = buf;
        }
    }
}

void BaseTiffConverter::normalizeTile(uint32 tileHeight, uint32 tileWidth, uint32* rasterTile) {
    //normalize tile
    //find start and end pixels
    int sx = -1, ex= -1, sy= -1, ey= -1;
    for (int y = 0; y < tileHeight; y++) {
        for (int x = 0; x < tileWidth; x++) {
            if (rasterTile[y * tileWidth + x] != 0) {
                sx = x;
                sy = y;
                break;
            }
        }
        if (sx != -1) break;
    }
    for (int y = tileHeight -1; y >= 0; y--) {
        for (int x = tileWidth -1; x >= 0; x--) {
            if (rasterTile[y * tileWidth + x] != 0) {
                ex = x;
                ey = y;
                break;
            }
        }
        if (ex != -1) break;
    }
    if (sy != 0) {
        for (int y = 0; y < tileHeight - sy -1; y++) {
            memcpy(rasterTile + (y * tileWidth), rasterTile + ((y+sy)*tileWidth), tileWidth * sizeof(uint32));
        }
    }
    if (sx != 0) {
        for (int y = 0; y < tileHeight; y++) {
           for (int x = 0; x < tileWidth - sx -1; x++) {
               rasterTile[y * tileWidth + x] = rasterTile[y * tileWidth + x + sx];
           }
        }
    }
}


================================================
FILE: src/main/jni/BaseTiffConverter.h
================================================
//
// Created by beyka on 5/11/17.
//

#ifndef TIFFSAMPLE_BASETIFFCONVERTER_H
#define TIFFSAMPLE_BASETIFFCONVERTER_H

#include <stdlib.h>
#include <stdio.h>
#include <tiffio.h>
#include "NativeExceptions.h"
#include <jni.h>
#include <android/log.h>
#include "unistd.h"
#include <ctime>
#include "string.h"

#ifdef NDEBUG
    #define LOGI(x)
    #define LOGII(x, y)
    #define LOGIF(x, y)
    #define LOGIS(x, y)
    #define LOGE(x)
    #define LOGES(x, y)
#else
    #define LOGI(x) __android_log_print(ANDROID_LOG_DEBUG, "BaseTiffConverter", "%s", x)
    #define LOGII(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BaseTiffConverter", "%s %d", x, y)
    #define LOGIF(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BaseTiffConverter", "%s %f", x, y)
    #define LOGIS(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BaseTiffConverter", "%s %s", x, y)
    #define LOGE(x) __android_log_print(ANDROID_LOG_ERROR, "BaseTiffConverter", "%s", x)
    #define LOGES(x, y) __android_log_print(ANDROID_LOG_ERROR, "BaseTiffConverter", "%s %s", x, y)
#endif


class BaseTiffConverter {
    public:
        explicit BaseTiffConverter(JNIEnv *, jclass, jstring, jstring, jobject, jobject);
        explicit BaseTiffConverter(JNIEnv *, jclass, jint, jint, jobject, jobject);
        ~BaseTiffConverter();
        virtual jboolean convert() = 0;

    protected:
        static const int colorMask = 0xFF;

        jboolean conversion_result = JNI_FALSE;

        JNIEnv *env;
        jstring inPath;
        jstring outPath;
        jint inFd;
        jint outFd;
        jobject optionsObj = NULL;
        jobject listener = NULL;
        jclass jConvertOptionsClass = NULL;
        jclass jIProgressListenerClass = NULL;
        jclass jThreadClass = NULL;

        uint32 width;
        uint32 height;
        uint32 outWidth;
        uint32 outHeight;
        uint32 outStartX;
        uint32 outStartY;

        jlong availableMemory;
        jboolean throwException;

        jint tiffDirectory;

        jboolean appendTiff;
        jint compressionInt;
        jint orientationInt;
        uint16 resUnit;
        float xRes;
        float yRes;
        jstring description;
        const char *cdescription = NULL;
        jstring software;
        const char *csoftware = NULL;
        int boundX;
        int boundY;
        int boundWidth;
        int boundHeight;
        char hasBounds;

        void readOptions();
        char normalizeDecodeArea();
        char *getCreationDate();
        void sendProgress(jlong, jlong);
        jboolean checkStop();
        void rotateTileLinesVertical(uint32, uint32, uint32*, uint32*);
        void rotateTileLinesHorizontal(uint32, uint32, uint32*, uint32*);
        void normalizeTile(uint32, uint32, uint32*);

};

#endif //TIFFSAMPLE_BASETOTIFFCONVERTER_H


================================================
FILE: src/main/jni/BitmapReader.cpp
================================================
//
// Created by beyka on 9/21/17.
//
using namespace std;
#ifdef __cplusplus
extern "C" {
#endif

#include "BitmapReader.h"
#include "BMP.h"
#include <android/bitmap.h>


jobject readBmp
  (JNIEnv *env, jclass clazz, jstring tiffPath, jstring inPath, jobject options, jobject listener)
  {
    FILE *inFile;
       //open bmp file fow reading
            const char *inCPath = NULL;
            inCPath = env->GetStringUTFChars(inPath, 0);
            LOGIS("IN path", inCPath);
            inFile = fopen(inCPath, "rb");
            if (!inFile) {
                //if (throwException) {
                    throw_cant_open_file_exception(env, inPath);
                //}
                LOGES("Can\'t open out file", inCPath);
                env->ReleaseStringUTFChars(inPath, inCPath);
                return JNI_FALSE;
            } else {
                env->ReleaseStringUTFChars(inPath, inCPath);
            }

            //read file header
            size_t byte_count = 54;
            unsigned char *header = (unsigned char *)malloc(sizeof(unsigned char) * byte_count);
            fread(header, 1, byte_count, inFile);
            rewind(inFile);

            //Check is file is JPG image
            bool is_bmp = !strncmp( (const char*)header, "BM", 2 );
            //seek file to begin
            //rewind(inFile);
            if (!is_bmp) {
                LOGE("Not bmp file");
//                if (throwException) {
                    throw_cant_open_file_exception(env, inPath);
  //              }
                return JNI_FALSE;
            } else {
                LOGI("IS BMP");
            }


        unsigned char *buf;
            BITMAPFILEHEADER bmp;
            BITMAPINFOHEADER inf;
            int size;
            int width, height;

            fread(&bmp, sizeof(BITMAPFILEHEADER), 1, inFile);
            //read(fd, &bmp, sizeof(BITMAPFILEHEADER));
            //read(fd, &inf,sizeof(BITMAPINFOHEADER));
            fread(&inf, sizeof(BITMAPINFOHEADER), 1, inFile);

            width = inf.biWidth;
            height = inf.biHeight;
            LOGII("width = ", inf.biWidth);
            LOGII("height = ", inf.biHeight);

            LOGII("bfType",bmp.bfType);
            LOGII("bfSize",bmp.bfSize);
            LOGII("bfOffBits",bmp.bfOffBits);

            LOGII("biSize",inf.biSize);
            LOGII("biPlanes",inf.biPlanes);
            LOGII("biBitCount",inf.biBitCount);
            LOGII("biCompression",inf.biCompression);
            LOGII("biSizeImage",inf.biSizeImage);

            //check if bitnap not 24 bits - throw exception

            /*if (inf.biBitCount != 24) {
                LOGE("Not 24 bits file");
                if (throwException) {
                    throw_cant_open_file_exception(env, inPath);
                }
                return NULL;
            }*/

            LOGII("biSizeImage", inf.biSizeImage);
            if(inf.biSizeImage == 0)  {
                size = width * 3 + width % 4;
                size = size * height;
            } else {
                size = inf.biSizeImage;
            }

            buf = (unsigned char *)malloc(size);
            if (buf == NULL) {
                LOGE("Cant allocate buffer");
                return NULL;
            }

            fseek(inFile, bmp.bfOffBits, SEEK_SET);

            //fread(pixels, sizeof(unsigned char), rowPerStrip * rowSize, inFile);

            int n = fread(buf, sizeof(unsigned char), size, inFile);
            //int n = read(inFile, buf, size);
            LOGII("Read bytes", n);

             int temp, line, i, j, numImgBytes, iw, ih, ind = 0, new_ind = 0;
                uint32 *pixels;

                temp = width * 3;
                line = temp + width % 4;
                numImgBytes = (4 * (width * height));
                pixels = (uint32*)malloc(numImgBytes);

                //memcpy(pixels, buf, numImgBytes);
                numImgBytes = line * height;
                for (i = 0; i < numImgBytes; i++) {
                    unsigned int r, g, b;
                    if (i > temp && (i % line) >= temp) continue;

                    b = buf[i];
                    i++;
                    g = buf[i];
                    i++;
                    r = buf[i];

                    /*iw = ind % width;
                    ih = ind / width;
                    new_ind = iw + (height - ih - 1) * width;*/



                    unsigned int alpha = 255;
                    pixels[ind] = (r| g << 8 | b << 16 | alpha << 24) ;
                    ind++;
                }

                for (i = 0; i < height/2 ;i++) {
                    uint32 *tmp = new uint32[width];
                    memcpy(tmp, pixels + i * width, width * sizeof(uint32));
                    memcpy(pixels + i * width, pixels + (height - 1- i) * width , width * sizeof(uint32));
                    memcpy(pixels + (height - 1- i) * width , tmp, width * sizeof(uint32));
                    free (tmp);
                }

                free(buf);


            jclass bitmapClass = env->FindClass("android/graphics/Bitmap");
                jmethodID methodid = env->GetStaticMethodID(bitmapClass, "createBitmap",
                                                            "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;");

            jclass bitmapConfigClass = env->FindClass("android/graphics/Bitmap$Config");
            jfieldID bitmapConfigField = env->GetStaticFieldID(bitmapConfigClass, "ARGB_8888",
                                                              "Landroid/graphics/Bitmap$Config;");
                //BitmapConfig
                jobject config = env->GetStaticObjectField(bitmapConfigClass, bitmapConfigField);


               jobject java_bitmap = env->CallStaticObjectMethod(bitmapClass, methodid, width,
                                                                      height, config);

int ret;
void *bitmapPixels;
if ((ret = AndroidBitmap_lockPixels(env, java_bitmap, &bitmapPixels)) < 0) {
        //error
        LOGE("Lock pixels failed");
        return NULL;
    }
    int pixelsCount = width * height;

        memcpy(bitmapPixels, (jint *) pixels, sizeof(jint) * pixelsCount);

AndroidBitmap_unlockPixels(env, java_bitmap);

free(pixels);

                                                                      return java_bitmap;
  }

#ifdef __cplusplus
}
#endif



================================================
FILE: src/main/jni/BitmapReader.h
================================================
//
// Created by beyka on 9/21/17.
//

#ifndef TIFFSAMPLE_BITMAPREADER_H
#define TIFFSAMPLE_BITMAPREADER_H

#include <stdlib.h>
#include <stdio.h>
#include <tiffio.h>
#include "string.h"
#include "NativeExceptions.h"
#include <jni.h>
#include <android/log.h>
#include "unistd.h"
#include <ctime>

#ifdef NDEBUG
    #define LOGI(x)
    #define LOGII(x, y)
    #define LOGIF(x, y)
    #define LOGIS(x, y)
    #define LOGE(x)
    #define LOGES(x, y)
#else
    #define LOGI(x) __android_log_print(ANDROID_LOG_DEBUG, "BMPReader", "%s", x)
    #define LOGII(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BMPReader", "%s %d", x, y)
    #define LOGIF(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BMPReader", "%s %f", x, y)
    #define LOGIS(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BMPReader", "%s %s", x, y)
    #define LOGE(x) __android_log_print(ANDROID_LOG_ERROR, "BMPReader", "%s", x)
    #define LOGES(x, y) __android_log_print(ANDROID_LOG_ERROR, "BMPReader", "%s %s", x, y)
#endif

#ifdef __cplusplus
extern "C" {
#endif

jobject readBmp
  (JNIEnv *env, jclass clazz, jstring tiffPath, jstring pngPath, jobject options, jobject listener);

#ifdef __cplusplus
}
#endif
#endif //TIFFSAMPLE_BITMAPREADER_H


================================================
FILE: src/main/jni/BmpToTiffConverter.cpp
================================================
//
// Created by beyka on 9/20/17.
//
#include "BmpToTiffConverter.h"

BmpToTiffConverter::BmpToTiffConverter(JNIEnv *e, jclass clazz, jstring in, jstring out, jobject opts, jobject listener)
    : BaseTiffConverter(e, clazz, in, out, opts, listener)
{
}

BmpToTiffConverter::BmpToTiffConverter(JNIEnv *e, jclass clazz, jint in, jint out, jobject opts, jobject listener)
    : BaseTiffConverter(e, clazz, in, out, opts, listener)
{
}

BmpToTiffConverter::~BmpToTiffConverter()
{
    LOGI("Destructor");
    if (tiffImage) {
        TIFFClose(tiffImage);
        tiffImage = NULL;
    }
    LOGI("Tiff removed");

    if (inf) {
        delete inf;
    }
    LOGI("Inf deleted");

    if (bmp) {
        delete bmp;
    }
    LOGI("header deleted");
}

jboolean BmpToTiffConverter::convert()
{
    LOGI("CONVERT");
    readOptions();

    if(outFd < 0) {
        //open tiff file for writing or appending
        const char *outCPath = NULL;
        outCPath = env->GetStringUTFChars(outPath, 0);
        LOGIS("OUT path", outCPath);
        LOGIS("nativeTiffOpenForSave", outCPath);
        int mode = O_RDWR | O_CREAT | O_TRUNC | 0;
        if (appendTiff) {
            mode = O_RDWR | O_CREAT;
        }
         outFd = open(outCPath, mode, 0666);
         if (outFd < 0) {
            throw_cant_open_file_exception(env, outPath);
            env->ReleaseStringUTFChars(outPath, outCPath);
            return JNI_FALSE;
         }
         env->ReleaseStringUTFChars(outPath, outCPath);
    }

    if (!appendTiff) {
        if ((tiffImage = TIFFFdOpen(outFd, "", "w")) == NULL) {
            LOGE("Unable to open tif file");
            if (throwException) {
                throw_cant_open_file_exception_fd(env, outFd);
            }
            return JNI_FALSE;
        }
    } else {
         if ((tiffImage = TIFFFdOpen(outFd, "", "a")) == NULL) {
            LOGE("Unable to open tif file");
            if (throwException) {
                throw_cant_open_file_exception_fd(env, outFd);
            }
            return JNI_FALSE;
         }
    }

    //open bmp file fow reading
    if(inFd < 0) {
        const char *inCPath = NULL;
        inCPath = env->GetStringUTFChars(inPath, 0);
        LOGIS("IN path", inCPath);
        int mode = O_RDONLY;
        inFd = open(inCPath, mode, 0666);
        if (inFd < 0) {
            LOGES("Can\'t open in file", inCPath);
            throw_cant_open_file_exception(env, inPath);
            env->ReleaseStringUTFChars(inPath, inCPath);
            return JNI_FALSE;
        }
        env->ReleaseStringUTFChars(inPath, inCPath);
    }

    //Read header of bitmap file
    readHeaders();

    //Check is file is BMP image
    bool is_bmp = !strncmp( (const char*)&bmp->bfType, "BM", 2 );
    if (!is_bmp) {
        LOGE("Not bmp file");
        if (throwException) {
            throw_cant_open_file_exception_fd(env, inFd);
        }
        return JNI_FALSE;
    }

    //check is bitmap has 24  bit per pixel. other format not supported
    if (inf->biBitCount != 16 && inf->biBitCount != 24 && inf->biBitCount != 32 && inf->biBitCount != 0) {
        LOGE("Support only 24bpp bitmaps");
        if (throwException) {
            throw_cant_open_file_exception_fd(env, inFd);
        }
        return JNI_FALSE;
    }
    LOGII("Bits per pixel", inf->biBitCount);

    int compression = inf->biCompression;
    LOGII("compression", inf->biCompression);
    for (int i = 0; i < 3; i++) {
        LOGII("mask", inf->biPalete[i]);
    }

    //Component per pixel will be always 4. Alpha will be always 0xff
    int componentsPerPixel = 4;//inf->biBitCount / 8;

    int width = inf->biWidth;
    int height = inf->biHeight;
    LOGII("width", width);
    LOGII("height", height);

    //Create tiff structure
    TIFFSetField(tiffImage, TIFFTAG_IMAGEWIDTH, width);
    TIFFSetField(tiffImage, TIFFTAG_IMAGELENGTH, height);
    TIFFSetField(tiffImage, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
    TIFFSetField(tiffImage, TIFFTAG_COMPRESSION, compressionInt);
    TIFFSetField(tiffImage, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
    TIFFSetField(tiffImage, TIFFTAG_XRESOLUTION, xRes);
    TIFFSetField(tiffImage, TIFFTAG_YRESOLUTION, yRes);
    TIFFSetField(tiffImage, TIFFTAG_RESOLUTIONUNIT, resUnit);

    if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
        TIFFSetField(tiffImage, TIFFTAG_BITSPERSAMPLE,	1);
        TIFFSetField(tiffImage, TIFFTAG_SAMPLESPERPIXEL,	1);
        TIFFSetField(tiffImage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
        TIFFSetField(tiffImage, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
    } else {
        TIFFSetField(tiffImage, TIFFTAG_BITSPERSAMPLE, 8);
        TIFFSetField(tiffImage, TIFFTAG_SAMPLESPERPIXEL, componentsPerPixel);
        TIFFSetField(tiffImage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
    }

    //creation date
    char *date = getCreationDate();
    TIFFSetField(tiffImage, TIFFTAG_DATETIME, date);
    free(date);
    //image description
    if (cdescription) {
        TIFFSetField(tiffImage, TIFFTAG_IMAGEDESCRIPTION, cdescription);
    }
    //software tag
    if (csoftware) {
        TIFFSetField(tiffImage, TIFFTAG_SOFTWARE, csoftware);
    }

    //progress reporter
    jlong total = width * height;
    sendProgress(0, total);

    int rowSize = width * componentsPerPixel;
    //Calculate row per strip
    //maximum size for strip should be less than 2Mb if memory available
    unsigned long MB2 = (availableMemory == -1 || availableMemory > 3 * 1024 * 1024) ? 2 * 1024 * 1024 : width * 4;
    int rowPerStrip = MB2/rowSize;
    if (rowPerStrip >= height) {
        rowPerStrip = height / 4;
    }
    if (rowPerStrip < 1) rowPerStrip = 1;
    LOGII("rowPerStrip", rowPerStrip);

    unsigned long estimateMem = rowPerStrip * width * 4 * 2;//need 2 buffers for read data from bitmap. Check getPixelsFromBmp method

    if (compressionInt == COMPRESSION_JPEG) {
        estimateMem += width * sizeof(uint32);//temp array for writing JPEG lines
        estimateMem += width * sizeof(uint32);//temp array for fliping bitmap data in getPixelsFromBmp method
    } else if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
        estimateMem += (width/8 + 0.5) * rowPerStrip; // bilevel array
    } else {
        estimateMem += 0;
    }
    LOGII("estimateMem", estimateMem);
    if (estimateMem > availableMemory && availableMemory != -1) {
        LOGEI("Not enough memory", availableMemory);
        if (throwException) {
            throw_not_enought_memory_exception(env, availableMemory, estimateMem);
        }
        return JNI_FALSE;
    }

    if (checkStop()) {
        conversion_result = JNI_FALSE;
        return conversion_result;
    }

    int ret;

    if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
        TIFFSetField(tiffImage, TIFFTAG_ROWSPERSTRIP, rowPerStrip);
        int compressedWidth = (width/8 + 0.5);
        for (int y = 0; y < height; y+=rowPerStrip) {
            if (checkStop()) {
                conversion_result = JNI_FALSE;
                return conversion_result;
            }
            int rowToRead = rowPerStrip;
            if (rowToRead + y >= height) {
                rowToRead = height - y;
            }
            sendProgress(y * width, total);
            uint32 *pixels = getPixelsFromBmp(y, rowToRead);
            unsigned char *bilevel = convertArgbToBilevel(pixels, width, rowToRead);
            free(pixels);
            ret = TIFFWriteEncodedStrip(tiffImage, y/rowToRead, bilevel, compressedWidth * sizeof(unsigned char) * rowToRead);
            free(bilevel);
        }
    } else if (compressionInt == COMPRESSION_JPEG) {
        for (int ys = 0; ys < height; ys+=rowPerStrip) {
        if (checkStop()) {
            return JNI_FALSE;
        }
        int rowToRead = rowPerStrip;
        if (rowToRead + ys >= height) {
            rowToRead = height - ys;
        }
        sendProgress(ys * width, total);
        uint32 *pixels = getPixelsFromBmp(ys, rowToRead);
        uint32 *pixelsline = new uint32[width];
        for (int k = 0; k < rowToRead; k++) {
            memcpy(pixelsline, &pixels [k * width], width * sizeof(uint32));
            ret = TIFFWriteScanline(tiffImage, pixelsline, ys + k, 0);
        }
        delete[] pixelsline;
        free(pixels);
        }
    } else {
        TIFFSetField(tiffImage, TIFFTAG_ROWSPERSTRIP, rowPerStrip);
        for (int y = 0; y < height; y+=rowPerStrip) {
            if (checkStop()) {
                return JNI_FALSE;
            }
            int rowToRead = rowPerStrip;
            if (rowToRead + y >= height) {
                rowToRead = height - y;
            }
            //LOGII("rowToRead", rowToRead);
            sendProgress(y * width, total);
            uint32 *pixels = getPixelsFromBmp(y, rowToRead);
            TIFFWriteEncodedStrip(tiffImage, y/rowPerStrip, pixels, width * sizeof(uint32) * rowToRead);
            free(pixels);
        }
    }

    ret = TIFFWriteDirectory(tiffImage);
    LOGII("ret = ", ret);

    sendProgress(total, total);
    conversion_result = JNI_TRUE;
    return conversion_result;
}

void BmpToTiffConverter::readHeaders()
{
    bmp = new BITMAPFILEHEADER;
    inf = new BITMAPINFOHEADER;
    int br = read(inFd, bmp, sizeof(BITMAPFILEHEADER));
    LOGII("Read bytes ", br);
    LOGIS("bmp read ", bmp);
    int bi = read(inFd, inf, sizeof(BITMAPINFOHEADER));
    LOGII("Read bytes ", bi);
    LOGIS("inf read ", (char*)inf);
}

uint32 *BmpToTiffConverter::getPixelsFromBmp(int offset, int limit)
{
    int componentPerPixel = inf->biBitCount/8;
    LOGII("componentPerPixel", inf->biBitCount);
    LOGII("componentPerPixel", componentPerPixel);

    if (componentPerPixel == 2) {
        return getPixelsFrom16Bmp(offset, limit);
    } else if (componentPerPixel == 3) {
        return getPixelsFrom24Bmp(offset, limit);
    } else if (componentPerPixel == 4) {
        return getPixelsFrom32Bmp(offset, limit);
    }

    return NULL;
}

uint32 *BmpToTiffConverter::getPixelsFrom16Bmp(int offset, int limit)
{
    unsigned char *buf;
    int size;
    int width = inf->biWidth;
    int height = inf->biHeight;

    LOGII("compr", inf->biCompression);

    if (offset + limit >= height) {
        limit = height - offset;
    }

    //width of bitmap should be multiple 4
    size = width * 2 + (width * 2) % 4;
    size = size * limit;

    buf = (unsigned char *)malloc(size);
    if (buf == NULL) {
        LOGE("Can\'t allocate buffer");
        return NULL;
    }

    //in bitmap picture stored fliped from up to down.
    //when need read 0 row - should read height-1 row
    //seek file to position from the end of file to read
    lseek(inFd, bmp->bfOffBits + (height - offset - limit) * (width * 2 + (width * 2) % 4) , SEEK_SET);
    int n = read(inFd, buf, size);
    LOGII("Read bytes", n);

    int temp, line, i, j, numImgBytes, ind = 0;
    uint32 *pixels;

    temp = width * 2;
    line = temp + (width * 2) % 4;//width % 4;
    numImgBytes = (4 * (width * limit));
    pixels = (uint32*)malloc(numImgBytes);

    int pixelss = 0;

    numImgBytes = line * limit;
    for (i = 0; i < numImgBytes; i+=2) {

        if (i > temp && (i % line) >= temp) continue;

        uint16_t r, g, b, a = 0b11111111;

        uint16_t* pix = (uint16_t*) (buf + i);

        r = inf->biPalete[0] & *pix;
        g = inf->biPalete[1] & *pix;
        b = inf->biPalete[2] & *pix;

        //Use one of palete mask to determine which type of 1 bpp used 555 or 565
        char greenShiftBits;
        g = g >> 5;
        if (inf->biPalete[1] == 0x03E0) {
            greenShiftBits = 3;
            r = r >> 10;
        } else {
            greenShiftBits = 2;
            r = r >> 11;
        }

        pixels[ind] = (r<<3) | (g << greenShiftBits << 8) | (b << 3 << 16)  | a << 24 ;//(r| g << 8 | b << 16 | a << 24) ;

        ind++;
    }

    uint32 *tmp = new uint32[width];
    for (i = 0; i < limit/2 ;i++) {
        memcpy(tmp, pixels + i * width, width * sizeof(uint32));
        memcpy(pixels + i * width, pixels + (limit - 1- i) * width , width * sizeof(uint32));
        memcpy(pixels + (limit - 1- i) * width , tmp, width * sizeof(uint32));
    }
    free (tmp);

    free(buf);

    return pixels;
}

uint32 *BmpToTiffConverter::getPixelsFrom24Bmp(int offset, int limit)
{
    unsigned char *buf;
    int size;
    int width = inf->biWidth;
    int height = inf->biHeight;

    if (offset + limit >= height) {
        limit = height - offset;
    }

    //width of bitmap should be multiple 4
    size = width * 3 + width % 4;
    size = size * limit;

    buf = (unsigned char *)malloc(size);
    if (buf == NULL) {
        LOGE("Can\'t allocate buffer");
        return NULL;
    }

    //in bitmap picture stored fliped from up to down.
    //when need read 0 row - should read height-1 row
    //seek file to position from the end of file to read
    lseek(inFd, bmp->bfOffBits + (height - offset - limit) * (width * 3 + width % 4) , SEEK_SET);
    int n = read(inFd, buf, size);

    LOGII("Read bytes", n);

    int temp, line, i, j, numImgBytes, ind = 0;
    uint32 *pixels;

    temp = width * 3;
    line = temp + width % 4;//width % 4;
    numImgBytes = (4 * (width * limit));
    pixels = (uint32*)malloc(numImgBytes);

    numImgBytes = line * limit;
    for (i = 0; i < numImgBytes; i++) {
        unsigned char r, g, b, a = 0b11111111;
        //width of bitmap should be multiple 4
        //here skip pixels that haven't data
        //but if bitmap is 32 bpp - it is laready multiple to 4
        if (i > temp && (i % line) >= temp) continue;

        //read colors. alpha always 255lf because 24bpp bitmap hasn't alpha chanel

        b = buf[i];
        i++;
        g = buf[i];
        i++;
        r = buf[i];


        pixels[ind] = (r| g << 8 | b << 16 | a << 24) ;
        ind++;
    }

    uint32 *tmp = new uint32[width];
    for (i = 0; i < limit/2 ;i++) {
        memcpy(tmp, pixels + i * width, width * sizeof(uint32));
        memcpy(pixels + i * width, pixels + (limit - 1- i) * width , width * sizeof(uint32));
        memcpy(pixels + (limit - 1- i) * width , tmp, width * sizeof(uint32));
    }
    free (tmp);

    free(buf);

    return pixels;
}

uint32 *BmpToTiffConverter::getPixelsFrom32Bmp(int offset, int limit)
{
    unsigned char *buf;
    int size;
    int width = inf->biWidth;
    int height = inf->biHeight;

    if (offset + limit >= height) {
        limit = height - offset;
    }

    //width of bitmap should be multiple 4
    size = width * 4;
    size = size * limit;

    buf = (unsigned char *)malloc(size);
    if (buf == NULL) {
        LOGE("Can\'t allocate buffer");
        return NULL;
    }


    //in bitmap picture stored fliped from up to down.
    //when need read 0 row - should read height-1 row
    //seek file to position from the end of file to read
    lseek(inFd, bmp->bfOffBits + (height - offset - limit) * width * 4, SEEK_SET);
    int n = read(inFd, buf, size);

    LOGII("Read bytes", n);

    int temp, line, i, j, numImgBytes, ind = 0;
    uint32 *pixels;

    line = width * 4;//width % 4;
    numImgBytes = (4 * (width * limit));
    pixels = (uint32*)malloc(numImgBytes);

    for (i = 0; i < numImgBytes; i++) {
        unsigned char r, g, b, a = 0b11111111;

        //read colors. alpha always 255lf because 24bpp bitmap hasn't alpha chanel
        //a = buf[i];
        i++;

        b = buf[i];
        i++;
        g = buf[i];
        i++;
        r = buf[i];

        pixels[ind] = (r| g << 8 | b << 16 | a << 24) ;
        ind++;
    }

    uint32 *tmp = new uint32[width];
    for (i = 0; i < limit/2 ;i++) {
        memcpy(tmp, pixels + i * width, width * sizeof(uint32));
        memcpy(pixels + i * width, pixels + (limit - 1- i) * width , width * sizeof(uint32));
        memcpy(pixels + (limit - 1- i) * width , tmp, width * sizeof(uint32));
    }
    free (tmp);

    free(buf);

    return pixels;
}

unsigned char * BmpToTiffConverter::convertArgbToBilevel(uint32 *data, uint32 width, uint32 height)
{
    unsigned char red;
    unsigned char green;
    unsigned char blue;

    uint32 crPix;
    uint32 grayPix;
    int bilevelWidth = (width / 8 + 0.5);

    unsigned char *dest = (unsigned char *) malloc(sizeof(unsigned char) * bilevelWidth * height);

    uint32 maxGrey = 0.2125 * 255 + 0.7154 * 255 + 0.0721 * 255;
    uint32 halfGrey = maxGrey/2;

    uint32 shift = 0;
    unsigned char charsum = 0;
    int k = 7;
    for (int y = 0; y < height; y++) {
        shift = 0;
        charsum = 0;
        k = 7;
        for (int i = 0; i < width; i++) {
            uint32 *px = &data[y * width + i];
                red = px[0];
                green = px[1];
                blue = px[2];
                grayPix = (0.2125 * red + 0.7154 * green + 0.0721 * blue);

            if (grayPix < halfGrey) charsum &= ~(1 << k);
            else charsum |= 1 << k;

            if (k == 0) {
                dest[y * bilevelWidth + shift] = charsum;
                shift++;
                k = 7;
                charsum = 0;
            } else {
               k--;
            }
         }
    }
    return dest;
}





================================================
FILE: src/main/jni/BmpToTiffConverter.h
================================================
//
// Created by beyka on 9/20/17.
//

#ifndef TIFFSAMPLE_BMPTOTIFFCONVERTER_H
#define TIFFSAMPLE_BMPTOTIFFCONVERTER_H

#include <stdlib.h>
#include <stdio.h>
#include <tiffio.h>
#include "fcntl.h"
#include "unistd.h"
#include <jpeglib.h>
#include <setjmp.h>
#include "BaseTiffConverter.h"
#include "BMP.h"

#ifdef NDEBUG
    #define LOGI(x)
    #define LOGII(x, y)
    #define LOGIF(x, y)
    #define LOGIS(x, y)
    #define LOGE(x)
    #define LOGES(x, y)
    #define LOGEI(x, y)
#else
    #define LOGI(x) __android_log_print(ANDROID_LOG_DEBUG, "BmpToTiffConverter", "%s", x)
    #define LOGII(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BmpToTiffConverter", "%s %d", x, y)
    #define LOGIF(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BmpToTiffConverter", "%s %f", x, y)
    #define LOGIS(x, y) __android_log_print(ANDROID_LOG_DEBUG, "BmpToTiffConverter", "%s %s", x, y)
    #define LOGE(x) __android_log_print(ANDROID_LOG_ERROR, "BmpToTiffConverter", "%s", x)
    #define LOGES(x, y) __android_log_print(ANDROID_LOG_ERROR, "BmpToTiffConverter", "%s %s", x, y)
    #define LOGEI(x, y) __android_log_print(ANDROID_LOG_ERROR, "BmpToTiffConverter", "%s %d", x, y)
#endif

class BmpToTiffConverter : public BaseTiffConverter
{
    public:
        explicit BmpToTiffConverter(JNIEnv *, jclass, jstring, jstring, jobject, jobject);
        explicit BmpToTiffConverter(JNIEnv *, jclass, jint, jint, jobject, jobject);
        ~BmpToTiffConverter();
        virtual jboolean convert();

    private:
        TIFF *tiffImage;
        BITMAPFILEHEADER *bmp;
        BITMAPINFOHEADER *inf;

        void readHeaders();

        uint32 * getPixelsFromBmp(int offset, int limit);
        uint32 * getPixelsFrom16Bmp(int offset, int limit);
        uint32 * getPixelsFrom24Bmp(int offset, int limit);
        uint32 * getPixelsFrom32Bmp(int offset, int limit);

        unsigned char * convertArgbToBilevel(uint32 *, uint32, uint32);

};

#endif //TIFFSAMPLE_BMPTOTIFFCONVERTER_H


================================================
FILE: src/main/jni/JpgToTiffConverter.cpp
================================================
//
// Created by beyka on 5/15/17.
//

#include "JpgToTiffConverter.h"

JpgToTiffConverter::JpgToTiffConverter(JNIEnv *e, jclass clazz, jstring in, jstring out, jobject opts, jobject listener)
    : BaseTiffConverter(e, clazz, in, out, opts, listener)
{
    jpeg_struct_init = 0;

    compressionInt = 5;
}

JpgToTiffConverter::JpgToTiffConverter(JNIEnv *e, jclass clazz, jint in, jint out, jobject opts, jobject listener)
    : BaseTiffConverter(e, clazz, in, out, opts, listener)
{
    jpeg_struct_init = 0;

    compressionInt = 5;
}

JpgToTiffConverter::~JpgToTiffConverter()
{
    LOGI("Destructor");
    if (tiffImage) {
        TIFFClose(tiffImage);
        tiffImage = NULL;
    }
    LOGI("Tiff removed");

    if (jpeg_struct_init) {
        jpeg_destroy_decompress(&cinfo);
    }
    LOGI("JPEG destroyed");

    if (inFile) {
        fclose(inFile);
    }
    LOGI("IN file closed");
}

jboolean JpgToTiffConverter::convert()
{
    readOptions();

    if(outFd < 0) {
        //open tiff file for writing or appending
        const char *outCPath = NULL;
        outCPath = env->GetStringUTFChars(outPath, 0);
        LOGIS("OUT path", outCPath);
        LOGIS("nativeTiffOpenForSave", outCPath);
        int mode = O_RDWR | O_CREAT | O_TRUNC | 0;
        if (appendTiff) {
            mode = O_RDWR | O_CREAT;
        }
        outFd = open(outCPath, mode, 0666);
        if (outFd < 0) {
            throw_cant_open_file_exception(env, outPath);
            env->ReleaseStringUTFChars(outPath, outCPath);
            return JNI_FALSE;
        }
        env->ReleaseStringUTFChars(outPath, outCPath);
    }

    if (!appendTiff) {
        if ((tiffImage = TIFFFdOpen(outFd, "", "w")) == NULL) {
        LOGE("Unable to open tif file");
            if (throwException) {
                throw_cant_open_file_exception_fd(env, outFd);
            }
            return JNI_FALSE;
        }
    } else {
        if ((tiffImage = TIFFFdOpen(outFd, "", "a")) == NULL) {
            LOGE("Unable to open tif file");
            if (throwException) {
                throw_cant_open_file_exception_fd(env, outFd);
            }
            return JNI_FALSE;
        }
    }

    //open jpg file fow reading
    if (inFd < 0) {
        const char *inCPath = NULL;
        inCPath = env->GetStringUTFChars(inPath, 0);
        LOGIS("IN path", inCPath);
        inFile = fopen(inCPath, "rb");
        if (!inFile) {
            if (throwException) {
                throw_cant_open_file_exception(env, inPath);
            }
            LOGES("Can\'t open out file", inCPath);
            env->ReleaseStringUTFChars(inPath, inCPath);
            return JNI_FALSE;
        }
        env->ReleaseStringUTFChars(inPath, inCPath);
    } else {
        inFile = fdopen(inFd, "rb");
        if (!inFile) {
            if (throwException) {
                throw_cant_open_file_exception_fd(env, inFd);
            }
            LOGES("Can\'t open out file descriptor", inFd);
            return JNI_FALSE;
        }
    }

    //read file header
    size_t byte_count = 8;
    unsigned char *header = (unsigned char *)malloc(sizeof(unsigned char) * byte_count);
    fread(header, 1, byte_count, inFile);

    //Check is file is JPG image
    bool is_jpg = !strncmp( (const char*)header, "\xFF\xD8\xFF", 3 );
    //seek file to begin
    rewind(inFile);
    if (!is_jpg) {
        LOGE("Not jpeg file");
        if (throwException) {
            if (inFd < 0) {
                throw_cant_open_file_exception(env, inPath);
            } else {
                throw_cant_open_file_exception_fd(env, inFd);
            }
        }
        return JNI_FALSE;
    } else {
        LOGI("IS JPEG");
    }

    /* We set up the normal JPEG error routines, then override error_exit. */
    cinfo.err = jpeg_std_error(&jerr);

    jpeg_create_decompress(&cinfo);
    jpeg_struct_init = 1;
    LOGI("decompress created");

    jpeg_stdio_src(&cinfo, inFile);
    LOGI("set file");

    //read file parameters
    int readHeader = jpeg_read_header(&cinfo, TRUE);
    LOGII("read jpeg header", readHeader);

    //start decompress
    int startDecompress = jpeg_start_decompress(&cinfo);
    LOGII("start decompress", startDecompress);

    width = cinfo.image_width;
    height = cinfo.image_height;
    LOGII("width", width);
    LOGII("height", height);

    componentsPerPixel = cinfo.output_components;

    //Create tiff structure
    TIFFSetField(tiffImage, TIFFTAG_IMAGEWIDTH, width);
    TIFFSetField(tiffImage, TIFFTAG_IMAGELENGTH, height);
    TIFFSetField(tiffImage, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
    TIFFSetField(tiffImage, TIFFTAG_COMPRESSION, compressionInt);
    TIFFSetField(tiffImage, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
    TIFFSetField(tiffImage, TIFFTAG_XRESOLUTION, xRes);
    TIFFSetField(tiffImage, TIFFTAG_YRESOLUTION, yRes);
    TIFFSetField(tiffImage, TIFFTAG_RESOLUTIONUNIT, resUnit);

    if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
        TIFFSetField(tiffImage, TIFFTAG_BITSPERSAMPLE,	1);
        TIFFSetField(tiffImage, TIFFTAG_SAMPLESPERPIXEL,	1);
        TIFFSetField(tiffImage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
        TIFFSetField(tiffImage, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
    } else {
        TIFFSetField(tiffImage, TIFFTAG_BITSPERSAMPLE, 8);
        TIFFSetField(tiffImage, TIFFTAG_SAMPLESPERPIXEL, componentsPerPixel);
        if (componentsPerPixel == 1) {
            TIFFSetField(tiffImage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
        } else {
            TIFFSetField(tiffImage, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
        }
    }
    //creation date
    char *date = getCreationDate();
    TIFFSetField(tiffImage, TIFFTAG_DATETIME, date);
    free(date);
    //image description
    if (cdescription) {
        TIFFSetField(tiffImage, TIFFTAG_IMAGEDESCRIPTION, cdescription);
    }
    //software tag
    if (csoftware) {
        TIFFSetField(tiffImage, TIFFTAG_SOFTWARE, csoftware);
    }

    //progress reporter
    jlong total = width * height;
    sendProgress(0, total);

    int rowSize = width * componentsPerPixel;
    LOGII("jpg samples", componentsPerPixel);

    //Calculate row per strip
    //maximum size for strip should be less than 2Mb if memory available
    unsigned long MB2 = (availableMemory == -1 || availableMemory > 3 * 1024 * 1024) ? 2 * 1024 * 1024 : width * 4;
    int rowPerStrip = MB2/rowSize;
    //TODO This is workaround. Need to understand why FAX compression schemes have shift in strips.
    if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
        rowPerStrip = 1;
    }

    if (rowPerStrip >= height) {
        rowPerStrip = height / 4;
    }
    if (rowPerStrip < 1) rowPerStrip = 1;
    LOGII("rowPerStrip", rowPerStrip);

    unsigned long estimateMem = rowPerStrip * width * 4;
    estimateMem += sizeof(JSAMPLE) * rowSize;//jpg buffer
    if (compressionInt == COMPRESSION_JPEG) {
        estimateMem += 0;
    } else if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
        estimateMem += (width/8 + 0.5) * rowPerStrip;
    } else {
        estimateMem += rowPerStrip * rowSize;
    }
    LOGII("estimateMem", estimateMem);
    if (estimateMem > availableMemory && availableMemory != -1) {
        LOGEI("Not enough memory", availableMemory);
        if (throwException) {
            throw_not_enought_memory_exception(env, availableMemory, estimateMem);
        }
        return JNI_FALSE;
    }

    if (checkStop()) {
        //jpeg_finish_decompress(&cinfo);
        conversion_result = JNI_FALSE;
        return conversion_result;
    }

    //Buffer for read jpeg image line by line
    int buffer_height = 1;
    JSAMPARRAY buffer = (JSAMPARRAY)malloc(sizeof(JSAMPROW) * buffer_height);
    buffer[0] = (JSAMPROW)malloc(sizeof(JSAMPLE) * rowSize);

    //buffer for format strips for tiff


    int ret;
    if (compressionInt == COMPRESSION_JPEG) {
        int line = 0;
        while (cinfo.output_scanline < height) {
            if (checkStop()) {
                free(buffer[0]);
                free(buffer);
                conversion_result = JNI_FALSE;
                return conversion_result;
            }
            if (line % rowPerStrip == 0) {
                sendProgress(line * width, total);
            }
            jpeg_read_scanlines(&cinfo, buffer, 1);
            ret = TIFFWriteScanline(tiffImage, buffer[0], line, 0);
            line++;
        }
    } else {
        TIFFSetField(tiffImage, TIFFTAG_ROWSPERSTRIP, rowPerStrip);
        unsigned char *data = new unsigned char[rowSize * rowPerStrip];
        int totalRowCounter = 0;
        int rowCounter = 0;
        bool shouldWrite = false;
        while (cinfo.output_scanline < height) {
            shouldWrite = true;
            jpeg_read_scanlines(&cinfo, buffer, 1);
            memcpy(data + rowCounter * rowSize, buffer[0], rowSize);
            rowCounter++;
            totalRowCounter++;
            if (rowCounter == rowPerStrip) {
                if (checkStop()) {
                    //jpeg_finish_decompress(&cinfo);
                    delete[] data;
                    free(buffer[0]);
                    free(buffer);
                    conversion_result = JNI_FALSE;
                    return conversion_result;
                }
                if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
                    int compressedWidth = (width/8 + 0.5);
                    unsigned char *bilevel = convertArgbToBilevel(data, componentsPerPixel, width, rowPerStrip);
                    ret = TIFFWriteEncodedStrip(tiffImage, totalRowCounter/rowPerStrip - 1, bilevel, compressedWidth * sizeof(unsigned char) * rowPerStrip);
                    free(bilevel);
                } else {
                    ret = TIFFWriteEncodedStrip(tiffImage, totalRowCounter/rowPerStrip - 1, data, rowPerStrip * rowSize);
                }
                rowCounter = 0;
                shouldWrite = false;
                sendProgress(totalRowCounter * width, total);
            }
        }
        if (shouldWrite) {  LOGI("last stage");
            if (checkStop()) {
                //jpeg_finish_decompress(&cinfo);
                delete[] data;
                free(buffer[0]);
                free(buffer);
                conversion_result = JNI_FALSE;
                return conversion_result;
            }
            if (compressionInt == COMPRESSION_CCITTRLE || compressionInt == COMPRESSION_CCITTFAX3 || compressionInt == COMPRESSION_CCITTFAX4) {
                int compressedWidth = (width/8 + 0.5);
                unsigned char *bilevel = convertArgbToBilevel(data, componentsPerPixel, width, rowPerStrip);
                ret = TIFFWriteEncodedStrip(tiffImage, totalRowCounter/rowPerStrip, bilevel, compressedWidth * sizeof(unsigned char) * rowPerStrip);
                free(bilevel);
            } else {
                ret = TIFFWriteEncodedStrip(tiffImage, totalRowCounter/rowPerStrip, data, rowPerStrip * rowSize);
            }
        }
        delete[] data;
    }

    ret = TIFFWriteDirectory(tiffImage);
    LOGII("ret = ", ret);

    jpeg_finish_decompress(&cinfo);


    free(buffer[0]);
    free(buffer);

    sendProgress(total, total);
    conversion_result = JNI_TRUE;
    return conversion_result;
}

unsigned char * JpgToTiffConverter::convertArgbToBilevel(unsigned char *data, int components, uint32 width, uint32 height)
{
    unsigned char red;
    unsigned char green;
    unsigned char blue;

    uint32 crPix;
    uint32 grayPix;
    int bilevelWidth = (width / 8 + 0.5);

    unsigned char *dest = (unsigned char *) malloc(sizeof(unsigned char) * bilevelWidth * height);

    uint32 maxGrey = (components > 1) ? (0.2125 * 255 + 0.7154 * 255 + 0.0721 * 255) : 255;
    uint32 halfGrey = maxGrey/2;

    uint32 shift = 0;
    unsigned char charsum = 0;
    int k = 7;
    for (int y = 0; y < height; y++) {
        shift = 0;
        charsum = 0;
        k = 7;
        for (int i = 0; i < width * components; i+=components) {
            unsigned char *px = &data[y * width * components + i];
            if (components == 1) {
                grayPix = (*px);
            } else {
                red = px[0];
                green = px[1];
                blue = px[2];
                grayPix = (0.2125 * red + 0.7154 * green + 0.0721 * blue);
            }

            if (grayPix < halfGrey) charsum &= ~(1 << k);
            else charsum |= 1 << k;

            if (k == 0) {
                dest[y * bilevelWidth + shift] = charsum;
                shift++;
                k = 7;
                charsum = 0;
            } else {
               k--;
            }
         }
    }
    return dest;
}



================================================
FILE: src/main/jni/JpgToTiffConverter.h
================================================
//
// Created by beyka on 5/15/17.
//

#ifndef TIFFSAMPLE_JPGTOTIFFCONVERTER_H
#define TIFFSAMPLE_JPGTOTIFFCONVERTER_H

#include <stdlib.h>
#include <stdio.h>
#include <tiffio.h>
#include "fcntl.h"
#include "unistd.h"
#include <jpeglib.h>
#include <setjmp.h>
#include "BaseTiffConverter.h"

#ifdef NDEBUG
    #define LOGI(x)
    #define LOGII(x, y)
    #define LOGIF(x, y)
    #define LOGIS(x, y)
    #define LOGE(x)
    #define LOGES(x, y)
    #define LOGEI(x, y);
#else
    #define LOGI(x) __android_log_print(ANDROID_LOG_DEBUG, "JpgToTiffConverter", "%s", x)
    #define LOGII(x, y) __android_log_print(ANDROID_LOG_DEBUG, "JpgToTiffConverter", "%s %d", x, y)
    #define LOGIF(x, y) __android_log_print(ANDROID_LOG_DEBUG, "JpgToTiffConverter", "%s %f", x, y)
    #define LOGIS(x, y) __android_log_print(ANDROID_LOG_DEBUG, "JpgToTiffConverter", "%s %s", x, y)
    #define LOGE(x) __android_log_print(ANDROID_LOG_ERROR, "JpgToTiffConverter", "%s", x)
    #define LOGES(x, y) __android_log_print(ANDROID_LOG_ERROR, "JpgToTiffConverter", "%s %s", x, y)
    #define LOGEI(x, y) __android_log_print(ANDROID_LOG_ERROR, "JpgToTiffConverter", "%s %d", x, y)
#endif

class JpgToTiffConverter : public BaseTiffConverter
{
    public:
        explicit JpgToTiffConverter(JNIEnv *, jclass, jstring, jstring, jobject, jobject);
        explicit JpgToTiffConverter(JNIEnv *, jclass, jint, jint, jobject, jobject);
        ~JpgToTiffConverter();
        virtual jboolean convert();

    private:
        TIFF *tiffImage;
        FILE *inFile;

        int componentsPerPixel;

        char jpeg_struct_init;
        struct jpeg_decompress_struct cinfo;
        struct jpeg_error_mgr jerr;

        //METHODDEF(void) JpgToTiffConverter::my_error_exit (j_common_ptr)
        unsigned char * convertArgbToBilevel(unsigned char *, int, uint32, uint32);

};


#endif //TIFFSAMPLE_JPGTOTIFFCONVERTER_H


================================================
FILE: src/main/jni/NativeDecoder.cpp
================================================
//
// Created by beyka on 3.2.17.
//

#include "NativeDecoder.h"
#include <string>

jmp_buf NativeDecoder::tile_buf;
jmp_buf NativeDecoder::strip_buf;
jmp_buf NativeDecoder::image_buf;
jmp_buf NativeDecoder::general_buf;

//Constructor for decoding from file descriptor
NativeDecoder::NativeDecoder(JNIEnv *e, jclass c, jint fd, jobject opts, jobject listener)
{

    decodingMode = DECODE_MODE_FILE_DESCRIPTOR;

    availableMemory = 8000*8000*4; // use 244Mb restriction for decoding full image
    env = e;
    clazz = c;
    optionsObject = opts;
    listenerObject = listener;
    jFd = fd;

    origwidth = 0;
    origheight = 0;
    origorientation = 0;
    origcompressionscheme = 0;
    progressTotal = 0;
    invertRedAndBlue = false;

    boundX = boundY = boundWidth = boundHeight = -1;
    hasBounds = 0;

    preferedConfig = NULL;
    image = NULL;

    jBitmapOptionsClass = env->FindClass(
                        "org/beyka/tiffbitmapfactory/TiffBitmapFactory$Options");
    jIProgressListenerClass = env->FindClass("org/beyka/tiffbitmapfactory/IProgressListener");
    jThreadClass = env->FindClass("java/lang/Thread");
}

//Constructor for decoding from file path
NativeDecoder::NativeDecoder(JNIEnv *e, jclass c, jstring path, jobject opts, jobject listener)
{

    decodingMode = DECODE_MODE_FILE_PATH;

    availableMemory = 8000*8000*4; // use 244Mb restriction for decoding full image
    env = e;
    clazz = c;
    optionsObject = opts;
    listenerObject = listener;
    jPath = path;

    origwidth = 0;
    origheight = 0;
    origorientation = 0;
    origcompressionscheme = 0;
    progressTotal = 0;
    invertRedAndBlue = false;

    boundX = boundY = boundWidth = boundHeight = -1;
    hasBounds = 0;

    preferedConfig = NULL;
    image = NULL;

    jBitmapOptionsClass = env->FindClass(
                        "org/beyka/tiffbitmapfactory/TiffBitmapFactory$Options");
    jIProgressListenerClass = env->FindClass("org/beyka/tiffbitmapfactory/IProgressListener");
    jThreadClass = env->FindClass("java/lang/Thread");
}

NativeDecoder::~NativeDecoder()
{
    LOGI("Destructor");
    if (image) {
        TIFFClose(image);
        image = NULL;
    }

    //Release global reference for Bitmap.Config
    if (preferedConfig) {
        env->DeleteGlobalRef(preferedConfig);
        preferedConfig = NULL;
    }

    if (jBitmapOptionsClass) {
        env->DeleteLocalRef(jBitmapOptionsClass);
        jBitmapOptionsClass = NULL;
    }

    if (jIProgressListenerClass) {
        env->DeleteLocalRef(jIProgressListenerClass);
        jIProgressListenerClass = NULL;
    }

    if (jThreadClass) {
            env->DeleteLocalRef(jThreadClass);
            jThreadClass = NULL;
        }
}

jobject NativeDecoder::getBitmap()
{
        //init signal handler for catch SIGSEGV error that could be raised in libtiff
        struct sigaction act;
        memset(&act, 0, sizeof(act));
        sigemptyset(&act.sa_mask);
        act.sa_sigaction = generalErrorHandler;
        act.sa_flags = SA_SIGINFO | SA_ONSTACK;
        if(sigaction(SIGSEGV, &act, 0) < 0) {
            LOGE("Can\'t setup signal handler. Working without errors catching mechanism");
        }

        //check for error
        if (setjmp(NativeDecoder::general_buf)) {
             const char * err = "Caught SIGSEGV signal(Segmentation fault or invalid memory reference)";
             LOGE(err);
             if (throwException) {
                 throwDecodeFileException(err);
             }
            return NULL;
        }

        //Get options from TiffBitmapFactory$Options
        jfieldID gOptions_ThrowExceptionFieldID = env->GetFieldID(jBitmapOptionsClass,
                                                                          "inThrowException",
                                                                          "Z");
        throwException = env->GetBooleanField(optionsObject, gOptions_ThrowExceptionFieldID);

        jfieldID gOptions_UseOrientationTagFieldID = env->GetFieldID(jBitmapOptionsClass,
                                                                                  "inUseOrientationTag",
                                                                                  "Z");
        useOrientationTag = env->GetBooleanField(optionsObject, gOptions_UseOrientationTagFieldID);

        jfieldID gOptions_sampleSizeFieldID = env->GetFieldID(jBitmapOptionsClass, "inSampleSize", "I");
        jint inSampleSize = env->GetIntField(optionsObject, gOptions_sampleSizeFieldID);
        if (inSampleSize != 1 && inSampleSize % 2 != 0) {
            const char *message = "inSampleSize should be power of 2\0";
            LOGE(message);
            if (throwException) {
                throwDecodeFileException(message);
            }
            return NULL;
        }

        jfieldID gOptions_justDecodeBoundsFieldID = env->GetFieldID(jBitmapOptionsClass,
                                                                    "inJustDecodeBounds", "Z");
        jboolean inJustDecodeBounds = env->GetBooleanField(optionsObject, gOptions_justDecodeBoundsFieldID);

        jfieldID gOptions_invertRedAndBlueFieldID = env->GetFieldID(jBitmapOptionsClass,
                                                                    "inSwapRedBlueColors", "Z");
        invertRedAndBlue = env->GetBooleanField(optionsObject, gOptions_invertRedAndBlueFieldID);

        jfieldID gOptions_DirectoryCountFieldID = env->GetFieldID(jBitmapOptionsClass,
                                                                  "inDirectoryNumber",
                                                                  "I");
        jint inDirectoryNumber = env->GetIntField(optionsObject, gOptions_DirectoryCountFieldID);
        LOGII("param directoryCount", inDirectoryNumber);

        jfieldID gOptions_AvailableMemoryFieldID = env->GetFieldID(jBitmapOptionsClass,
                                                                  "inAvailableMemory",
                                                                  "J");
        unsigned long inAvailableMemory = env->GetLongField(optionsObject, gOptions_AvailableMemoryFieldID);

        jfieldID gOptions_PreferedConfigFieldID = env->GetFieldID(jBitmapOptionsClass,
                                                                  "inPreferredConfig",
                                                                  "Lorg/beyka/tiffbitmapfactory/TiffBitmapFactory$ImageConfig;");
        jobject config = env->GetObjectField(optionsObject, gOptions_PreferedConfigFieldID);

        if (inAvailableMemory > 0) {
            availableMemory = inAvailableMemory;
        }

        if (config == NULL) {
            LOGI("config is NULL, creating default options");
            jclass bitmapConfig = env->FindClass(
                    "org/beyka/tiffbitmapfactory/TiffBitmapFactory$ImageConfig");
            jfieldID argb8888FieldID = env->GetStaticFieldID(bitmapConfig, "ARGB_8888",
                                                             "Lorg/beyka/tiffbitmapfactory/TiffBitmapFactory$ImageConfig;");
            config = env->GetStaticObjectField(bitmapConfig, argb8888FieldID);
            env->DeleteLocalRef(bitmapConfig);
        }
        preferedConfig = env->NewGlobalRef(config);
        env->DeleteLocalRef(config);

        jfieldID gOptions_DecodeAreaFieldId = env->GetFieldID(jBitmapOptionsClass, "inDecodeArea",
                                                                "Lorg/beyka/tiffbitmapfactory/DecodeArea;");
        jobject decodeArea = env->GetObjectField(optionsObject, gOptions_DecodeAreaFieldId);

        //if directory number < 0 set it to 0
        if (inDirectoryNumber < 0) inDirectoryNumber = 0;

        //Open tiff file
        LOGIS("nativeTiffOpen", strPath);
        const char *strPath = NULL;
        if (decodingMode == DECODE_MODE_FILE_DESCRIPTOR) {
            image = TIFFFdOpen(jFd, "", "r");
        } else if (decodingMode == DECODE_MODE_FILE_PATH) {
            strPath = env->GetStringUTFChars(jPath, 0);
            image = TIFFOpen(strPath, "r");
        }

        if (image == NULL) {
            if (throwException) {
                throwCantOpenFileException();
            }

            if (decodingMode == DECODE_MODE_FILE_PATH) {
                LOGES("Can\'t open bitmap", strPath);
                env->ReleaseStringUTFChars(jPath, strPath);
            } else {
                LOGEI("Can\'t open file descriptor", jFd);
            }
            return NULL;
        } else {
            if (decodingMode == DECODE_MODE_FILE_PATH) {
                env->ReleaseStringUTFChars(jPath, strPath);
            }
        }
        LOGI("Tiff is open");

        TIFFSetDirectory(image, inDirectoryNumber);
        TIFFGetField(image, TIFFTAG_IMAGEWIDTH, &origwidth);
        TIFFGetField(image, TIFFTAG_IMAGELENGTH, &origheight);

        //Read decode bounds if exists
        if (decodeArea) {
            LOGI("Decode bounds present");
            jclass decodeAreaClass = env->FindClass("org/beyka/tiffbitmapfactory/DecodeArea");
            jfieldID xFieldID = env->GetFieldID(decodeAreaClass, "x", "I");
            jfieldID yFieldID = env->GetFieldID(decodeAreaClass, "y", "I");
            jfieldID widthFieldID = env->GetFieldID(decodeAreaClass, "width", "I");
            jfieldID heightFieldID = env->GetFieldID(decodeAreaClass, "height", "I");

            boundX = env->GetIntField(decodeArea, xFieldID);
            boundY = env->GetIntField(decodeArea, yFieldID);
            boundWidth = env->GetIntField(decodeArea, widthFieldID);
            boundHeight = env->GetIntField(decodeArea, heightFieldID);
            if (boundX >= origwidth-1) {
                const char *message = "X of left top corner of decode area should be less than image width";
                LOGE(*message);
                if (throwException) {
                    throwDecodeFileException(message);
                }
                env->DeleteLocalRef(decodeAreaClass);
                return NULL;
            }
            if (boundY >= origheight-1) {
                const char *message = "Y of left top corner of decode area should be less than image height";
                LOGE(*message);
                if (throwException) {
                    throwDecodeFileException(message);
                }
                env->DeleteLocalRef(decodeAreaClass);
                return NULL;
            }

            if (boundX < 0) boundX = 0;
            if (boundY < 0) boundY = 0;
            if (boundX + boundWidth >= origwidth) boundWidth = origwidth - boundX -1;
            if (boundY + boundHeight >= origheight) boundHeight = origheight - boundY -1;

            if (boundWidth < 1) {
                const char *message = "Width of decode area can\'t be less than 1";
                LOGE(*message);
                if (throwException) {
                    throwDecodeFileException(message);
                }
                env->DeleteLocalRef(decodeAreaClass);
                return NULL;
            }
            if (boundHeight < 1) {
                const char *message = "Height of decode area can\'t be less than 1";
                LOGE(*message);
                if (throwException) {
                    throwDecodeFileException(message);
                }
                env->DeleteLocalRef(decodeAreaClass);
                return NULL;
            }

            LOGII("Decode X", boundX);
            LOGII("Decode Y", boundY);
            LOGII("Decode width", boundWidth);
            LOGII("Decode height", boundHeight);

            hasBounds = 1;
            env->DeleteLocalRef(decodeAreaClass);
            env->DeleteLocalRef(decodeArea);
        }

        jobject java_bitmap = NULL;

        writeDataToOptions(inDirectoryNumber);

        if (!inJustDecodeBounds) {
            progressTotal = origwidth * origheight;
            sendProgress(0, progressTotal);
            java_bitmap = createBitmap(inSampleSize, inDirectoryNumber);
        }

        return java_bitmap;
}

jobject NativeDecoder::createBitmap(int inSampleSize, int directoryNumber)
{
//Read Config from options. Use ordinal field from ImageConfig class
    jint configInt = ARGB_8888;
    if(preferedConfig) {
        jclass configClass = env->FindClass(
            "org/beyka/tiffbitmapfactory/TiffBitmapFactory$ImageConfig");
        jfieldID ordinalFieldID = env->GetFieldID(configClass, "ordinal", "I");
        configInt = env->GetIntField(preferedConfig, ordinalFieldID);
        env->DeleteLocalRef(configClass);
    }

    int bitdepth = 1;
    TIFFGetField(image, TIFFTAG_BITSPERSAMPLE, &bitdepth);
    if (bitdepth != 1 && bitdepth != 4 && bitdepth != 8 && bitdepth != 16) {
        const char * err = "Only 1, 4, 8 and 16 bits per sample are supported";
        LOGE(err);
        if (throwException) {
            throwDecodeFileException(err);
        }
        return NULL;
    }

    int newBitmapWidth = 0;
    int newBitmapHeight = 0;

    jint *raster = NULL;

    if (!hasBounds) {
        switch(getDecodeMethod()) {
            case DECODE_METHOD_IMAGE:
                raster = getSampledRasterFromImage(inSampleSize, &newBitmapWidth, &newBitmapHeight);
                break;
            case DECODE_METHOD_TILE:
                raster = getSampledRasterFromTile(inSampleSize, &newBitmapWidth, &newBitmapHeight);
                break;
            case DECODE_METHOD_STRIP:
                raster = getSampledRasterFromStrip(inSampleSize,  &newBitmapWidth, &newBitmapHeight);
                break;
        }
    } else {
        switch(getDecodeMethod()) {
            case DECODE_METHOD_IMAGE:
                raster = getSampledRasterFromImageWithBounds(inSampleSize, &newBitmapWidth, &newBitmapHeight);
                break;
            case DECODE_METHOD_TILE:
                raster = getSampledRasterFromTileWithBounds(inSampleSize, &newBitmapWidth, &newBitmapHeight);
                break;
            case DECODE_METHOD_STRIP:
                raster = getSampledRasterFromStripWithBounds(inSampleSize,  &newBitmapWidth, &newBitmapHeight);
                break;
        }

    }

    if (raster == NULL) {
        return NULL;
    }

    // Convert ABGR to ARGB
    if (invertRedAndBlue) {
        int i = 0;
        int j = 0;
        int tmp = 0;
        for (i = 0; i < newBitmapHeight; i++) {
            for (j = 0; j < newBitmapWidth; j++) {
                tmp = raster[j + newBitmapWidth * i];
                raster[j + newBitmapWidth * i] =
                        (tmp & 0xff000000) | ((tmp & 0x00ff0000) >> 16) | (tmp & 0x0000ff00) |
                        ((tmp & 0xff) << 16);
            }
        }
    }

    sendProgress(progressTotal, progressTotal);

    if(checkStop()) {
        if (raster) {
            free(raster);
        }
        LOGI("Thread stopped");
        return NULL;
    }

    //Class and field for Bitmap.Config
    jclass bitmapConfigClass = env->FindClass("android/graphics/Bitmap$Config");
    jfieldID bitmapConfigField = NULL;
    void *processedBuffer = NULL;
    if (configInt == ARGB_8888) {
        processedBuffer = raster;
        bitmapConfigField = env->GetStaticFieldID(bitmapConfigClass, "ARGB_8888",
                                                  "Landroid/graphics/Bitmap$Config;");
    } else if (configInt == ALPHA_8) {
        processedBuffer = createBitmapAlpha8(raster, newBitmapWidth,
                                             newBitmapHeight);
        bitmapConfigField = env->GetStaticFieldID(bitmapConfigClass, "ALPHA_8",
                                                  "Landroid/graphics/Bitmap$Config;");
    } else if (configInt == RGB_565) {
        processedBuffer = createBitmapRGB565(raster, newBitmapWidth,
                                             newBitmapHeight);
        bitmapConfigField = env->GetStaticFieldID(bitmapConfigClass, "RGB_565",
                                                  "Landroid/graphics/Bitmap$Config;");
    }

    if (processedBuffer == NULL) {
        LOGE("Error while decoding image");
        return NULL;
    }

    //Create mutable bitmap
    jclass bitmapClass = env->FindClass("android/graphics/Bitmap");
    jmethodID methodid = env->GetStaticMethodID(bitmapClass, "createBitmap",
                                                "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;");

    //BitmapConfig
    jobject config = env->GetStaticObjectField(bitmapConfigClass, bitmapConfigField);

    env->DeleteLocalRef(bitmapConfigClass);

    jobject java_bitmap = NULL;

    if(checkStop()) {
        env->DeleteLocalRef(config);
        env->DeleteLocalRef(bitmapClass);
        if (processedBuffer) {
            free(processedBuffer);
        }
        LOGI("Thread stopped");
        return NULL;
    }

    if (!useOrientationTag) {
        java_bitmap = env->CallStaticObjectMethod(bitmapClass, methodid, newBitmapWidth,
                                                      newBitmapHeight, config);
    } else if (origorientation > 4) {
        java_bitmap = env->CallStaticObjectMethod(bitmapClass, methodid, newBitmapHeight,
                                                  newBitmapWidth, config);
    } else {
        java_bitmap = env->CallStaticObjectMethod(bitmapClass, methodid, newBitmapWidth,
                                                  newBitmapHeight, config);
    }

    //remove not used references
    env->DeleteLocalRef(config);
    env->DeleteLocalRef(bitmapClass);

    //Copy data to bitmap
    int ret;
    void *bitmapPixels;
    if ((ret = AndroidBitmap_lockPixels(env, java_bitmap, &bitmapPixels)) < 0) {
        //error
        LOGE("Lock pixels failed");
        return NULL;
    }
    int pixelsCount = newBitmapWidth * newBitmapHeight;

    if (configInt == ARGB_8888) {
        memcpy(bitmapPixels, (jint *) processedBuffer, sizeof(jint) * pixelsCount);
    } else if (configInt == ALPHA_8) {
        memcpy(bitmapPixels, (jbyte *) processedBuffer, sizeof(jbyte) * pixelsCount);
    } else if (configInt == RGB_565) {
        memcpy(bitmapPixels, (unsigned short *) processedBuffer,
               sizeof(unsigned short) * pixelsCount);
    }

    AndroidBitmap_unlockPixels(env, java_bitmap);

    //remove array
    free(processedBuffer);

    return java_bitmap;
}

jint * NativeDecoder::getSampledRasterFromStrip(int inSampleSize, int *bitmapwidth, int *bitmapheight) {

    //init signal handler for catch SIGSEGV error that could be raised in libtiff
    struct sigaction act;
    memset(&act, 0, sizeof(act));
    sigemptyset(&act.sa_mask);
    act.sa_sigaction = stripErrorHandler;
    act.sa_flags = SA_SIGINFO | SA_ONSTACK;
    if(sigaction(SIGSEGV, &act, 0) < 0) {
        LOGE("Can\'t setup signal handler. Working without errors catching mechanism");
    }

    LOGII("width", origwidth);
    LOGII("height", origheight);

    jint *pixels = NULL;
    *bitmapwidth = origwidth / inSampleSize;
    *bitmapheight = origheight / inSampleSize;
    uint32 pixelsBufferSize = *bitmapwidth * *bitmapheight;
    int origImageBufferSize = origwidth * origheight;

    LOGII("new width", *bitmapwidth);
    LOGII("new height", *bitmapheight);

    uint32 stripSize = TIFFStripSize (image);
    uint32 stripMax = TIFFNumberOfStrips (image);
    LOGII("strip size ", stripSize);
    LOGII("stripMax  ", stripMax);
    int rowPerStrip = -1;
    TIFFGetField(image, TIFFTAG_ROWSPERSTRIP, &rowPerStrip);
    LOGII("rowsperstrip", rowPerStrip);

    unsigned long estimateMem = 0;
    estimateMem += (sizeof(jint) * pixelsBufferSize); //buffer for decoded pixels
    estimateMem += (origwidth * sizeof(uint32)); //work line for rotate strip
    estimateMem += (origwidth * rowPerStrip * sizeof (uint32) * 2); //current and next strips
    estimateMem += (sizeof(jint) * origwidth * 2); //bottom and top lines for reading pixel(matrixBottomLine, matrixTopLine)
    LOGII("estimateMem", estimateMem);
    if (estimateMem > availableMemory) {
        if (throwException) {
            throw_not_enought_memory_exception(env, availableMemory, estimateMem);
        }
        return NULL;
    }

    pixels = (jint *) malloc(sizeof(jint) * pixelsBufferSize);
    if (pixels == NULL) {
        LOGE("Can\'t allocate memory for temp buffer");
        return NULL;
    }

    uint32* work_line_buf = (uint32 *)_TIFFmalloc(origwidth * sizeof(uint32));

    uint32* raster;
    uint32* rasterForBottomLine; // in this raster copy next strip for getting bottom line in matrix color selection
    if (rowPerStrip == -1 && stripMax == 1) {
            raster = (uint32 *)_TIFFmalloc(origImageBufferSize * sizeof (uint32));
            rasterForBottomLine = (uint32 *)_TIFFmalloc(origImageBufferSize * sizeof (uint32));
    } else {
            raster = (uint32 *)_TIFFmalloc(origwidth * rowPerStrip * sizeof (uint32));
            rasterForBottomLine = (uint32 *)_TIFFmalloc(origwidth * rowPerStrip * sizeof (uint32));
    }
    if (rowPerStrip == -1) {
            rowPerStrip = origheight;
    }

    int writedLines = 0;
    int nextStripOffset = 0;
    int globalLineCounter = 0;

    unsigned int *matrixTopLine = (uint32 *) malloc(sizeof(jint) * origwidth);
    unsigned int *matrixBottomLine = (uint32 *) malloc(sizeof(jint) * origwidth);

    int isSecondRasterExist = 0;
    int ok = 1;
    uint32 rows_to_write = 0;

    //check for error
    if (setjmp(NativeDecoder::strip_buf)) {
        if (raster) {
            _TIFFfree(raster);
            raster = NULL;
        }
        if (rasterForBottomLine) {
            _TIFFfree(rasterForBottomLine);
            rasterForBottomLine = NULL;
        }
        if (matrixTopLine) {
            _TIFFfree(matrixTopLine);
            matrixTopLine = NULL;
        }
        if (matrixBottomLine) {
            _TIFFfree(matrixBottomLine);
            matrixBottomLine = NULL;
        }

        const char * err = "Caught SIGSEGV signal(Segmentation fault or invalid memory reference)";
        LOGE(err);
        if (throwException) {
            throwDecodeFileException(err);
        }

        return NULL;
    }

    for (int i = 0; i < stripMax*rowPerStrip; i += rowPerStrip) {

            sendProgress(i * origwidth, progressTotal);

            //if second raster is exist - copy it to work raster end decode next strip
            if (isSecondRasterExist) {
                _TIFFmemcpy(raster, rasterForBottomLine, origwidth * rowPerStrip * sizeof (uint32));

                //If next strip is exist - decode it, invert lines
                if (i + rowPerStrip < stripMax*rowPerStrip) {
                    TIFFReadRGBAStrip(image, i+rowPerStrip, rasterForBottomLine);
                    isSecondRasterExist = 1;

                    rows_to_write = 0;
                    if ( i + rowPerStrip * 2 > origheight )
                        rows_to_write = origheight - i - rowPerStrip;
                    else
                        rows_to_write = rowPerStrip;

                    if (origorientation <= 4) {
                        for (int line = 0; line < rows_to_write / 2; line++) {
                            unsigned int  *top_line, *bottom_line;

                            top_line = rasterForBottomLine + origwidth * line;
                            bottom_line = rasterForBottomLine + origwidth * (rows_to_write - line - 1);

                            _TIFFmemcpy(work_line_buf, top_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(top_line, bottom_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(bottom_line, work_line_buf, sizeof(unsigned int) * origwidth);
                        }
                    }
                } else {
                    isSecondRasterExist = 0;
                }
            } else {
                //if second raster is not exist - first processing - read first and second raster
                 TIFFReadRGBAStrip(image, i, raster);
                 //invert lines, because libtiff origin is bottom left instead of top left
                 rows_to_write = 0;
                 if( i + rowPerStrip > origheight )
                    rows_to_write = origheight - i;
                 else
                    rows_to_write = rowPerStrip;

                 if (origorientation <= 4) {
                     for (int line = 0; line < rows_to_write / 2; line++) {
                         unsigned int  *top_line, *bottom_line;

                         top_line = raster + origwidth * line;
                         bottom_line = raster + origwidth * (rows_to_write - line - 1);

                         _TIFFmemcpy(work_line_buf, top_line, sizeof(unsigned int) * origwidth);
                         _TIFFmemcpy(top_line, bottom_line, sizeof(unsigned int) * origwidth);
                         _TIFFmemcpy(bottom_line, work_line_buf, sizeof(unsigned int) * origwidth);
                     }
                 }

                 //if next strip is exist - read it and invert lines
                 if (i + rowPerStrip < origheight) {
                    TIFFReadRGBAStrip(image, i+rowPerStrip, rasterForBottomLine);
                    isSecondRasterExist = 1;

                    //invert lines, because libtiff origin is bottom left instead of top left
                    rows_to_write = 0;
                    if ( i + rowPerStrip * 2 > origheight )
                        rows_to_write = origheight - i - rowPerStrip;
                    else
                        rows_to_write = rowPerStrip;
                    if (origorientation <= 4) {
                        for (int line = 0; line < rows_to_write / 2; line++) {
                            unsigned int  *top_line, *bottom_line;

                            top_line = rasterForBottomLine + origwidth * line;
                            bottom_line = rasterForBottomLine + origwidth * (rows_to_write - line - 1);

                            _TIFFmemcpy(work_line_buf, top_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(top_line, bottom_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(bottom_line, work_line_buf, sizeof(unsigned int) * origwidth);
                        }
                    }
                 }

            }

            if (inSampleSize == 1) {
                int byteToCopy = 0;
                if (i + rowPerStrip < origheight) {
                    byteToCopy = sizeof(unsigned int) * rowPerStrip * origwidth;
                } else {
                    byteToCopy = sizeof(unsigned int) * rows_to_write * origwidth;
                }
                int position = i * origwidth;
                memcpy(&pixels[position], raster, byteToCopy);
                //sendProgress(position, progressTotal);
            } else {
                if (isSecondRasterExist) {
                    _TIFFmemcpy(matrixBottomLine, rasterForBottomLine /*+ lineAddrToCopyBottomLine * origwidth*/, sizeof(unsigned int) * origwidth);
                }
                 int workWritedLines = writedLines;
                 for (int resBmpY = workWritedLines, workY = 0; resBmpY < *bitmapheight && workY < rowPerStrip; /*wj++,*/ workY ++/*= inSampleSize*/) {

                 if (checkStop()) {
                     if (raster) {
                         _TIFFfree(raster);
                         raster = NULL;
                     }
                     if (rasterForBottomLine) {
                         _TIFFfree(rasterForBottomLine);
                         rasterForBottomLine = NULL;
                     }
                     if (matrixTopLine) {
                         _TIFFfree(matrixTopLine);
                         matrixTopLine = NULL;
                     }
                     if (matrixBottomLine) {
                         _TIFFfree(matrixBottomLine);
                         matrixBottomLine = NULL;
                     }
                     LOGI("Thread stopped");
                     return NULL;
                 }

                    // if total line of source image is equal to inSampleSize*N then process this line
                    if (globalLineCounter % inSampleSize == 0) {
                        for (int resBmpX = 0, workX = 0; resBmpX < *bitmapwidth; resBmpX++, workX += inSampleSize) {

                            //Apply filter to pixel
                            jint crPix = raster[workY * origwidth + workX];
                            int sum = 1;


                            int alpha = colorMask & crPix >> 24;
                            int red = colorMask & crPix >> 16;
                            int green = colorMask & crPix >> 8;
                            int blue = colorMask & crPix;


                            //topleft
                            if (workX - 1 >= 0 && workY - 1 >= 0) {
                                crPix = raster[(workY - 1) * origwidth + workX - 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            } else if (workX - 1 >= 0 && workY - 1 == -1 && globalLineCounter > 0) {
                                crPix = matrixTopLine[workX - 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }
                            //top
                            if (workY - 1 >= 0) {
                                crPix = raster[(workY - 1) * origwidth + workX];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            } else if (workY - 1 == -1 && globalLineCounter > 0) {
                                crPix = matrixTopLine[workX];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }

                            // topright
                            if (workX + 1 < origwidth && workY - 1 >= 0) {
                                crPix = raster[(workY - 1) * origwidth + workX + 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            } else if (workX + 1 < origwidth && workY - 1 == -1 && globalLineCounter > 0) {
                                crPix = matrixTopLine[workX + 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }

                            //right
                            if (workX + 1 < origwidth) {
                                crPix = raster[workY * origwidth + workX + 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }

                            //bottomright
                            if (workX + 1 < origwidth && workY + 1 < rowPerStrip) {
                                crPix = raster[(workY + 1) * origwidth + workX + 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            } else if (workX + 1 < origwidth && workY + 1 == rowPerStrip && isSecondRasterExist) {
                                crPix = matrixBottomLine[workX + 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }

                            //bottom
                            if (workY + 1 < rowPerStrip) {
                                crPix = raster[(workY + 1) * origwidth + workX + 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            } else if (workY + 1 == rowPerStrip && isSecondRasterExist) {
                                crPix = matrixBottomLine[workX + 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }

                            //bottomleft
                            if (workX - 1 >= 0 && workY + 1 < rowPerStrip) {
                                crPix = raster[(workY + 1) * origwidth + workX - 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            } else if (workX - 1 >= 0 && workY + 1 == rowPerStrip  && isSecondRasterExist) {
                                crPix = matrixBottomLine[workX - 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }


                            //left
                            if (workX - 1 >= 0) {
                                crPix = raster[workY * origwidth + workX - 1];
                                red += colorMask & crPix >> 16;
                                green += colorMask & crPix >> 8;
                                blue += colorMask & crPix;
                                alpha += colorMask & crPix >> 24;
                                sum++;
                            }

                            red /= sum;
                            if (red > 255) red = 255;
                            if (red < 0) red = 0;

                            green /= sum;
                            if (green > 255) green = 255;
                            if (green < 0) green = 0;

                            blue /= sum;
                            if (blue > 255) blue = 255;
                            if (blue < 0) blue = 0;

                            alpha /= sum;///= sum;
                            if (alpha > 255) alpha = 255;
                            if (alpha < 0) alpha = 0;

                            crPix = (alpha << 24) | (red << 16) | (green << 8) | (blue);

                            pixels[resBmpY * *bitmapwidth + resBmpX] = crPix;
                        }
                        //if line was processed - increment counter of lines that was writed to result image
                        writedLines++;
                        //and incremetncounter of current Y for writing
                        resBmpY++;
                    }
                    if (workY == rowPerStrip - 1 && i + rowPerStrip < origheight) {
                        _TIFFmemcpy(matrixTopLine, raster + workY * origwidth, sizeof(unsigned int) * origwidth);
                    }
                    //incremetn global source image line counter
                    globalLineCounter++;

                }
            }
        }
        LOGI("Decoding finished. Free memmory");

        //Close Buffers
        if (raster) {
            _TIFFfree(raster);
            raster = NULL;
        }

        if (rasterForBottomLine) {
            _TIFFfree(rasterForBottomLine);
            rasterForBottomLine = NULL;
        }

        if (matrixTopLine) {
            _TIFFfree(matrixTopLine);
            matrixTopLine = NULL;
        }

        if (matrixBottomLine) {
            _TIFFfree(matrixBottomLine);
            matrixBottomLine = NULL;
        }

        if (useOrientationTag) {
            uint32 buf;
            //fixOrientation(pixels, pixelsBufferSize, *bitmapwidth, *bitmapheight);
            switch(origorientation) {
                 case ORIENTATION_TOPLEFT:
                 case ORIENTATION_TOPRIGHT:
                    break;
                 case ORIENTATION_BOTRIGHT:
                 case ORIENTATION_BOTLEFT:
                    flipPixelsVertical(*bitmapwidth, *bitmapheight, pixels);
                    break;
                 case ORIENTATION_LEFTTOP:
                    rotateRaster(pixels, 90, bitmapwidth, bitmapheight);
                    flipPixelsHorizontal(*bitmapwidth, *bitmapheight, pixels);
                    buf = *bitmapwidth;
                    *bitmapwidth = *bitmapheight;
                    *bitmapheight = buf;
                    break;
                 case ORIENTATION_RIGHTTOP:
                    rotateRaster(pixels, 270, bitmapwidth, bitmapheight);
                    flipPixelsHorizontal(*bitmapwidth, *bitmapheight, pixels);
                    buf = *bitmapwidth;
                    *bitmapwidth = *bitmapheight;
                    *bitmapheight = buf;
                    break;
                 case ORIENTATION_RIGHTBOT:
                    rotateRaster(pixels, 90, bitmapwidth, bitmapheight);
                    buf= *bitmapwidth;
                    *bitmapwidth = *bitmapheight;
                    *bitmapheight = buf;
                    break;
                 case ORIENTATION_LEFTBOT:
                    rotateRaster(pixels, 270, bitmapwidth, bitmapheight);
                    buf = *bitmapwidth;
                    *bitmapwidth = *bitmapheight;
                    *bitmapheight = buf;
                    break;
            }

        } else if (origorientation == 2 || origorientation == 3 || origorientation == 6 || origorientation == 7) {
            flipPixelsHorizontal(*bitmapwidth, *bitmapheight, pixels);
        }

        return pixels;
}

jint * NativeDecoder::getSampledRasterFromStripWithBounds(int inSampleSize, int *bitmapwidth, int *bitmapheight) {

    //init signal handler for catch SIGSEGV error that could be raised in libtiff
    struct sigaction act;
    memset(&act, 0, sizeof(act));
    sigemptyset(&act.sa_mask);
    act.sa_sigaction = stripErrorHandler;
    act.sa_flags = SA_SIGINFO | SA_ONSTACK;
    if(sigaction(SIGSEGV, &act, 0) < 0) {
        LOGE("Can\'t setup signal handler. Working without errors catching mechanism");
    }

    LOGII("width", origwidth);
    LOGII("height", origheight);

    jint *pixels = NULL;
    *bitmapwidth = origwidth / inSampleSize;
    *bitmapheight = boundHeight / inSampleSize;//origheight / inSampleSize;
    uint32 pixelsBufferSize = *bitmapwidth * *bitmapheight;
    int origImageBufferSize = origwidth * origheight;

    LOGII("new width", *bitmapwidth);
    LOGII("new height", *bitmapheight);

    uint32 stripSize = TIFFStripSize (image);
    uint32 stripMax = TIFFNumberOfStrips (image);
    LOGII("strip size ", stripSize);
    LOGII("stripMax  ", stripMax);
    int rowPerStrip = -1;
    TIFFGetField(image, TIFFTAG_ROWSPERSTRIP, &rowPerStrip);
    LOGII("rowsperstrip", rowPerStrip);

    unsigned long estimateMem = 0;
    estimateMem += (sizeof(jint) * pixelsBufferSize); //temp buffer for decoded pixels
    estimateMem += (sizeof(jint) * (boundWidth / inSampleSize) * (boundHeight/inSampleSize)); //final buffer that will store original image
    estimateMem += (origwidth * sizeof(uint32)); //work line for rotate strip
    estimateMem += (origwidth * rowPerStrip * sizeof (uint32) * 2); //current and next strips
    estimateMem += (sizeof(jint) * origwidth * 2); //bottom and top lines for reading pixel(matrixBottomLine, matrixTopLine)
    LOGII("estimateMem", estimateMem);
    if (estimateMem > availableMemory) {
        if (throwException) {
            throw_not_enought_memory_exception(env, availableMemory, estimateMem);
        }
        return NULL;
    }

    progressTotal = pixelsBufferSize + (boundWidth/inSampleSize) * (boundHeight / inSampleSize);
    sendProgress(0, progressTotal);
    jlong processedProgress = 0;

    pixels = (jint *) malloc(sizeof(jint) * pixelsBufferSize);
    if (pixels == NULL) {
        LOGE("Can\'t allocate memory for temp buffer");
        return NULL;
    }

    uint32* work_line_buf = (uint32 *)_TIFFmalloc(origwidth * sizeof(uint32));

    uint32* raster;
    uint32* rasterForBottomLine; // in this raster copy next strip for getting bottom line in matrix color selection
    if (rowPerStrip == -1 && stripMax == 1) {
            raster = (uint32 *)_TIFFmalloc(origImageBufferSize * sizeof (uint32));
            rasterForBottomLine = (uint32 *)_TIFFmalloc(origImageBufferSize * sizeof (uint32));
    } else {
            raster = (uint32 *)_TIFFmalloc(origwidth * rowPerStrip * sizeof (uint32));
            rasterForBottomLine = (uint32 *)_TIFFmalloc(origwidth * rowPerStrip * sizeof (uint32));
    }
    if (rowPerStrip == -1) {
            rowPerStrip = origheight;
    }

    int writedLines = 0;
    int nextStripOffset = 0;
    int globalLineCounter = 0;

    unsigned int *matrixTopLine = (uint32 *) malloc(sizeof(jint) * origwidth);
    unsigned int *matrixBottomLine = (uint32 *) malloc(sizeof(jint) * origwidth);

    int isSecondRasterExist = 0;
    int ok = 1;
    uint32 rows_to_write = 0;

    //check for error
    if (setjmp(NativeDecoder::strip_buf)) {
        if (raster) {
            _TIFFfree(raster);
            raster = NULL;
        }
        if (rasterForBottomLine) {
            _TIFFfree(rasterForBottomLine);
            rasterForBottomLine = NULL;
        }
        if (matrixTopLine) {
            _TIFFfree(matrixTopLine);
            matrixTopLine = NULL;
        }
        if (matrixBottomLine) {
            _TIFFfree(matrixBottomLine);
            matrixBottomLine = NULL;
        }

        const char * err = "Caught SIGSEGV signal(Segmentation fault or invalid memory reference)";
        LOGE(err);
        if (throwException) {
            throwDecodeFileException(err);
        }

        return NULL;
    }

    for (int i = 0; (i < stripMax*rowPerStrip || i > boundY + boundHeight) ; i += rowPerStrip) {

            if (i + rowPerStrip <= boundY) {
                continue;
            }
            if (i > boundY + boundHeight) {
                break;
            }

            sendProgress(processedProgress * *bitmapwidth, progressTotal);
            processedProgress += rowPerStrip/inSampleSize;

            //if second raster is exist - copy it to work raster end decode next strip
            if (isSecondRasterExist) {
                _TIFFmemcpy(raster, rasterForBottomLine, origwidth * rowPerStrip * sizeof (uint32));

                //If next strip is exist - decode it, invert lines
                if (i + rowPerStrip < stripMax*rowPerStrip) {
                    TIFFReadRGBAStrip(image, i+rowPerStrip, rasterForBottomLine);
                    isSecondRasterExist = 1;

                    rows_to_write = 0;
                    if ( i + rowPerStrip * 2 > origheight )
                        rows_to_write = origheight - i - rowPerStrip;
                    else
                        rows_to_write = rowPerStrip;

                    if (origorientation <= 4) {
                        for (int line = 0; line < rows_to_write / 2; line++) {
                            unsigned int  *top_line, *bottom_line;

                            top_line = rasterForBottomLine + origwidth * line;
                            bottom_line = rasterForBottomLine + origwidth * (rows_to_write - line - 1);

                            _TIFFmemcpy(work_line_buf, top_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(top_line, bottom_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(bottom_line, work_line_buf, sizeof(unsigned int) * origwidth);
                        }
                    }
                } else {
                    isSecondRasterExist = 0;
                }
            } else {
                //if second raster is not exist - first processing - read first and second raster
                 TIFFReadRGBAStrip(image, i, raster);
                 //invert lines, because libtiff origin is bottom left instead of top left
                 rows_to_write = 0;
                 if( i + rowPerStrip > origheight )
                    rows_to_write = origheight - i;
                 else
                    rows_to_write = rowPerStrip;

                 if (origorientation <= 4) {
                     for (int line = 0; line < rows_to_write / 2; line++) {
                         unsigned int  *top_line, *bottom_line;

                         top_line = raster + origwidth * line;
                         bottom_line = raster + origwidth * (rows_to_write - line - 1);

                         _TIFFmemcpy(work_line_buf, top_line, sizeof(unsigned int) * origwidth);
                         _TIFFmemcpy(top_line, bottom_line, sizeof(unsigned int) * origwidth);
                         _TIFFmemcpy(bottom_line, work_line_buf, sizeof(unsigned int) * origwidth);
                     }
                 }

                 //if next strip is exist - read it and invert lines
                 if (i + rowPerStrip < origheight) {
                    TIFFReadRGBAStrip(image, i+rowPerStrip, rasterForBottomLine);
                    isSecondRasterExist = 1;

                    //invert lines, because libtiff origin is bottom left instead of top left
                    rows_to_write = 0;
                    if ( i + rowPerStrip * 2 > origheight )
                        rows_to_write = origheight - i - rowPerStrip;
                    else
                        rows_to_write = rowPerStrip;
                    if (origorientation <= 4) {
                        for (int line = 0; line < rows_to_write / 2; line++) {
                            unsigned int  *top_line, *bottom_line;

                            top_line = rasterForBottomLine + origwidth * line;
                            bottom_line = rasterForBottomLine + origwidth * (rows_to_write - line - 1);

                            _TIFFmemcpy(work_line_buf, top_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(top_line, bottom_line, sizeof(unsigned int) * origwidth);
                            _TIFFmemcpy(bottom_line, work_line_buf, sizeof(unsigned int) * origwidth);
                        }
                    }
                 }

            }

            /*if (inSampleSize == 1) {
                int byteToCopy = 0;
                if (i + rowPerStrip < origheight) {
                    byteToCopy = sizeof(unsigned int) * rowPerStrip * origwidth;
                } else {
                    byteToCopy = sizeof(unsigned int) * rows_to_write * origwidth;
                }
                int position = i * origwidth;
                memcpy(&pixels[position], raster, byteToCopy);
                //sendProgress(position, progressTotal);
            } else {*/
Download .txt
gitextract_fbcwkp2b/

├── .gitignore
├── CHANGELOG.txt
├── README.md
├── build.gradle
├── license.txt
├── proguard-rules.pro
└── src/
    ├── androidTest/
    │   └── java/
    │       └── org/
    │           └── beyka/
    │               └── tiffbitmapfactory/
    │                   └── ApplicationTest.java
    └── main/
        ├── .gitignore
        ├── AndroidManifest.xml
        ├── java/
        │   └── org/
        │       └── beyka/
        │           └── tiffbitmapfactory/
        │               ├── CompressionScheme.java
        │               ├── DecodeArea.java
        │               ├── FillOrder.java
        │               ├── IProgressListener.java
        │               ├── ImageFormat.java
        │               ├── Orientation.java
        │               ├── Photometric.java
        │               ├── PlanarConfig.java
        │               ├── ResolutionUnit.java
        │               ├── TiffBitmapFactory.java
        │               ├── TiffConverter.java
        │               ├── TiffSaver.java
        │               └── exceptions/
        │                   ├── CantOpenFileException.java
        │                   ├── DecodeTiffException.java
        │                   └── NotEnoughtMemoryException.java
        ├── jni/
        │   ├── Android.mk
        │   ├── Application.mk
        │   ├── BMP.h
        │   ├── BaseTiffConverter.cpp
        │   ├── BaseTiffConverter.h
        │   ├── BitmapReader.cpp
        │   ├── BitmapReader.h
        │   ├── BmpToTiffConverter.cpp
        │   ├── BmpToTiffConverter.h
        │   ├── JpgToTiffConverter.cpp
        │   ├── JpgToTiffConverter.h
        │   ├── NativeDecoder.cpp
        │   ├── NativeDecoder.h
        │   ├── NativeExceptions.cpp
        │   ├── NativeExceptions.h
        │   ├── NativeTiffBitmapFactory.cpp
        │   ├── NativeTiffBitmapFactory.h
        │   ├── NativeTiffConverter.cpp
        │   ├── NativeTiffConverter.h
        │   ├── NativeTiffSaver.cpp
        │   ├── NativeTiffSaver.h
        │   ├── PngToTiffConverter.cpp
        │   ├── PngToTiffConverter.h
        │   ├── TiffToBmpConverter.cpp
        │   ├── TiffToBmpConverter.h
        │   ├── TiffToJpgConverter.cpp
        │   ├── TiffToJpgConverter.h
        │   ├── TiffToPngConverter.cpp
        │   ├── TiffToPngConverter.h
        │   ├── jpeg/
        │   │   ├── jconfig.h
        │   │   ├── jerror.h
        │   │   ├── jmorecfg.h
        │   │   └── jpeglib.h
        │   ├── libs/
        │   │   ├── arm64-v8a/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── armeabi/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── armeabi-v7a/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── mips/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── mips64/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   ├── x86/
        │   │   │   ├── libjpeg.a
        │   │   │   └── libpng.a
        │   │   └── x86_64/
        │   │       ├── libjpeg.a
        │   │       └── libpng.a
        │   ├── png/
        │   │   ├── config.h
        │   │   ├── png.h
        │   │   ├── pngconf.h
        │   │   └── pngpriv.h
        │   ├── tiff/
        │   │   ├── Android.mk
        │   │   ├── COPYRIGHT
        │   │   ├── ChangeLog
        │   │   ├── HOWTO-RELEASE
        │   │   ├── Makefile.am
        │   │   ├── Makefile.in
        │   │   ├── Makefile.vc
        │   │   ├── README
        │   │   ├── README.android
        │   │   ├── README.vms
        │   │   ├── RELEASE-DATE
        │   │   ├── SConstruct
        │   │   ├── TODO
        │   │   ├── VERSION
        │   │   ├── aclocal.m4
        │   │   ├── autogen.sh
        │   │   ├── build/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   └── README
        │   │   ├── config/
        │   │   │   ├── compile
        │   │   │   ├── config.guess
        │   │   │   ├── config.sub
        │   │   │   ├── depcomp
        │   │   │   ├── install-sh
        │   │   │   ├── ltmain.sh
        │   │   │   ├── missing
        │   │   │   └── mkinstalldirs
        │   │   ├── configure
        │   │   ├── configure.ac
        │   │   ├── configure.com
        │   │   ├── contrib/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── README
        │   │   │   ├── acorn/
        │   │   │   │   ├── Makefile.acorn
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── ReadMe
        │   │   │   │   ├── SetVars
        │   │   │   │   ├── cleanlib
        │   │   │   │   ├── convert
        │   │   │   │   └── install
        │   │   │   ├── addtiffo/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── Makefile.vc
        │   │   │   │   ├── README
        │   │   │   │   ├── addtiffo.c
        │   │   │   │   ├── tif_overview.c
        │   │   │   │   ├── tif_ovrcache.c
        │   │   │   │   └── tif_ovrcache.h
        │   │   │   ├── dbs/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── tiff-bi.c
        │   │   │   │   ├── tiff-grayscale.c
        │   │   │   │   ├── tiff-palette.c
        │   │   │   │   ├── tiff-rgb.c
        │   │   │   │   └── xtiff/
        │   │   │   │       ├── Makefile.am
        │   │   │   │       ├── Makefile.in
        │   │   │   │       ├── README
        │   │   │   │       ├── patchlevel.h
        │   │   │   │       ├── xtiff.c
        │   │   │   │       └── xtifficon.h
        │   │   │   ├── iptcutil/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── iptcutil.c
        │   │   │   │   ├── test.iptc
        │   │   │   │   └── test.txt
        │   │   │   ├── mac-cw/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── Makefile.script
        │   │   │   │   ├── README
        │   │   │   │   ├── mac_main.c
        │   │   │   │   ├── mac_main.h
        │   │   │   │   ├── metrowerks.note
        │   │   │   │   ├── mkg3_main.c
        │   │   │   │   └── version.h
        │   │   │   ├── mac-mpw/
        │   │   │   │   ├── BUILD.mpw
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── libtiff.make
        │   │   │   │   ├── mactrans.c
        │   │   │   │   ├── port.make
        │   │   │   │   ├── tools.make
        │   │   │   │   └── top.make
        │   │   │   ├── mfs/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   └── mfs_file.c
        │   │   │   ├── pds/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── tif_imageiter.c
        │   │   │   │   ├── tif_imageiter.h
        │   │   │   │   ├── tif_pdsdirread.c
        │   │   │   │   └── tif_pdsdirwrite.c
        │   │   │   ├── ras/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── ras2tif.c
        │   │   │   │   └── tif2ras.c
        │   │   │   ├── stream/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── tiffstream.cpp
        │   │   │   │   └── tiffstream.h
        │   │   │   ├── tags/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── README
        │   │   │   │   ├── listtif.c
        │   │   │   │   ├── maketif.c
        │   │   │   │   ├── xtif_dir.c
        │   │   │   │   ├── xtiffio.h
        │   │   │   │   └── xtiffiop.h
        │   │   │   └── win_dib/
        │   │   │       ├── Makefile.am
        │   │   │       ├── Makefile.in
        │   │   │       ├── Makefile.w95
        │   │   │       ├── README.Tiffile
        │   │   │       ├── README.tiff2dib
        │   │   │       ├── Tiffile.cpp
        │   │   │       └── tiff2dib.c
        │   │   ├── html/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── TIFFTechNote2.html
        │   │   │   ├── addingtags.html
        │   │   │   ├── bugs.html
        │   │   │   ├── build.html
        │   │   │   ├── contrib.html
        │   │   │   ├── document.html
        │   │   │   ├── images/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   └── Makefile.in
        │   │   │   ├── images.html
        │   │   │   ├── index.html
        │   │   │   ├── internals.html
        │   │   │   ├── intro.html
        │   │   │   ├── libtiff.html
        │   │   │   ├── man/
        │   │   │   │   ├── Makefile.am
        │   │   │   │   ├── Makefile.in
        │   │   │   │   ├── TIFFClose.3tiff.html
        │   │   │   │   ├── TIFFDataWidth.3tiff.html
        │   │   │   │   ├── TIFFError.3tiff.html
        │   │   │   │   ├── TIFFFlush.3tiff.html
        │   │   │   │   ├── TIFFGetField.3tiff.html
        │   │   │   │   ├── TIFFOpen.3tiff.html
        │   │   │   │   ├── TIFFPrintDirectory.3tiff.html
        │   │   │   │   ├── TIFFRGBAImage.3tiff.html
        │   │   │   │   ├── TIFFReadDirectory.3tiff.html
        │   │   │   │   ├── TIFFReadEncodedStrip.3tiff.html
        │   │   │   │   ├── TIFFReadEncodedTile.3tiff.html
        │   │   │   │   ├── TIFFReadRGBAImage.3tiff.html
        │   │   │   │   ├── TIFFReadRGBAStrip.3tiff.html
        │   │   │   │   ├── TIFFReadRGBATile.3tiff.html
        │   │   │   │   ├── TIFFReadRawStrip.3tiff.html
        │   │   │   │   ├── TIFFReadRawTile.3tiff.html
        │   │   │   │   ├── TIFFReadScanline.3tiff.html
        │   │   │   │   ├── TIFFReadTile.3tiff.html
        │   │   │   │   ├── TIFFSetDirectory.3tiff.html
        │   │   │   │   ├── TIFFSetField.3tiff.html
        │   │   │   │   ├── TIFFWarning.3tiff.html
        │   │   │   │   ├── TIFFWriteDirectory.3tiff.html
        │   │   │   │   ├── TIFFWriteEncodedStrip.3tiff.html
        │   │   │   │   ├── TIFFWriteEncodedTile.3tiff.html
        │   │   │   │   ├── TIFFWriteRawStrip.3tiff.html
        │   │   │   │   ├── TIFFWriteRawTile.3tiff.html
        │   │   │   │   ├── TIFFWriteScanline.3tiff.html
        │   │   │   │   ├── TIFFWriteTile.3tiff.html
        │   │   │   │   ├── TIFFbuffer.3tiff.html
        │   │   │   │   ├── TIFFcodec.3tiff.html
        │   │   │   │   ├── TIFFcolor.3tiff.html
        │   │   │   │   ├── TIFFmemory.3tiff.html
        │   │   │   │   ├── TIFFquery.3tiff.html
        │   │   │   │   ├── TIFFsize.3tiff.html
        │   │   │   │   ├── TIFFstrip.3tiff.html
        │   │   │   │   ├── TIFFswab.3tiff.html
        │   │   │   │   ├── TIFFtile.3tiff.html
        │   │   │   │   ├── fax2ps.1.html
        │   │   │   │   ├── fax2tiff.1.html
        │   │   │   │   ├── gif2tiff.1.html
        │   │   │   │   ├── index.html
        │   │   │   │   ├── libtiff.3tiff.html
        │   │   │   │   ├── pal2rgb.1.html
        │   │   │   │   ├── ppm2tiff.1.html
        │   │   │   │   ├── ras2tiff.1.html
        │   │   │   │   ├── raw2tiff.1.html
        │   │   │   │   ├── rgb2ycbcr.1.html
        │   │   │   │   ├── sgi2tiff.1.html
        │   │   │   │   ├── thumbnail.1.html
        │   │   │   │   ├── tiff2bw.1.html
        │   │   │   │   ├── tiff2pdf.1.html
        │   │   │   │   ├── tiff2ps.1.html
        │   │   │   │   ├── tiff2rgba.1.html
        │   │   │   │   ├── tiffcmp.1.html
        │   │   │   │   ├── tiffcp.1.html
        │   │   │   │   ├── tiffcrop.1.html
        │   │   │   │   ├── tiffdither.1.html
        │   │   │   │   ├── tiffdump.1.html
        │   │   │   │   ├── tiffgt.1.html
        │   │   │   │   ├── tiffinfo.1.html
        │   │   │   │   ├── tiffmedian.1.html
        │   │   │   │   ├── tiffset.1.html
        │   │   │   │   ├── tiffsplit.1.html
        │   │   │   │   └── tiffsv.1.html
        │   │   │   ├── misc.html
        │   │   │   ├── support.html
        │   │   │   ├── tools.html
        │   │   │   ├── v3.4beta007.html
        │   │   │   ├── v3.4beta016.html
        │   │   │   ├── v3.4beta018.html
        │   │   │   ├── v3.4beta024.html
        │   │   │   ├── v3.4beta028.html
        │   │   │   ├── v3.4beta029.html
        │   │   │   ├── v3.4beta031.html
        │   │   │   ├── v3.4beta032.html
        │   │   │   ├── v3.4beta033.html
        │   │   │   ├── v3.4beta034.html
        │   │   │   ├── v3.4beta035.html
        │   │   │   ├── v3.4beta036.html
        │   │   │   ├── v3.5.1.html
        │   │   │   ├── v3.5.2.html
        │   │   │   ├── v3.5.3.html
        │   │   │   ├── v3.5.4.html
        │   │   │   ├── v3.5.5.html
        │   │   │   ├── v3.5.6-beta.html
        │   │   │   ├── v3.5.7.html
        │   │   │   ├── v3.6.0.html
        │   │   │   ├── v3.6.1.html
        │   │   │   ├── v3.7.0.html
        │   │   │   ├── v3.7.0alpha.html
        │   │   │   ├── v3.7.0beta.html
        │   │   │   ├── v3.7.0beta2.html
        │   │   │   ├── v3.7.1.html
        │   │   │   ├── v3.7.2.html
        │   │   │   ├── v3.7.3.html
        │   │   │   ├── v3.7.4.html
        │   │   │   ├── v3.8.0.html
        │   │   │   ├── v3.8.1.html
        │   │   │   ├── v3.8.2.html
        │   │   │   ├── v3.9.0beta.html
        │   │   │   ├── v3.9.1.html
        │   │   │   └── v3.9.2.html
        │   │   ├── libtiff/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── Makefile.vc
        │   │   │   ├── SConstruct
        │   │   │   ├── libtiff.def
        │   │   │   ├── mkg3states.c
        │   │   │   ├── t4.h
        │   │   │   ├── tif_acorn.c
        │   │   │   ├── tif_apple.c
        │   │   │   ├── tif_atari.c
        │   │   │   ├── tif_aux.c
        │   │   │   ├── tif_close.c
        │   │   │   ├── tif_codec.c
        │   │   │   ├── tif_color.c
        │   │   │   ├── tif_compress.c
        │   │   │   ├── tif_config.h
        │   │   │   ├── tif_config.h-vms
        │   │   │   ├── tif_config.h.in
        │   │   │   ├── tif_config.vc.h
        │   │   │   ├── tif_config.wince.h
        │   │   │   ├── tif_dir.c
        │   │   │   ├── tif_dir.h
        │   │   │   ├── tif_dirinfo.c
        │   │   │   ├── tif_dirread.c
        │   │   │   ├── tif_dirwrite.c
        │   │   │   ├── tif_dumpmode.c
        │   │   │   ├── tif_error.c
        │   │   │   ├── tif_extension.c
        │   │   │   ├── tif_fax3.c
        │   │   │   ├── tif_fax3.h
        │   │   │   ├── tif_fax3sm.c
        │   │   │   ├── tif_flush.c
        │   │   │   ├── tif_getimage.c
        │   │   │   ├── tif_jbig.c
        │   │   │   ├── tif_jpeg.c
        │   │   │   ├── tif_luv.c
        │   │   │   ├── tif_lzw.c
        │   │   │   ├── tif_msdos.c
        │   │   │   ├── tif_next.c
        │   │   │   ├── tif_ojpeg.c
        │   │   │   ├── tif_open.c
        │   │   │   ├── tif_packbits.c
        │   │   │   ├── tif_pixarlog.c
        │   │   │   ├── tif_predict.c
        │   │   │   ├── tif_predict.h
        │   │   │   ├── tif_print.c
        │   │   │   ├── tif_read.c
        │   │   │   ├── tif_stream.cxx
        │   │   │   ├── tif_strip.c
        │   │   │   ├── tif_swab.c
        │   │   │   ├── tif_thunder.c
        │   │   │   ├── tif_tile.c
        │   │   │   ├── tif_unix.c
        │   │   │   ├── tif_version.c
        │   │   │   ├── tif_warning.c
        │   │   │   ├── tif_win3.c
        │   │   │   ├── tif_win32.c
        │   │   │   ├── tif_write.c
        │   │   │   ├── tif_zip.c
        │   │   │   ├── tiff.h
        │   │   │   ├── tiffconf.h
        │   │   │   ├── tiffconf.h.in
        │   │   │   ├── tiffconf.vc.h
        │   │   │   ├── tiffconf.wince.h
        │   │   │   ├── tiffio.h
        │   │   │   ├── tiffio.hxx
        │   │   │   ├── tiffiop.h
        │   │   │   ├── tiffvers.h
        │   │   │   └── uvcode.h
        │   │   ├── m4/
        │   │   │   ├── acinclude.m4
        │   │   │   ├── libtool.m4
        │   │   │   ├── ltoptions.m4
        │   │   │   ├── ltsugar.m4
        │   │   │   ├── ltversion.m4
        │   │   │   └── lt~obsolete.m4
        │   │   ├── man/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── TIFFClose.3tiff
        │   │   │   ├── TIFFDataWidth.3tiff
        │   │   │   ├── TIFFError.3tiff
        │   │   │   ├── TIFFFlush.3tiff
        │   │   │   ├── TIFFGetField.3tiff
        │   │   │   ├── TIFFOpen.3tiff
        │   │   │   ├── TIFFPrintDirectory.3tiff
        │   │   │   ├── TIFFRGBAImage.3tiff
        │   │   │   ├── TIFFReadDirectory.3tiff
        │   │   │   ├── TIFFReadEncodedStrip.3tiff
        │   │   │   ├── TIFFReadEncodedTile.3tiff
        │   │   │   ├── TIFFReadRGBAImage.3tiff
        │   │   │   ├── TIFFReadRGBAStrip.3tiff
        │   │   │   ├── TIFFReadRGBATile.3tiff
        │   │   │   ├── TIFFReadRawStrip.3tiff
        │   │   │   ├── TIFFReadRawTile.3tiff
        │   │   │   ├── TIFFReadScanline.3tiff
        │   │   │   ├── TIFFReadTile.3tiff
        │   │   │   ├── TIFFSetDirectory.3tiff
        │   │   │   ├── TIFFSetField.3tiff
        │   │   │   ├── TIFFWarning.3tiff
        │   │   │   ├── TIFFWriteDirectory.3tiff
        │   │   │   ├── TIFFWriteEncodedStrip.3tiff
        │   │   │   ├── TIFFWriteEncodedTile.3tiff
        │   │   │   ├── TIFFWriteRawStrip.3tiff
        │   │   │   ├── TIFFWriteRawTile.3tiff
        │   │   │   ├── TIFFWriteScanline.3tiff
        │   │   │   ├── TIFFWriteTile.3tiff
        │   │   │   ├── TIFFbuffer.3tiff
        │   │   │   ├── TIFFcodec.3tiff
        │   │   │   ├── TIFFcolor.3tiff
        │   │   │   ├── TIFFmemory.3tiff
        │   │   │   ├── TIFFquery.3tiff
        │   │   │   ├── TIFFsize.3tiff
        │   │   │   ├── TIFFstrip.3tiff
        │   │   │   ├── TIFFswab.3tiff
        │   │   │   ├── TIFFtile.3tiff
        │   │   │   ├── bmp2tiff.1
        │   │   │   ├── fax2ps.1
        │   │   │   ├── fax2tiff.1
        │   │   │   ├── gif2tiff.1
        │   │   │   ├── libtiff.3tiff
        │   │   │   ├── pal2rgb.1
        │   │   │   ├── ppm2tiff.1
        │   │   │   ├── ras2tiff.1
        │   │   │   ├── raw2tiff.1
        │   │   │   ├── rgb2ycbcr.1
        │   │   │   ├── sgi2tiff.1
        │   │   │   ├── thumbnail.1
        │   │   │   ├── tiff2bw.1
        │   │   │   ├── tiff2pdf.1
        │   │   │   ├── tiff2ps.1
        │   │   │   ├── tiff2rgba.1
        │   │   │   ├── tiffcmp.1
        │   │   │   ├── tiffcp.1
        │   │   │   ├── tiffcrop.1
        │   │   │   ├── tiffdither.1
        │   │   │   ├── tiffdump.1
        │   │   │   ├── tiffgt.1
        │   │   │   ├── tiffinfo.1
        │   │   │   ├── tiffmedian.1
        │   │   │   ├── tiffset.1
        │   │   │   ├── tiffsplit.1
        │   │   │   └── tiffsv.1
        │   │   ├── nmake.opt
        │   │   ├── port/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── Makefile.vc
        │   │   │   ├── dummy.c
        │   │   │   ├── getopt.c
        │   │   │   ├── lfind.c
        │   │   │   ├── libport.h
        │   │   │   ├── strcasecmp.c
        │   │   │   └── strtoul.c
        │   │   ├── test/
        │   │   │   ├── Makefile.am
        │   │   │   ├── Makefile.in
        │   │   │   ├── ascii_tag.c
        │   │   │   ├── check_tag.c
        │   │   │   ├── long_tag.c
        │   │   │   ├── short_tag.c
        │   │   │   ├── strip.c
        │   │   │   ├── strip_rw.c
        │   │   │   ├── test_arrays.c
        │   │   │   └── test_arrays.h
        │   │   └── tools/
        │   │       ├── Makefile.am
        │   │       ├── Makefile.in
        │   │       ├── Makefile.vc
        │   │       ├── bmp2tiff.c
        │   │       ├── fax2ps.c
        │   │       ├── fax2tiff.c
        │   │       ├── gif2tiff.c
        │   │       ├── pal2rgb.c
        │   │       ├── ppm2tiff.c
        │   │       ├── ras2tiff.c
        │   │       ├── rasterfile.h
        │   │       ├── raw2tiff.c
        │   │       ├── rgb2ycbcr.c
        │   │       ├── sgi2tiff.c
        │   │       ├── sgisv.c
        │   │       ├── thumbnail.c
        │   │       ├── tiff2bw.c
        │   │       ├── tiff2pdf.c
        │   │       ├── tiff2ps.c
        │   │       ├── tiff2rgba.c
        │   │       ├── tiffcmp.c
        │   │       ├── tiffcp.c
        │   │       ├── tiffcrop.c
        │   │       ├── tiffdither.c
        │   │       ├── tiffdump.c
        │   │       ├── tiffgt.c
        │   │       ├── tiffinfo.c
        │   │       ├── tiffmedian.c
        │   │       ├── tiffset.c
        │   │       ├── tiffsplit.c
        │   │       └── ycbcr.c
        │   ├── tiff.h
        │   ├── tiffconf.h
        │   ├── tiffio.h
        │   └── tiffvers.h
        └── res/
            └── values/
                └── strings.xml
Download .txt
SYMBOL INDEX (1842 symbols across 159 files)

FILE: src/androidTest/java/org/beyka/tiffbitmapfactory/ApplicationTest.java
  class ApplicationTest (line 9) | public class ApplicationTest extends ApplicationTestCase<Application> {
    method ApplicationTest (line 10) | public ApplicationTest() {

FILE: src/main/java/org/beyka/tiffbitmapfactory/CompressionScheme.java
  type CompressionScheme (line 7) | public enum CompressionScheme {
    method CompressionScheme (line 42) | CompressionScheme(int ordinal) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/DecodeArea.java
  class DecodeArea (line 10) | public class DecodeArea {
    method DecodeArea (line 16) | public DecodeArea(){}
    method DecodeArea (line 18) | public DecodeArea(int x, int y, int width, int height) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/FillOrder.java
  type FillOrder (line 7) | public enum FillOrder {
    method FillOrder (line 21) | FillOrder(int ordinal) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/IProgressListener.java
  type IProgressListener (line 7) | public interface IProgressListener {
    method reportProgress (line 8) | public void reportProgress(long processedPixels, long totalPixels);

FILE: src/main/java/org/beyka/tiffbitmapfactory/ImageFormat.java
  type ImageFormat (line 7) | public enum ImageFormat {
    method ImageFormat (line 16) | ImageFormat(int ordinal) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/Orientation.java
  type Orientation (line 7) | public enum Orientation {
    method Orientation (line 20) | Orientation(int ordinal) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/Photometric.java
  type Photometric (line 7) | public enum Photometric {
    method Photometric (line 76) | Photometric(int ordinal) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/PlanarConfig.java
  type PlanarConfig (line 7) | public enum PlanarConfig {
    method PlanarConfig (line 13) | PlanarConfig(int ordinal) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/ResolutionUnit.java
  type ResolutionUnit (line 7) | public enum ResolutionUnit {
    method ResolutionUnit (line 14) | ResolutionUnit(int ordinal) {

FILE: src/main/java/org/beyka/tiffbitmapfactory/TiffBitmapFactory.java
  class TiffBitmapFactory (line 15) | public class TiffBitmapFactory {
    type ImageConfig (line 22) | public enum ImageConfig {
      method ImageConfig (line 57) | ImageConfig(int ordinal) {
    method decodeFile (line 76) | public static Bitmap decodeFile(File file) throws CantOpenFileExceptio...
    method decodeFile (line 95) | public static Bitmap decodeFile(File file, Options options) throws Can...
    method decodeFile (line 115) | public static Bitmap decodeFile(File file, Options options, IProgressL...
    method decodePath (line 137) | public static Bitmap decodePath(String path) throws CantOpenFileExcept...
    method decodePath (line 157) | public static Bitmap decodePath(String path, Options options) throws C...
    method decodePath (line 178) | public static Bitmap decodePath(String path, Options options, IProgres...
    method decodeFileDescriptor (line 198) | public static Bitmap decodeFileDescriptor(int fileDescriptor) throws C...
    method decodeFileDescriptor (line 215) | public static Bitmap decodeFileDescriptor(int fileDescriptor, Options ...
    method decodeFileDescriptor (line 233) | public static Bitmap decodeFileDescriptor(int fileDescriptor, Options ...
    method nativeDecodePath (line 241) | private static native Bitmap nativeDecodePath(String path, Options opt...
    method nativeDecodeFD (line 243) | private static native Bitmap nativeDecodeFD(int fd, Options options, I...
    method closeFd (line 249) | public static native void closeFd(int fd);
    class Options (line 254) | public static final class Options {
      method Options (line 260) | public Options() {
      method stop (line 288) | public void stop() {

FILE: src/main/java/org/beyka/tiffbitmapfactory/TiffConverter.java
  class TiffConverter (line 13) | public class TiffConverter {
    method convertToTiff (line 31) | public static boolean convertToTiff(File inFile, File outFile, Convert...
    method convertToTiff (line 47) | public static boolean convertToTiff(String inPath, String outPath, Con...
    method convertToTiff (line 72) | public static boolean convertToTiff(int inFd, int outFd, ConverterOpti...
    method convertTiffPng (line 99) | public static native boolean convertTiffPng(String tiff, String png, C...
    method convertTiffPngFd (line 109) | public static native boolean convertTiffPngFd(int tiff, int png, Conve...
    method convertPngTiff (line 122) | public static native boolean convertPngTiff(String png, String tiff, C...
    method convertPngTiffFd (line 133) | public static native boolean convertPngTiffFd(int png, int tiff, Conve...
    method convertTiffJpg (line 146) | public static native boolean convertTiffJpg(String tiff, String jpg, C...
    method convertTiffJpgFd (line 156) | public static native boolean convertTiffJpgFd(int tiff, int jpg, Conve...
    method convertJpgTiff (line 169) | public static native boolean convertJpgTiff(String jpg, String tiff, C...
    method convertJpgTiffFd (line 180) | public static native boolean convertJpgTiffFd(int jpg, int tiff, Conve...
    method convertTiffBmp (line 193) | public static native boolean convertTiffBmp(String tiff, String bmp, C...
    method convertTiffBmpFd (line 203) | public static native boolean convertTiffBmpFd(int tiff, int bmp, Conve...
    method convertBmpTiff (line 216) | public static native boolean convertBmpTiff(String bmp, String tiff, C...
    method convertBmpTiffFd (line 227) | public static native boolean convertBmpTiffFd(int bmp, int tiff, Conve...
    method getImageType (line 237) | public static native ImageFormat getImageType(String path);
    method getImageTypeFd (line 244) | public static native ImageFormat getImageTypeFd(int fd);
    method closeFd (line 250) | public static native void closeFd(int fd);
    class ConverterOptions (line 252) | public static final class ConverterOptions {
      method ConverterOptions (line 254) | public ConverterOptions() {
      method stop (line 275) | public void stop() {

FILE: src/main/java/org/beyka/tiffbitmapfactory/TiffSaver.java
  class TiffSaver (line 13) | public class TiffSaver {
    method saveBitmap (line 30) | public static boolean saveBitmap(File destination, Bitmap bmp) throws ...
    method saveBitmap (line 45) | public static boolean saveBitmap(File destination, Bitmap bmp, SaveOpt...
    method saveBitmap (line 59) | public static boolean saveBitmap(String destinationPath, Bitmap bmp) t...
    method saveBitmap (line 74) | public static boolean saveBitmap(String destinationPath, Bitmap bmp, S...
    method appendBitmap (line 91) | public static boolean appendBitmap(File destination, Bitmap bmp) throw...
    method appendBitmap (line 106) | public static boolean appendBitmap(File destination, Bitmap bmp, SaveO...
    method appendBitmap (line 120) | public static boolean appendBitmap(String destinationPath, int page, B...
    method appendBitmap (line 135) | public static boolean appendBitmap(String destinationPath, Bitmap bmp,...
    method saveBitmap (line 152) | public static boolean saveBitmap(int fileDescriptor, Bitmap bmp) throw...
    method saveBitmap (line 167) | public static boolean saveBitmap(int fileDescriptor, Bitmap bmp, SaveO...
    method appendBitmap (line 181) | public static boolean appendBitmap(int fileDescriptor, Bitmap bmp) thr...
    method appendBitmap (line 196) | public static boolean appendBitmap(int fileDescriptor, Bitmap bmp, Sav...
    method save (line 200) | private static synchronized native boolean save(String filePath, int f...
    method closeFd (line 206) | public static native void closeFd(int fd);
    class SaveOptions (line 211) | public static final class SaveOptions {
      method SaveOptions (line 213) | public SaveOptions() {

FILE: src/main/java/org/beyka/tiffbitmapfactory/exceptions/CantOpenFileException.java
  class CantOpenFileException (line 6) | public class CantOpenFileException extends RuntimeException {
    method CantOpenFileException (line 10) | public CantOpenFileException(String fileName){
    method CantOpenFileException (line 15) | public CantOpenFileException(int fileDescriptor){
    method getFileName (line 20) | public String getFileName(){
    method getFileDescriptor (line 24) | public int getFileDescriptor() {

FILE: src/main/java/org/beyka/tiffbitmapfactory/exceptions/DecodeTiffException.java
  class DecodeTiffException (line 6) | public class DecodeTiffException extends RuntimeException {
    method DecodeTiffException (line 12) | public DecodeTiffException(String fileName){
    method DecodeTiffException (line 17) | public DecodeTiffException(int fileDescriptor) {
    method DecodeTiffException (line 22) | public DecodeTiffException(String fileName, String aditionaInfo){
    method DecodeTiffException (line 28) | public DecodeTiffException(int fileDescriptor, String aditionaInfo){
    method getFileName (line 34) | public String getFileName(){
    method getAditionalInfo (line 38) | public String getAditionalInfo() {
    method getFileDescriptor (line 42) | public int getFileDescriptor() {

FILE: src/main/java/org/beyka/tiffbitmapfactory/exceptions/NotEnoughtMemoryException.java
  class NotEnoughtMemoryException (line 6) | public class NotEnoughtMemoryException extends RuntimeException {
    method NotEnoughtMemoryException (line 11) | public NotEnoughtMemoryException(int availableMemory, int needMemory){
    method getAvailableMemory (line 17) | public int getAvailableMemory() {
    method getNeedMemory (line 21) | public int getNeedMemory() {

FILE: src/main/jni/BaseTiffConverter.cpp
  type tm (line 264) | struct tm
  function jboolean (line 279) | jboolean BaseTiffConverter::checkStop() {

FILE: src/main/jni/BaseTiffConverter.h
  function class (line 35) | class BaseTiffConverter {

FILE: src/main/jni/BitmapReader.cpp
  function jobject (line 14) | jobject readBmp

FILE: src/main/jni/BmpToTiffConverter.cpp
  function jboolean (line 36) | jboolean BmpToTiffConverter::convert()
  function uint32 (line 282) | uint32 *BmpToTiffConverter::getPixelsFromBmp(int offset, int limit)
  function uint32 (line 299) | uint32 *BmpToTiffConverter::getPixelsFrom16Bmp(int offset, int limit)
  function uint32 (line 381) | uint32 *BmpToTiffConverter::getPixelsFrom24Bmp(int offset, int limit)
  function uint32 (line 452) | uint32 *BmpToTiffConverter::getPixelsFrom32Bmp(int offset, int limit)

FILE: src/main/jni/BmpToTiffConverter.h
  function class (line 36) | class BmpToTiffConverter : public BaseTiffConverter

FILE: src/main/jni/JpgToTiffConverter.cpp
  function jboolean (line 43) | jboolean JpgToTiffConverter::convert()

FILE: src/main/jni/JpgToTiffConverter.h
  function class (line 35) | class JpgToTiffConverter : public BaseTiffConverter

FILE: src/main/jni/NativeDecoder.cpp
  function jobject (line 107) | jobject NativeDecoder::getBitmap()
  function jobject (line 310) | jobject NativeDecoder::createBitmap(int inSampleSize, int directoryNumber)
  function jint (line 483) | jint * NativeDecoder::getSampledRasterFromStrip(int inSampleSize, int *b...
  function jint (line 950) | jint * NativeDecoder::getSampledRasterFromStripWithBounds(int inSampleSi...
  function jint (line 1510) | jint * NativeDecoder::getSampledRasterFromTile(int inSampleSize, int *bi...
  function jint (line 2013) | jint * NativeDecoder::getSampledRasterFromTileWithBounds(int inSampleSiz...
  function jint (line 2570) | jint * NativeDecoder::getSampledRasterFromImage(int inSampleSize, int *b...
  function jint (line 2818) | jint * NativeDecoder::getSampledRasterFromImageWithBounds(int inSampleSi...
  function jbyte (line 3233) | jbyte * NativeDecoder::createBitmapAlpha8(jint *raster, int bitmapwidth,...
  function jstring (line 3810) | jstring NativeDecoder::charsToJString(const char *chars) {
  function jboolean (line 3822) | jboolean NativeDecoder::checkStop() {

FILE: src/main/jni/NativeDecoder.h
  function class (line 36) | class NativeDecoder

FILE: src/main/jni/NativeExceptions.cpp
  function throw_not_enought_memory_exception (line 12) | void throw_not_enought_memory_exception(JNIEnv *env, int available, int ...
  function throw_decode_file_exception (line 28) | void throw_decode_file_exception(JNIEnv *env, jstring str, jstring addit...
  function throw_decode_file_exception_fd (line 44) | void throw_decode_file_exception_fd(JNIEnv *env, jint fd, jstring additi...
  function throw_cant_open_file_exception (line 60) | void throw_cant_open_file_exception(JNIEnv *env, jstring str)
  function throw_cant_open_file_exception_fd (line 76) | void throw_cant_open_file_exception_fd(JNIEnv *env, jint fd)

FILE: src/main/jni/NativeTiffBitmapFactory.cpp
  function JNIEXPORT (line 9) | JNIEXPORT jobject
  function JNIEXPORT (line 20) | JNIEXPORT jobject
  function JNIEXPORT (line 31) | JNIEXPORT jobject

FILE: src/main/jni/NativeTiffConverter.cpp
  function JNIEXPORT (line 12) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 22) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 32) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 42) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 52) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 62) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 72) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 81) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 90) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 99) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 108) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 117) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverte...
  function JNIEXPORT (line 126) | JNIEXPORT jobject JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverter...
  function JNIEXPORT (line 132) | JNIEXPORT jobject JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverter...
  function JNIEXPORT (line 255) | JNIEXPORT jobject JNICALL Java_org_beyka_tiffbitmapfactory_TiffConverter...
  function JNIEXPORT (line 384) | JNIEXPORT jobject

FILE: src/main/jni/NativeTiffSaver.cpp
  function JNIEXPORT (line 17) | JNIEXPORT jboolean JNICALL Java_org_beyka_tiffbitmapfactory_TiffSaver_save
  type tm (line 483) | struct tm
  function JNIEXPORT (line 500) | JNIEXPORT jobject

FILE: src/main/jni/PngToTiffConverter.cpp
  function jboolean (line 44) | jboolean PngToTiffConverter::convert()

FILE: src/main/jni/PngToTiffConverter.h
  function class (line 35) | class PngToTiffConverter : public BaseTiffConverter

FILE: src/main/jni/TiffToBmpConverter.cpp
  function jboolean (line 29) | jboolean TiffToBmpConverter::convert()
  function jboolean (line 181) | jboolean TiffToBmpConverter::convertFromImage() {
  function jboolean (line 266) | jboolean TiffToBmpConverter::convertFromTile() {
  function jboolean (line 417) | jboolean TiffToBmpConverter::convertFromStrip() {

FILE: src/main/jni/TiffToBmpConverter.h
  function class (line 36) | class TiffToBmpConverter : public BaseTiffConverter

FILE: src/main/jni/TiffToJpgConverter.cpp
  function jboolean (line 45) | jboolean TiffToJpgConverter::convert()
  function jboolean (line 215) | jboolean TiffToJpgConverter::convertFromImage() {
  function jboolean (line 290) | jboolean TiffToJpgConverter::convertFromTile() {
  function jboolean (line 451) | jboolean TiffToJpgConverter::convertFromStrip() {

FILE: src/main/jni/TiffToJpgConverter.h
  function class (line 39) | class TiffToJpgConverter : public BaseTiffConverter

FILE: src/main/jni/TiffToPngConverter.cpp
  function jboolean (line 47) | jboolean TiffToPngConverter::convert()
  function jboolean (line 219) | jboolean TiffToPngConverter::convertFromImage() {
  function jboolean (line 284) | jboolean TiffToPngConverter::convertFromTile() {
  function jboolean (line 436) | jboolean TiffToPngConverter::convertFromStrip() {

FILE: src/main/jni/TiffToPngConverter.h
  function class (line 35) | class TiffToPngConverter : public BaseTiffConverter

FILE: src/main/jni/jpeg/jmorecfg.h
  type JSAMPLE (line 60) | typedef unsigned char JSAMPLE;
  type JSAMPLE (line 65) | typedef char JSAMPLE;
  type JSAMPLE (line 85) | typedef short JSAMPLE;
  type JCOEF (line 100) | typedef short JCOEF;
  type JOCTET (line 111) | typedef unsigned char JOCTET;
  type JOCTET (line 116) | typedef char JOCTET;
  type UINT8 (line 136) | typedef unsigned char UINT8;
  type UINT8 (line 139) | typedef char UINT8;
  type UINT8 (line 141) | typedef short UINT8;
  type UINT16 (line 148) | typedef unsigned short UINT16;
  type UINT16 (line 150) | typedef unsigned int UINT16;
  type INT16 (line 156) | typedef short INT16;
  type INT32 (line 165) | typedef long INT32;
  type JDIMENSION (line 178) | typedef unsigned int JDIMENSION;
  type noreturn_t (line 229) | typedef void noreturn_t;
  type boolean (line 256) | typedef int boolean;

FILE: src/main/jni/jpeg/jpeglib.h
  type JSAMPLE (line 75) | typedef JSAMPLE FAR *JSAMPROW;
  type JSAMPROW (line 76) | typedef JSAMPROW *JSAMPARRAY;
  type JSAMPARRAY (line 77) | typedef JSAMPARRAY *JSAMPIMAGE;
  type JCOEF (line 79) | typedef JCOEF JBLOCK[DCTSIZE2];
  type JBLOCK (line 80) | typedef JBLOCK FAR *JBLOCKROW;
  type JBLOCKROW (line 81) | typedef JBLOCKROW *JBLOCKARRAY;
  type JBLOCKARRAY (line 82) | typedef JBLOCKARRAY *JBLOCKIMAGE;
  type JCOEF (line 84) | typedef JCOEF FAR *JCOEFPTR;
  type JQUANT_TBL (line 92) | typedef struct {
  type JHUFF_TBL (line 109) | typedef struct {
  type jpeg_component_info (line 125) | typedef struct {
  type jpeg_scan_info (line 193) | typedef struct {
  type jpeg_marker_struct (line 202) | struct jpeg_marker_struct
  type jpeg_marker_struct (line 204) | struct jpeg_marker_struct {
  type J_COLOR_SPACE (line 215) | typedef enum {
  type J_COLOR_TRANSFORM (line 226) | typedef enum {
  type J_DCT_METHOD (line 233) | typedef enum {
  type J_DITHER_MODE (line 248) | typedef enum {
  type jpeg_memory_mgr (line 259) | struct jpeg_memory_mgr
  type jpeg_progress_mgr (line 260) | struct jpeg_progress_mgr
  type jpeg_common_struct (line 269) | struct jpeg_common_struct {
  type jpeg_common_struct (line 277) | struct jpeg_common_struct
  type jpeg_compress_struct (line 278) | struct jpeg_compress_struct
  type jpeg_decompress_struct (line 279) | struct jpeg_decompress_struct
  type jpeg_compress_struct (line 284) | struct jpeg_compress_struct {
  type jpeg_decompress_struct (line 452) | struct jpeg_decompress_struct {
  type jpeg_error_mgr (line 695) | struct jpeg_error_mgr {
  type jpeg_progress_mgr (line 753) | struct jpeg_progress_mgr {
  type jpeg_destination_mgr (line 765) | struct jpeg_destination_mgr {
  type jpeg_source_mgr (line 777) | struct jpeg_source_mgr {
  type jvirt_sarray_control (line 804) | struct jvirt_sarray_control
  type jvirt_barray_control (line 805) | struct jvirt_barray_control
  type jpeg_memory_mgr (line 808) | struct jpeg_memory_mgr {
  type jpeg_error_mgr (line 941) | struct jpeg_error_mgr
  type jpeg_error_mgr (line 942) | struct jpeg_error_mgr
  type jvirt_sarray_control (line 1129) | struct jvirt_sarray_control { long dummy; }
  type jvirt_barray_control (line 1130) | struct jvirt_barray_control { long dummy; }
  type jpeg_comp_master (line 1131) | struct jpeg_comp_master { long dummy; }
  type jpeg_c_main_controller (line 1132) | struct jpeg_c_main_controller { long dummy; }
  type jpeg_c_prep_controller (line 1133) | struct jpeg_c_prep_controller { long dummy; }
  type jpeg_c_coef_controller (line 1134) | struct jpeg_c_coef_controller { long dummy; }
  type jpeg_marker_writer (line 1135) | struct jpeg_marker_writer { long dummy; }
  type jpeg_color_converter (line 1136) | struct jpeg_color_converter { long dummy; }
  type jpeg_downsampler (line 1137) | struct jpeg_downsampler { long dummy; }
  type jpeg_forward_dct (line 1138) | struct jpeg_forward_dct { long dummy; }
  type jpeg_entropy_encoder (line 1139) | struct jpeg_entropy_encoder { long dummy; }
  type jpeg_decomp_master (line 1140) | struct jpeg_decomp_master { long dummy; }
  type jpeg_d_main_controller (line 1141) | struct jpeg_d_main_controller { long dummy; }
  type jpeg_d_coef_controller (line 1142) | struct jpeg_d_coef_controller { long dummy; }
  type jpeg_d_post_controller (line 1143) | struct jpeg_d_post_controller { long dummy; }
  type jpeg_input_controller (line 1144) | struct jpeg_input_controller { long dummy; }
  type jpeg_marker_reader (line 1145) | struct jpeg_marker_reader { long dummy; }
  type jpeg_entropy_decoder (line 1146) | struct jpeg_entropy_decoder { long dummy; }
  type jpeg_inverse_dct (line 1147) | struct jpeg_inverse_dct { long dummy; }
  type jpeg_upsampler (line 1148) | struct jpeg_upsampler { long dummy; }
  type jpeg_color_deconverter (line 1149) | struct jpeg_color_deconverter { long dummy; }
  type jpeg_color_quantizer (line 1150) | struct jpeg_color_quantizer { long dummy; }

FILE: src/main/jni/png/png.h
  type png_color (line 374) | typedef struct png_color_struct
  type png_color (line 380) | typedef png_color FAR * png_colorp;
  type png_color (line 381) | typedef png_color FAR
  type png_color_16 (line 383) | typedef struct png_color_16_struct
  type png_color_16 (line 391) | typedef png_color_16 FAR * png_color_16p;
  type png_color_16 (line 392) | typedef png_color_16 FAR
  type png_color_8 (line 394) | typedef struct png_color_8_struct
  type png_color_8 (line 402) | typedef png_color_8 FAR * png_color_8p;
  type png_color_8 (line 403) | typedef png_color_8 FAR
  type png_sPLT_entry (line 409) | typedef struct png_sPLT_entry_struct
  type png_sPLT_entry (line 417) | typedef png_sPLT_entry FAR * png_sPLT_entryp;
  type png_sPLT_entry (line 418) | typedef png_sPLT_entry FAR
  type png_sPLT_t (line 425) | typedef struct png_sPLT_struct
  type png_sPLT_t (line 432) | typedef png_sPLT_t FAR * png_sPLT_tp;
  type png_sPLT_t (line 433) | typedef png_sPLT_t FAR
  type png_text (line 444) | typedef struct png_text_struct
  type png_text (line 463) | typedef png_text FAR * png_textp;
  type png_text (line 464) | typedef png_text FAR
  type png_time (line 483) | typedef struct png_time_struct
  type png_time (line 492) | typedef png_time FAR * png_timep;
  type png_time (line 493) | typedef png_time FAR
  type png_unknown_chunk (line 502) | typedef struct png_unknown_chunk_t
  type png_unknown_chunk (line 512) | typedef png_unknown_chunk FAR * png_unknown_chunkp;
  type png_unknown_chunk (line 513) | typedef png_unknown_chunk FAR
  type png_info (line 555) | typedef struct png_info_struct
  type png_info (line 818) | typedef png_info FAR * png_infop;
  type PNG_CONST (line 819) | typedef PNG_CONST png_info
  type png_info (line 820) | typedef png_info FAR
  type png_row_info (line 919) | typedef struct png_row_info_struct
  type png_row_info (line 929) | typedef png_row_info FAR * png_row_infop;
  type png_row_info (line 930) | typedef png_row_info FAR
  type png_struct (line 938) | typedef struct png_struct_def png_struct;
  type png_struct (line 939) | typedef png_struct FAR * png_structp;
  type PNG_CONST (line 940) | typedef PNG_CONST png_struct
  type png_voidp (line 1004) | typedef png_voidp (*png_malloc_ptr)
  type png_struct_def (line 1014) | struct png_struct_def
  type png_structp (line 1381) | typedef png_structp version_1_4_19;
  type png_struct (line 1383) | typedef png_struct FAR

FILE: src/main/jni/png/pngconf.h
  type png_uint_32 (line 1122) | typedef unsigned int png_uint_32;
  type png_int_32 (line 1123) | typedef int png_int_32;
  type png_uint_32 (line 1125) | typedef unsigned long png_uint_32;
  type png_int_32 (line 1126) | typedef long png_int_32;
  type png_uint_16 (line 1128) | typedef unsigned short png_uint_16;
  type png_int_16 (line 1129) | typedef short png_int_16;
  type png_byte (line 1130) | typedef unsigned char png_byte;
  type png_size_t (line 1133) | typedef unsigned int png_size_t;
  type png_size_t (line 1135) | typedef size_t png_size_t;
  type png_int_32 (line 1201) | typedef png_int_32 png_fixed_point;
  type png_byte (line 1205) | typedef png_byte        FAR * png_bytep;
  type png_uint_32 (line 1206) | typedef png_uint_32     FAR * png_uint_32p;
  type png_int_32 (line 1207) | typedef png_int_32      FAR * png_int_32p;
  type png_uint_16 (line 1208) | typedef png_uint_16     FAR * png_uint_16p;
  type png_int_16 (line 1209) | typedef png_int_16      FAR * png_int_16p;
  type PNG_CONST (line 1210) | typedef PNG_CONST char
  type png_fixed_point (line 1212) | typedef png_fixed_point FAR * png_fixed_point_p;
  type FILE (line 1215) | typedef FILE                * png_FILE_p;
  type png_byte (line 1223) | typedef png_byte        FAR
  type png_uint_32 (line 1224) | typedef png_uint_32     FAR
  type png_int_32 (line 1225) | typedef png_int_32      FAR
  type png_uint_16 (line 1226) | typedef png_uint_16     FAR
  type png_int_16 (line 1227) | typedef png_int_16      FAR
  type PNG_CONST (line 1228) | typedef PNG_CONST char
  type FAR (line 1229) | typedef char            FAR
  type png_fixed_point (line 1230) | typedef png_fixed_point FAR
  type FAR (line 1232) | typedef double          FAR
  type FAR (line 1236) | typedef char            FAR
  type png_alloc_size_t (line 1513) | typedef unsigned long png_alloc_size_t;
  type png_alloc_size_t (line 1516) | typedef unsigned long    png_alloc_size_t;
  type DWORD (line 1524) | typedef DWORD         png_alloc_size_t;
  type png_size_t (line 1526) | typedef png_size_t    png_alloc_size_t;

FILE: src/main/jni/tiff.h
  type int8 (line 65) | typedef	signed char int8;
  type uint8 (line 67) | typedef	unsigned char uint8;
  type int16 (line 69) | typedef	short int16;
  type uint16 (line 71) | typedef	unsigned short uint16;
  type int32 (line 74) | typedef	int int32;
  type uint32 (line 76) | typedef	unsigned int uint32;
  type int32 (line 79) | typedef	long int32;
  type uint32 (line 81) | typedef	unsigned long uint32;
  type TIFFIgnoreSense (line 85) | enum TIFFIgnoreSense /* IGNORE tag table */
  type TIFFHeader (line 95) | typedef	struct {
  type TIFFDirEntry (line 116) | typedef	struct {
  type TIFFDataType (line 137) | typedef	enum {

FILE: src/main/jni/tiff/contrib/addtiffo/addtiffo.c
  function main (line 68) | int main( int argc, char ** argv )

FILE: src/main/jni/tiff/contrib/addtiffo/tif_overview.c
  function uint32 (line 80) | uint32 TIFF_WriteOverview( TIFF *hTIFF, int nXSize, int nYSize,
  function TIFF_GetSourceSamples (line 161) | static void
  function TIFF_SetSample (line 215) | static void
  function TIFF_DownSample (line 257) | static
  function TIFF_DownSample_Subsampled (line 363) | static
  function TIFF_ProcessFullResBlock (line 541) | void TIFF_ProcessFullResBlock( TIFF *hTIFF, int nPlanarConfig,
  function TIFFBuildOverviews (line 685) | void TIFFBuildOverviews( TIFF *hTIFF, int nOverviews, int * panOvList,

FILE: src/main/jni/tiff/contrib/addtiffo/tif_ovrcache.c
  function TIFFOvrCache (line 43) | TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, int nDirOffset )
  function TIFFWriteOvrRow (line 134) | static void TIFFWriteOvrRow( TIFFOvrCache * psCache )
  function TIFFDestroyOvrCache (line 325) | void TIFFDestroyOvrCache( TIFFOvrCache * psCache )

FILE: src/main/jni/tiff/contrib/addtiffo/tif_ovrcache.h
  type TIFFOvrCache (line 44) | typedef struct

FILE: src/main/jni/tiff/contrib/dbs/tiff-bi.c
  function main (line 35) | int main(int argc, char **argv)

FILE: src/main/jni/tiff/contrib/dbs/tiff-grayscale.c
  function main (line 41) | int main(int argc, char **argv)
  function Usage (line 134) | void

FILE: src/main/jni/tiff/contrib/dbs/tiff-palette.c
  function main (line 40) | int main(int argc, char **argv)
  function Usage (line 271) | void

FILE: src/main/jni/tiff/contrib/dbs/tiff-rgb.c
  function main (line 43) | int main(int argc, char **argv)
  function Usage (line 189) | void

FILE: src/main/jni/tiff/contrib/dbs/xtiff/xtiff.c
  type AppData (line 132) | typedef struct {
  function main (line 263) | int
  function OpenTIFFFile (line 387) | void
  function GetTIFFHeader (line 402) | void
  function SetNameLabel (line 508) | void
  function CheckAndCorrectColormap (line 526) | void
  function SimpleGammaCorrection (line 543) | void
  function GetVisual (line 578) | void
  function Boolean (line 702) | Boolean
  function GetTIFFImage (line 736) | void
  function CreateXImage (line 872) | void
  function XtCallbackProc (line 937) | XtCallbackProc
  function QuitProc (line 964) | void
  function NextProc (line 970) | void
  function PreviousProc (line 976) | void
  function PageProc (line 982) | void
  function EventProc (line 1046) | void
  function ResizeProc (line 1207) | void
  function XTiffErrorHandler (line 1246) | int
  function Usage (line 1267) | void

FILE: src/main/jni/tiff/contrib/iptcutil/iptcutil.c
  type tag_spec (line 29) | typedef struct _tag_spec
  function formatString (line 97) | void formatString(FILE *ofile, const char *s, int len)
  type html_code (line 128) | typedef struct _html_code
  function convertHTMLcodes (line 151) | int convertHTMLcodes(char *s, int len)
  function formatIPTC (line 196) | int formatIPTC(FILE *ifile, FILE *ofile)
  function main (line 366) | int main(int argc, char *argv[])
  function sindex (line 769) | int sindex(char ch,char *string)
  function chstore (line 780) | void chstore(char *string,int max,char ch)
  function tokenizer (line 807) | int tokenizer(unsigned inflag,char *token,int tokmax,char *line,

FILE: src/main/jni/tiff/contrib/mac-cw/mac_main.c
  function main (line 11) | int

FILE: src/main/jni/tiff/contrib/mac-cw/mkg3_main.c
  function main (line 7) | int

FILE: src/main/jni/tiff/contrib/mac-mpw/mactrans.c
  function from_ascii (line 26) | void from_ascii(void)
  function to_ascii (line 43) | void to_ascii(void)

FILE: src/main/jni/tiff/contrib/mfs/mfs_file.c
  function mfs_open (line 119) | int mfs_open (void *buffer, int size, char *mode)
  function mfs_lseek (line 242) | int mfs_lseek (int fd, int offset, int whence)
  function mfs_read (line 327) | int mfs_read (int fd, void *clnt_buf, int size)
  function mfs_write (line 367) | int mfs_write (int fd, void *clnt_buf, int size)
  function mfs_size (line 425) | int mfs_size (int fd)
  function mfs_map (line 456) | int mfs_map (int fd, char **addr, size_t *len)
  function mfs_unmap (line 489) | int mfs_unmap (int fd)
  function mfs_close (line 507) | int mfs_close (int fd)
  function extend_mem_file (line 538) | static int extend_mem_file (int fd, int size)
  function mem_init (line 567) | static void mem_init ()

FILE: src/main/jni/tiff/contrib/pds/tif_imageiter.c
  function isCCITTCompression (line 61) | static int
  function TIFFImageIterBegin (line 72) | int
  function TIFFImageIterGet (line 210) | int
  function TIFFReadImageIter (line 233) | int
  function gtTileContig (line 259) | static int
  function gtTileSeparate (line 307) | static int
  function gtStripContig (line 374) | static int
  function gtStripSeparate (line 413) | static int
  function DECLAREContigCallbackFunc (line 465) | DECLAREContigCallbackFunc(TestContigCallback)
  function DECLARESepCallbackFunc (line 472) | DECLARESepCallbackFunc(TestSepCallback)

FILE: src/main/jni/tiff/contrib/pds/tif_imageiter.h
  type TIFFImageIter (line 1) | typedef struct _TIFFImageIter TIFFImageIter;
  type _TIFFImageIter (line 36) | struct _TIFFImageIter {

FILE: src/main/jni/tiff/contrib/pds/tif_pdsdirread.c
  function TIFFReadPrivateDataSubDirectory (line 117) | int
  function EstimateStripByteCounts (line 287) | static void
  function MissingRequired (line 338) | static void
  function CheckDirCount (line 351) | static int
  function tsize_t (line 367) | static tsize_t
  function tsize_t (line 413) | static tsize_t
  function cvtRational (line 429) | static int
  function TIFFFetchRational (line 451) | static float
  function TIFFFetchFloat (line 466) | static float
  function TIFFFetchByteArray (line 495) | static int
  function TIFFFetchShortArray (line 525) | static int
  function TIFFFetchShortPair (line 548) | static int
  function TIFFFetchLongArray (line 572) | static int
  function TIFFFetchRationalArray (line 585) | static int
  function TIFFFetchFloatArray (line 612) | static int
  function TIFFFetchDoubleArray (line 630) | static int
  function TIFFFetchAnyArray (line 651) | static int
  function TIFFFetchNormalSubTag (line 737) | static int
  function TIFFFetchPerSampleShorts (line 884) | static int
  function TIFFFetchPerSampleAnys (line 920) | static int
  function TIFFFetchStripThing (line 957) | static int
  function TIFFFetchExtraSamples (line 996) | static int
  function TIFFFetchRefBlackWhite (line 1021) | static int
  function ChopUpSingleUncompressedStrip (line 1059) | static void

FILE: src/main/jni/tiff/contrib/pds/tif_pdsdirwrite.c
  function toff_t (line 141) | toff_t
  function TIFFWriteNormalSubTag (line 319) | static int
  function TIFFSetupShortLong (line 479) | static void
  function TIFFWriteRational (line 499) | static int
  function TIFFWritePerSampleShorts (line 514) | static int
  function TIFFWritePerSampleAnys (line 537) | static int
  function TIFFSetupShortPair (line 562) | static int
  function TIFFWriteShortTable (line 576) | static int
  function TIFFWriteByteArray (line 598) | static int
  function TIFFWriteShortArray (line 613) | static int
  function TIFFWriteLongArray (line 639) | static int
  function TIFFWriteRationalArray (line 657) | static int
  function TIFFWriteFloatArray (line 696) | static int
  function TIFFWriteDoubleArray (line 711) | static int
  function TIFFWriteAnyArray (line 731) | static int
  function TIFFWriteTransferFunction (line 822) | static int
  function TIFFWriteData (line 849) | static int
  function TIFFLinkDirectory (line 890) | static int

FILE: src/main/jni/tiff/contrib/ras/ras2tif.c
  type boolean (line 51) | typedef int boolean;
  function error (line 60) | void
  function usage (line 69) | void
  type tm (line 92) | struct tm
  type timeval (line 93) | struct timeval
  type timezone (line 105) | struct timezone

FILE: src/main/jni/tiff/contrib/ras/tif2ras.c
  type boolean (line 50) | typedef int boolean;
  function error (line 58) | void
  function usage (line 67) | void

FILE: src/main/jni/tiff/contrib/stream/tiffstream.cpp
  function TIFF (line 26) | TIFF*
  function TIFF (line 47) | TIFF*
  function TIFF (line 68) | TIFF*
  function tsize_t (line 89) | tsize_t
  function tsize_t (line 106) | tsize_t
  function toff_t (line 122) | toff_t
  function toff_t (line 147) | toff_t

FILE: src/main/jni/tiff/contrib/stream/tiffstream.h
  function class (line 10) | class TiffStream {

FILE: src/main/jni/tiff/contrib/tags/listtif.c
  function main (line 8) | void main(int argc,char *argv[])

FILE: src/main/jni/tiff/contrib/tags/maketif.c
  function main (line 16) | void main()
  function SetUpTIFFDirectory (line 36) | void SetUpTIFFDirectory(TIFF *tif)
  function WriteImage (line 57) | void WriteImage(TIFF *tif)

FILE: src/main/jni/tiff/contrib/tags/xtif_dir.c
  function _XTIFFPrintDirectory (line 40) | static void
  function _XTIFFVSetField (line 88) | static int
  function _XTIFFVGetField (line 153) | static int
  function _XTIFFFreeDirectory (line 191) | static void
  function _XTIFFLocalDefaultDirectory (line 209) | static void _XTIFFLocalDefaultDirectory(TIFF *tif)
  function _XTIFFDefaultDirectory (line 253) | static void
  function _XTIFFInitialize (line 293) | static
  function TIFF (line 309) | TIFF*
  function TIFF (line 320) | TIFF*
  function XTIFFClose (line 332) | void

FILE: src/main/jni/tiff/contrib/tags/xtiffiop.h
  type XTIFFDirectory (line 34) | struct XTIFFDirectory {
  type XTIFFDirectory (line 40) | typedef struct XTIFFDirectory XTIFFDirectory;
  type xtiff (line 46) | struct xtiff {
  type xtiff (line 55) | typedef struct xtiff xtiff;

FILE: src/main/jni/tiff/contrib/win_dib/Tiffile.cpp
  type TIFFDibImage (line 36) | struct TIFFDibImage {
  function MyWarningHandler (line 45) | static void
  function MyErrorHandler (line 52) | static void
  function ChkTIFF (line 60) | int ChkTIFF ( LPCTSTR lpszPath )
  function PVOID (line 84) | PVOID ReadTIFF ( LPCTSTR lpszPath )
  function HANDLE (line 131) | HANDLE TIFFRGBA2DIB(TIFFDibImage* dib, uint32* raster)
  function DibInstallHack (line 301) | void DibInstallHack(TIFFDibImage* dib) {
  function DECLAREContigPutFunc (line 323) | DECLAREContigPutFunc(putContig1bitTile)
  function uint32 (line 351) | static uint32
  function getStripContig1Bit (line 392) | static int

FILE: src/main/jni/tiff/contrib/win_dib/tiff2dib.c
  function HDIB (line 59) | HDIB LoadTIFFinDIB(LPSTR lpFileName)
  function checkcmap (line 221) | static int checkcmap(int n, uint16* r, uint16* g, uint16* b)
  function HDIB (line 246) | HDIB CreateDIB(DWORD dwWidth, DWORD dwHeight, WORD wBitCount)
  function LPSTR (line 314) | LPSTR FAR FindDIBBits(LPSTR lpDIB)
  function WORD (line 320) | WORD FAR PaletteSize(LPSTR lpDIB)
  function WORD (line 330) | WORD DIBNumColors(LPSTR lpDIB)

FILE: src/main/jni/tiff/libtiff/mkg3states.c
  type proto (line 55) | struct proto {
  type proto (line 60) | struct proto
  type proto (line 65) | struct proto
  type proto (line 70) | struct proto
  type proto (line 75) | struct proto
  type proto (line 82) | struct proto
  type proto (line 89) | struct proto
  type proto (line 94) | struct proto
  type proto (line 99) | struct proto
  type proto (line 130) | struct proto
  type proto (line 161) | struct proto
  type proto (line 178) | struct proto
  type proto (line 246) | struct proto
  type proto (line 314) | struct proto
  function FillTable (line 319) | static void
  function WriteTable (line 345) | void
  function main (line 380) | int

FILE: src/main/jni/tiff/libtiff/t4.h
  type tableentry (line 35) | typedef struct tableentry {

FILE: src/main/jni/tiff/libtiff/tif_acorn.c
  type bits (line 68) | typedef unsigned int                            bits;
  type byte (line 69) | typedef unsigned char                           byte;
  type _kernel_oserror (line 84) | typedef _kernel_oserror os_error;
  type byte (line 85) | typedef byte os_f;
  function open (line 285) | extern int open(const char* name, int flags, int mode)
  function close (line 320) | extern int close(int fd)
  function write (line 325) | extern int write(int fd, const char *buf, int nbytes)
  function read (line 331) | extern int read(int fd, char *buf, int nbytes)
  function off_t (line 337) | extern off_t lseek(int fd, off_t offset, int whence)
  function tsize_t (line 366) | static tsize_t
  function tsize_t (line 372) | static tsize_t
  function toff_t (line 378) | static toff_t
  function _tiffCloseProc (line 384) | static int
  function toff_t (line 390) | static toff_t
  function _tiffMapProc (line 401) | static int
  function _tiffUnmapProc (line 408) | static void
  function TIFF (line 417) | TIFF*
  function TIFF (line 437) | TIFF*
  function _TIFFfree (line 466) | void
  function _TIFFmemset (line 478) | void
  function _TIFFmemcpy (line 484) | void
  function _TIFFmemcmp (line 490) | int
  function acornWarningHandler (line 496) | static void
  function acornErrorHandler (line 509) | static void

FILE: src/main/jni/tiff/libtiff/tif_apple.c
  function tsize_t (line 58) | static tsize_t
  function tsize_t (line 65) | static tsize_t
  function toff_t (line 72) | static toff_t
  function _tiffMapProc (line 105) | static int
  function _tiffUnmapProc (line 111) | static void
  function _tiffCloseProc (line 116) | static int
  function toff_t (line 122) | static toff_t
  function TIFF (line 137) | TIFF*
  function ourc2pstr (line 150) | static void ourc2pstr( char* inString )
  function TIFF (line 160) | TIFF*
  function _TIFFmemset (line 212) | void
  function _TIFFmemcpy (line 218) | void
  function _TIFFmemcmp (line 224) | int
  function tdata_t (line 230) | tdata_t
  function _TIFFfree (line 236) | void
  function tdata_t (line 242) | tdata_t
  function appleWarningHandler (line 255) | static void
  function appleErrorHandler (line 266) | static void

FILE: src/main/jni/tiff/libtiff/tif_atari.c
  function tsize_t (line 47) | static tsize_t
  function tsize_t (line 60) | static tsize_t
  function toff_t (line 73) | static toff_t
  function _tiffCloseProc (line 105) | static int
  function toff_t (line 118) | static toff_t
  function _tiffMapProc (line 129) | static int
  function _tiffUnmapProc (line 135) | static void
  function TIFF (line 143) | TIFF*
  function TIFF (line 160) | TIFF*
  function tdata_t (line 188) | tdata_t
  function _TIFFfree (line 194) | void
  function tdata_t (line 200) | tdata_t
  function _TIFFmemset (line 206) | void
  function _TIFFmemcpy (line 212) | void
  function _TIFFmemcmp (line 218) | int
  function atariWarningHandler (line 224) | static void
  function atariErrorHandler (line 235) | static void

FILE: src/main/jni/tiff/libtiff/tif_aux.c
  function tdata_t (line 36) | tdata_t
  function tdata_t (line 56) | tdata_t
  function TIFFDefaultTransferFunction (line 62) | static int
  function TIFFVGetFieldDefaulted (line 111) | int
  function TIFFGetFieldDefaulted (line 263) | int

FILE: src/main/jni/tiff/libtiff/tif_close.c
  function TIFFCleanup (line 45) | void
  function TIFFClose (line 110) | void

FILE: src/main/jni/tiff/libtiff/tif_codec.c
  function _notConfigured (line 101) | static int
  function NotConfigured (line 114) | static int
  function TIFFIsCODECConfigured (line 137) | int

FILE: src/main/jni/tiff/libtiff/tif_color.c
  function TIFFCIELabToXYZ (line 45) | void
  function TIFFXYZToRGB (line 77) | void
  function TIFFCIELabToRGBInit (line 124) | int
  function TIFFYCbCrtoRGB (line 182) | void
  function TIFFYCbCrToRGBInit (line 211) | int

FILE: src/main/jni/tiff/libtiff/tif_compress.c
  function TIFFNoEncode (line 34) | static int
  function _TIFFNoRowEncode (line 51) | int
  function _TIFFNoStripEncode (line 58) | int
  function _TIFFNoTileEncode (line 65) | int
  function TIFFNoDecode (line 72) | static int
  function _TIFFNoRowDecode (line 88) | int
  function _TIFFNoStripDecode (line 95) | int
  function _TIFFNoTileDecode (line 102) | int
  function _TIFFNoSeek (line 109) | int
  function _TIFFNoPreCode (line 118) | int
  function _TIFFtrue (line 125) | static int _TIFFtrue(TIFF* tif) { (void) tif; return (1); }
  function _TIFFvoid (line 126) | static void _TIFFvoid(TIFF* tif) { (void) tif; }
  function _TIFFSetDefaultCompressionState (line 128) | void
  function TIFFSetCompressionScheme (line 152) | int
  type codec_t (line 172) | typedef struct _codec {
  function TIFFCodec (line 178) | const TIFFCodec*
  function TIFFCodec (line 193) | TIFFCodec*
  function TIFFUnRegisterCODEC (line 216) | void
  function TIFFCodec (line 244) | TIFFCodec*

FILE: src/main/jni/tiff/libtiff/tif_dir.c
  function setByteArray (line 43) | static void
  function _TIFFsetByteArray (line 56) | void _TIFFsetByteArray(void** vpp, void* vp, uint32 n)
  function _TIFFsetString (line 58) | void _TIFFsetString(char** cpp, char* cp)
  function _TIFFsetNString (line 60) | void _TIFFsetNString(char** cpp, char* cp, uint32 n)
  function _TIFFsetShortArray (line 62) | void _TIFFsetShortArray(uint16** wpp, uint16* wp, uint32 n)
  function _TIFFsetLongArray (line 64) | void _TIFFsetLongArray(uint32** lpp, uint32* lp, uint32 n)
  function _TIFFsetFloatArray (line 66) | void _TIFFsetFloatArray(float** fpp, float* fp, uint32 n)
  function _TIFFsetDoubleArray (line 68) | void _TIFFsetDoubleArray(double** dpp, double* dp, uint32 n)
  function setExtraSamples (line 74) | static int
  function uint32 (line 110) | static uint32
  function _TIFFVSetField (line 136) | static int
  function OkToChangeTag (line 612) | static int
  function TIFFSetField (line 644) | int
  function TIFFVSetField (line 662) | int
  function _TIFFVGetField (line 669) | static int
  function TIFFGetField (line 943) | int
  function TIFFVGetField (line 961) | int
  function TIFFFreeDirectory (line 979) | void
  function TIFFExtendProc (line 1016) | TIFFExtendProc
  function TIFFCreateDirectory (line 1031) | int
  function TIFFDefaultDirectory (line 1047) | int
  function TIFFAdvanceDirectory (line 1106) | static int
  function tdir_t (line 1167) | tdir_t
  function TIFFSetDirectory (line 1182) | int
  function TIFFSetSubDirectory (line 1213) | int
  function uint32 (line 1228) | uint32
  function TIFFLastDirectory (line 1238) | int
  function TIFFUnlinkDirectory (line 1247) | int
  function TIFFReassignTagToIgnore (line 1327) | int

FILE: src/main/jni/tiff/libtiff/tif_dir.h
  type TIFFDirectory (line 36) | typedef	struct {

FILE: src/main/jni/tiff/libtiff/tif_dirinfo.c
  function TIFFFieldInfo (line 515) | const TIFFFieldInfo *
  function TIFFFieldInfo (line 522) | const TIFFFieldInfo *
  function _TIFFSetupFieldInfo (line 529) | void
  function tagCompare (line 555) | static int
  function tagNameCompare (line 568) | static int
  function TIFFMergeFieldInfo (line 582) | void
  function _TIFFMergeFieldInfo (line 592) | int
  function _TIFFPrintFieldInfo (line 637) | void
  function TIFFDataWidth (line 661) | int
  function _TIFFDataSize (line 696) | int
  function TIFFDataType (line 725) | TIFFDataType
  function TIFFFieldInfo (line 746) | const TIFFFieldInfo*
  function TIFFFieldInfo (line 774) | const TIFFFieldInfo*
  function TIFFFieldInfo (line 803) | const TIFFFieldInfo*
  function TIFFFieldInfo (line 817) | const TIFFFieldInfo*
  function TIFFFieldInfo (line 831) | const TIFFFieldInfo*
  function TIFFFieldInfo (line 848) | TIFFFieldInfo*

FILE: src/main/jni/tiff/libtiff/tif_dirread.c
  function TIFFReadDirectory (line 73) | int
  function TIFFDirEntry (line 744) | static TIFFDirEntry*
  function TIFFReadCustomDirectory (line 761) | int
  function TIFFReadEXIFDirectory (line 883) | int
  function EstimateStripByteCounts (line 893) | static int
  function MissingRequired (line 966) | static void
  function TIFFCheckDirOffset (line 982) | static int
  function CheckDirCount (line 1024) | static int
  function uint16 (line 1048) | static uint16
  function tsize_t (line 1152) | static tsize_t
  function tsize_t (line 1212) | static tsize_t
  function cvtRational (line 1228) | static int
  function TIFFFetchRational (line 1249) | static float
  function TIFFFetchFloat (line 1263) | static float
  function TIFFFetchByteArray (line 1276) | static int
  function TIFFFetchShortArray (line 1322) | static int
  function TIFFFetchShortPair (line 1346) | static int
  function TIFFFetchLongArray (line 1384) | static int
  function TIFFFetchRationalArray (line 1397) | static int
  function TIFFFetchFloatArray (line 1424) | static int
  function TIFFFetchDoubleArray (line 1449) | static int
  function TIFFFetchAnyArray (line 1468) | static int
  function TIFFFetchNormalTag (line 1551) | static int
  function TIFFFetchPerSampleShorts (line 1696) | static int
  function TIFFFetchPerSampleLongs (line 1737) | static int
  function TIFFFetchPerSampleAnys (line 1777) | static int
  function TIFFFetchStripThing (line 1818) | static int
  function TIFFFetchRefBlackWhite (line 1882) | static int
  function TIFFFetchSubjectDistance (line 1915) | static int
  function ChopUpSingleUncompressedStrip (line 1942) | static void

FILE: src/main/jni/tiff/libtiff/tif_dirwrite.c
  function _TIFFWriteDirectory (line 80) | static int
  function TIFFWriteDirectory (line 413) | int
  function TIFFCheckpointDirectory (line 425) | int
  function _TIFFWriteCustomDirectory (line 437) | static int
  function TIFFWriteCustomDirectory (line 558) | int
  function TIFFWriteNormalTag (line 567) | static int
  function TIFFSetupShortLong (line 783) | static void
  function TIFFSetupShort (line 800) | static void
  function TIFFWritePerSampleShorts (line 817) | static int
  function TIFFWritePerSampleAnys (line 851) | static int
  function TIFFSetupShortPair (line 882) | static int
  function TIFFWriteShortTable (line 900) | static int
  function TIFFWriteByteArray (line 922) | static int
  function TIFFWriteShortArray (line 952) | static int
  function TIFFWriteLongArray (line 974) | static int
  function TIFFWriteRationalArray (line 988) | static int
  function TIFFWriteFloatArray (line 1030) | static int
  function TIFFWriteDoubleArray (line 1041) | static int
  function TIFFWriteAnyArray (line 1057) | static int
  function TIFFWriteTransferFunction (line 1163) | static int
  function TIFFWriteInkNames (line 1186) | static int
  function TIFFWriteData (line 1200) | static int
  function TIFFRewriteDirectory (line 1245) | int
  function TIFFLinkDirectory (line 1322) | static int

FILE: src/main/jni/tiff/libtiff/tif_dumpmode.c
  function DumpModeEncode (line 37) | static int
  function DumpModeDecode (line 70) | static int
  function DumpModeSeek (line 96) | static int
  function TIFFInitDumpMode (line 107) | int

FILE: src/main/jni/tiff/libtiff/tif_error.c
  function TIFFErrorHandler (line 34) | TIFFErrorHandler
  function TIFFErrorHandlerExt (line 42) | TIFFErrorHandlerExt
  function TIFFError (line 50) | void
  function TIFFErrorExt (line 62) | void

FILE: src/main/jni/tiff/libtiff/tif_extension.c
  function TIFFGetTagListCount (line 36) | int TIFFGetTagListCount( TIFF *tif )
  function ttag_t (line 44) | ttag_t TIFFGetTagListEntry( TIFF *tif, int tag_index )
  function TIFFTagMethods (line 60) | TIFFTagMethods *TIFFAccessTagMethods( TIFF *tif )
  function TIFFSetClientInfo (line 80) | void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )

FILE: src/main/jni/tiff/libtiff/tif_fax3.c
  type Fax3BaseState (line 50) | typedef struct {
  type Ttag (line 70) | typedef enum { G3_1D, G3_2D } Ttag;
  type Fax3CodecState (line 71) | typedef struct {
  function Fax3PreDecode (line 150) | static int
  function Fax3Unexpected (line 183) | static void
  function Fax3Extension (line 193) | static void
  function Fax3BadLength (line 204) | static void
  function Fax3PrematureEOF (line 216) | static void
  function Fax3Decode1D (line 232) | static int
  function Fax3Decode2D (line 271) | static int
  function _TIFFFax3fillruns (line 365) | void
  function Fax3SetupState (line 462) | static int
  function Fax3PutBits (line 573) | static void
  function putspan (line 608) | static void
  function Fax3PutEOL (line 651) | static void
  function Fax3PreEncode (line 688) | static int
  function int32 (line 779) | static int32
  function int32 (line 838) | static int32
  function Fax3Encode1DRow (line 917) | static int
  function Fax3Encode2DRow (line 964) | static int
  function Fax3Encode (line 1009) | static int
  function Fax3PostEncode (line 1044) | static int
  function Fax3Close (line 1054) | static void
  function Fax3Cleanup (line 1071) | static void
  function Fax3VSetField (line 1142) | static int
  function Fax3VGetField (line 1202) | static int
  function Fax3PrintDir (line 1247) | static void
  function InitCCITTFax3 (line 1309) | static int
  function TIFFInitCCITTFax3 (line 1378) | int
  function Fax4Decode (line 1409) | static int
  function Fax4Encode (line 1457) | static int
  function Fax4PostEncode (line 1473) | static int
  function TIFFInitCCITTFax4 (line 1486) | int
  function Fax3DecodeRLE (line 1523) | static int
  function TIFFInitCCITTRLE (line 1568) | int
  function TIFFInitCCITTRLEW (line 1585) | int

FILE: src/main/jni/tiff/libtiff/tif_fax3.h
  type TIFFFaxTabEnt (line 84) | typedef struct {		/* state table entry */

FILE: src/main/jni/tiff/libtiff/tif_flush.c
  function TIFFFlush (line 32) | int
  function TIFFFlushData (line 55) | int

FILE: src/main/jni/tiff/libtiff/tif_getimage.c
  function TIFFRGBAImageOK (line 71) | int
  function TIFFRGBAImageEnd (line 192) | void
  function isCCITTCompression (line 212) | static int
  function TIFFRGBAImageBegin (line 223) | int
  function TIFFRGBAImageGet (line 449) | int
  function TIFFReadRGBAImageOriented (line 468) | int
  function TIFFReadRGBAImage (line 494) | int
  function setorientation (line 502) | static int
  function gtTileContig (line 569) | static int
  function gtTileSeparate (line 662) | static int
  function gtStripContig (line 787) | static int
  function gtStripSeparate (line 870) | static int
  function DECLAREContigPutFunc (line 1057) | DECLAREContigPutFunc(put8bitcmaptile)
  function DECLAREContigPutFunc (line 1077) | DECLAREContigPutFunc(put4bitcmaptile)
  function DECLAREContigPutFunc (line 1094) | DECLAREContigPutFunc(put2bitcmaptile)
  function DECLAREContigPutFunc (line 1111) | DECLAREContigPutFunc(put1bitcmaptile)
  function DECLAREContigPutFunc (line 1128) | DECLAREContigPutFunc(putgreytile)
  function DECLAREContigPutFunc (line 1148) | DECLAREContigPutFunc(put16bitbwtile)
  function DECLAREContigPutFunc (line 1173) | DECLAREContigPutFunc(put1bitbwtile)
  function DECLAREContigPutFunc (line 1190) | DECLAREContigPutFunc(put2bitbwtile)
  function DECLAREContigPutFunc (line 1207) | DECLAREContigPutFunc(put4bitbwtile)
  function DECLAREContigPutFunc (line 1224) | DECLAREContigPutFunc(putRGBcontig8bittile)
  function DECLAREContigPutFunc (line 1243) | DECLAREContigPutFunc(putRGBAAcontig8bittile)
  function DECLAREContigPutFunc (line 1262) | DECLAREContigPutFunc(putRGBUAcontig8bittile)
  function DECLAREContigPutFunc (line 1285) | DECLAREContigPutFunc(putRGBcontig16bittile)
  function DECLAREContigPutFunc (line 1305) | DECLAREContigPutFunc(putRGBAAcontig16bittile)
  function DECLAREContigPutFunc (line 1325) | DECLAREContigPutFunc(putRGBUAcontig16bittile)
  function DECLAREContigPutFunc (line 1351) | DECLAREContigPutFunc(putRGBcontig8bitCMYKtile)
  function DECLAREContigPutFunc (line 1376) | DECLAREContigPutFunc(putRGBcontig8bitCMYKMaptile)
  function DECLARESepPutFunc (line 1411) | DECLARESepPutFunc(putRGBseparate8bittile)
  function DECLARESepPutFunc (line 1424) | DECLARESepPutFunc(putRGBAAseparate8bittile)
  function DECLARESepPutFunc (line 1437) | DECLARESepPutFunc(putRGBUAseparate8bittile)
  function DECLARESepPutFunc (line 1457) | DECLARESepPutFunc(putRGBseparate16bittile)
  function DECLARESepPutFunc (line 1474) | DECLARESepPutFunc(putRGBAAseparate16bittile)
  function DECLARESepPutFunc (line 1492) | DECLARESepPutFunc(putRGBUAseparate16bittile)
  function DECLAREContigPutFunc (line 1516) | DECLAREContigPutFunc(putcontig8bitCIELab)
  function putcontig8bitYCbCrGenericTile (line 1557) | static void putcontig8bitYCbCrGenericTile(
  function DECLAREContigPutFunc (line 1627) | DECLAREContigPutFunc(putcontig8bitYCbCr44tile)
  function DECLAREContigPutFunc (line 1724) | DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
  function DECLAREContigPutFunc (line 1802) | DECLAREContigPutFunc(putcontig8bitYCbCr41tile)
  function DECLAREContigPutFunc (line 1846) | DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
  function DECLAREContigPutFunc (line 1903) | DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
  function DECLAREContigPutFunc (line 1939) | DECLAREContigPutFunc(putcontig8bitYCbCr12tile)
  function DECLAREContigPutFunc (line 1976) | DECLAREContigPutFunc(putcontig8bitYCbCr11tile)
  function DECLARESepPutFunc (line 1998) | DECLARESepPutFunc(putseparate8bitYCbCr11tile)
  function initYCbCrConversion (line 2016) | static int
  function tileContigRoutine (line 2045) | static tileContigRoutine
  function makebwmap (line 2085) | static int
  function setupMap (line 2144) | static int
  function checkcmap (line 2183) | static int
  function cvtcmap (line 2197) | static void
  function makecmap (line 2221) | static int
  function buildMap (line 2277) | static int
  function PickContigCase (line 2315) | static int
  function PickSeparateCase (line 2458) | static int
  function TIFFReadRGBAStrip (line 2520) | int
  function TIFFReadRGBATile (line 2571) | int

FILE: src/main/jni/tiff/libtiff/tif_jbig.c
  type JBIGState (line 40) | typedef struct
  function JBIGSetupDecode (line 66) | static int JBIGSetupDecode(TIFF* tif)
  function JBIGDecode (line 77) | static int JBIGDecode(TIFF* tif, tidata_t buffer, tsize_t size, tsample_...
  function JBIGSetupEncode (line 130) | static int JBIGSetupEncode(TIFF* tif)
  function JBIGCopyEncodedData (line 141) | static int JBIGCopyEncodedData(TIFF* tif, tidata_t pp, tsize_t cc, tsamp...
  function JBIGOutputBie (line 169) | static void JBIGOutputBie(unsigned char* buffer, size_t len, void *userD...
  function JBIGEncode (line 181) | static int JBIGEncode(TIFF* tif, tidata_t buffer, tsize_t size, tsample_...
  function JBIGCleanup (line 205) | static void JBIGCleanup(TIFF* tif)
  function JBIGPrintDir (line 220) | static void JBIGPrintDir(TIFF* tif, FILE* fd, long flags)
  function JBIGVGetField (line 254) | static int JBIGVGetField(TIFF* tif, ttag_t tag, va_list ap)
  function JBIGVSetField (line 283) | static int JBIGVSetField(TIFF* tif, ttag_t tag, va_list ap)
  function TIFFInitJBIG (line 314) | int TIFFInitJBIG(TIFF* tif, int scheme)

FILE: src/main/jni/tiff/libtiff/tif_jpeg.c
  type boolean (line 82) | typedef unsigned char boolean;
  type jpeg_destination_mgr (line 109) | typedef struct jpeg_destination_mgr jpeg_destination_mgr;
  type jpeg_source_mgr (line 110) | typedef struct jpeg_source_mgr jpeg_source_mgr;
  type jpeg_error_mgr (line 111) | typedef	struct jpeg_error_mgr jpeg_error_mgr;
  type JPEGState (line 126) | typedef	struct {
  function TIFFjpeg_error_exit (line 222) | static void
  function TIFFjpeg_output_message (line 239) | static void
  function TIFFjpeg_create_compress (line 257) | static int
  function TIFFjpeg_create_decompress (line 268) | static int
  function TIFFjpeg_set_defaults (line 279) | static int
  function TIFFjpeg_set_colorspace (line 285) | static int
  function TIFFjpeg_set_quality (line 291) | static int
  function TIFFjpeg_suppress_tables (line 298) | static int
  function TIFFjpeg_start_compress (line 304) | static int
  function TIFFjpeg_write_scanlines (line 311) | static int
  function TIFFjpeg_write_raw_data (line 318) | static int
  function TIFFjpeg_finish_compress (line 325) | static int
  function TIFFjpeg_write_tables (line 331) | static int
  function TIFFjpeg_read_header (line 337) | static int
  function TIFFjpeg_start_decompress (line 343) | static int
  function TIFFjpeg_read_scanlines (line 349) | static int
  function TIFFjpeg_read_raw_data (line 356) | static int
  function TIFFjpeg_finish_decompress (line 363) | static int
  function TIFFjpeg_abort (line 369) | static int
  function TIFFjpeg_destroy (line 375) | static int
  function JSAMPARRAY (line 381) | static JSAMPARRAY
  function std_init_destination (line 396) | static void
  function boolean (line 406) | static boolean
  function std_term_destination (line 421) | static void
  function TIFFjpeg_data_dest (line 433) | static void
  function tables_init_destination (line 447) | static void
  function boolean (line 457) | static boolean
  function tables_term_destination (line 475) | static void
  function TIFFjpeg_tables_dest (line 484) | static int
  function std_init_source (line 513) | static void
  function boolean (line 523) | static boolean
  function std_skip_input_data (line 541) | static void
  function std_term_source (line 557) | static void
  function TIFFjpeg_data_src (line 566) | static void
  function tables_init_source (line 585) | static void
  function TIFFjpeg_tables_src (line 594) | static void
  function alloc_downsampled_buffers (line 608) | static int
  function JPEGSetupDecode (line 638) | static int
  function JPEGPreDecode (line 681) | static int
  function JPEGDecode (line 880) | static int
  function JPEGDecodeRaw (line 984) | static int
  function unsuppress_quant_table (line 1109) | static void
  function unsuppress_huff_table (line 1118) | static void
  function prepare_JPEGTables (line 1129) | static int
  function JPEGSetupEncode (line 1163) | static int
  function JPEGPreEncode (line 1293) | static int
  function JPEGEncode (line 1414) | static int
  function JPEGEncodeRaw (line 1447) | static int
  function JPEGPostEncode (line 1531) | static int
  function JPEGCleanup (line 1566) | static void
  function JPEGResetUpsampled (line 1587) | static void
  function JPEGVSetField (line 1619) | static int
  function JPEGFixupTestSubsampling (line 1717) | static void
  function JPEGVGetField (line 1754) | static int
  function JPEGPrintDir (line 1796) | static void
  function uint32 (line 1819) | static uint32
  function JPEGDefaultTileSize (line 1831) | static void
  function JPEGInitializeLibJPEG (line 1864) | static int JPEGInitializeLibJPEG( TIFF * tif, int force_encode, int forc...
  function TIFFInitJPEG (line 1930) | int

FILE: src/main/jni/tiff/libtiff/tif_luv.c
  type LogLuvState (line 158) | typedef	struct logLuvState LogLuvState;
  type logLuvState (line 160) | struct logLuvState {
  function LogL16Decode (line 183) | static int
  function LogLuvDecode24 (line 240) | static int
  function LogLuvDecode32 (line 282) | static int
  function LogLuvDecodeStrip (line 342) | static int
  function LogLuvDecodeTile (line 358) | static int
  function LogL16Encode (line 372) | static int
  function LogLuvEncode24 (line 460) | static int
  function LogLuvEncode32 (line 505) | static int
  function LogLuvEncodeStrip (line 595) | static int
  function LogLuvEncodeTile (line 610) | static int
  function LogL16toY (line 649) | double
  function LogL16fromY (line 664) | int
  function L16toY (line 678) | static void
  function L16toGry (line 688) | static void
  function L16fromY (line 700) | static void
  function XYZtoRGB24 (line 713) | void
  function LogL10toY (line 731) | double
  function LogL10fromY (line 742) | int
  function oog_encode (line 757) | static int
  function uv_encode (line 813) | int
  function uv_decode (line 835) | int
  function LogLuv24toXYZ (line 867) | void
  function uint32 (line 895) | uint32
  function Luv24toXYZ (line 918) | static void
  function Luv24toLuv48 (line 931) | static void
  function Luv24toRGB (line 951) | static void
  function Luv24fromXYZ (line 966) | static void
  function Luv24fromLuv48 (line 978) | static void
  function LogLuv32toXYZ (line 1008) | void
  function uint32 (line 1033) | uint32
  function Luv32toXYZ (line 1059) | static void
  function Luv32toLuv48 (line 1071) | static void
  function Luv32toRGB (line 1089) | static void
  function Luv32fromXYZ (line 1104) | static void
  function Luv32fromLuv48 (line 1116) | static void
  function _logLuvNop (line 1139) | static void
  function LogL16GuessDataFmt (line 1145) | static int
  function uint32 (line 1164) | static uint32
  function LogL16InitState (line 1175) | static int
  function LogLuvGuessDataFmt (line 1216) | static int
  function LogLuvInitState (line 1268) | static int
  function LogLuvSetupDecode (line 1317) | static int
  function LogLuvSetupEncode (line 1378) | static int
  function LogLuvClose (line 1446) | static void
  function LogLuvCleanup (line 1464) | static void
  function LogLuvVSetField (line 1482) | static int
  function LogLuvVGetField (line 1540) | static int
  function TIFFInitSGILog (line 1561) | int

FILE: src/main/jni/tiff/libtiff/tif_lzw.c
  type LZWBaseState (line 91) | typedef	struct {
  type uint16 (line 112) | typedef uint16 hcode_t;
  type hash_t (line 113) | typedef struct {
  type code_t (line 121) | typedef struct code_ent {
  type LZWCodecState (line 130) | typedef struct {
  function LZWSetupDecode (line 191) | static int
  function LZWPreDecode (line 253) | static int
  function codeLoop (line 341) | static void
  function LZWDecode (line 349) | static int
  function LZWDecodeCompat (line 560) | static int
  function LZWSetupEncode (line 741) | static int
  function LZWPreEncode (line 759) | static int
  function LZWEncode (line 824) | static int
  function LZWPostEncode (line 989) | static int
  function cl_hash (line 1018) | static void
  function LZWCleanup (line 1040) | static void
  function TIFFInitLZW (line 1059) | int

FILE: src/main/jni/tiff/libtiff/tif_msdos.c
  function tsize_t (line 36) | static tsize_t
  function tsize_t (line 42) | static tsize_t
  function toff_t (line 48) | static toff_t
  function _tiffCloseProc (line 54) | static int
  function toff_t (line 62) | static toff_t
  function _tiffMapProc (line 69) | static int
  function _tiffUnmapProc (line 75) | static void
  function TIFF (line 83) | TIFF*
  function TIFF (line 100) | TIFF*
  function tdata_t (line 131) | tdata_t
  function _TIFFfree (line 137) | void
  function tdata_t (line 143) | tdata_t
  function _TIFFmemset (line 149) | void
  function _TIFFmemcpy (line 155) | void
  function _TIFFmemcmp (line 161) | int
  function msdosWarningHandler (line 167) | static void
  function msdosErrorHandler (line 178) | static void

FILE: src/main/jni/tiff/libtiff/tif_next.c
  function NeXTDecode (line 48) | static int
  function TIFFInitNeXT (line 136) | int

FILE: src/main/jni/tiff/libtiff/tif_ojpeg.c
  type jpeg_error_mgr (line 195) | typedef struct jpeg_error_mgr jpeg_error_mgr;
  type jpeg_common_struct (line 196) | typedef struct jpeg_common_struct jpeg_common_struct;
  type jpeg_decompress_struct (line 197) | typedef struct jpeg_decompress_struct jpeg_decompress_struct;
  type jpeg_source_mgr (line 198) | typedef struct jpeg_source_mgr jpeg_source_mgr;
  type OJPEGStateInBufferSource (line 200) | typedef enum {
  type OJPEGStateOutState (line 207) | typedef enum {
  type OJPEGState (line 220) | typedef struct {
  function TIFFInitOJPEG (line 391) | int
  function OJPEGVGetField (line 452) | static int
  function OJPEGVSetField (line 494) | static int
  function OJPEGPrintDir (line 576) | static void
  function OJPEGSetupDecode (line 614) | static int
  function OJPEGPreDecode (line 622) | static int
  function OJPEGPreDecodeSkipRaw (line 685) | static int
  function OJPEGPreDecodeSkipScanlines (line 718) | static int
  function OJPEGDecode (line 741) | static int
  function OJPEGDecodeRaw (line 759) | static int
  function OJPEGDecodeScanlines (line 814) | static int
  function OJPEGPostDecode (line 839) | static void
  function OJPEGSetupEncode (line 854) | static int
  function OJPEGPreEncode (line 862) | static int
  function OJPEGEncode (line 871) | static int
  function OJPEGPostEncode (line 882) | static int
  function OJPEGCleanup (line 890) | static void
  function OJPEGSubsamplingCorrect (line 936) | static void
  function OJPEGReadHeaderInfo (line 989) | static int
  function OJPEGReadSecondarySos (line 1050) | static int
  function OJPEGWriteHeaderInfo (line 1100) | static int
  function OJPEGLibjpegSessionAbort (line 1192) | static void
  function OJPEGReadHeaderInfoSec (line 1201) | static int
  function OJPEGReadHeaderInfoSecStreamDri (line 1332) | static int
  function OJPEGReadHeaderInfoSecStreamDqt (line 1352) | static int
  function OJPEGReadHeaderInfoSecStreamDht (line 1411) | static int
  function OJPEGReadHeaderInfoSecStreamSof (line 1483) | static int
  function OJPEGReadHeaderInfoSecStreamSos (line 1631) | static int
  function OJPEGReadHeaderInfoSecTablesQTable (line 1679) | static int
  function OJPEGReadHeaderInfoSecTablesDcTable (line 1733) | static int
  function OJPEGReadHeaderInfoSecTablesAcTable (line 1797) | static int
  function OJPEGReadBufferFill (line 1861) | static int
  function OJPEGReadByte (line 1936) | static int
  function OJPEGReadBytePeek (line 1951) | static int
  function OJPEGReadByteAdvance (line 1964) | static void
  function OJPEGReadWord (line 1972) | static int
  function OJPEGReadBlock (line 1985) | static int
  function OJPEGReadSkip (line 2014) | static void
  function OJPEGWriteStream (line 2044) | static int
  function OJPEGWriteStreamSoi (line 2117) | static void
  function OJPEGWriteStreamQTable (line 2129) | static void
  function OJPEGWriteStreamDcTable (line 2141) | static void
  function OJPEGWriteStreamAcTable (line 2153) | static void
  function OJPEGWriteStreamDri (line 2165) | static void
  function OJPEGWriteStreamSof (line 2184) | static void
  function OJPEGWriteStreamSos (line 2220) | static void
  function OJPEGWriteStreamCompressed (line 2252) | static int
  function OJPEGWriteStreamRst (line 2285) | static void
  function OJPEGWriteStreamEoi (line 2300) | static void
  function jpeg_create_decompress_encap (line 2312) | static int
  function jpeg_read_header_encap (line 2320) | static int
  function jpeg_start_decompress_encap (line 2328) | static int
  function jpeg_read_scanlines_encap (line 2336) | static int
  function jpeg_read_raw_data_encap (line 2344) | static int
  function jpeg_encap_unwind (line 2352) | static void
  function OJPEGLibjpegJpegErrorMgrOutputMessage (line 2360) | static void
  function OJPEGLibjpegJpegErrorMgrErrorExit (line 2368) | static void
  function OJPEGLibjpegJpegSourceMgrInitSource (line 2377) | static void
  function boolean (line 2383) | static boolean
  function OJPEGLibjpegJpegSourceMgrSkipInputData (line 2400) | static void
  function boolean (line 2409) | static boolean
  function OJPEGLibjpegJpegSourceMgrTermSource (line 2419) | static void

FILE: src/main/jni/tiff/libtiff/tif_open.c
  function _tiffDummyMapProc (line 81) | static int
  function _tiffDummyUnmapProc (line 88) | static void
  function TIFFInitOrder (line 99) | static void
  function _TIFFgetMode (line 116) | int
  function TIFF (line 140) | TIFF*

FILE: src/main/jni/tiff/libtiff/tif_packbits.c
  function PackBitsPreEncode (line 36) | static int
  function PackBitsPostEncode (line 53) | static int
  type tidata (line 66) | typedef unsigned char tidata;
  function PackBitsEncode (line 71) | static int
  function PackBitsEncodeChunk (line 198) | static int
  function PackBitsDecode (line 217) | static int
  function TIFFInitPackBits (line 277) | int

FILE: src/main/jni/tiff/libtiff/tif_pixarlog.c
  function horizontalAccumulateF (line 110) | static void
  function horizontalAccumulate12 (line 173) | static void
  function horizontalAccumulate16 (line 241) | static void
  function horizontalAccumulate11 (line 293) | static void
  function horizontalAccumulate8 (line 336) | static void
  function horizontalAccumulate8abgr (line 385) | static void
  type PixarLogState (line 454) | typedef	struct {
  function PixarLogMakeTables (line 476) | static int
  function PixarLogGuessDataFmt (line 598) | static int
  function uint32 (line 633) | static uint32
  function PixarLogSetupDecode (line 644) | static int
  function PixarLogPreDecode (line 690) | static int
  function PixarLogDecode (line 702) | static int
  function PixarLogSetupEncode (line 825) | static int
  function PixarLogPreEncode (line 865) | static int
  function horizontalDifferenceF (line 877) | static void
  function horizontalDifference16 (line 935) | static void
  function horizontalDifference8 (line 989) | static void
  function PixarLogEncode (line 1044) | static int
  function PixarLogPostEncode (line 1126) | static int
  function PixarLogClose (line 1157) | static void
  function PixarLogCleanup (line 1172) | static void
  function PixarLogVSetField (line 1204) | static int
  function PixarLogVGetField (line 1266) | static int
  function TIFFInitPixarLog (line 1289) | int

FILE: src/main/jni/tiff/libtiff/tif_predict.c
  function PredictorSetup (line 52) | static int
  function PredictorSetupDecode (line 101) | static int
  function PredictorSetupEncode (line 179) | static int
  function horAcc8 (line 239) | static void
  function swabHorAcc16 (line 282) | static void
  function horAcc16 (line 299) | static void
  function swabHorAcc32 (line 315) | static void
  function horAcc32 (line 332) | static void
  function fpAcc (line 351) | static void
  function PredictorDecodeRow (line 388) | static int
  function PredictorDecodeTile (line 411) | static int
  function horDiff8 (line 433) | static void
  function horDiff16 (line 478) | static void
  function horDiff32 (line 496) | static void
  function fpDiff (line 517) | static void
  function PredictorEncodeRow (line 550) | static int
  function PredictorEncodeTile (line 564) | static int
  function PredictorVSetField (line 615) | static int
  function PredictorVGetField (line 635) | static int
  function PredictorPrintDir (line 653) | static void
  function TIFFPredictorInit (line 672) | int
  function TIFFPredictorCleanup (line 713) | int

FILE: src/main/jni/tiff/libtiff/tif_predict.h
  type TIFFPredictorState (line 38) | typedef struct {

FILE: src/main/jni/tiff/libtiff/tif_print.c
  function _TIFFPrintField (line 63) | static void
  function _TIFFPrettyPrintField (line 114) | static int
  function TIFFPrintDirectory (line 194) | void
  function _TIFFprintAscii (line 611) | void
  function _TIFFprintAsciiTag (line 631) | void

FILE: src/main/jni/tiff/libtiff/tif_read.c
  function TIFFSeek (line 46) | static int
  function TIFFReadScanline (line 95) | int
  function tsize_t (line 123) | tsize_t
  function tsize_t (line 170) | static tsize_t
  function tsize_t (line 217) | tsize_t
  function TIFFFillStrip (line 261) | int
  function tsize_t (line 369) | tsize_t
  function tsize_t (line 383) | tsize_t
  function tsize_t (line 409) | static tsize_t
  function tsize_t (line 459) | tsize_t
  function TIFFFillTile (line 496) | int
  function TIFFReadBufferSetup (line 592) | int
  function TIFFStartStrip (line 626) | static int
  function TIFFStartTile (line 656) | static int
  function TIFFCheckRead (line 687) | static int
  function _TIFFNoPostDecode (line 703) | void
  function _TIFFSwab16BitData (line 709) | void
  function _TIFFSwab24BitData (line 717) | void
  function _TIFFSwab32BitData (line 725) | void
  function _TIFFSwab64BitData (line 733) | void

FILE: src/main/jni/tiff/libtiff/tif_stream.cxx
  class tiffis_data (line 37) | class tiffis_data
  class tiffos_data (line 45) | class tiffos_data
  function tsize_t (line 53) | static tsize_t
  function tsize_t (line 59) | static tsize_t
  function tsize_t (line 69) | static tsize_t
  function tsize_t (line 81) | static tsize_t
  function toff_t (line 87) | static toff_t
  function toff_t (line 160) | static toff_t
  function toff_t (line 180) | static toff_t
  function toff_t (line 195) | static toff_t
  function _tiffosCloseProc (line 209) | static int
  function _tiffisCloseProc (line 217) | static int
  function _tiffDummyMapProc (line 225) | static int
  function _tiffDummyUnmapProc (line 231) | static void
  function TIFF (line 239) | static TIFF*
  function TIFF (line 272) | TIFF*
  function TIFF (line 288) | TIFF*

FILE: src/main/jni/tiff/libtiff/tif_strip.c
  function uint32 (line 34) | static uint32
  function uint32 (line 51) | static uint32
  function tstrip_t (line 67) | tstrip_t
  function tstrip_t (line 89) | tstrip_t
  function tsize_t (line 106) | tsize_t
  function tsize_t (line 157) | tsize_t
  function tsize_t (line 181) | tsize_t
  function uint32 (line 197) | uint32
  function uint32 (line 203) | uint32
  function tsize_t (line 226) | tsize_t
  function tsize_t (line 274) | tsize_t
  function tsize_t (line 300) | tsize_t
  function tsize_t (line 345) | tsize_t

FILE: src/main/jni/tiff/libtiff/tif_swab.c
  function TIFFSwabShort (line 35) | void
  function TIFFSwabLong (line 46) | void
  function TIFFSwabArrayOfShort (line 58) | void
  function TIFFSwabArrayOfTriples (line 74) | void
  function TIFFSwabArrayOfLong (line 90) | void
  function TIFFSwabDouble (line 107) | void
  function TIFFSwabArrayOfDouble (line 119) | void
  function TIFFReverseBits (line 217) | void

FILE: src/main/jni/tiff/libtiff/tif_thunder.c
  function ThunderDecode (line 66) | static int
  function ThunderDecodeRow (line 133) | static int
  function TIFFInitThunderScan (line 148) | int

FILE: src/main/jni/tiff/libtiff/tif_tile.c
  function uint32 (line 34) | static uint32
  function uint32 (line 51) | static uint32
  function ttile_t (line 67) | ttile_t
  function TIFFCheckTile (line 104) | int
  function ttile_t (line 144) | ttile_t
  function tsize_t (line 173) | tsize_t
  function tsize_t (line 192) | tsize_t
  function tsize_t (line 240) | tsize_t
  function TIFFDefaultTileSize (line 252) | void
  function _TIFFDefaultTileSize (line 258) | void

FILE: src/main/jni/tiff/libtiff/tif_unix.c
  function tsize_t (line 55) | static tsize_t
  function tsize_t (line 61) | static tsize_t
  function toff_t (line 67) | static toff_t
  function _tiffCloseProc (line 73) | static int
  function toff_t (line 80) | static toff_t
  function _tiffMapProc (line 95) | static int
  function _tiffUnmapProc (line 110) | static void
  function _tiffMapProc (line 117) | static int
  function _tiffUnmapProc (line 124) | static void
  function TIFF (line 134) | TIFF*
  function TIFF (line 152) | TIFF*
  function TIFF (line 189) | TIFF*
  function _TIFFfree (line 244) | void
  function _TIFFmemset (line 256) | void
  function _TIFFmemcpy (line 262) | void
  function _TIFFmemcmp (line 268) | int
  function unixWarningHandler (line 274) | static void
  function unixErrorHandler (line 285) | static void

FILE: src/main/jni/tiff/libtiff/tif_warning.c
  function TIFFErrorHandler (line 34) | TIFFErrorHandler
  function TIFFErrorHandlerExt (line 42) | TIFFErrorHandlerExt
  function TIFFWarning (line 50) | void
  function TIFFWarningExt (line 62) | void

FILE: src/main/jni/tiff/libtiff/tif_win3.c
  function tsize_t (line 39) | static tsize_t
  function tsize_t (line 45) | static tsize_t
  function toff_t (line 51) | static toff_t
  function _tiffCloseProc (line 57) | static int
  function toff_t (line 65) | static toff_t
  function _tiffMapProc (line 72) | static int
  function _tiffUnmapProc (line 78) | static void
  function TIFF (line 86) | TIFF*
  function TIFF (line 103) | TIFF*
  function tdata_t (line 130) | tdata_t
  function _TIFFfree (line 136) | void
  function tdata_t (line 142) | tdata_t
  function _TIFFmemset (line 148) | void
  function _TIFFmemcpy (line 165) | void
  function _TIFFmemcmp (line 174) | int
  function win3WarningHandler (line 202) | static void
  function win3ErrorHandler (line 215) | static void

FILE: src/main/jni/tiff/libtiff/tif_win32.c
  function tsize_t (line 35) | static tsize_t
  function tsize_t (line 44) | static tsize_t
  function toff_t (line 53) | static toff_t
  function _tiffCloseProc (line 80) | static int
  function toff_t (line 86) | static toff_t
  function _tiffDummyMapProc (line 92) | static int
  function _tiffMapProc (line 112) | static int
  function _tiffDummyUnmapProc (line 131) | static void
  function _tiffUnmapProc (line 139) | static void
  function TIFF (line 150) | TIFF*
  function TIFF (line 171) | TIFF*
  function TIFF (line 221) | TIFF*
  function tdata_t (line 280) | tdata_t
  function _TIFFfree (line 286) | void
  function tdata_t (line 293) | tdata_t
  function _TIFFmemset (line 318) | void
  function _TIFFmemcpy (line 324) | void
  function _TIFFmemcmp (line 330) | int
  function Win32WarningHandler (line 344) | static void
  function Win32ErrorHandler (line 372) | static void

FILE: src/main/jni/tiff/libtiff/tif_write.c
  function TIFFWriteScanline (line 48) | int
  function tsize_t (line 181) | tsize_t
  function tsize_t (line 263) | tsize_t
  function tsize_t (line 307) | tsize_t
  function tsize_t (line 335) | tsize_t
  function tsize_t (line 422) | tsize_t
  function TIFFSetupStrips (line 442) | int
  function TIFFWriteCheck (line 482) | int
  function TIFFWriteBufferSetup (line 545) | int
  function TIFFGrowStrips (line 588) | static int
  function TIFFAppendToStrip (line 622) | static int
  function TIFFFlushData1 (line 681) | int
  function TIFFSetWriteOffset (line 705) | void

FILE: src/main/jni/tiff/libtiff/tif_zip.c
  type ZIPState (line 68) | typedef	struct {
  function ZIPSetupDecode (line 87) | static int
  function ZIPPreDecode (line 113) | static int
  function ZIPDecode (line 129) | static int
  function ZIPSetupEncode (line 168) | static int
  function ZIPPreEncode (line 192) | static int
  function ZIPEncode (line 210) | static int
  function ZIPPostEncode (line 242) | static int
  function ZIPCleanup (line 273) | static void
  function ZIPVSetField (line 298) | static int
  function ZIPVGetField (line 322) | static int
  function TIFFInitZIP (line 342) | int

FILE: src/main/jni/tiff/libtiff/tiff.h
  type int8 (line 65) | typedef	signed char int8;
  type uint8 (line 67) | typedef	unsigned char uint8;
  type int16 (line 69) | typedef	short int16;
  type uint16 (line 71) | typedef	unsigned short uint16;
  type int32 (line 74) | typedef	int int32;
  type uint32 (line 76) | typedef	unsigned int uint32;
  type int32 (line 79) | typedef	long int32;
  type uint32 (line 81) | typedef	unsigned long uint32;
  type TIFFIgnoreSense (line 85) | enum TIFFIgnoreSense /* IGNORE tag table */
  type TIFFHeader (line 95) | typedef	struct {
  type TIFFDirEntry (line 116) | typedef	struct {
  type TIFFDataType (line 137) | typedef	enum {

FILE: src/main/jni/tiff/libtiff/tiffio.h
  type TIFF (line 40) | typedef	struct tiff TIFF;
  type uint32 (line 61) | typedef uint32 ttag_t;
  type uint16 (line 62) | typedef uint16 tdir_t;
  type uint16 (line 63) | typedef uint16 tsample_t;
  type uint32 (line 64) | typedef uint32 tstrile_t;
  type tstrile_t (line 65) | typedef tstrile_t tstrip_t;
  type tstrile_t (line 66) | typedef tstrile_t ttile_t;
  type int32 (line 67) | typedef int32 tsize_t;
  type uint32 (line 69) | typedef uint32 toff_t;
  type HFILE (line 94) | typedef	HFILE thandle_t;
  type TIFFRGBValue (line 129) | typedef	unsigned char TIFFRGBValue;
  type TIFFDisplay (line 131) | typedef struct {
  type TIFFYCbCrToRGB (line 147) | typedef struct {				/* YCbCr->RGB support */
  type TIFFCIELabToRGB (line 156) | typedef struct {				/* CIE Lab 1976->RGB support */
  type TIFFRGBAImage (line 170) | typedef struct _TIFFRGBAImage TIFFRGBAImage;
  type _TIFFRGBAImage (line 190) | struct _TIFFRGBAImage {
  type TIFFCodec (line 240) | typedef struct {
  type tsize_t (line 263) | typedef	tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
  type toff_t (line 264) | typedef	toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);
  type toff_t (line 266) | typedef	toff_t (*TIFFSizeProc)(thandle_t);
  type TIFFFieldInfo (line 303) | typedef	struct {
  type TIFFTagValue (line 314) | typedef struct _TIFFTagValue {
  type TIFFTagMethods (line 331) | typedef struct {
  type TIFFIgnoreSense (line 404) | enum TIFFIgnoreSense

FILE: src/main/jni/tiff/libtiff/tiffiop.h
  type TIFF_INT64_T (line 64) | typedef TIFF_INT64_T  int64;
  type TIFF_UINT64_T (line 65) | typedef TIFF_UINT64_T uint64;
  type TIFFClientInfoLink (line 81) | typedef struct client_info {
  type tidataval_t (line 90) | typedef	unsigned char tidataval_t;
  type tidataval_t (line 91) | typedef	tidataval_t* tidata_t;
  type uint32 (line 99) | typedef	uint32 (*TIFFStripMethod)(TIFF*, uint32);
  type tiff (line 102) | struct tiff {

FILE: src/main/jni/tiff/port/dummy.c
  function libport_dummy_function (line 7) | void

FILE: src/main/jni/tiff/port/getopt.c
  function getopt (line 54) | int

FILE: src/main/jni/tiff/port/strcasecmp.c
  function strcasecmp (line 40) | int

FILE: src/main/jni/tiff/port/strtoul.c
  function strtoul (line 48) | unsigned long

FILE: src/main/jni/tiff/test/ascii_tag.c
  type Tags (line 45) | struct Tags {
  function main (line 68) | int

FILE: src/main/jni/tiff/test/check_tag.c
  function CheckShortField (line 34) | int
  function CheckLongField (line 53) | int

FILE: src/main/jni/tiff/test/long_tag.c
  type Tags (line 46) | struct Tags {
  function main (line 59) | int

FILE: src/main/jni/tiff/test/short_tag.c
  type SingleTags (line 54) | struct SingleTags {
  function main (line 72) | int

FILE: src/main/jni/tiff/test/strip.c
  function write_strips (line 37) | int
  function read_strips (line 71) | int
  function create_image_striped (line 119) | int
  function read_image_striped (line 183) | int
  function write_scanlines (line 261) | int

FILE: src/main/jni/tiff/test/strip_rw.c
  function main (line 54) | int

FILE: src/main/jni/tiff/tools/bmp2tiff.c
  type BMPType (line 61) | enum BMPType
  type BMPComprMethod (line 90) | enum BMPComprMethod
  type BMPLCSType (line 104) | enum BMPLCSType                 /* Type of logical color space. */
  type BMPCIEXYZ (line 113) | typedef struct
  type BMPCIEXYZTriple (line 120) | typedef struct                  /* This structure contains the x, y, and...
  type BMPFileHeader (line 128) | typedef struct
  type BMPInfoHeader (line 143) | typedef struct
  type BMPColorEntry (line 206) | typedef struct
  function main (line 223) | int
  function rearrangePixels (line 735) | static void
  function processCompressOptions (line 768) | static int
  function usage (line 830) | static void

FILE: src/main/jni/tiff/tools/fax2ps.c
  function printruns (line 67) | static void
  function emitFont (line 161) | static void
  function printTIF (line 193) | void
  function findPage (line 270) | int
  function fax2ps (line 283) | void
  function pcompar (line 309) | static int
  function main (line 319) | int
  function usage (line 426) | static void

FILE: src/main/jni/tiff/tools/fax2tiff.c
  function main (line 71) | int
  function copyFaxFile (line 342) | int
  function usage (line 445) | static void

FILE: src/main/jni/tiff/tools/gif2tiff.c
  function makegamtab (line 58) | void
  function usage (line 83) | static void
  function main (line 132) | int
  function processCompressOptions (line 175) | static int
  function convert (line 197) | int
  function checksignature (line 222) | int
  function readscreen (line 244) | void
  function readgifimage (line 257) | int
  function readextension (line 304) | void
  function readraster (line 320) | int
  function process (line 382) | int
  function initcolors (line 438) | void
  function rasterize (line 450) | void

FILE: src/main/jni/tiff/tools/pal2rgb.c
  function checkcmap (line 46) | static int
  function main (line 67) | int
  function processCompressOptions (line 225) | static int
  function cpTag (line 271) | static void
  type cpTag (line 331) | struct cpTag {
  function cpTags (line 382) | static void
  function usage (line 411) | static void

FILE: src/main/jni/tiff/tools/ppm2tiff.c
  function BadPPM (line 64) | static void
  function main (line 71) | int
  function processG3Options (line 258) | static void
  function processCompressOptions (line 277) | static int
  function usage (line 342) | static void

FILE: src/main/jni/tiff/tools/ras2tiff.c
  function main (line 55) | int
  function processCompressOptions (line 226) | static int
  function usage (line 286) | static void

FILE: src/main/jni/tiff/tools/rasterfile.h
  type rasterfile (line 6) | struct rasterfile {

FILE: src/main/jni/tiff/tools/raw2tiff.c
  type InterleavingType (line 66) | typedef enum {
  function main (line 83) | int
  function swapBytesInScanline (line 330) | static void
  function guessSize (line 354) | static int
  function correlation (line 439) | static double
  function processCompressOptions (line 530) | static int
  function usage (line 627) | static void

FILE: src/main/jni/tiff/tools/rgb2ycbcr.c
  function main (line 66) | int
  function V2Code (line 150) | static unsigned
  function setupLumaTables (line 157) | static void
  function cvtClump (line 168) | static void
  function cvtStrip (line 210) | static void
  function cvtRaster (line 243) | static int
  function tiffcvt (line 273) | static int
  function usage (line 361) | static void

FILE: src/main/jni/tiff/tools/sgi2tiff.c
  function main (line 57) | int
  function processCompressOptions (line 153) | static int
  function cpContig (line 190) | static int
  function cpSeparate (line 265) | static int
  function usage (line 318) | static void

FILE: src/main/jni/tiff/tools/sgisv.c
  type uint32 (line 37) | typedef unsigned long uint32;
  function main (line 55) | int
  function usage (line 141) | static void
  function svRGBSeparate (line 153) | static void
  function svRGBContig (line 194) | static void
  function svGrey (line 233) | static void
  function tiffsv (line 254) | static void

FILE: src/main/jni/tiff/tools/thumbnail.c
  type Contrast (line 50) | typedef enum {
  function main (line 73) | int
  function cpTag (line 137) | static void
  type cpTag (line 197) | struct cpTag {
  function cpTags (line 252) | static void
  function cpStrips (line 261) | static int
  function cpTiles (line 295) | static int
  function cpIFD (line 329) | static int
  function setupBitsTables (line 354) | static void
  function clamp (line 372) | static int clamp(float v, int low, int high)
  function expFill (line 379) | static void
  function setupCmap (line 390) | static void
  function initScale (line 420) | static void
  function setupStepTables (line 436) | static void
  function setrow (line 470) | static void
  function setImage1 (line 512) | static void
  function setImage (line 539) | static void
  function generateThumbnail (line 547) | static int
  function usage (line 619) | static void

FILE: src/main/jni/tiff/tools/tiff2bw.c
  function compresscontig (line 52) | static void
  function compresssep (line 65) | static void
  function checkcmap (line 76) | static int
  function compresspalette (line 86) | static void
  function main (line 107) | int
  function processCompressOptions (line 269) | static int
  function cpTag (line 315) | static void
  type cpTag (line 375) | struct cpTag {
  function cpTags (line 416) | static void
  function usage (line 447) | static void

FILE: src/main/jni/tiff/tools/tiff2pdf.c
  type t2p_cs_t (line 58) | typedef enum {
  type t2p_compress_t (line 71) | typedef enum{
  type t2p_transcode_t (line 85) | typedef enum{
  type t2p_sample_t (line 91) | typedef enum{
  type t2p_err_t (line 105) | typedef enum{
  type T2P_PAGE (line 111) | typedef struct {
  type T2P_BOX (line 119) | typedef struct {
  type T2P_TILE (line 128) | typedef struct {
  type T2P_TILES (line 133) | typedef struct {
  type T2P (line 145) | typedef struct {
  function t2p_disable (line 314) | static void
  function t2p_enable (line 321) | static void
  function tsize_t (line 332) | static tsize_t
  function tsize_t (line 342) | static tsize_t
  function toff_t (line 352) | static toff_t
  function tsize_t (line 362) | static tsize_t
  function tsize_t (line 369) | static tsize_t
  function toff_t (line 381) | static toff_t
  function t2p_closeproc (line 390) | static int
  function toff_t (line 397) | static toff_t
  function t2p_mapproc (line 404) | static int
  function t2p_unmapproc (line 411) | static void
  function main (line 537) | int main(int argc, char** argv){
  function tiff2pdf_usage (line 819) | void tiff2pdf_usage(){
  function tiff2pdf_match_paper_size (line 862) | int tiff2pdf_match_paper_size(float* width, float* length, char* papersi...
  function T2P (line 926) | T2P* t2p_init(){
  function t2p_free (line 952) | void t2p_free(T2P* t2p){
  function t2p_validate (line 1011) | void t2p_validate(T2P* t2p){
  function t2p_read_tiff_init (line 1053) | void t2p_read_tiff_init(T2P* t2p, TIFF* input){
  function t2p_cmp_t2p_page (line 1226) | int t2p_cmp_t2p_page(const void* e1, const void* e2){
  function t2p_read_tiff_data (line 1243) | void t2p_read_tiff_data(T2P* t2p, TIFF* input){
  function t2p_read_tiff_size (line 1823) | void t2p_read_tiff_size(T2P* t2p, TIFF* input){
  function t2p_read_tiff_size_tile (line 1933) | void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
  function t2p_tile_is_right_edge (line 1988) | int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){
  function t2p_tile_is_bottom_edge (line 2003) | int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){
  function t2p_tile_is_edge (line 2018) | int t2p_tile_is_edge(T2P_TILES tiles, ttile_t tile){
  function t2p_tile_is_corner_edge (line 2028) | int t2p_tile_is_corner_edge(T2P_TILES tiles, ttile_t tile){
  function tsize_t (line 2040) | tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
  function tsize_t (line 2623) | tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output...
  function t2p_process_ojpeg_tables (line 3060) | int t2p_process_ojpeg_tables(T2P* t2p, TIFF* input){
  function t2p_process_jpeg_strip (line 3304) | int t2p_process_jpeg_strip(
  function t2p_tile_collapse_left (line 3397) | void t2p_tile_collapse_left(
  function t2p_write_advance_directory (line 3425) | void
  function tsize_t (line 3440) | tsize_t t2p_sample_planar_separate_to_contig(
  function tsize_t (line 3460) | tsize_t t2p_sample_realize_palette(T2P* t2p, unsigned char* buffer){
  function tsize_t (line 3487) | tsize_t t2p_sample_abgr_to_rgb(tdata_t data, uint32 samplecount)
  function tsize_t (line 3507) | tsize_t
  function tsize_t (line 3523) | tsize_t
  function tsize_t (line 3547) | tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t buffer, uint32 samplec...
  function tsize_t (line 3573) | tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
  function tsize_t (line 3590) | tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
  function tsize_t (line 3607) | tsize_t t2p_write_pdf_obj_end(TIFF* output){
  function tsize_t (line 3620) | tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){
  function tsize_t (line 3718) | tsize_t t2p_write_pdf_string(unsigned char* pdfstr, TIFF* output){
  function tsize_t (line 3773) | tsize_t t2p_write_pdf_stream(tdata_t buffer, tsize_t len, TIFF* output){
  function tsize_t (line 3786) | tsize_t t2p_write_pdf_stream_start(TIFF* output){
  function tsize_t (line 3799) | tsize_t t2p_write_pdf_stream_end(TIFF* output){
  function tsize_t (line 3812) | tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* outp...
  function tsize_t (line 3834) | tsize_t t2p_write_pdf_stream_dict_start(TIFF* output){
  function tsize_t (line 3847) | tsize_t t2p_write_pdf_stream_dict_end(TIFF* output){
  function tsize_t (line 3860) | tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
  function tsize_t (line 3877) | tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output){
  function tsize_t (line 3903) | tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output){
  function t2p_pdf_currenttime (line 4027) | void t2p_pdf_currenttime(T2P* t2p)
  function t2p_pdf_tifftime (line 4051) | void t2p_pdf_tifftime(T2P* t2p, TIFF* input){
  function tsize_t (line 4092) | tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
  function tsize_t (line 4131) | tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
  function t2p_compose_pdf_page (line 4226) | void t2p_compose_pdf_page(T2P* t2p){
  function t2p_compose_pdf_page_orient (line 4413) | void t2p_compose_pdf_page_orient(T2P_BOX* boxp, uint16 orientation){
  function t2p_compose_pdf_page_orient_flip (line 4488) | void t2p_compose_pdf_page_orient_flip(T2P_BOX* boxp, uint16 orientation){
  function tsize_t (line 4550) | tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
  function tsize_t (line 4596) | tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile,
  function tsize_t (line 4678) | tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
  function tsize_t (line 4759) | tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
  function tsize_t (line 4793) | tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){
  function tsize_t (line 4811) | tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){
  function tsize_t (line 4827) | tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
  function tsize_t (line 4923) | tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
  function tsize_t (line 4937) | tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
  function tsize_t (line 4955) | tsize_t t2p_write_pdf_xobject_icccs_stream(T2P* t2p, TIFF* output){
  function tsize_t (line 4971) | tsize_t t2p_write_pdf_xobject_palettecs_stream(T2P* t2p, TIFF* output){
  function tsize_t (line 4987) | tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){
  function tsize_t (line 5006) | tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF...
  function tsize_t (line 5116) | tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
  function tsize_t (line 5140) | tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output)
  function tsize_t (line 5232) | tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){

FILE: src/main/jni/tiff/tools/tiff2ps.c
  function main (line 175) | int
  function checkImage (line 334) | static int
  function PhotoshopBanner (line 438) | static void
  function setupPageState (line 453) | static void
  function isCCITTCompression (line 490) | static int
  function PlaceImage (line 511) | int
  function TIFF2PS (line 685) | int
  function PSHead (line 934) | void
  function PSTail (line 969) | void
  function checkcmap (line 977) | static int
  function PS_Lvl2colorspace (line 988) | static void
  function PS_Lvl2ImageDict (line 1068) | static int
  function PS_FlipBytes (line 1398) | static void
  function PS_Lvl2page (line 1419) | int
  function PSpage (line 1607) | void
  function PSColorContigPreamble (line 1670) | void
  function PSColorSeparatePreamble (line 1684) | void
  function PSDataColorContig (line 1709) | void
  function PSDataColorSeparate (line 1771) | void
  function PSDataPalette (line 1804) | void
  function PSDataBW (line 1876) | void
  function PSRawDataBW (line 2004) | void
  function Ascii85Init (line 2101) | void
  function Ascii85Put (line 2137) | void
  function Ascii85Flush (line 2160) | void
  function Ascii85EncodeBlock (line 2214) | int Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 *...
  function usage (line 2350) | static void

FILE: src/main/jni/tiff/tools/tiff2rgba.c
  function main (line 58) | int
  function cvt_by_tile (line 128) | static int
  function cvt_by_strip (line 231) | static int
  function cvt_whole_image (line 342) | static int
  function tiffcvt (line 446) | static int
  function usage (line 510) | static void

FILE: src/main/jni/tiff/tools/tiffcmp.c
  function main (line 62) | int
  function usage (line 123) | static void
  function tiffcmp (line 148) | static int
  function cmptags (line 256) | static int
  function ContigCompare (line 310) | static int
  function PrintIntDiff (line 410) | static void
  function PrintFloatDiff (line 467) | static void
  function SeparateCompare (line 484) | static int
  function checkTag (line 508) | static int
  function CheckShortTag (line 535) | static int
  function CheckShort2Tag (line 542) | static int
  function CheckShortArrayTag (line 563) | static int
  function CheckLongTag (line 602) | static int
  function CheckFloatTag (line 609) | static int
  function CheckStringTag (line 616) | static int
  function leof (line 623) | static void

FILE: src/main/jni/tiff/tools/tiffcp.c
  function nextSrcImage (line 96) | static int nextSrcImage (TIFF *tif, char **imageSpec)
  function TIFF (line 127) | static TIFF* openSrcImage (char **imageSpec)
  function main (line 155) | int
  function processG3Options (line 307) | static void
  function processCompressOptions (line 327) | static int
  function usage (line 422) | static void
  function cpTag (line 444) | static void
  type cpTag (line 499) | struct cpTag {
  function tiffcp (line 546) | static int
  function DECLAREcpFunc (line 763) | DECLAREcpFunc(cpContig2ContigByRow)
  function biasFn (line 808) | static biasFn *lineSubtractFn (unsigned bits)
  function DECLAREcpFunc (line 821) | DECLAREcpFunc(cpBiasedContig2Contig)
  function DECLAREcpFunc (line 898) | DECLAREcpFunc(cpDecodedStrips)
  function DECLAREcpFunc (line 942) | DECLAREcpFunc(cpSeparate2SeparateByRow)
  function DECLAREcpFunc (line 975) | DECLAREcpFunc(cpContig2SeparateByRow)
  function DECLAREcpFunc (line 1020) | DECLAREcpFunc(cpSeparate2ContigByRow)
  function cpStripToTile (line 1062) | static void
  function cpContigBufToSeparateBuf (line 1075) | static void
  function cpSeparateBufToContigBuf (line 1096) | static void
  function cpImage (line 1116) | static int
  function DECLAREreadFunc (line 1149) | DECLAREreadFunc(readContigStripsIntoBuffer)
  function DECLAREreadFunc (line 1170) | DECLAREreadFunc(readSeparateStripsIntoBuffer)
  function DECLAREreadFunc (line 1210) | DECLAREreadFunc(readContigTilesIntoBuffer)
  function DECLAREreadFunc (line 1261) | DECLAREreadFunc(readSeparateTilesIntoBuffer)
  function DECLAREwriteFunc (line 1331) | DECLAREwriteFunc(writeBufferToContigStrips)
  function DECLAREwriteFunc (line 1352) | DECLAREwriteFunc(writeBufferToSeparateStrips)
  function DECLAREwriteFunc (line 1387) | DECLAREwriteFunc(writeBufferToContigTiles)
  function DECLAREwriteFunc (line 1436) | DECLAREwriteFunc(writeBufferToSeparateTiles)
  function DECLAREcpFunc (line 1505) | DECLAREcpFunc(cpContigStrips2ContigTiles)
  function DECLAREcpFunc (line 1516) | DECLAREcpFunc(cpContigStrips2SeparateTiles)
  function DECLAREcpFunc (line 1527) | DECLAREcpFunc(cpSeparateStrips2ContigTiles)
  function DECLAREcpFunc (line 1538) | DECLAREcpFunc(cpSeparateStrips2SeparateTiles)
  function DECLAREcpFunc (line 1549) | DECLAREcpFunc(cpContigTiles2ContigTiles)
  function DECLAREcpFunc (line 1560) | DECLAREcpFunc(cpContigTiles2SeparateTiles)
  function DECLAREcpFunc (line 1571) | DECLAREcpFunc(cpSeparateTiles2ContigTiles)
  function DECLAREcpFunc (line 1582) | DECLAREcpFunc(cpSeparateTiles2SeparateTiles)
  function DECLAREcpFunc (line 1593) | DECLAREcpFunc(cpContigTiles2ContigStrips)
  function DECLAREcpFunc (line 1604) | DECLAREcpFunc(cpContigTiles2SeparateStrips)
  function DECLAREcpFunc (line 1615) | DECLAREcpFunc(cpSeparateTiles2ContigStrips)
  function DECLAREcpFunc (line 1626) | DECLAREcpFunc(cpSeparateTiles2SeparateStrips)
  function copyFunc (line 1637) | static copyFunc

FILE: src/main/jni/tiff/tools/tiffcrop.c
  type offset (line 213) | struct offset {
  type buffinfo (line 232) | struct  buffinfo {
  type zone (line 237) | struct  zone {
  type pageseg (line 242) | struct  pageseg {
  type coordpairs (line 252) | struct  coordpairs {
  type region (line 259) | struct  region {
  type crop_mask (line 274) | struct crop_mask {
  type paperdef (line 323) | struct paperdef {
  type paperdef (line 331) | struct paperdef
  type image_data (line 384) | struct image_data {
  type pagedef (line 399) | struct pagedef {
  type dump_opts (line 414) | struct dump_opts {
  type dump_opts (line 447) | struct dump_opts
  type dump_opts (line 451) | struct dump_opts
  type dump_opts (line 452) | struct dump_opts
  type dump_opts (line 453) | struct dump_opts
  type dump_opts (line 455) | struct dump_opts
  type image_data (line 460) | struct image_data
  type crop_mask (line 461) | struct crop_mask
  type pagedef (line 462) | struct pagedef
  type pageseg (line 462) | struct pageseg
  type buffinfo (line 462) | struct buffinfo
  type dump_opts (line 463) | struct dump_opts
  type crop_mask (line 468) | struct crop_mask
  type pagedef (line 468) | struct pagedef
  type dump_opts (line 469) | struct dump_opts
  type pagedef (line 475) | struct pagedef
  type crop_mask (line 476) | struct crop_mask
  type image_data (line 476) | struct image_data
  type offset (line 477) | struct offset
  type crop_mask (line 478) | struct crop_mask
  type image_data (line 478) | struct image_data
  type pagedef (line 479) | struct pagedef
  type pageseg (line 479) | struct pageseg
  type dump_opts (line 480) | struct dump_opts
  type image_data (line 481) | struct image_data
  type dump_opts (line 481) | struct dump_opts
  type image_data (line 482) | struct image_data
  type image_data (line 483) | struct image_data
  type crop_mask (line 483) | struct crop_mask
  type dump_opts (line 483) | struct dump_opts
  type image_data (line 484) | struct image_data
  type crop_mask (line 484) | struct crop_mask
  type buffinfo (line 485) | struct buffinfo
  type crop_mask (line 486) | struct crop_mask
  type image_data (line 486) | struct image_data
  type dump_opts (line 487) | struct dump_opts
  type buffinfo (line 487) | struct buffinfo
  type image_data (line 492) | struct image_data
  type pageseg (line 492) | struct pageseg
  type image_data (line 494) | struct image_data
  type dump_opts (line 495) | struct dump_opts
  type image_data (line 497) | struct image_data
  type pagedef (line 498) | struct pagedef
  type pageseg (line 498) | struct pageseg
  type dump_opts (line 499) | struct dump_opts
  type image_data (line 502) | struct image_data
  type crop_mask (line 502) | struct crop_mask
  type image_data (line 504) | struct image_data
  type dump_opts (line 505) | struct dump_opts
  type image_data (line 517) | struct image_data
  type image_data (line 532) | struct image_data
  type crop_mask (line 532) | struct crop_mask
  type image_data (line 534) | struct image_data
  type crop_mask (line 534) | struct crop_mask
  type dump_opts (line 569) | struct dump_opts
  function readContigTilesIntoBuffer (line 751) | static int readContigTilesIntoBuffer (TIFF* in, uint8* buf,
  function readSeparateTilesIntoBuffer (line 939) | static int  readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf,
  function writeBufferToContigStrips (line 1086) | static int writeBufferToContigStrips(TIFF* out, uint8* buf, uint32 image...
  function writeBufferToSeparateStrips (line 1117) | static int
  function writeBufferToContigTiles (line 1182) | static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 image...
  function writeBufferToSeparateTiles (line 1257) | static int writeBufferToSeparateTiles (TIFF* out, uint8* buf, uint32 ima...
  function processG3Options (line 1320) | static void
  function processCompressOptions (line 1340) | static int
  function usage (line 1409) | static void
  function cpTag (line 1431) | static void
  type cpTag (line 1486) | struct cpTag {
  function process_command_opts (line 1530) | void  process_command_opts (int argc, char *argv[], char *mp, char *mode...
  function update_output_file (line 2027) | static int
  function main (line 2082) | int
  function dump_data (line 2377) | static int dump_data (FILE *dumpfile, int format, char *dump_tag, unsign...
  function dump_byte (line 2417) | static int dump_byte (FILE *dumpfile, int format, char *dump_tag, unsign...
  function dump_short (line 2452) | static int dump_short (FILE *dumpfile, int format, char *dump_tag, uint1...
  function dump_long (line 2489) | static int dump_long (FILE *dumpfile, int format, char *dump_tag, uint32...
  function dump_wide (line 2525) | static int dump_wide (FILE *dumpfile, int format, char *dump_tag, uint64...
  function dump_info (line 2562) | static void dump_info(FILE *dumpfile, int format, char *prefix, char *ms...
  function dump_buffer (line 2574) | static int dump_buffer (FILE* dumpfile, int format, uint32 rows, uint32 ...
  function extractContigSamplesBytes (line 2609) | static int
  function extractContigSamples8bits (line 2675) | static int
  function extractContigSamples16bits (line 2752) | static int
  function extractContigSamples24bits (line 2841) | static int
  function extractContigSamples32bits (line 2934) | static int
  function extractContigSamplesShifted8bits (line 3039) | static int
  function extractContigSamplesShifted16bits (line 3119) | static int
  function extractContigSamplesShifted24bits (line 3209) | static int
  function extractContigSamplesShifted32bits (line 3307) | static int
  function extractContigSamplesToBuffer (line 3415) | static int
  function extractContigSamplesToTileBuffer (line 3491) | static int
  function readContigStripsIntoBuffer (line 3568) | static int readContigStripsIntoBuffer (TIFF* in, uint8* buf)
  function combineSeparateSamplesBytes (line 3598) | static int
  function combineSeparateSamples8bits (line 3656) | static int
  function combineSeparateSamples16bits (line 3756) | static int
  function combineSeparateSamples24bits (line 3866) | static int
  function combineSeparateSamples32bits (line 3990) | static int
  function combineSeparateTileSamplesBytes (line 4121) | static int
  function combineSeparateTileSamples8bits (line 4182) | static int
  function combineSeparateTileSamples16bits (line 4281) | static int
  function combineSeparateTileSamples24bits (line 4390) | static int
  function combineSeparateTileSamples32bits (line 4514) | static int
  function readSeparateStripsIntoBuffer (line 4647) | static int readSeparateStripsIntoBuffer (TIFF *in, uint8 *obuf, uint32 l...
  function get_page_geometry (line 4825) | static int
  function initPageSetup (line 4850) | static void
  function initImageData (line 4887) | static void
  function initCropMasks (line 4903) | static void
  function initDumpOptions (line 4945) | static void initDumpOptions(struct dump_opts *dump)
  function computeInputPixelOffsets (line 4958) | static int
  function getCropOffsets (line 5245) | static int
  function computeOutputPixelOffsets (line 5443) | static int
  function loadImage (line 5673) | static int
  function correct_orientation (line 5900) | static int  correct_orientation(struct image_data *image, unsigned char ...
  function extractCompositeRegions (line 5953) | static int
  function extractSeparateRegion (line 6201) | static int
  function extractImageSection (line 6324) | static int
  function writeSelections (line 6542) | static int
  function writeImageSections (line 6649) | static int
  function writeSingleSection (line 6707) | static int
  function createImageSection (line 6974) | static int
  function processCropSelections (line 7019) | static int
  function createCroppedImage (line 7254) | static int
  function writeCroppedImage (line 7381) | static int
  function rotateContigSamples8bits (line 7661) | static int
  function rotateContigSamples16bits (line 7737) | static int
  function rotateContigSamples24bits (line 7820) | static int
  function rotateContigSamples32bits (line 7911) | static int
  function rotateImage (line 8020) | static int
  function reverseSamples8bits (line 8302) | static int
  function reverseSamples16bits (line 8367) | static int
  function reverseSamples24bits (line 8442) | static int
  function reverseSamples32bits (line 8526) | static int
  function reverseSamplesBytes (line 8626) | static int
  function mirrorImage (line 8675) | static int
  function invertImage (line 8788) | static int

FILE: src/main/jni/tiff/tools/tiffdither.c
  function fsdither (line 55) | static void
  function processG3Options (line 141) | static void
  function processCompressOptions (line 159) | static int
  function main (line 186) | int
  function usage (line 312) | static void

FILE: src/main/jni/tiff/tools/tiffdump.c
  function usage (line 79) | void
  function main (line 86) | int
  function InitByteOrder (line 141) | static void
  function dump (line 185) | static void
  function off_t (line 264) | static off_t
  type tagname (line 386) | struct tagname {
  function PrintTag (line 484) | static void
  function PrintType (line 497) | static void
  function PrintByte (line 524) | static void
  function PrintShort (line 552) | static void
  function PrintLong (line 572) | static void
  function PrintASCII (line 580) | static void
  function PrintData (line 602) | static void
  function TIFFFetchData (line 704) | static int
  function ReadError (line 743) | static void
  function vError (line 751) | static void
  function Error (line 759) | static void
  function Fatal (line 768) | static void

FILE: src/main/jni/tiff/tools/tiffgt.c
  function main (line 80) | int
  function cleanup_and_exit (line 184) | static void
  function initImage (line 197) | static int
  function prevImage (line 246) | static int
  function nextImage (line 261) | static int
  function setWindowSize (line 276) | static void
  function raster_draw (line 282) | static void
  function raster_reshape (line 288) | static void
  function raster_keys (line 302) | static void
  function raster_special (line 347) | static void
  function usage (line 415) | static void
  function uint16 (line 428) | static uint16

FILE: src/main/jni/tiff/tools/tiffinfo.c
  function main (line 54) | int
  function usage (line 168) | static void
  function ShowStrip (line 181) | static void
  function TIFFReadContigStripData (line 197) | void
  function TIFFReadSeparateStripData (line 224) | void
  function ShowTile (line 255) | static void
  function TIFFReadContigTileData (line 275) | void
  function TIFFReadSeparateTileData (line 303) | void
  function TIFFReadData (line 335) | void
  function ShowRawBytes (line 354) | static void
  function ShowRawWords (line 367) | static void
  function TIFFReadRawData (line 380) | void
  function tiffinfo (line 428) | static void

FILE: src/main/jni/tiff/tools/tiffmedian.c
  type Colorbox (line 71) | typedef	struct colorbox {
  type C_cell (line 79) | typedef struct {
  function main (line 113) | int
  function processCompressOptions (line 292) | static int
  function usage (line 331) | static void
  function get_histogram (line 344) | static void
  function Colorbox (line 391) | static Colorbox *
  function splitbox (line 406) | static void
  function shrinkbox (line 528) | static void
  function C_cell (line 613) | static C_cell *
  function map_colortable (line 701) | static void
  function quant (line 748) | static void
  function quant_fsdither (line 797) | static void

FILE: src/main/jni/tiff/tools/tiffset.c
  function usage (line 59) | static void
  function TIFFFieldInfo (line 68) | static const TIFFFieldInfo *
  function main (line 86) | int

FILE: src/main/jni/tiff/tools/tiffsplit.c
  function main (line 57) | int
  function newfilename (line 98) | static void
  function tiffcp (line 157) | static int
  function cpStrips (line 230) | static int
  function cpTiles (line 260) | static int

FILE: src/main/jni/tiff/tools/ycbcr.c
  function abs (line 24) | static int abs(int v) { return (v < 0 ? -v : v); }
  function pct (line 25) | static double pct(int v,double range) { return (v*100. / range); }
  function main (line 32) | int
  function setupLumaTables (line 95) | static void
  function V2Code (line 103) | static unsigned
  function check (line 115) | static

FILE: src/main/jni/tiffio.h
  type TIFF (line 40) | typedef	struct tiff TIFF;
  type uint32 (line 61) | typedef uint32 ttag_t;
  type uint16 (line 62) | typedef uint16 tdir_t;
  type uint16 (line 63) | typedef uint16 tsample_t;
  type uint32 (line 64) | typedef uint32 tstrile_t;
  type tstrile_t (line 65) | typedef tstrile_t tstrip_t;
  type tstrile_t (line 66) | typedef tstrile_t ttile_t;
  type int32 (line 67) | typedef int32 tsize_t;
  type uint32 (line 69) | typedef uint32 toff_t;
  type HFILE (line 94) | typedef	HFILE thandle_t;
  type TIFFRGBValue (line 129) | typedef	unsigned char TIFFRGBValue;
  type TIFFDisplay (line 131) | typedef struct {
  type TIFFYCbCrToRGB (line 147) | typedef struct {				/* YCbCr->RGB support */
  type TIFFCIELabToRGB (line 156) | typedef struct {				/* CIE Lab 1976->RGB support */
  type TIFFRGBAImage (line 170) | typedef struct _TIFFRGBAImage TIFFRGBAImage;
  type _TIFFRGBAImage (line 190) | struct _TIFFRGBAImage {
  type TIFFCodec (line 240) | typedef struct {
  type tsize_t (line 263) | typedef	tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
  type toff_t (line 264) | typedef	toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);
  type toff_t (line 266) | typedef	toff_t (*TIFFSizeProc)(thandle_t);
  type TIFFFieldInfo (line 303) | typedef	struct {
  type TIFFTagValue (line 314) | typedef struct _TIFFTagValue {
  type TIFFTagMethods (line 331) | typedef struct {
  type TIFFIgnoreSense (line 404) | enum TIFFIgnoreSense
Condensed preview — 513 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6,871K chars).
[
  {
    "path": ".gitignore",
    "chars": 28,
    "preview": "/build\n*.o\n*.o.d\n*.so\n*.iml\n"
  },
  {
    "path": "CHANGELOG.txt",
    "chars": 1757,
    "preview": "0.9.9.0\n- Added support for decoding and converting files from file descriptors\n\n0.9.8.7\n- Fixed converting from JPG to "
  },
  {
    "path": "README.md",
    "chars": 9723,
    "preview": "# Android-TiffBitmapFactory\nTiffBitmapFactory is an Android library that allows opening and saving images in *.tif forma"
  },
  {
    "path": "build.gradle",
    "chars": 1211,
    "preview": "plugins {\n    id \"com.android.library\"\n}\n\nandroid {\n    compileSdkVersion 30\n    buildToolsVersion '30.0.3'\n\n    def sof"
  },
  {
    "path": "license.txt",
    "chars": 1090,
    "preview": "The MIT License (MIT)\n\nCopyright © «2018» «Oleksii Bei aka Beyka»\n\nPermission is hereby granted, free of charge, to any "
  },
  {
    "path": "proguard-rules.pro",
    "chars": 663,
    "preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /h"
  },
  {
    "path": "src/androidTest/java/org/beyka/tiffbitmapfactory/ApplicationTest.java",
    "chars": 358,
    "preview": "package org.beyka.tiffbitmapfactory;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <"
  },
  {
    "path": "src/main/.gitignore",
    "chars": 6,
    "preview": "/obj/\n"
  },
  {
    "path": "src/main/AndroidManifest.xml",
    "chars": 197,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"org.beyka.tiffbitmapfactory\">\n\n    <ap"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/CompressionScheme.java",
    "chars": 695,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 5.1.17.\n */\n\npublic enum CompressionScheme {\n    /**\n  "
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/DecodeArea.java",
    "chars": 426,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 10/24/17.\n */\n\n/**\n * Holder for points of decode area\n"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/FillOrder.java",
    "chars": 438,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 4/16/17.\n */\n\npublic enum FillOrder {\n\n    /**\n     * P"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/IProgressListener.java",
    "chars": 190,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 4/26/17.\n */\n\npublic interface IProgressListener {\n    "
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/ImageFormat.java",
    "chars": 262,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Supported image formats\n */\n\npublic enum ImageFormat {\n    UNKNOWN(0),\n    "
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/Orientation.java",
    "chars": 360,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 5.1.17.\n */\n\npublic enum Orientation {\n    TOP_LEFT(1),"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/Photometric.java",
    "chars": 2042,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 4/16/17.\n */\n\npublic enum Photometric {\n\n    /**\n     *"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/PlanarConfig.java",
    "chars": 235,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 4/16/17.\n */\n\npublic enum PlanarConfig {\n    CONTIG(1),"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/ResolutionUnit.java",
    "chars": 252,
    "preview": "package org.beyka.tiffbitmapfactory;\n\n/**\n * Created by beyka on 13.3.17.\n */\n\npublic enum ResolutionUnit {\n    NONE(1),"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/TiffBitmapFactory.java",
    "chars": 26421,
    "preview": "package org.beyka.tiffbitmapfactory;\n\nimport android.graphics.Bitmap;\nimport android.util.Log;\n\nimport org.beyka.tiffbit"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/TiffConverter.java",
    "chars": 18389,
    "preview": "package org.beyka.tiffbitmapfactory;\n\nimport org.beyka.tiffbitmapfactory.exceptions.CantOpenFileException;\nimport org.be"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/TiffSaver.java",
    "chars": 14713,
    "preview": "package org.beyka.tiffbitmapfactory;\n\nimport android.graphics.Bitmap;\n\nimport org.beyka.tiffbitmapfactory.exceptions.Can"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/exceptions/CantOpenFileException.java",
    "chars": 683,
    "preview": "package org.beyka.tiffbitmapfactory.exceptions;\n\n/**\n * Created by alexeyba on 09.11.15.\n */\npublic class CantOpenFileEx"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/exceptions/DecodeTiffException.java",
    "chars": 1316,
    "preview": "package org.beyka.tiffbitmapfactory.exceptions;\n\n/**\n * Created by alexeyba on 09.11.15.\n */\npublic class DecodeTiffExce"
  },
  {
    "path": "src/main/java/org/beyka/tiffbitmapfactory/exceptions/NotEnoughtMemoryException.java",
    "chars": 674,
    "preview": "package org.beyka.tiffbitmapfactory.exceptions;\n\n/**\n * Created by alexeyba on 09.11.15.\n */\npublic class NotEnoughtMemo"
  },
  {
    "path": "src/main/jni/Android.mk",
    "chars": 3500,
    "preview": "LOCAL_PATH := $(call my-dir)\n\ninclude $(CLEAR_VARS)\n\nLOCAL_ARM_MODE := arm\n\nLOCAL_TIFF_SRC_FILES := \\\n\ttiff/libtiff/tif_"
  },
  {
    "path": "src/main/jni/Application.mk",
    "chars": 173,
    "preview": "APP_STL := c++_static\n\nAPP_MODULES      := tiff png jpeg tifffactory tiffsaver tiffconverter\n\nAPP_PLATFORM=android-16\n\nA"
  },
  {
    "path": "src/main/jni/BMP.h",
    "chars": 1622,
    "preview": "//\n// Created by beyka on 9/21/17.\n//\n\n#ifndef __BMP_H_INCLUDED__   // if x.h hasn't been included yet...\n#define __BMP_"
  },
  {
    "path": "src/main/jni/BaseTiffConverter.cpp",
    "chars": 13858,
    "preview": "//\n// Created by beyka on 5/11/17.\n//\n\n#include \"BaseTiffConverter.h\"\n\nBaseTiffConverter::BaseTiffConverter(JNIEnv *e, j"
  },
  {
    "path": "src/main/jni/BaseTiffConverter.h",
    "chars": 2798,
    "preview": "//\n// Created by beyka on 5/11/17.\n//\n\n#ifndef TIFFSAMPLE_BASETIFFCONVERTER_H\n#define TIFFSAMPLE_BASETIFFCONVERTER_H\n\n#i"
  },
  {
    "path": "src/main/jni/BitmapReader.cpp",
    "chars": 6406,
    "preview": "//\n// Created by beyka on 9/21/17.\n//\nusing namespace std;\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"BitmapReade"
  },
  {
    "path": "src/main/jni/BitmapReader.h",
    "chars": 1208,
    "preview": "//\n// Created by beyka on 9/21/17.\n//\n\n#ifndef TIFFSAMPLE_BITMAPREADER_H\n#define TIFFSAMPLE_BITMAPREADER_H\n\n#include <st"
  },
  {
    "path": "src/main/jni/BmpToTiffConverter.cpp",
    "chars": 17411,
    "preview": "//\n// Created by beyka on 9/20/17.\n//\n#include \"BmpToTiffConverter.h\"\n\nBmpToTiffConverter::BmpToTiffConverter(JNIEnv *e,"
  },
  {
    "path": "src/main/jni/BmpToTiffConverter.h",
    "chars": 1973,
    "preview": "//\n// Created by beyka on 9/20/17.\n//\n\n#ifndef TIFFSAMPLE_BMPTOTIFFCONVERTER_H\n#define TIFFSAMPLE_BMPTOTIFFCONVERTER_H\n\n"
  },
  {
    "path": "src/main/jni/JpgToTiffConverter.cpp",
    "chars": 13027,
    "preview": "//\n// Created by beyka on 5/15/17.\n//\n\n#include \"JpgToTiffConverter.h\"\n\nJpgToTiffConverter::JpgToTiffConverter(JNIEnv *e"
  },
  {
    "path": "src/main/jni/JpgToTiffConverter.h",
    "chars": 1883,
    "preview": "//\n// Created by beyka on 5/15/17.\n//\n\n#ifndef TIFFSAMPLE_JPGTOTIFFCONVERTER_H\n#define TIFFSAMPLE_JPGTOTIFFCONVERTER_H\n\n"
  },
  {
    "path": "src/main/jni/NativeDecoder.cpp",
    "chars": 174436,
    "preview": "//\n// Created by beyka on 3.2.17.\n//\n\n#include \"NativeDecoder.h\"\n#include <string>\n\njmp_buf NativeDecoder::tile_buf;\njmp"
  },
  {
    "path": "src/main/jni/NativeDecoder.h",
    "chars": 4617,
    "preview": "//\n// Created by beyka on 3.2.17.\n//\n\n#ifndef TIFFSAMPLE_NATIVEDECODER_H\n#define TIFFSAMPLE_NATIVEDECODER_H\n\n#include <j"
  },
  {
    "path": "src/main/jni/NativeExceptions.cpp",
    "chars": 2523,
    "preview": "//\n// Created by alexeyba on 09.11.15.\n//\nusing namespace std;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"Native"
  },
  {
    "path": "src/main/jni/NativeExceptions.h",
    "chars": 948,
    "preview": "//\n// Created by alexeyba on 09.11.15.\n//\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef TIFFEXAMPLE_NATIVEEXCEPTIONS_"
  },
  {
    "path": "src/main/jni/NativeTiffBitmapFactory.cpp",
    "chars": 1003,
    "preview": "using namespace std;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"NativeTiffBitmapFactory.h\"\n\nJNIEXPORT jobject\nJN"
  },
  {
    "path": "src/main/jni/NativeTiffBitmapFactory.h",
    "chars": 2045,
    "preview": "/* DO NOT EDIT THIS FILE - it is machine generated */\n#include <jni.h>\n#include <android/log.h>\n#include <android/bitmap"
  },
  {
    "path": "src/main/jni/NativeTiffConverter.cpp",
    "chars": 14562,
    "preview": "//\n// Created by beyka on 5/9/17.\n//\nusing namespace std;\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"NativeTiffCo"
  },
  {
    "path": "src/main/jni/NativeTiffConverter.h",
    "chars": 4135,
    "preview": "//\n// Created by beyka on 5/9/17.\n//\n#include <jni.h>\n#include <android/log.h>\n#include <stdlib.h>\n#include <stdio.h>\n\n#"
  },
  {
    "path": "src/main/jni/NativeTiffSaver.cpp",
    "chars": 20403,
    "preview": "//\n// Created by beyka on 18.2.16.\n//\nusing namespace std;\n\n#ifdef __cplusplus\nextern \"C\" {\n    #endif\n\n    #include \"Na"
  },
  {
    "path": "src/main/jni/NativeTiffSaver.h",
    "chars": 1650,
    "preview": "#include <jni.h>\n#include <android/log.h>\n#include <android/bitmap.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <t"
  },
  {
    "path": "src/main/jni/PngToTiffConverter.cpp",
    "chars": 14846,
    "preview": "//\n// Created by beyka on 5/12/17.\n//\n\n#include \"PngToTiffConverter.h\"\n\nPngToTiffConverter::PngToTiffConverter(JNIEnv *e"
  },
  {
    "path": "src/main/jni/PngToTiffConverter.h",
    "chars": 1903,
    "preview": "//\n// Created by beyka on 5/12/17.\n//\n\n#ifndef TIFFSAMPLE_PNGTOTIFFCONVERTER_H\n#define TIFFSAMPLE_PNGTOTIFFCONVERTER_H\n\n"
  },
  {
    "path": "src/main/jni/TiffToBmpConverter.cpp",
    "chars": 19103,
    "preview": "//\n// Created by beyka on 9/22/17.\n//\n#include \"TiffToBmpConverter.h\"\n#include \"BMP.h\"\n\nTiffToBmpConverter::TiffToBmpCon"
  },
  {
    "path": "src/main/jni/TiffToBmpConverter.h",
    "chars": 2144,
    "preview": "//\n// Created by beyka on 9/22/17.\n//\n\n#ifndef TIFFSAMPLE_TIFFTOBMPCONVERTER_H\n#define TIFFSAMPLE_TIFFTOBMPCONVERTER_H\n\n"
  },
  {
    "path": "src/main/jni/TiffToJpgConverter.cpp",
    "chars": 20593,
    "preview": "//\n// Created by beyka on 5/10/17.\n//\n\n#include \"TiffToJpgConverter.h\"\n\nTiffToJpgConverter::TiffToJpgConverter(JNIEnv *e"
  },
  {
    "path": "src/main/jni/TiffToJpgConverter.h",
    "chars": 2106,
    "preview": "//\n// Created by beyka on 5/10/17.\n//\n\n#ifndef TIFFSAMPLE_TIFFTOJPGCONVERTER_H\n#define TIFFSAMPLE_TIFFTOJPGCONVERTER_H\n\n"
  },
  {
    "path": "src/main/jni/TiffToPngConverter.cpp",
    "chars": 18166,
    "preview": "//\n// Created by beyka on 5/10/17.\n//\n\n#include \"TiffToPngConverter.h\"\n\nTiffToPngConverter::TiffToPngConverter(JNIEnv *e"
  },
  {
    "path": "src/main/jni/TiffToPngConverter.h",
    "chars": 2015,
    "preview": "//\n// Created by beyka on 5/10/17.\n//\n\n#ifndef TIFFSAMPLE_TIFFTOPNGCONVERTER_H\n#define TIFFSAMPLE_TIFFTOPNGCONVERTER_H\n\n"
  },
  {
    "path": "src/main/jni/jpeg/jconfig.h",
    "chars": 5396,
    "preview": "/* android jconfig.h */\n/*\n * jconfig.doc\n *\n * Copyright (C) 1991-1994, Thomas G. Lane.\n * This file is part of the Ind"
  },
  {
    "path": "src/main/jni/jpeg/jerror.h",
    "chars": 14580,
    "preview": "/*\n * jerror.h\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * Modified 1997-2012 by Guido Vollbeding.\n * This file is"
  },
  {
    "path": "src/main/jni/jpeg/jmorecfg.h",
    "chars": 13275,
    "preview": "/*\n * jmorecfg.h\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * Modified 1997-2012 by Guido Vollbeding.\n * This file "
  },
  {
    "path": "src/main/jni/jpeg/jpeglib.h",
    "chars": 48910,
    "preview": "/*\n * jpeglib.h\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * Modified 2002-2012 by Guido Vollbeding.\n * This file i"
  },
  {
    "path": "src/main/jni/png/config.h",
    "chars": 2470,
    "preview": "/* config.h.  Generated from config.h.in by configure.  */\n/* config.h.in.  Generated from configure.ac by autoheader.  "
  },
  {
    "path": "src/main/jni/png/png.h",
    "chars": 111074,
    "preview": "\n/* png.h - header file for PNG reference library\n *\n * libpng version 1.4.19, December 17, 2015\n *\n * Copyright (c) 199"
  },
  {
    "path": "src/main/jni/png/pngconf.h",
    "chars": 46544,
    "preview": "\n/* pngconf.h - machine configurable file for libpng\n *\n * libpng version 1.4.19, December 17, 2015\n *\n * Copyright (c) "
  },
  {
    "path": "src/main/jni/png/pngpriv.h",
    "chars": 35706,
    "preview": "\n/* pngpriv.h - private declarations for use inside libpng\n *\n * libpng version 1.4.19 - December 17, 2015\n * For condit"
  },
  {
    "path": "src/main/jni/tiff/Android.mk",
    "chars": 2192,
    "preview": "LOCAL_PATH:= $(call my-dir)\ninclude $(CLEAR_VARS)\n\nLOCAL_ARM_MODE := arm\n\nLOCAL_TIFF_SRC_FILES := \\\n\tlibtiff/tif_dirread"
  },
  {
    "path": "src/main/jni/tiff/COPYRIGHT",
    "chars": 1146,
    "preview": "Copyright (c) 1988-1997 Sam Leffler\nCopyright (c) 1991-1997 Silicon Graphics, Inc.\n\nPermission to use, copy, modify, dis"
  },
  {
    "path": "src/main/jni/tiff/ChangeLog",
    "chars": 150477,
    "preview": "2009-11-04  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>\n\n\t* libtiff 3.9.2 released.\n\n2009-11-03  Bob Friesenhahn  <b"
  },
  {
    "path": "src/main/jni/tiff/HOWTO-RELEASE",
    "chars": 3160,
    "preview": "HOWTO-RELEASE: \n\nNotes on releasing.\n\n0. Make sure that you have current FSF releases of autoconf, automake,\n   and libt"
  },
  {
    "path": "src/main/jni/tiff/Makefile.am",
    "chars": 2040,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/Makefile.in",
    "chars": 27407,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/Makefile.vc",
    "chars": 1823,
    "preview": "# $Id: Makefile.vc,v 1.6 2006/10/13 10:30:21 dron Exp $\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n#"
  },
  {
    "path": "src/main/jni/tiff/README",
    "chars": 2363,
    "preview": "$Header: /cvs/maptools/cvsroot/libtiff/README,v 1.5 2004/10/30 13:44:45 dron Exp $\n\n\nTIFF Software Distribution\n--------"
  },
  {
    "path": "src/main/jni/tiff/README.android",
    "chars": 154,
    "preview": "\nAdded or modified file list:\nAndroid.mk\nREADME.android\nlibtiff/tif_config.h\nlibtiff/tiffconf.h\n\nDeleted file list:\n(Non"
  },
  {
    "path": "src/main/jni/tiff/README.vms",
    "chars": 415,
    "preview": "Dear OpenVMS user\nto make this library, execute\n$@CONFIGURE\n$@BUILD\n\nBuild process should be error and warning free. Whe"
  },
  {
    "path": "src/main/jni/tiff/RELEASE-DATE",
    "chars": 9,
    "preview": "20091104\n"
  },
  {
    "path": "src/main/jni/tiff/SConstruct",
    "chars": 5952,
    "preview": "# $Id: SConstruct,v 1.4 2007/02/24 15:03:47 dron Exp $\n\n# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2005, "
  },
  {
    "path": "src/main/jni/tiff/TODO",
    "chars": 433,
    "preview": "#\t$Header: /cvs/maptools/cvsroot/libtiff/TODO,v 1.6 2002/10/10 05:28:43 warmerda Exp $\n\no gif2tiff segaulting on selecte"
  },
  {
    "path": "src/main/jni/tiff/VERSION",
    "chars": 6,
    "preview": "3.9.2\n"
  },
  {
    "path": "src/main/jni/tiff/aclocal.m4",
    "chars": 38719,
    "preview": "# generated automatically by aclocal 1.11 -*- Autoconf -*-\n\n# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 20"
  },
  {
    "path": "src/main/jni/tiff/autogen.sh",
    "chars": 121,
    "preview": "#!/bin/sh\nset -x\n#libtoolize --force --copy\naclocal -I ./m4\nautoheader\nautomake --foreign --add-missing --copy\nautoconf\n"
  },
  {
    "path": "src/main/jni/tiff/build/Makefile.am",
    "chars": 1352,
    "preview": "# $Id: Makefile.am,v 1.1 2007/02/24 15:03:49 dron Exp $\n#\n# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2007"
  },
  {
    "path": "src/main/jni/tiff/build/Makefile.in",
    "chars": 19470,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/build/README",
    "chars": 118,
    "preview": "This directory contains scripts and tools needed to build libtiff library\nand its utilities in various environments.\n\n"
  },
  {
    "path": "src/main/jni/tiff/config/compile",
    "chars": 3707,
    "preview": "#! /bin/sh\n# Wrapper for compilers which do not understand `-c -o'.\n\nscriptversion=2005-05-14.22\n\n# Copyright (C) 1999, "
  },
  {
    "path": "src/main/jni/tiff/config/config.guess",
    "chars": 44573,
    "preview": "#! /bin/sh\n# Attempt to guess a canonical system name.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,"
  },
  {
    "path": "src/main/jni/tiff/config/config.sub",
    "chars": 32665,
    "preview": "#! /bin/sh\n# Configuration validation subroutine script.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 199"
  },
  {
    "path": "src/main/jni/tiff/config/depcomp",
    "chars": 15936,
    "preview": "#! /bin/sh\n# depcomp - compile a program generating dependencies as side-effects\n\nscriptversion=2005-07-09.11\n\n# Copyrig"
  },
  {
    "path": "src/main/jni/tiff/config/install-sh",
    "chars": 10970,
    "preview": "#!/bin/sh\n# install - install a program, script, or datafile\n\nscriptversion=2005-11-07.23\n\n# This originates from X11R5 "
  },
  {
    "path": "src/main/jni/tiff/config/ltmain.sh",
    "chars": 243268,
    "preview": "# Generated from ltmain.m4sh.\n\n# ltmain.sh (GNU libtool) 2.2.6\n# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 199"
  },
  {
    "path": "src/main/jni/tiff/config/missing",
    "chars": 11014,
    "preview": "#! /bin/sh\n# Common stub for a few missing GNU programs while installing.\n\nscriptversion=2005-06-08.21\n\n# Copyright (C) "
  },
  {
    "path": "src/main/jni/tiff/config/mkinstalldirs",
    "chars": 3474,
    "preview": "#! /bin/sh\n# mkinstalldirs --- make directory hierarchy\n\nscriptversion=2005-06-29.22\n\n# Original author: Noah Friedman <"
  },
  {
    "path": "src/main/jni/tiff/configure",
    "chars": 637228,
    "preview": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.64 for LibT"
  },
  {
    "path": "src/main/jni/tiff/configure.ac",
    "chars": 24245,
    "preview": "dnl                                               -*- Autoconf -*-\ndnl Tag Image File Format (TIFF) Software\ndnl\ndnl Cop"
  },
  {
    "path": "src/main/jni/tiff/configure.com",
    "chars": 36315,
    "preview": "$! $Id: configure.com,v 1.1.2.2 2009-08-20 22:31:00 bfriesen Exp $\n$!\n$! OpenVMS configure procedure for libtiff\n$! (c) "
  },
  {
    "path": "src/main/jni/tiff/contrib/Makefile.am",
    "chars": 1368,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/Makefile.in",
    "chars": 19492,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/README",
    "chars": 67,
    "preview": "This directory contains various contributions from libtiff users.\n\n"
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/Makefile.acorn",
    "chars": 4712,
    "preview": "# Project:   LibTIFF\n\n\n# Toolflags:\nCCflags = -c -zo -ffah -depend !Depend -IC:\nC++flags = -c -depend !Depend -IC: -thro"
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/Makefile.am",
    "chars": 1381,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/Makefile.in",
    "chars": 12283,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/ReadMe",
    "chars": 3670,
    "preview": "Building the Software on an Acorn RISC OS system\n\nThe directory contrib/acorn contains support for compiling the library"
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/SetVars",
    "chars": 88,
    "preview": "Set LibTIFF$Dir <Obey$Dir>\nSet LibTIFF$Path <LibTIFF$Dir>.\nSet C$Path <C$Path>,LibTIFF:\n"
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/cleanlib",
    "chars": 281,
    "preview": "IfThere LibTIFF:o.* THEN Wipe LibTIFF:o.* ~CFR~V\nIfThere LibTIFF:c.tif_fax3sm THEN Delete LibTIFF:c.tif_fax3sm\nIfThere L"
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/convert",
    "chars": 4176,
    "preview": "RISC OS Conversion log\n======================\n\nmkversion.c\n~~~~~~~~~~~\nThe RISC OS command-line does not allow the direc"
  },
  {
    "path": "src/main/jni/tiff/contrib/acorn/install",
    "chars": 4600,
    "preview": "If \"%0\" = \"\" Then Error Syntax: install |<source_dir> |<dest_dir>\nIf \"%1\" = \"\" Then Error Syntax: install |<source_dir> "
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/Makefile.am",
    "chars": 1524,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/Makefile.in",
    "chars": 17728,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/Makefile.vc",
    "chars": 633,
    "preview": "#\n# If libtiff.a is installed in /usr/lib or /usr/local/lib just point\n# LIBTIFF_DIR there.  It doesn't need a full libt"
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/README",
    "chars": 4563,
    "preview": "\taddtiffo 1.0\n\t============\n\nThe addtiffo utility is used to add overview pyramids to an existing \nTIFF or GeoTIFF file."
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/addtiffo.c",
    "chars": 5880,
    "preview": "/******************************************************************************\n * $Id: addtiffo.c,v 1.6 2005/12/16 05:5"
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/tif_overview.c",
    "chars": 37173,
    "preview": "/******************************************************************************\n * tif_overview.c,v 1.9 2005/05/25 09:03"
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/tif_ovrcache.c",
    "chars": 13384,
    "preview": "/******************************************************************************\n * $Id: tif_ovrcache.c,v 1.7 2006/03/25 "
  },
  {
    "path": "src/main/jni/tiff/contrib/addtiffo/tif_ovrcache.h",
    "chars": 3789,
    "preview": "/******************************************************************************\n * tif_ovrcache.h,v 1.3 2005/05/25 09:03"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/Makefile.am",
    "chars": 1720,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/Makefile.in",
    "chars": 24484,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/README",
    "chars": 160,
    "preview": "Wed May  9 09:11:35 PDT 1990\n\nThis directory contains programs from Dan Sears\n(dbs@decwrl.dec.com).  Contact him directl"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/tiff-bi.c",
    "chars": 2756,
    "preview": "/* $Id: tiff-bi.c,v 1.2 2004/05/03 16:46:36 dron Exp $ */\n\n/*\n * tiff-bi.c -- create a Class B (bilevel) TIFF file\n *\n *"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/tiff-grayscale.c",
    "chars": 4293,
    "preview": "/* $Id: tiff-grayscale.c,v 1.4 2004/09/03 08:26:08 dron Exp $ */\n\n/*\n * tiff-grayscale.c -- create a Class G (grayscale)"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/tiff-palette.c",
    "chars": 7665,
    "preview": "/* $Id: tiff-palette.c,v 1.3 2004/09/03 08:27:20 dron Exp $ */\n\n/*\n * tiff-palette.c -- create a Class P (palette) TIFF "
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/tiff-rgb.c",
    "chars": 6417,
    "preview": "/* $Id: tiff-rgb.c,v 1.3 2004/09/03 08:29:16 dron Exp $ */\n\n/*\n * tiff-rgb.c -- create a 24-bit Class R (rgb) TIFF file\n"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/xtiff/Makefile.am",
    "chars": 1676,
    "preview": "# $Id: Makefile.am,v 1.4 2007/02/24 15:03:49 dron Exp $\n#\n# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/xtiff/Makefile.in",
    "chars": 12597,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/xtiff/README",
    "chars": 313,
    "preview": "xtiff 2.0\n\nxtiff is a tool for viewing a TIFF file in an X window.  It was written to\nhandle as many different kinds of "
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/xtiff/patchlevel.h",
    "chars": 21,
    "preview": "#define PATCHLEVEL 0\n"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/xtiff/xtiff.c",
    "chars": 41843,
    "preview": "/*\n * $Id: xtiff.c,v 1.2 2006/10/13 10:16:22 dron Exp $\n *\n * xtiff - view a TIFF file in an X window\n *\n * Dan Sears\n *"
  },
  {
    "path": "src/main/jni/tiff/contrib/dbs/xtiff/xtifficon.h",
    "chars": 890,
    "preview": "#define xtifficon_width 32\n#define xtifficon_height 32\nstatic char xtifficon_bits[] = {\n   0xff, 0x00, 0x00, 0xc0, 0xfe,"
  },
  {
    "path": "src/main/jni/tiff/contrib/iptcutil/Makefile.am",
    "chars": 1470,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/iptcutil/Makefile.in",
    "chars": 17473,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/iptcutil/README",
    "chars": 1179,
    "preview": "\nProgram: IPTCUTIL.C\n\nPurpose: Convert between IPTC binary and a \"special\" IPTC text file format.\n\nUsage:   iptcutil -t "
  },
  {
    "path": "src/main/jni/tiff/contrib/iptcutil/iptcutil.c",
    "chars": 21636,
    "preview": "/* $Id: iptcutil.c,v 1.4.2.1 2009-08-30 16:21:46 bfriesen Exp $ */\n\n#include \"tif_config.h\"\n\n#include <stdio.h>\n#include"
  },
  {
    "path": "src/main/jni/tiff/contrib/iptcutil/test.txt",
    "chars": 2106,
    "preview": "2#0=\"&#0;&#2;\"\n2#120#Caption=\"Chairman of the US House Judiciary Committee, Henry Hyde,R-IL, makes his opening statement"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/Makefile.am",
    "chars": 1358,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/Makefile.in",
    "chars": 12270,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/Makefile.script",
    "chars": 5066,
    "preview": "\n(* You must manually set the top-level PATHNAME here; everything else is automatic *)\n\nset PATHNAME to \"ritter:tiff-v3."
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/README",
    "chars": 721,
    "preview": "----------------------------------------------------\nBuild instructions for LIBTIFF - CodeWarrior (6.1):\n---------------"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/mac_main.c",
    "chars": 378,
    "preview": "/*\n *  mac_main.c -- The REAL entry point which\n *   calls the tools main code. For the tools\n *   the symbol \"main\" has"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/mac_main.h",
    "chars": 159,
    "preview": "/* \n * mac_main.h  -- redefines main entry point\n */\n \n#ifndef _mac_main_h\n#define _mac_main_h\n\n#undef main\n#define main"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/metrowerks.note",
    "chars": 3290,
    "preview": "----------------------------------------------------\nBuild instructions for LIBTIFF - CodeWarrior (6.1):\n---------------"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/mkg3_main.c",
    "chars": 226,
    "preview": "/*\n *  mkg3_main.c -- passes fake arguments into main\n */\n\n#undef main\n\nint\nmain()\n{\n\tstatic char *argv[4] = {\n\t \"mkg3st"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-cw/version.h",
    "chars": 142,
    "preview": "#define VERSION \\\n\"LIBTIFF, Version 3.4beta028 \\n\"\\\n\"Copyright (c) 1988-1995 Sam Leffler\\n\"\\\n\"Copyright (c) 1991-1996 Si"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/BUILD.mpw",
    "chars": 1689,
    "preview": "# BUILD.mpw:  \n#\n#   Full build for Apple Macintosh Programmer's Workshop (MPW).\n#\n#  This is an executable MPW script w"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/Makefile.am",
    "chars": 1346,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/Makefile.in",
    "chars": 12261,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/README",
    "chars": 704,
    "preview": "######################\nAbout contrib:mac-mpw:\n######################\n\nThis directory contains all of the utilities and m"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/libtiff.make",
    "chars": 5370,
    "preview": "#\n# Tag Image File Format Library\n#\n# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler\n# Copyright (c)"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/mactrans.c",
    "chars": 957,
    "preview": "/*\n *  mactrans.c  -- Hack filter used to generate MPW files \n *    with special characters from pure ASCII, denoted \"%n"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/port.make",
    "chars": 1665,
    "preview": "#\n# Tag Image File Format Library\n#\n# Copyright (c) 1995 Sam Leffler\n# Copyright (c) 1995 Silicon Graphics, Inc.\n# \n# Pe"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/tools.make",
    "chars": 3613,
    "preview": "#\n# Tag Image File Format Library\n#\n# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler\n# Copyright (c)"
  },
  {
    "path": "src/main/jni/tiff/contrib/mac-mpw/top.make",
    "chars": 3346,
    "preview": "#\n# Tag Image File Format Library\n#\n# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler\n# Copyright (c)"
  },
  {
    "path": "src/main/jni/tiff/contrib/mfs/Makefile.am",
    "chars": 1343,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/mfs/Makefile.in",
    "chars": 12247,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/mfs/README",
    "chars": 1342,
    "preview": "Date:    Mon, 23 Jun 1997 13:30:48 +0200\nTo:      <sam@cthulhu.engr.sgi.com>\n\nFrom:    \"Mike Johnson\" <mikehunt@swipnet."
  },
  {
    "path": "src/main/jni/tiff/contrib/mfs/mfs_file.c",
    "chars": 14985,
    "preview": "/*\n--------------------------------------------------------------------------------\n-   Module      :   mem_file.c\n-   D"
  },
  {
    "path": "src/main/jni/tiff/contrib/pds/Makefile.am",
    "chars": 1400,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/pds/Makefile.in",
    "chars": 12303,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/pds/README",
    "chars": 4619,
    "preview": "Date:    Fri, 01 Aug 1997 20:14:52 MDT\nTo:      Sam Leffler <sam@cthulhu.engr.sgi.com>\n\nFrom:    \"Conrad J. Poelman (WSA"
  },
  {
    "path": "src/main/jni/tiff/contrib/pds/tif_imageiter.c",
    "chars": 15847,
    "preview": "/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_imageiter.c,v 1.3 2005/12/21 12:23:13 joris Exp $ */\n\n/*\n * Co"
  },
  {
    "path": "src/main/jni/tiff/contrib/pds/tif_imageiter.h",
    "chars": 2084,
    "preview": "typedef struct _TIFFImageIter TIFFImageIter;\n\n/* The callback function is called for each \"block\" of image pixel data af"
  },
  {
    "path": "src/main/jni/tiff/contrib/pds/tif_pdsdirread.c",
    "chars": 32203,
    "preview": "/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirread.c,v 1.3 2005/12/21 12:23:13 joris Exp $ */\n\n/*\n * C"
  },
  {
    "path": "src/main/jni/tiff/contrib/pds/tif_pdsdirwrite.c",
    "chars": 29950,
    "preview": "/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirwrite.c,v 1.3 2005/12/21 12:23:13 joris Exp $ */\n\n/* Whe"
  },
  {
    "path": "src/main/jni/tiff/contrib/ras/Makefile.am",
    "chars": 1353,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/ras/Makefile.in",
    "chars": 12256,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/ras/README",
    "chars": 328,
    "preview": "Sun May 19 22:28:16 PDT 1991\n\nThese programs are from Patrick Naughton (naughton@wind.sun.com).\nI've tried to update the"
  },
  {
    "path": "src/main/jni/tiff/contrib/ras/ras2tif.c",
    "chars": 6678,
    "preview": "#ifndef lint\nstatic char sccsid[] = \"@(#)ras2tif.c 1.2 90/03/06\";\n#endif\n/*-\n * ras2tif.c - Converts from a Sun Rasterfi"
  },
  {
    "path": "src/main/jni/tiff/contrib/ras/tif2ras.c",
    "chars": 9042,
    "preview": "#ifndef lint\nstatic char id[] = \"$Id: tif2ras.c,v 1.2 1999/11/28 20:15:36 mwelles Exp $\"; \n#endif\n/*-\n * tif2ras.c - Con"
  },
  {
    "path": "src/main/jni/tiff/contrib/stream/Makefile.am",
    "chars": 1361,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/stream/Makefile.in",
    "chars": 12273,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/stream/README",
    "chars": 1543,
    "preview": "Subject: tiff stream interface (contrib)\nDate: Thu, 30 Mar 2000 10:48:51 -0800\nFrom: \"Avi Bleiweiss\" <avi@shutterfly.com"
  },
  {
    "path": "src/main/jni/tiff/contrib/stream/tiffstream.cpp",
    "chars": 4505,
    "preview": "// tiff stream interface class implementation\n\n#include \"tiffstream.h\"\n\nconst char* TiffStream::m_name = \"TiffStream\";\n\n"
  },
  {
    "path": "src/main/jni/tiff/contrib/stream/tiffstream.h",
    "chars": 1359,
    "preview": "// tiff stream interface class definition\n\n#ifndef _TIFF_STREAM_H_\n#define _TIFF_STREAM_H_\n\n#include <iostream.h>\n\n#incl"
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/Makefile.am",
    "chars": 1385,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/Makefile.in",
    "chars": 12291,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/README",
    "chars": 4854,
    "preview": "\nNOTE:  Sept/2004 \n\nThe following described approach to managing tag extensions has been\nmostly superceeded since libtif"
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/listtif.c",
    "chars": 525,
    "preview": "/*\n * listtif.c -- lists a tiff file.\n */\n\n#include \"xtiffio.h\"\n#include <stdlib.h>\n\nvoid main(int argc,char *argv[])\n{\n"
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/maketif.c",
    "chars": 1527,
    "preview": "/*\n * maketif.c -- creates a little TIFF file, with\n *   the XTIFF extended tiff example tags.\n */\n\n#include <stdlib.h>\n"
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/xtif_dir.c",
    "chars": 8304,
    "preview": "/*\n * xtif_dir.c\n *\n * Extended TIFF Directory Tag Support.\n *\n *  You may use this file as a template to add your own\n "
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/xtiffio.h",
    "chars": 1422,
    "preview": "/*\n *  xtiffio.h -- Public interface to Extended TIFF tags\n *\n *    This is a template for defining a client module\n *  "
  },
  {
    "path": "src/main/jni/tiff/contrib/tags/xtiffiop.h",
    "chars": 1969,
    "preview": "/*\n * Private Extended TIFF library interface.\n *\n *  uses private LIBTIFF interface.\n *\n *  The portions of this module"
  },
  {
    "path": "src/main/jni/tiff/contrib/win_dib/Makefile.am",
    "chars": 1392,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/contrib/win_dib/Makefile.in",
    "chars": 12301,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/contrib/win_dib/Makefile.w95",
    "chars": 3260,
    "preview": "#\t$Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.w95,v 1.2 1994/11/28\n06:13:31 sam Exp $\n#\n# Tag Image File Format L"
  },
  {
    "path": "src/main/jni/tiff/contrib/win_dib/README.Tiffile",
    "chars": 1237,
    "preview": "Frank,\n\nI attached a file that uses RGBA interface (tif_getimage.c) to read a tiff\nfile and convert to a DIB.  It's adva"
  },
  {
    "path": "src/main/jni/tiff/contrib/win_dib/README.tiff2dib",
    "chars": 1567,
    "preview": "\nDate: 04 Dec 95 10:34:23 EST\nFrom: Philippe <100423.3705@compuserve.com>\nTo: TIFF/sam Leffler <sam@cthulhu.engr.sgi.com"
  },
  {
    "path": "src/main/jni/tiff/contrib/win_dib/Tiffile.cpp",
    "chars": 12976,
    "preview": "#include \"StdAfx.h\"\n\n//#define STRICT\n#include <windows.h>\n#include <windowsx.h>\n#include <commdlg.h>\n#include <stdlib.h"
  },
  {
    "path": "src/main/jni/tiff/contrib/win_dib/tiff2dib.c",
    "chars": 10988,
    "preview": "/*************************************************************************\n *\n * Source file for Windows 95/Win32. \n *\n "
  },
  {
    "path": "src/main/jni/tiff/html/Makefile.am",
    "chars": 2249,
    "preview": "# $Id: Makefile.am,v 1.16.2.1 2007/07/13 13:40:12 dron Exp $\n#\n# Tag Image File Format (TIFF) Software\n#\n# Copyright (C)"
  },
  {
    "path": "src/main/jni/tiff/html/Makefile.in",
    "chars": 22335,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/html/TIFFTechNote2.html",
    "chars": 35698,
    "preview": "<pre>\nDRAFT TIFF Technical Note #2\t\t\t\t17-Mar-95\n============================\n\nThis Technical Note describes serious prob"
  },
  {
    "path": "src/main/jni/tiff/html/addingtags.html",
    "chars": 11806,
    "preview": "<HTML>\n<HEAD>\n<TITLE>\nModifying The TIFF Library\n</TITLE>\n</HEAD>\n<BODY BGCOLOR=white> \n<FONT FACE=\"Arial, Helvetica, Sa"
  },
  {
    "path": "src/main/jni/tiff/html/bugs.html",
    "chars": 2646,
    "preview": "<HTML>\n<HEAD>\n<TITLE>Bugs and the TIFF Mailing List</TITLE>\n</HEAD>\n<BODY BGCOLOR=white> \n<FONT FACE=\"Arial, Helvetica, "
  },
  {
    "path": "src/main/jni/tiff/html/build.html",
    "chars": 41097,
    "preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n<meta name=\"generator\" content=\n\"HTML Tidy"
  },
  {
    "path": "src/main/jni/tiff/html/contrib.html",
    "chars": 3739,
    "preview": "<HTML>\n<HEAD>\n<TITLE>\nContributed TIFF Software\n</TITLE>\n</HEAD>\n\n<BODY BGCOLOR=white> \n<FONT FACE=\"Arial, Helvetica, Sa"
  },
  {
    "path": "src/main/jni/tiff/html/document.html",
    "chars": 1473,
    "preview": "<HTML>\n<HEAD>\n<TITLE>\nTIFF Documentation\n</TITLE>\n</HEAD>\n<BODY BGCOLOR=white> \n<FONT FACE=\"Arial, Helvetica, Sans\">\n<H1"
  },
  {
    "path": "src/main/jni/tiff/html/images/Makefile.am",
    "chars": 1546,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/html/images/Makefile.in",
    "chars": 14421,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/html/images.html",
    "chars": 1088,
    "preview": "<HTML>\n<HEAD>\n<TITLE>\nTIFF Test Images\n</TITLE>\n</HEAD>\n<BODY BGCOLOR=white> \n<FONT FACE=\"Arial, Helvetica, Sans\">\n<H1>\n"
  },
  {
    "path": "src/main/jni/tiff/html/index.html",
    "chars": 5180,
    "preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html lang=\"en\">\n<head>\n  <title>LibTIFF - TIFF Library "
  },
  {
    "path": "src/main/jni/tiff/html/internals.html",
    "chars": 19236,
    "preview": "<HTML>\n<HEAD>\n<TITLE>\nModifying The TIFF Library\n</TITLE>\n</HEAD>\n<BODY BGCOLOR=white> \n<FONT FACE=\"Arial, Helvetica, Sa"
  },
  {
    "path": "src/main/jni/tiff/html/intro.html",
    "chars": 2394,
    "preview": "<HTML>\n<HEAD>\n<TITLE>\nIntroduction to the TIFF Documentation\n</TITLE>\n</HEAD>\n<BODY BGCOLOR=white> \n<FONT FACE=\"Arial, H"
  },
  {
    "path": "src/main/jni/tiff/html/libtiff.html",
    "chars": 37433,
    "preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html lang=\"en\">\n<head>\n  <title>Using The TIFF Library<"
  },
  {
    "path": "src/main/jni/tiff/html/man/Makefile.am",
    "chars": 3528,
    "preview": "# Tag Image File Format (TIFF) Software\n#\n# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\n#\n# Permission to u"
  },
  {
    "path": "src/main/jni/tiff/html/man/Makefile.in",
    "chars": 16390,
    "preview": "# Makefile.in generated by automake 1.11 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994, 1995, 1996, 1997, "
  },
  {
    "path": "src/main/jni/tiff/html/man/TIFFClose.3tiff.html",
    "chars": 2479,
    "preview": "<!-- Creator     : groff version 1.18.1 -->\n<!-- CreationDate: Fri Jul 13 17:43:15 2007 -->\n<html>\n<head>\n<meta name=\"ge"
  }
]

// ... and 313 more files (download for full content)

About this extraction

This page contains the full source code of the Beyka/Android-TiffBitmapFactory GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 513 files (6.1 MB), approximately 1.6M tokens, and a symbol index with 1842 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!