GithubHelp home page GithubHelp logo

beyka / android-tiffbitmapfactory Goto Github PK

View Code? Open in Web Editor NEW
127.0 127.0 46.0 24.47 MB

License: MIT License

Java 1.45% Makefile 10.70% C++ 8.25% C 56.79% Python 0.18% Shell 6.21% DIGITAL Command Language 0.78% HTML 8.19% M4 1.03% Roff 6.43%
android libtiff tiff tiff-encoder tiff-files tiff-format

android-tiffbitmapfactory's People

Contributors

abeynavionics avatar beyka avatar beyka-ts avatar bossshen avatar dennis508 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

android-tiffbitmapfactory's Issues

About License

Hi,

Let me check about the license.
Beyka-san is written as
https://github.com/Beyka/Android-TiffBitmapFactory/issues/7

In future I will try to remove GPL code from project to use MIT license

Is it MIT license now?

If it is not MIT license,
what does "licences = ['MIT']" in build.gradle mean?

Regards.

the error log is "JNI GetStaticObjectField called with pending exception 'java.lang.NoSuchFieldError' thrown in boolean "

I have a question when I used the old demo; error log is
`05-05 13:40:04.798 15173-15362/JNI DETECTED ERROR IN APPLICATION: JNI GetStaticObjectField called with pending exception 'java.lang.NoSuchFieldError' thrown in boolean org.beyka.tiffbitmapfactory.TiffSaver.save(java.lang.String, android.graphics.Bitmap, org.beyka.tiffbitmapfactory.TiffSaver$SaveOptions, boolean):-2
in call to GetStaticObjectField
from boolean org.beyka.tiffbitmapfactory.TiffSaver.save(java.lang.String, android.graphics.Bitmap, org.beyka.tiffbitmapfactory.TiffSaver$SaveOptions, boolean)
05-05 13:40:04.798 15173-15362/"AsyncTask #1" prio=5 tid=56 Runnable
| group="main" sCount=0 dsCount=0 obj=0x12c06ca0 self=0xdcc46000
| sysTid=15362 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0xe2448000
| state=R schedstat=( 57966230 15888615 136 ) utm=5 stm=0 core=0 HZ=100
| stack=0xdd9f7000-0xdd9f9000 stackSize=1036KB
| held mutexes= "mutator lock"(shared held)
native: #00 pc 0000505c /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
native: #1 pc 00003739 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
native: #2 pc 0024a6e9 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, char const*, art::mirror::ArtMethod*)+68)
native: #3 pc 0022e7e1 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&) const+148)
native: #4 pc 000b0d0f /system/lib/libart.so (art::JniAbort(char const*, char const*)+582)
native: #5 pc 000b144f /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+58)
native: #6 pc 000b4549 /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1284)
native: #7 pc 000b68c9 /system/lib/libart.so (art::CheckJNI::GetStaticObjectField(_JNIEnv*, _jclass*, _jfieldID*)+40)
native: #8 pc 00001f13 /data/app/com.test.demo-1/lib/arm/libtiffsaver.so (Java_org_beyka_tiffbitmapfactory_TiffSaver_save+1186)
native: #9 pc 00001eab /data/dalvik-cache/arm/data@[email protected]@[email protected] (Java_org_beyka_tiffbitmapfactory_TiffSaver_save__Ljava_lang_String_2Landroid_graphics_Bitmap_2Lorg_beyka_tiffbitmapfactory_TiffSaver_00024SaveOptions_2Z+174)
at org.beyka.tiffbitmapfactory.TiffSaver.save(Native method)

  • locked <0x1f5ae728> (a java.lang.Class<org.beyka.tiffbitmapfactory.TiffSaver>)
    at org.beyka.tiffbitmapfactory.TiffSaver.appendBitmap(TiffSaver.java:139)
    at org.beyka.tiffbitmapfactory.TiffSaver.appendBitmap(TiffSaver.java:107)`

Thanks sir!

getting bitmap value null for decodePath

Hi Team,
Getting bmp value null for below implementation.

