Skip to content

Commit 46bc953

Browse files
Update README.md
1 parent 65570d9 commit 46bc953

1 file changed

Lines changed: 221 additions & 0 deletions

File tree

README.md

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,223 @@
11
# Mobile-Scanning-SDK-IOS
22
QuickCapture Mobile Scanning SDK Specially designed for native IOS
3+
4+
5+
Compatibility
6+
-------------
7+
* **JAVA 8 Support**: QuickCapture v1 requires JAVA version 8 support for the application.
8+
# * **Minimum IOS SDK**: QuickCapture v1 requires a minimum API level of 21.
9+
# * **Compile Android SDK**: QuickCapture v1 requires you to compile against API 33 or later.
10+
11+
12+
13+
QuickCapture IOS SDK v 1.0.2
14+
15+
## API and integration Details
16+
17+
Mainly the SDK will expose two classes and two supporting classes :
18+
19+
1. **CameraHelper** - *Handle the camera related operations. Basically, an activity.*
20+
2. **ImgHelper** - *Purpose of this class is to handle all imaging related operations.*
21+
3. **CameraSupport** - *Holds various configurations for camera.*
22+
4. **ImgException** - *Handle all exceptions on Image related operations on ImgHelper.*
23+
24+
25+
Based on the requirement any one or all classes can be used. And need to import those from the SDK.
26+
```swift
27+
import QuickCaptureFW;
28+
```
29+
---
30+
## CameraHelper
31+
This class will be implemented as an activity. This class can be initialized as intent.
32+
```swift
33+
var cameraHelper = CameraHelper();
34+
```
35+
36+
```swift
37+
cameraHelper.StartCapture(
38+
sender:self,
39+
//pathtowritabledirectorywherecaptured
40+
//files are stored temporarily for processing
41+
workingDirectory:“”,
42+
callback:cameraHelperCallBack)
43+
44+
func cameraHelperCallback(_ImageArray:[String])->Void{
45+
//paths- arrayofcapturedimagesavailablehere.
46+
//Use returned images
47+
}
48+
```
49+
Camera Helper having a supporting class with static configuration
50+
CameraSupport.CamConfigClass.CamConfigClass : contains various configurations as follows:
51+
52+
- **OutputPath** - To set the output directory in which the captured images will be saved. Base app should have rights to write to the provided path.
53+
```java
54+
CameraSupport.CamConfigClass.OutputPath = “pass output path as string”;
55+
```
56+
- **MaxPage** - To set the number of captures to do on each camera session. And this can also control whether the capture mode is single or multi i.e
57+
> if MaxPage <= 0 / not set: means unlimited.If MaxPage >= 1:
58+
> means limited.
59+
```java
60+
// MaxPage <= 0 : Unlimited Capture Mode
61+
// MaxPage = 1 : Limited Single Capture
62+
// MaxPage > 1 : Limited Multi Capture Mode
63+
public static int MaxPage = 0;
64+
```
65+
- **ColorMode** - To Set the capture color mode- supporting color and grayscale.
66+
- **EnableFlash** - Enable Document capture specific flash control for SDK camera.
67+
```java
68+
CameraSupport.CamConfigClass.EnableFlash = true;
69+
```
70+
- **CaptureSound** - To Enable camera capture sound.
71+
```java
72+
CameraSupport.CamConfigClass.CaptureSound = true;
73+
```
74+
- **DeviceInfo** - Will share all general information about the device.
75+
```java
76+
CameraSupport.CamConfigClass.DeviceInfo;
77+
```
78+
- **SDKInfo** - Contains all version related information on SDK.
79+
```java
80+
CameraSupport.CamConfigClass.SDKInfo;
81+
```
82+
83+
- CameraToggle - Toggle camera between front and back.
84+
```java
85+
CameraSupport.CamConfigClass.CameraToggle = 2;
86+
//0-Disable camera toggle option.
87+
//1-Enable camera toggle option with Front camera by default.
88+
//2-Enable camera toggle option with Back camera by default.
89+
```
90+
91+
- **GetTiffForLastCapture** - Build Tiff file output file from last captured set of images.
92+
```java
93+
CameraHelper.GetTiffForLastCapture(outPutFileWithpath);
94+
//on success, will respond with string : "SUCCESS:::TiffFilePath";
95+
//use ":::" char. key to split the response.
96+
//on failure,will respond with string : "FAILED:::Reason for failure";
97+
//use ":::" char. key to split the response.
98+
//on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo
99+
```
100+
- **GetPDFForLastCapture** - Build PDF file output file from last captured set of images.
101+
```java
102+
CameraHelper.GetPDFForLastCapture(outPutFileWithpath);
103+
//on success, will respond with string : "SUCCESS:::PdfFilePath";
104+
//use ":::" char. key to split the response.
105+
//on failure,will respond with string : "FAILED:::Reason for failure";
106+
//use ":::" char. key to split the response.
107+
//on failure, error details can collect from CameraSupport.CamConfigClass.LastLogInfo
108+
```
109+
- **BuildTiff** - Build .tiff file output from the list of images shared.
110+
```java
111+
CameraHelper.BuildTiff(ArrayList<String> ImageCol, String OutputTiffFilePath)
112+
*@param "Image File path collection as ArrayList<String>"
113+
*@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::TIFF file path".
114+
```
115+
- **BuildPDF** - Build PDF file output file from last captured set of images.
116+
```java
117+
CameraHelper.BuildPDF(outPutFileWithpath);
118+
*@param "Image File path collection as ArrayList<String>"
119+
*@return on failure = "FAILED:::REASON" || on success = "SUCCESS:::PDF file path".
120+
```
121+
## ImgHelper
122+
Following are the options/methods available from class **ImgHelper** :
123+
```java
124+
ImgHelper ImageHelper = new ImgHelper(this);
125+
```
126+
- ***SetImageQuality*** - *Set the Quality of the image, Document_Qualityisused.If documents are used further for any automations and OCR, use Document_Quality.*
127+
>*Available Image Qualities* :
128+
1. Photo_Quality.
129+
2. Document_Quality.
130+
3. Compressed_Document.
131+
132+
```java
133+
ImageHelper.SetImageQuality(ImgHelper.ImageQuality.Photo_Quality.ordinal());
134+
//OR
135+
ImageHelper.SetImageQuality(1);//0,1,2 - Photo_Quality, Document_Quality, Compressed_Document
136+
```
137+
- ***SetPageLayout*** - *Set the Layout for the images generated/processed by the system.*
138+
```java
139+
ImageHelper.SetPageLayout(ImgHelper.LayoutType.A4.ordinal());
140+
//OR
141+
ImageHelper.SetPageLayout(4);//A1-A7(1-7),PHOTO,CUSTOM,ID(8,9,10)
142+
```
143+
>*Available layouts* : A1, A2, A3, **A4**, A5, A6, A7,PHOTO & CUSTOM
144+
145+
*A4 is the most recommended layout for document capture scenarios.*
146+
147+
- ***SetDPI*** - *Set DPI (depth per inch) for the image.*
148+
```java
149+
ImageHelper.SetDPI(ImgHelper.DPI.DPI_200.ordinal());
150+
//OR
151+
ImageHelper.SetDPI(200);//int dpi_val = 150, 200, 300, 500, 600;
152+
```
153+
154+
>*Available DPI* : DPI_150, DPI_200, DPI_300, DPI_500, DPI_600
155+
156+
*150 & 200 DPI is most used.And 200 DPI recommended for OCR and other image extraction prior to capture.*
157+
158+
- ***GetThumbnail*** - *This method Will build thumbnail for the given image in custom width,height & AspectRatio.*
159+
```java
160+
161+
Bitmap thumb = ImageHelper.GetThumbnail(ImageBitmap, 600, 600, true);
162+
/*
163+
Bitmap GetThumbnail(
164+
@NonNull Bitmap bm,
165+
int reqHeight,
166+
int reqWidth,
167+
Boolean AspectRatio )throws ImgException.
168+
*/
169+
```
170+
- ***CompressToJPEG*** - *This method will Compress the provided bitmap image and will save to given path..*
171+
```java
172+
173+
Boolean Iscompressed = CompressToJPEG(bitmap,outputFilePath);
174+
/*
175+
Boolean CompressToJPEG(Bitmap bm,String outputFilePath)
176+
throws ImgException
177+
178+
*/
179+
```
180+
181+
- ***rotateBitmap*** - *This method will rotate the image to preferred orientation.*
182+
```java
183+
184+
Bitmap rotatedBm = rotateBitmapDegree(nBm, RotationDegree);
185+
/*
186+
Bitmap rotateBitmapDegree(Bitmap bitmap,int Degree)
187+
throws ImgException
188+
*/
189+
```
190+
191+
## ImgException
192+
As a part of exceptional error handling **ImgException** class is available.
193+
- *Following are the possible errors and corresponding codes*:
194+
- CREATE_FILE_ERROR= **-100**;
195+
- IMAGE_ROTATION_ERROR= **-101**;
196+
- LOAD_TO_BUFFER_ERROR= **-102**;
197+
- DELETE_FILE_ERROR= **-103**;
198+
- GET_ROTATION_ERROR= **-104**;
199+
- ROTATE_BITMAP_ERROR= **-105**;
200+
- BITMAP_RESIZE_ERROR= **-106**;
201+
- CAMERA_HELPER_ERROR= **-107**;
202+
- LOG_CREATION_ERROR= **-108**;
203+
204+
## SDK Licensing
205+
206+
*License file provided that should keep inside assets folder of main application and call UnlockImagingLibrary from ImgHelper class to unlock the SDK.*
207+
> **QuickCapture** SDK is absolutely **free** to use.But for image operations on enterprise use cases, license required.
208+
> [Click for license details ](https://www.extrieve.com/mobile-document-scanning/)
209+
210+
```java
211+
212+
String licData = readAssetFile("com.extrieve.lic", this);
213+
Boolean IsUnlocked = ImageHelper.UnlockImagingLibrary(licData)
214+
215+
/*
216+
boolean UnlockImagingLibrary(String licenseFileData)
217+
throws Exception
218+
*/
219+
220+
```
221+
222+
223+
[© 1996 - 2023 Extrieve Technologies](https://www.extrieve.com/)

0 commit comments

Comments
 (0)