cordova-plugin-pdf417
Version:
A small and powerful PDF417 barcode scanning library
584 lines (582 loc) • 21.7 kB
HTML
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Image (LibPdf417Mobi API)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Image (LibPdf417Mobi API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../com/microblink/image/ImageBuilder.html" title="class in com.microblink.image"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/microblink/image/Image.html" target="_top">Frames</a></li>
<li><a href="Image.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.microblink.image</div>
<h2 title="Class Image" class="title">Class Image</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.microblink.image.Image</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">Image</span>
extends java.lang.Object</pre>
<div class="block">Created by dodo on 16/12/14.
Represents a image that is being processed.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../com/microblink/image/Image.html" title="class in com.microblink.image">Image</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#clone--">clone</a></span>()</code>
<div class="block">Creates and returns a copy of this image object.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>android.graphics.Bitmap</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#convertToBitmap--">convertToBitmap</a></span>()</code>
<div class="block">Converts this image into Android Bitmap.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#dispose--">dispose</a></span>()</code>
<div class="block">Disposes native object containing image pixels.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#finalize--">finalize</a></span>()</code> </td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.nio.ByteBuffer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getBuffer--">getBuffer</a></span>()</code>
<div class="block">Returns the native buffer that contains image pixels.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getHeight--">getHeight</a></span>()</code>
<div class="block">Returns the height of the image.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../com/microblink/image/ImageFormat.html" title="enum in com.microblink.image">ImageFormat</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getImageFormat--">getImageFormat</a></span>()</code>
<div class="block">Returns the format of the image.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getImageName--">getImageName</a></span>()</code>
<div class="block">Returns the name of the image.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../com/microblink/hardware/orientation/Orientation.html" title="enum in com.microblink.hardware.orientation">Orientation</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getImageOrientation--">getImageOrientation</a></span>()</code>
<div class="block">Returns the orientation of the image.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../com/microblink/image/ImageType.html" title="enum in com.microblink.image">ImageType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getImageType--">getImageType</a></span>()</code>
<div class="block">Returns the type of the image.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getPixelStride--">getPixelStride</a></span>()</code>
<div class="block">Returns the pixel stride for image buffer.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>android.graphics.Rect</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getROI--">getROI</a></span>()</code>
<div class="block">Returns the region of interest in image.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getRowStride--">getRowStride</a></span>()</code>
<div class="block">Returns the row stride for image buffer.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#getWidth--">getWidth</a></span>()</code>
<div class="block">Returns the width of the image.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#isDisposed--">isDisposed</a></span>()</code>
<div class="block">Returns true if image's internal buffers are disposed and cannot be used anymore.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#setImageOrientation-com.microblink.hardware.orientation.Orientation-">setImageOrientation</a></span>(<a href="../../../com/microblink/hardware/orientation/Orientation.html" title="enum in com.microblink.hardware.orientation">Orientation</a> orientation)</code>
<div class="block">Use this method to change Image's orientation.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/microblink/image/Image.html#setROI-android.graphics.Rect-">setROI</a></span>(android.graphics.Rect roi)</code>
<div class="block">Sets the region of interest in image.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="dispose--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispose</h4>
<pre>public void dispose()</pre>
<div class="block">Disposes native object containing image pixels.
After this method is called, Image object cannot be used anymore.</div>
</li>
</ul>
<a name="finalize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>finalize</h4>
<pre>protected void finalize()
throws java.lang.Throwable</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>finalize</code> in class <code>java.lang.Object</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.Throwable</code></dd>
</dl>
</li>
</ul>
<a name="clone--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre>public <a href="../../../com/microblink/image/Image.html" title="class in com.microblink.image">Image</a> clone()</pre>
<div class="block">Creates and returns a copy of this image object. This method makes a copy of image pixels.
Use it if you want to use this image for later processing.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>clone</code> in class <code>java.lang.Object</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a copy of this image object</dd>
</dl>
</li>
</ul>
<a name="getWidth--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWidth</h4>
<pre>public int getWidth()</pre>
<div class="block">Returns the width of the image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the width of the image.</dd>
</dl>
</li>
</ul>
<a name="getHeight--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeight</h4>
<pre>public int getHeight()</pre>
<div class="block">Returns the height of the image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the height of the image.</dd>
</dl>
</li>
</ul>
<a name="getImageType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getImageType</h4>
<pre>public <a href="../../../com/microblink/image/ImageType.html" title="enum in com.microblink.image">ImageType</a> getImageType()</pre>
<div class="block">Returns the type of the image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the type of the image.</dd>
</dl>
</li>
</ul>
<a name="getImageFormat--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getImageFormat</h4>
<pre>public <a href="../../../com/microblink/image/ImageFormat.html" title="enum in com.microblink.image">ImageFormat</a> getImageFormat()</pre>
<div class="block">Returns the format of the image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the format of the image.</dd>
</dl>
</li>
</ul>
<a name="getImageName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getImageName</h4>
<pre>public java.lang.String getImageName()</pre>
<div class="block">Returns the name of the image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of the image.</dd>
</dl>
</li>
</ul>
<a name="getBuffer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBuffer</h4>
<pre>public java.nio.ByteBuffer getBuffer()</pre>
<div class="block">Returns the native buffer that contains image pixels.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the native buffer that contains image pixels.</dd>
</dl>
</li>
</ul>
<a name="getPixelStride--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPixelStride</h4>
<pre>public int getPixelStride()</pre>
<div class="block">Returns the pixel stride for image buffer. Pixel stride is byte difference between two
consecutive pixels image row. It is guaranteed that pixel stride is at least 1.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the pixel stride for image buffer.</dd>
</dl>
</li>
</ul>
<a name="getRowStride--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRowStride</h4>
<pre>public int getRowStride()</pre>
<div class="block">Returns the row stride for image buffer. Row stride is byte difference between two
consecutive rows in image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the row stride for image plane</dd>
</dl>
</li>
</ul>
<a name="getROI--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getROI</h4>
<pre>public android.graphics.Rect getROI()</pre>
<div class="block">Returns the region of interest in image. This is useful only for
YUV_NV21 images that will contain the entire image in buffer and to obtain
ROI-ed image, you should use YuvImage helper class (see: https://developer.android.com/reference/android/graphics/YuvImage.html)</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the region of interest in image.</dd>
</dl>
</li>
</ul>
<a name="setROI-android.graphics.Rect-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setROI</h4>
<pre>public void setROI(android.graphics.Rect roi)</pre>
<div class="block">Sets the region of interest in image. You can use this method to set the ROI of
images that will be processed via DirectAPI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>roi</code> - region of interest in image</dd>
</dl>
</li>
</ul>
<a name="getImageOrientation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getImageOrientation</h4>
<pre>public <a href="../../../com/microblink/hardware/orientation/Orientation.html" title="enum in com.microblink.hardware.orientation">Orientation</a> getImageOrientation()</pre>
<div class="block">Returns the orientation of the image. Orientation is defined as orientation of the device when the image was taken.
To explain the orientation further, let's assume that image contains a line of text.
If orientation is Orientation.ORIENTATION_LANDSCAPE_RIGHT, the line of text would be horizontal from left to right (normal reading orientation).
If orientation is Orientation.ORIENTATION_PORTRAIT, the line of text would be vertical from bottom to top. In order to read the text, you would
need to rotate image by 90 degrees clockwise.
If orientation is Orientation.ORIENTATION_PORTRAIT_UPSIDE, the line of text would be vertical from top to bottom. In order to read the text,
you would need to rotate image by 90 degrees counterclockwise.
If orientation is Orientation.ORIENTATION_LANDSCAPE_LEFT, the line of text would be horizontal from right to left (upside down). In order to
read the text, you would need to rotate image by 180 degrees.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the orientation of the image</dd>
</dl>
</li>
</ul>
<a name="setImageOrientation-com.microblink.hardware.orientation.Orientation-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setImageOrientation</h4>
<pre>public void setImageOrientation(@NonNull
<a href="../../../com/microblink/hardware/orientation/Orientation.html" title="enum in com.microblink.hardware.orientation">Orientation</a> orientation)</pre>
<div class="block">Use this method to change Image's orientation. This can be useful for different interpretations of same image in
different recognition contexts.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>orientation</code> - </dd>
</dl>
</li>
</ul>
<a name="isDisposed--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDisposed</h4>
<pre>public boolean isDisposed()</pre>
<div class="block">Returns true if image's internal buffers are disposed and cannot be used anymore.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if image's internal buffers are disposed and cannot be used anymore.</dd>
</dl>
</li>
</ul>
<a name="convertToBitmap--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>convertToBitmap</h4>
<pre>@Nullable
public android.graphics.Bitmap convertToBitmap()</pre>
<div class="block">Converts this image into Android Bitmap. This is a very slow process that involves
copying and converting a lot of data.
Returned bitmap has its own pixel buffer, so it may remain valid even after this
image's buffers become invalid (i.e. after image gets disposed).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Image converted to Android Bitmap or null if conversion failed.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../com/microblink/image/ImageBuilder.html" title="class in com.microblink.image"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/microblink/image/Image.html" target="_top">Frames</a></li>
<li><a href="Image.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>