String filePath = "file:///data/user/0/com.app.doctor/cache/com.ciscowebex.sdk.downloads/thumb-c0d0e7e6-0e90-43e6-b36a-2ad684b0f5fd-file_example_TIFF_1MB1402900616ORIGINAL_Aircraft_Rescue_Firefighting_training.tiff";

Bitmap bmp = TiffBitmapFactory.decodePath(filePath);
imageView.setImageBitmap(bmp);

kindly help me with this.

Library only supports 1 row per strip with TIFF saver

I am comparing results of CCITTFAX4 compression of the same black-and-white 59 KB PNG scan file converted to TIF using TiffBitmapFactory against Imagemagick (Windows platform). TiffBitmapFactory gives a 107 KB file while with Imagemagick it is just 43 KB.
Can that be because NativeTiffSaver.cs seemingly only implementing a 1 row per strip for TIFFS?
Would appreciate any insight.

Out of Memory

I have experienced a permanent OutOfMemory calling this method:
TiffBitmapFactory.decodePath(path);

It happens only on the following devices that I use to test Android 4.:

  • Android 4.1.2 device (Galaxy Win)
  • Android 4.4.2 (PadFone S - PF500KL)

This is the stack trace of the java.lang.OutOfMemoryError:

android.graphics.Bitmap.nativeCreate (Bitmap.java)

  | android.graphics.Bitmap.createBitmap (Bitmap.java:817)
  | android.graphics.Bitmap.createBitmap (Bitmap.java:794)
  | android.graphics.Bitmap.createBitmap (Bitmap.java:761)
  | org.beyka.tiffbitmapfactory.TiffBitmapFactory.nativeDecodePath (TiffBitmapFactory.java)
  | org.beyka.tiffbitmapfactory.TiffBitmapFactory.decodePath (TiffBitmapFactory.java:157)

I succeeded to avoid the OutOfMemory crash by setting this attribute of Options:
options.inAvailableMemory = 20000000;

But the returned Bitmap is null.

How can I find a runtime value of options.inAvailableMemory that will work without returning a null bitmap?

Should I use this information?
https://developer.android.com/reference/android/app/ActivityManager.MemoryInfo.html

Thanks
Francesco

Error while running in release mode

Hi,
Thank you for this great library.
I am using it with Graddle: compile 'com.github.beyka:androidtiffbitmapfactory:0.9.7.2'
My Compile SDK version is 21 and targetSdkVersion is 19.

It is working fine on my Nexus 9 runnig Android 7.1.1 that I use for testing when I run my app in debug mode.
When I generate a signed apk in release mode, it fails with the following error code.
05-17 17:03:58.851 6939-6939/? A/art: art/runtime/java_vm_ext.cc:470] native: #6 pc 0000000000009910 /data/app/com.sailgrib_wr.paid-1/lib/arm64/libtifffactory.so (_ZN13NativeDecoder12createBitmapEii+852)
05-17 17:03:58.851 6939-6939/? A/art: art/runtime/java_vm_ext.cc:470] native: #7 pc 0000000000007b20 /data/app/com.sailgrib_wr.paid-1/lib/arm64/libtifffactory.so (Java_org_beyka_tiffbitmapfactory_TiffBitmapFactory_nativeDecodePath+80)
05-17 17:03:58.851 6939-6939/? A/art: art/runtime/java_vm_ext.cc:470] native: #8 pc 00000000000d10f0 /data/app/com.sailgrib_wr.paid-1/oat/arm64/base.odex (Java_org_beyka_tiffbitmapfactory_TiffBitmapFactory_nativeDecodePath__Ljava_lang_String_2Lorg_beyka_tiffbitmapfactory_TiffBitmapFactory_00024Options_2Lorg_beyka_tiffbitmapfactory_IProgressListener_2+204)
Can you help?
thanks,
Henri

Create multipaged tiff

hi is there an option where i can create a multi paged tiff depending on the number of png images?

Question: couldn't find "libtiff.so"

Hi, I have a problem when running in a Moto Droid Turbo 2:

