Home | History | Annotate | Download | only in decoder
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2 <!-- NewPage -->
      3 <html lang="en">
      4 <head>
      5 <!-- Generated by javadoc -->
      6 <title>ImageDecoder (library 3.9.0 API)</title>
      7 <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
      8 <script type="text/javascript" src="../../../../../script.js"></script>
      9 </head>
     10 <body>
     11 <script type="text/javascript"><!--
     12     try {
     13         if (location.href.indexOf('is-external=true') == -1) {
     14             parent.document.title="ImageDecoder (library 3.9.0 API)";
     15         }
     16     }
     17     catch(err) {
     18     }
     19 //-->
     20 var methods = {"i0":6};
     21 var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
     22 var altColor = "altColor";
     23 var rowColor = "rowColor";
     24 var tableTab = "tableTab";
     25 var activeTableTab = "activeTableTab";
     26 </script>
     27 <noscript>
     28 <div>JavaScript is disabled on your browser.</div>
     29 </noscript>
     30 <!-- ========= START OF TOP NAVBAR ======= -->
     31 <div class="topNav"><a name="navbar.top">
     32 <!--   -->
     33 </a>
     34 <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
     35 <a name="navbar.top.firstrow">
     36 <!--   -->
     37 </a>
     38 <ul class="navList" title="Navigation">
     39 <li><a href="../../../../../overview-summary.html">Overview</a></li>
     40 <li><a href="package-summary.html">Package</a></li>
     41 <li class="navBarCell1Rev">Class</li>
     42 <li><a href="package-tree.html">Tree</a></li>
     43 <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
     44 <li><a href="../../../../../index-all.html">Index</a></li>
     45 <li><a href="../../../../../help-doc.html">Help</a></li>
     46 </ul>
     47 </div>
     48 <div class="subNav">
     49 <ul class="navList">
     50 <li><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/DecoderFactory.html" title="interface in com.davemorrissey.labs.subscaleview.decoder"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
     51 <li><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageRegionDecoder.html" title="interface in com.davemorrissey.labs.subscaleview.decoder"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
     52 </ul>
     53 <ul class="navList">
     54 <li><a href="../../../../../index.html?com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html" target="_top">Frames</a></li>
     55 <li><a href="ImageDecoder.html" target="_top">No&nbsp;Frames</a></li>
     56 </ul>
     57 <ul class="navList" id="allclasses_navbar_top">
     58 <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
     59 </ul>
     60 <div>
     61 <script type="text/javascript"><!--
     62   allClassesLink = document.getElementById("allclasses_navbar_top");
     63   if(window==top) {
     64     allClassesLink.style.display = "block";
     65   }
     66   else {
     67     allClassesLink.style.display = "none";
     68   }
     69   //-->
     70 </script>
     71 </div>
     72 <div>
     73 <ul class="subNavList">
     74 <li>Summary:&nbsp;</li>
     75 <li>Nested&nbsp;|&nbsp;</li>
     76 <li>Field&nbsp;|&nbsp;</li>
     77 <li>Constr&nbsp;|&nbsp;</li>
     78 <li><a href="#method.summary">Method</a></li>
     79 </ul>
     80 <ul class="subNavList">
     81 <li>Detail:&nbsp;</li>
     82 <li>Field&nbsp;|&nbsp;</li>
     83 <li>Constr&nbsp;|&nbsp;</li>
     84 <li><a href="#method.detail">Method</a></li>
     85 </ul>
     86 </div>
     87 <a name="skip.navbar.top">
     88 <!--   -->
     89 </a></div>
     90 <!-- ========= END OF TOP NAVBAR ========= -->
     91 <!-- ======== START OF CLASS DATA ======== -->
     92 <div class="header">
     93 <div class="subTitle">com.davemorrissey.labs.subscaleview.decoder</div>
     94 <h2 title="Interface ImageDecoder" class="title">Interface ImageDecoder</h2>
     95 </div>
     96 <div class="contentContainer">
     97 <div class="description">
     98 <ul class="blockList">
     99 <li class="blockList">
    100 <dl>
    101 <dt>All Known Implementing Classes:</dt>
    102 <dd><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/SkiaImageDecoder.html" title="class in com.davemorrissey.labs.subscaleview.decoder">SkiaImageDecoder</a></dd>
    103 </dl>
    104 <hr>
    105 <br>
    106 <pre>public interface <span class="typeNameLabel">ImageDecoder</span></pre>
    107 <div class="block">Interface for image decoding classes, allowing the default <a href="https://developer.android.com/reference/android/graphics/BitmapFactory.html?is-external=true" title="class or interface in android.graphics"><code>BitmapFactory</code></a>
    108  based on the Skia library to be replaced with a custom class.</div>
    109 </li>
    110 </ul>
    111 </div>
    112 <div class="summary">
    113 <ul class="blockList">
    114 <li class="blockList">
    115 <!-- ========== METHOD SUMMARY =========== -->
    116 <ul class="blockList">
    117 <li class="blockList"><a name="method.summary">
    118 <!--   -->
    119 </a>
    120 <h3>Method Summary</h3>
    121 <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
    122 <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
    123 <tr>
    124 <th class="colFirst" scope="col">Modifier and Type</th>
    125 <th class="colLast" scope="col">Method and Description</th>
    126 </tr>
    127 <tr id="i0" class="altColor">
    128 <td class="colFirst"><code><a href="https://developer.android.com/reference/android/graphics/Bitmap.html?is-external=true" title="class or interface in android.graphics">Bitmap</a></code></td>
    129 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html#decode-android.content.Context-android.net.Uri-">decode</a></span>(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context,
    130       <a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&nbsp;uri)</code>
    131 <div class="block">Decode an image.</div>
    132 </td>
    133 </tr>
    134 </table>
    135 </li>
    136 </ul>
    137 </li>
    138 </ul>
    139 </div>
    140 <div class="details">
    141 <ul class="blockList">
    142 <li class="blockList">
    143 <!-- ============ METHOD DETAIL ========== -->
    144 <ul class="blockList">
    145 <li class="blockList"><a name="method.detail">
    146 <!--   -->
    147 </a>
    148 <h3>Method Detail</h3>
    149 <a name="decode-android.content.Context-android.net.Uri-">
    150 <!--   -->
    151 </a>
    152 <ul class="blockListLast">
    153 <li class="blockList">
    154 <h4>decode</h4>
    155 <pre><a href="https://developer.android.com/reference/android/graphics/Bitmap.html?is-external=true" title="class or interface in android.graphics">Bitmap</a>&nbsp;decode(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context,
    156               <a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&nbsp;uri)
    157        throws <a href="https://developer.android.com/reference/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
    158 <div class="block">Decode an image. The URI can be in one of the following formats:
    159  <br>
    160  File: <code>file:///scard/picture.jpg</code>
    161  <br>
    162  Asset: <code>file:///android_asset/picture.png</code>
    163  <br>
    164  Resource: <code>android.resource://com.example.app/drawable/picture</code></div>
    165 <dl>
    166 <dt><span class="paramLabel">Parameters:</span></dt>
    167 <dd><code>context</code> - Application context</dd>
    168 <dd><code>uri</code> - URI of the image</dd>
    169 <dt><span class="returnLabel">Returns:</span></dt>
    170 <dd>the decoded bitmap</dd>
    171 <dt><span class="throwsLabel">Throws:</span></dt>
    172 <dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if decoding fails.</dd>
    173 </dl>
    174 </li>
    175 </ul>
    176 </li>
    177 </ul>
    178 </li>
    179 </ul>
    180 </div>
    181 </div>
    182 <!-- ========= END OF CLASS DATA ========= -->
    183 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    184 <div class="bottomNav"><a name="navbar.bottom">
    185 <!--   -->
    186 </a>
    187 <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
    188 <a name="navbar.bottom.firstrow">
    189 <!--   -->
    190 </a>
    191 <ul class="navList" title="Navigation">
    192 <li><a href="../../../../../overview-summary.html">Overview</a></li>
    193 <li><a href="package-summary.html">Package</a></li>
    194 <li class="navBarCell1Rev">Class</li>
    195 <li><a href="package-tree.html">Tree</a></li>
    196 <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
    197 <li><a href="../../../../../index-all.html">Index</a></li>
    198 <li><a href="../../../../../help-doc.html">Help</a></li>
    199 </ul>
    200 </div>
    201 <div class="subNav">
    202 <ul class="navList">
    203 <li><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/DecoderFactory.html" title="interface in com.davemorrissey.labs.subscaleview.decoder"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
    204 <li><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageRegionDecoder.html" title="interface in com.davemorrissey.labs.subscaleview.decoder"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
    205 </ul>
    206 <ul class="navList">
    207 <li><a href="../../../../../index.html?com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html" target="_top">Frames</a></li>
    208 <li><a href="ImageDecoder.html" target="_top">No&nbsp;Frames</a></li>
    209 </ul>
    210 <ul class="navList" id="allclasses_navbar_bottom">
    211 <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
    212 </ul>
    213 <div>
    214 <script type="text/javascript"><!--
    215   allClassesLink = document.getElementById("allclasses_navbar_bottom");
    216   if(window==top) {
    217     allClassesLink.style.display = "block";
    218   }
    219   else {
    220     allClassesLink.style.display = "none";
    221   }
    222   //-->
    223 </script>
    224 </div>
    225 <div>
    226 <ul class="subNavList">
    227 <li>Summary:&nbsp;</li>
    228 <li>Nested&nbsp;|&nbsp;</li>
    229 <li>Field&nbsp;|&nbsp;</li>
    230 <li>Constr&nbsp;|&nbsp;</li>
    231 <li><a href="#method.summary">Method</a></li>
    232 </ul>
    233 <ul class="subNavList">
    234 <li>Detail:&nbsp;</li>
    235 <li>Field&nbsp;|&nbsp;</li>
    236 <li>Constr&nbsp;|&nbsp;</li>
    237 <li><a href="#method.detail">Method</a></li>
    238 </ul>
    239 </div>
    240 <a name="skip.navbar.bottom">
    241 <!--   -->
    242 </a></div>
    243 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    244 </body>
    245 </html>
    246