• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>SkiaImageDecoder (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="SkiaImageDecoder (library 3.9.0 API)";
15        }
16    }
17    catch(err) {
18    }
19//-->
20var methods = {"i0":10};
21var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
22var altColor = "altColor";
23var rowColor = "rowColor";
24var tableTab = "tableTab";
25var 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/ImageRegionDecoder.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/SkiaImageRegionDecoder.html" title="class 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/SkiaImageDecoder.html" target="_top">Frames</a></li>
55<li><a href="SkiaImageDecoder.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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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="Class SkiaImageDecoder" class="title">Class SkiaImageDecoder</h2>
95</div>
96<div class="contentContainer">
97<ul class="inheritance">
98<li><a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
99<li>
100<ul class="inheritance">
101<li>com.davemorrissey.labs.subscaleview.decoder.SkiaImageDecoder</li>
102</ul>
103</li>
104</ul>
105<div class="description">
106<ul class="blockList">
107<li class="blockList">
108<dl>
109<dt>All Implemented Interfaces:</dt>
110<dd><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html" title="interface in com.davemorrissey.labs.subscaleview.decoder">ImageDecoder</a></dd>
111</dl>
112<hr>
113<br>
114<pre>public class <span class="typeNameLabel">SkiaImageDecoder</span>
115extends <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
116implements <a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html" title="interface in com.davemorrissey.labs.subscaleview.decoder">ImageDecoder</a></pre>
117<div class="block">Default implementation of <a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html" title="interface in com.davemorrissey.labs.subscaleview.decoder"><code>ImageDecoder</code></a>
118 using Android's <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>, based on the Skia library. This
119 works well in most circumstances and has reasonable performance, however it has some problems
120 with grayscale, indexed and CMYK images.</div>
121</li>
122</ul>
123</div>
124<div class="summary">
125<ul class="blockList">
126<li class="blockList">
127<!-- ======== CONSTRUCTOR SUMMARY ======== -->
128<ul class="blockList">
129<li class="blockList"><a name="constructor.summary">
130<!--   -->
131</a>
132<h3>Constructor Summary</h3>
133<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
134<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
135<tr>
136<th class="colOne" scope="col">Constructor and Description</th>
137</tr>
138<tr class="altColor">
139<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/SkiaImageDecoder.html#SkiaImageDecoder--">SkiaImageDecoder</a></span>()</code>&nbsp;</td>
140</tr>
141<tr class="rowColor">
142<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/SkiaImageDecoder.html#SkiaImageDecoder-android.graphics.Bitmap.Config-">SkiaImageDecoder</a></span>(<a href="https://developer.android.com/reference/android/graphics/Bitmap.Config.html?is-external=true" title="class or interface in android.graphics">Bitmap.Config</a>&nbsp;bitmapConfig)</code>&nbsp;</td>
143</tr>
144</table>
145</li>
146</ul>
147<!-- ========== METHOD SUMMARY =========== -->
148<ul class="blockList">
149<li class="blockList"><a name="method.summary">
150<!--   -->
151</a>
152<h3>Method Summary</h3>
153<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
154<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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
155<tr>
156<th class="colFirst" scope="col">Modifier and Type</th>
157<th class="colLast" scope="col">Method and Description</th>
158</tr>
159<tr id="i0" class="altColor">
160<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>
161<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/SkiaImageDecoder.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,
162      <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>
163<div class="block">Decode an image.</div>
164</td>
165</tr>
166</table>
167<ul class="blockList">
168<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
169<!--   -->
170</a>
171<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
172<code><a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
173</ul>
174</li>
175</ul>
176</li>
177</ul>
178</div>
179<div class="details">
180<ul class="blockList">
181<li class="blockList">
182<!-- ========= CONSTRUCTOR DETAIL ======== -->
183<ul class="blockList">
184<li class="blockList"><a name="constructor.detail">
185<!--   -->
186</a>
187<h3>Constructor Detail</h3>
188<a name="SkiaImageDecoder--">
189<!--   -->
190</a>
191<ul class="blockList">
192<li class="blockList">
193<h4>SkiaImageDecoder</h4>
194<pre>public&nbsp;SkiaImageDecoder()</pre>
195</li>
196</ul>
197<a name="SkiaImageDecoder-android.graphics.Bitmap.Config-">
198<!--   -->
199</a>
200<ul class="blockListLast">
201<li class="blockList">
202<h4>SkiaImageDecoder</h4>
203<pre>public&nbsp;SkiaImageDecoder(<a href="https://developer.android.com/reference/android/graphics/Bitmap.Config.html?is-external=true" title="class or interface in android.graphics">Bitmap.Config</a>&nbsp;bitmapConfig)</pre>
204</li>
205</ul>
206</li>
207</ul>
208<!-- ============ METHOD DETAIL ========== -->
209<ul class="blockList">
210<li class="blockList"><a name="method.detail">
211<!--   -->
212</a>
213<h3>Method Detail</h3>
214<a name="decode-android.content.Context-android.net.Uri-">
215<!--   -->
216</a>
217<ul class="blockListLast">
218<li class="blockList">
219<h4>decode</h4>
220<pre>public&nbsp;<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,
221                     <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)
222              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>
223<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html#decode-android.content.Context-android.net.Uri-">ImageDecoder</a></code></span></div>
224<div class="block">Decode an image. The URI can be in one of the following formats:
225 <br>
226 File: <code>file:///scard/picture.jpg</code>
227 <br>
228 Asset: <code>file:///android_asset/picture.png</code>
229 <br>
230 Resource: <code>android.resource://com.example.app/drawable/picture</code></div>
231<dl>
232<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
233<dd><code><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html#decode-android.content.Context-android.net.Uri-">decode</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html" title="interface in com.davemorrissey.labs.subscaleview.decoder">ImageDecoder</a></code></dd>
234<dt><span class="paramLabel">Parameters:</span></dt>
235<dd><code>context</code> - Application context</dd>
236<dd><code>uri</code> - URI of the image</dd>
237<dt><span class="returnLabel">Returns:</span></dt>
238<dd>the decoded bitmap</dd>
239<dt><span class="throwsLabel">Throws:</span></dt>
240<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>
241</dl>
242</li>
243</ul>
244</li>
245</ul>
246</li>
247</ul>
248</div>
249</div>
250<!-- ========= END OF CLASS DATA ========= -->
251<!-- ======= START OF BOTTOM NAVBAR ====== -->
252<div class="bottomNav"><a name="navbar.bottom">
253<!--   -->
254</a>
255<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
256<a name="navbar.bottom.firstrow">
257<!--   -->
258</a>
259<ul class="navList" title="Navigation">
260<li><a href="../../../../../overview-summary.html">Overview</a></li>
261<li><a href="package-summary.html">Package</a></li>
262<li class="navBarCell1Rev">Class</li>
263<li><a href="package-tree.html">Tree</a></li>
264<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
265<li><a href="../../../../../index-all.html">Index</a></li>
266<li><a href="../../../../../help-doc.html">Help</a></li>
267</ul>
268</div>
269<div class="subNav">
270<ul class="navList">
271<li><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageRegionDecoder.html" title="interface in com.davemorrissey.labs.subscaleview.decoder"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
272<li><a href="../../../../../com/davemorrissey/labs/subscaleview/decoder/SkiaImageRegionDecoder.html" title="class in com.davemorrissey.labs.subscaleview.decoder"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
273</ul>
274<ul class="navList">
275<li><a href="../../../../../index.html?com/davemorrissey/labs/subscaleview/decoder/SkiaImageDecoder.html" target="_top">Frames</a></li>
276<li><a href="SkiaImageDecoder.html" target="_top">No&nbsp;Frames</a></li>
277</ul>
278<ul class="navList" id="allclasses_navbar_bottom">
279<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
280</ul>
281<div>
282<script type="text/javascript"><!--
283  allClassesLink = document.getElementById("allclasses_navbar_bottom");
284  if(window==top) {
285    allClassesLink.style.display = "block";
286  }
287  else {
288    allClassesLink.style.display = "none";
289  }
290  //-->
291</script>
292</div>
293<div>
294<ul class="subNavList">
295<li>Summary:&nbsp;</li>
296<li>Nested&nbsp;|&nbsp;</li>
297<li>Field&nbsp;|&nbsp;</li>
298<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
299<li><a href="#method.summary">Method</a></li>
300</ul>
301<ul class="subNavList">
302<li>Detail:&nbsp;</li>
303<li>Field&nbsp;|&nbsp;</li>
304<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
305<li><a href="#method.detail">Method</a></li>
306</ul>
307</div>
308<a name="skip.navbar.bottom">
309<!--   -->
310</a></div>
311<!-- ======== END OF BOTTOM NAVBAR ======= -->
312</body>
313</html>
314