E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader
[DexPathList[[zip -1/base.apk"],nativeLibraryDirectories=[-1/lib/arm64,
-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libtiff.so"

Any chance someone could explain me what is missing?

Thank you for your time.

TiffConverter return false.

The TiffConverter retuns false. I have provided the input bmp path and output tiff path . and i get 8-byte image in the destination folder. where as the bmp file is around
300kb.

Multipage Tiff

Is it possible to create multi page tiff image using this library ?

Unsupported project?

I see a lot of chatter back in 2020 but nothing this year. Is this project now deprecated/unsupported?

when open multiFIle, I had a question "OutOfMemoryError"

The Error code is ` TiffBitmapFactory.Options options = new TiffBitmapFactory.Options();
options.inJustDecodeBounds = true;
options.inThrowException = 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 = TiffTools.getFreeMemmory(context); // bytes

            Bitmap bmp = TiffBitmapFactory.decodeFile(file, options);
            bitmaps.add(bmp);
        }`

Quitely ,the error happened is Second TiffBitmapFactory.decodeFile(file, options);,
Error Log is java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread. at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.OutOfMemoryError: Failed to allocate a 8355852 byte allocation with 2497147 free bytes and 2MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:812) at android.graphics.Bitmap.createBitmap(Bitmap.java:789) at android.graphics.Bitmap.createBitmap(Bitmap.java:756) at org.beyka.tiffbitmapfactory.TiffBitm java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread. at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.OutOfMemoryError: Failed to allocate a 8355852 byte allocation with 2497147 free bytes and 2MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:812) at android.graphics.Bitmap.createBitmap(Bitmap.java:789) at android.graphics.Bitmap.createBitmap(Bitmap.java:756) at org.beyka.tiffbitmapfactory.TiffBitmapFactory.nativeDecodePath(Native Method) at org.beyka.tiffbitmapfactory.TiffBitmapFactory.decodeFile(TiffBitmapFactory.java:96) at.TiffTools.openTiffToBitmaps(TiffTools.java:124) at .TiffTools.getFilePathListByTiff(TiffTools.java:166)apFactory.nativeDecodePath(Native Method) at org.beyka.tiffbitmapfactory.TiffBitmapFactory.decodeFile(TiffBitmapFactory.java:96) .TiffTools.openTiffToBitmaps(TiffTools.java:124) at TiffTools.getFilePathListByTiff(TiffTools.java:166)

Please help me!

Question about compression type

Can you please tell me why the LZWcompression is generating images less compress that CCITTFAX4, since we need the best compression without lossing the quality.

Regards,

Converting Tiff to Jpeg

TiffConverter.convertTiffJpg("/sdcard/in.tif", "/sdcard/out.jpg", options, progressListener);

Hi i am trying to convert tiff to jpeg format but my output is showing last captured image only,how i get both files converted,
and also please help me to convert tiff to base64 format

compiled project

do you have a link to the library already compiled and ready to add to a android project?

JPG to TIff not converting correctly with last version

Hi!
Recently I upadted to the last version com.github.beyka:androidtiffbitmapfactory:0.9.7.4, but when I try to save the JPG image to Tiff isn't converting like the older version. Attached you will find the original and how is converted. Also here is the code I'm using it.

                  //Open some image
                  debugLog("Loading jpgBitmap ..");
                  Bitmap jpgBitmap = loadImage(resultImgUri.toString());

                  if(jpgBitmap != null) {

                    debugLog("jpgBitmap loaded");
                    //Create options for saving
                    TiffSaver.SaveOptions options = new TiffSaver.SaveOptions();
                    //By default compression mode is none
                    options.compressionScheme = CompressionScheme.LZW;
                    //By default orientation is top left
                    options.orientation = Orientation.LEFT_TOP;


                    //Add author tag to output file
                    options.author = "UPS";
                    //Add copyright tag to output file
                    options.copyright = "UPS Copyright";

                    //Save image as tif. If image saved succesfull true will be returned
                    debugLog("start saving tiff");

                    File tiffFile = sdkWrapper.generateTifFile();

                    boolean saved = TiffSaver.saveBitmap(tiffFile, jpgBitmap, options);

                    debugLog("finish saving tiff");

Please advice!!

Regards!!!

3.zip

Output Image resolution size is very small

Output image file when saved as .tif then its resolution size saved to small size. 3000X4000 images are saved in 183X250 with file size 184kb. I want to save in same resolution as image is taken.

Problems converting TIFF to PNG; nodata values copying values from close-by pixels

First, I want to thank you for such a great and useful library :) it is an excellent job.

I just recently needed to convert a TIFF image to PNG, and found that it can be done using TiffConverter.convertTiffPng().

I proceeded to run such method, providing the default ConverterOptions and without listener (null). After the process finishes, the .png image is successfully (no errors thrown, correct height/width) converted, but it is different than the original .tiff image.

The way it is different is that, in the pixels where there should be nodata values (transparent) they seem to "take the pixel value" of nearby pixels. In other words, in a pixel where it should be nodata, it has the value of (say) the pixel N units above it, like it were "filling" the nodata values with the closest chunk or region of pixels closest to the nodata chunk.

Funny analogy: it looks really similar to when you dragged your window on the screen and it "lagged", leaving a trail among the path (which was a copy of one of the edges of the image), on old Windows OS.

Here are some more technical specs (if more are needed will provide them gladly):

  • Library Version: 0.9.8.7
  • Using Android Studio, with Kotlin
  • Using Gradle to get the dependency.
  • Device: Samsung Galaxy Tab A

Also, did some testing with other images, and found that other, smaller images are converted without this issue. For example:

-Image without issue: 2334x2154, 20.1MB
-Image without issue: 3830x3999, 61.3MB
-Image with issues: 4862x5065, 99.6MB
-Image with issues: 13225x7753, 415.8MB

Both have the same Spatial Reference (WGS84), nodata values, etc., so perhaps the issue has something to do with the size (fails somewhere between 61-99 MB) or the dimensions (perhaps the ones greater than 4096 on either width or height?).

Thanks in advance, and if you need anything else I'll gladly provide.

Error testing TiffBitmapFactory

Hi Aleksey,

First of all, thanks for the effort Implementing on version 0.9.6 Group 4 compression.

I have a problem, but I guess it is not related to this version (as it happens also on 0.9.5 for me). Testing TiffBitmapFactory on the emulator works fine but when I try to do it in the mobile, i get an error during saveBitmap in the line System.loadLibrary("tiff")

The mobile is an Android 6.0 MTK6580 Quad-Core

any help? Please...

android:allowBackup should be removed from this library

Only applications should define this attribute. They need to decide whether they want to allow users to backup their app, and if it's true, what to back up. Please remove this attribute so that it doesn't leak into applications: imagine if an app doesn't declare this attribute, but it uses your library. They'll have their allowBackup set to some value they didn't decide on.

In our case we were lucky that we defined the value and it conflicted yours, so we were alerted to the change.

> Task :app:processReleaseManifest FAILED
app/src/main/AndroidManifest.xml:11:9-36 Error:
        Attribute application@allowBackup value=(false) from AndroidManifest.xml:11:9-36
        is also present at [com.github.beyka:androidtiffbitmapfactory:0.9.8.7] AndroidManifest.xml:12:9-35 value=(true).
        Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:9:5-26:19 to override.

Note: we didn't even use this tiff library, we got it through a transitive dependency!
We just added implementation("com.thirdparty:library:1.2.3") and it pulled in this tiff library:

+--- com.thirdparty:library:1.2.3
|    +--- ... lots of other dependencies
|    \--- com.github.beyka:androidtiffbitmapfactory:0.9.8.7

There's no easy workaround for this other than every single user of your library and every single user of any library that depends on yours having to be aware of this leaked allowBackup attribute and use tools:replace.

Release Mode Build 😞 💥

How to build project for signed apk?. When I generate signed apk. It doesnt install on device. Im thinking about this is occurring because the library didn't build for release. How can i build for release mode?

Open Tiff and Convert to JPG

Hi!,

I'm trying to use the decode process, but returns null the bitmap.

File file = new File("/storage/emulated/0/Android/data/Temp/50a.tif");

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

        Bitmap bmp = null;
        bmp = TiffBitmapFactory.decodeFile(file, options);

Can you please tell me if I missing something.

Test branch with supporting of all abies

Branch x64-support has supporting for all abies.
All who can test this branch on real device with abi arm64-v8a, x86_64 please do this.
Building of native is described in readme file of master branch.
If all works good please leave comment to this issue with next data: Device(nexus, smasung etc.), Abi(arm64-v8a, x86, etc.), API version or name (API21 or Lollipop, etc). is all compression mods from TiffSaver.CompressionMode works while saving and is TiffBitmapFactory can open saved files or else tiff images.
For now it tested on real devices with abi armeabi-v7a and x86 and emulators with abi arm64-v8a, x86_64, mips.
Thank you. After testing new build will be available in repositories

Photometric Interpretation

Hi ,
i am merging 2 jpeg files to single tiff file. but the property of tiff file Photometric Interpretation is coming as RGB but in jpeg Photometric Interpretation is coming null

please help to remove the Photometric Interpretation value while creating the tiff file

read elevation data from grayscale tiff

Hi,

I tried to read a gray scale tiff image with RGB_565 image config option because the image pixels in stored in two bytes (16bit), when i read pixel value from the bitmap the value doesn't seem to be an elevation value.

how can i use the library for reading such files ? below is example:

TiffBitmapFactory.Options options = new TiffBitmapFactory.Options();

options.inJustDecodeBounds = false;
options.inPreferredConfig = TiffBitmapFactory.ImageConfig.RGB_565;
options.inDirectoryNumber = 0;

Bitmap bmp = TiffBitmapFactory.decodeFile(file, options);
bmp.getPixel(1800, 3400);

I used TiffSaver to create a tiff file with 3 png, but only one image in tiff file

This is my code, and i can only find one image in the tiff file.
java ArrayList<String> fileArray = new ArrayList<>(); fileArray.add("/sdcard/Pictures/edu.jpg"); fileArray.add("/sdcard/Pictures/beifeng.jpg"); fileArray.add("/sdcard/Pictures/tashigan.jpg"); for (int i = 0; i < fileCount; i++) { Bitmap bitmap = BitmapFactory.decodeFile(fileArray.get(i)); TiffSaver.SaveOptions options = new TiffSaver.SaveOptions(); options.compressionScheme = CompressionScheme.NONE; options.orientation = Orientation.LEFT_TOP; options.author = ""; options.copyright = ""; boolean saved = TiffSaver.saveBitmap(filePath + File.separator + fileName, bitmap, options); }
Does some one also have this problem?

sorry for my poor English.

TiffSaver.saveBitmap causes Fatal signal 11 (SIGSEGV)

I am calling:

TiffSaver.saveBitmap(file, bitmap);

Bitmap is a gif image loaded with Android's BitmapFactory.decodeStream. It seems that everything is fine with the gif image as it is properly decoded and encoded to other formats supported natively by Android.

However, the call results with the following error:
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 3220 (Thread-2250)

The error can not be caught with a catch clause in java code, the app just crashes immediately. I am attaching the gif file:

dilbert2073207040504

meizu devices tif save problem

on every meizu device i got the error : org.beyka.tiffbitmapfactory.exceptions.NoSuchFileException
The native method TIFFOpen(strPath, "w") always returns null.
do you know this kind of issue?

Color of the bitmap changing from red to blue ?

Hi,
Thank you so much for the awesome library. Unfortunately when I tried to get bitmap from a tiff file using TiffLoader.getBitmap(int dir,int sampleSize) , but the color of the bitmap is changed from red to blue. I checked the config it is ARGB_8888. Can you please suggest a solution on this issue?
screenshot_unifier_20180801-112343
screenshot_drive_20180801-112326

No implementation found for android.graphics.Bitmap

System.loadLibrary("tiff");
System.loadLibrary("tifffactory");
The above are executed still I'm getting the following error:

java.lang.UnsatisfiedLinkError: No implementation found for android.graphics.Bitmap org.beyka.tiffbitmapfactory.TiffBitmapFactory.nativeDecodePath(java.lang.String, org.beyka.tiffbitmapfactory.TiffBitmapFactory$Options, org.beyka.tiffbitmapfactory.IProgressListener) (tried Java_org_beyka_tiffbitmapfactory_TiffBitmapFactory_nativeDecodePath and Java_org_beyka_tiffbitmapfactory_TiffBitmapFactory_nativeDecodePath__Ljava_lang_String_2Lorg_beyka_tiffbitmapfactory_TiffBitmapFactory_00024Options_2Lorg_beyka_tiffbitmapfactory_IProgressListener_2)

at org.beyka.tiffbitmapfactory.TiffBitmapFactory.nativeDecodePath(Native Method)

decodeFile returned null

Hi Beyka,

I am now having issue getting decodeFile to work. I used a test Tiff (1640x1240), set options.inJustDecodeBounds = true, and called decodeFile(file, options). There was no exception, but the Bitmap returned was null.

I then tried importing your source as module (not from gradle), but same result. However, android studio warned that it could not resolve corresponding JNI function of nativeDecodePath in TiffBitmapFactory.java.

I am using NDK 10e for the native code compilation (which also warns of non-system libraries in linker flags for libjpeg-x86.a and libjpeg.a.

Do you know how I can resolve this issue?

Thanks,
Devin

DNG or RawData to Tiff conversion

Is it possible to convert Raw Data from camera feed into Tiff 16 bit linear version? I have a requirement to convert the raw output of the camera into Tiff format. Will that be possible with this?

Error converting from jpg to Tiff CCITTFAX4 or FAX3

Hi,

I was using your excellent library since many many months ago. After relaunching the app I was developing and updating to the latest version of the library (I was using 0.9.7.5 or lower), I found that the conversion of a single JPG is not ok.
I´m getting a noise unreadable image.

I´m using the piece of code explained in the example and tutorial. And I hardly beleive that this piece of code was working before...

any help?

Commercial Use

Hi , is there any possibility to use this great library for commercial use ?

Because the problem is the gpl license.

Group 4 compression support

Hi!
I am building an Android App and I need to compress an image in group 4. But I am not seeing the option in TiffSaver.CompressionMode. Is there any way I can call COMPRESSION_CCITTFAX4 ??

Usage issue

Hi Beyka,

I am having issue using your module. I tried to install it through gradle dependencies (compile 'com.github.beyka:androidtiffbitmapfactory:0.6'), then following the usage sample you wrote. However, I couldn't access the options properties or decodeFile in the TiffBitmapFactory object. Do you know what could be the issue?

Thanks,
Devin

Base 64 tiff string

I have base 64 encode string tif format string from the web-service how i can display the android image view if you have any example let me know..

I have lot searched after Found your source .. Your source through file path only..
We need string data how can i display image View ..

Please help me asap....

jcenter repository shut down

According to JFrog, the JCenter repository ceased serving packages on February 1st 2022, which means your library is no longer accessible and now gives the following error in when syncing Gradle dependencies in Android Studio: "Failed to resolve: com.github.beyka:androidtiffbitmapfactory:0.9.8.8"

The artifact is still searchable in Maven, giving the URL https://mvnrepository.com/artifact/com.github.beyka/androidtiffbitmapfactory/0.9.8.8
However, the link to the library on JCenter https://jcenter.bintray.com/com/github/beyka/androidtiffbitmapfactory/0.9.8.8/androidtiffbitmapfactory-0.9.8.8.aar gives a 403 Forbidden error, confirming that the JCenter repository has been closed down.

Can you advise if you are intending to migrate the library to MavenCentral to keep your library alive, or perhaps make the library available as a direct download from the GitHub repository.

Thanks in advance.

TIFF JPEG compression type resulting in CMYK color space?

We use com.sun.imageio.plugins.jpeg.JPEGImageReader to decode the TIFFs we receive in one portion of our app. I'm using TiffBitmapFactory to generate multipage grayscale TIFFs and using CompressionScheme.COMPRESSION_JPEG when saving them. JPEGImageReader is complaining about an unsupported image type, and the one that it's getting from the image is com.sun.imageio.plugins.jpeg.JPEG.JCS_CMYK, which it doesn't handle.

Is there a way to make TiffBitmapFactory emit RGB? Alternately, could TBFactory be outputting CMYK because of anything I'm doing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.