You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.
I'm tring to create a OCR program using your code, but I'm having a lot of unexpected trouble and decided to create a JUnit test file to validate the class com.googlecode.leptonica.android.WriteFile.
The result of the tests follow below:
. The two writeBytes8 methods creates a invalid file format with 4.9Mb. I tried to open the file using Gimp 2.6 (attached image) but received a error dialog;
. The method writeFiles throw a RuntimeException with the message "writeFiles() is not currently supported". It is ok to me, because if the API say do not use, is supposed to don't use;
. The method writeMem always return null;
. The two methods writeImpliedFormat return true - that means success - but the files don't exist anywhere;
. The only method that works is the writeBitmap method.
The image used for test was taken from the camera and is a valid image.
Environment ---------------------------------------------------
Darwin Eduardo-Mac 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
Eclipse Android Developer Tools: Build: v21.1.0-569685
Android Debug Bridge version 1.0.31
ndk-build version: GNU Make 3.81 (This program built for i386-apple-darwin10.8.0)
Hi all,
I'm tring to create a OCR program using your code, but I'm having a lot of unexpected trouble and decided to create a JUnit test file to validate the class com.googlecode.leptonica.android.WriteFile.
The result of the tests follow below:
. The two writeBytes8 methods creates a invalid file format with 4.9Mb. I tried to open the file using Gimp 2.6 (attached image) but received a error dialog;
. The method writeFiles throw a RuntimeException with the message "writeFiles() is not currently supported". It is ok to me, because if the API say do not use, is supposed to don't use;
. The method writeMem always return null;
. The two methods writeImpliedFormat return true - that means success - but the files don't exist anywhere;
. The only method that works is the writeBitmap method.
The image used for test was taken from the camera and is a valid image.
Environment ---------------------------------------------------
Darwin Eduardo-Mac 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
Eclipse Android Developer Tools: Build: v21.1.0-569685
Android Debug Bridge version 1.0.31
ndk-build version: GNU Make 3.81 (This program built for i386-apple-darwin10.8.0)
JUnit ---------------------------------------------------
package com.googlecode.leptonica.android.test;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import junit.framework.Assert;
import junit.framework.TestCase;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory.Options;
import android.graphics.BitmapFactory;
import android.os.Environment;
import android.util.Log;
import com.googlecode.leptonica.android.Constants;
import com.googlecode.leptonica.android.Pix;
import com.googlecode.leptonica.android.Pixa;
import com.googlecode.leptonica.android.ReadFile;
import com.googlecode.leptonica.android.WriteFile;
public class WriteFileFullTest extends TestCase {
}
Thanks in advance for any help!!
The text was updated successfully, but these errors were encountered: