[Multimedia] Add guide for the ThumbnailExtractor 55/152655/2
authorcoderhyme <jhyo.kim@samsung.com>
Tue, 26 Sep 2017 23:39:44 +0000 (08:39 +0900)
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Thu, 28 Sep 2017 09:57:00 +0000 (12:57 +0300)
PS2: Reviewed

Change-Id: Id3c0e703742115e93a77a3fc1357a01ce9756363
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
org.tizen.guides/html/dotnet/media/thumbnail_images.htm [new file with mode: 0644]

diff --git a/org.tizen.guides/html/dotnet/media/thumbnail_images.htm b/org.tizen.guides/html/dotnet/media/thumbnail_images.htm
new file mode 100644 (file)
index 0000000..559d669
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../../css/snippet.css" />
+       <script type="text/javascript" src="../../scripts/snippet.js"></script>
+       <script type="text/javascript" src="../../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../../scripts/search.js" charset="utf-8"></script>
+
+       <title>Thumbnail Images</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+
+<div id="toc-navigation">
+
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Dependencies</p>
+               <ul class="toc">
+                       <li>Tizen 4.0 and Higher</li>
+               </ul>
+
+               <p class="toc-title">Content</p>
+                       <ul class="toc">
+                               <li><a href="#prerequisites">Prerequisites</a></li>
+                               <li><a href="#get_thumbnail">Extracting a Thumbnail</a></li>
+                       </ul>
+
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                       <li><a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Multimedia_1_1Util_1_1ThumbnailExtractor.html" target="_blank">Tizen.Multimedia.Util.ThumbnailExtractor Class</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1>Thumbnail Images</h1>
+<p>You can create a thumbnail from an input media file.</p>
+
+<p>The main features of the <code>Tizen.Multimedia.Util.ThumbnailExtractor</code> class include:</p>
+
+<ul>
+       <li>Video and image thumbnails
+       <p>You can <a href="#get_thumbnail">create thumbnails</a> from video and image files. Audio files are not supported.</p></li>
+       <li>Custom size
+       <p>You can create the thumbnail using any size you like. The <code>Tizen.Multimedia.Util.ThumbnailExtractor</code> class outputs the results according to the size you have set. This means that the thumbnail can be generated even if the output size differs from the original aspect ratio.</p>
+       </li>
+</ul>
+
+<p>The requested thumbnail is provided as a raw data type with the BGRA color space, not a JPG or PNG file. You can display the thumbnail on the screen as is. If you want to save the thumbnail to a file, you must encode it.</p>
+
+<h2 id="prerequisites">Prerequisites</h2>
+<p>To use the methods and properties of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Multimedia_1_1Util_1_1ThumbnailExtractor.html">Tizen.Multimedia.Util.ThumbnailExtractor</a> class, include the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Multimedia_1_1Util.html">Tizen.Multimedia.Util</a> namespace in your application:</p>
+<pre class="prettyprint">
+using Tizen.Multimedia.Util;
+</pre>
+
+<div class="note">
+       <strong>Note</strong>
+       The input media file can be common content in the device storage (internal or external) or private content in your application data.
+</div>
+
+<h2 id="get_thumbnail">Extracting a Thumbnail</h2>
+
+<p>To extract a thumbnail from a file, use the <code>ExtractAsync()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Multimedia_1_1Util_1_1ThumbnailExtractor.html">Tizen.Multimedia.Util.ThumbnailExtractor</a> class:</p>
+<pre class="prettyprint">
+async Task Extract(string testImagePath)
+{
+    ThumbnailExtractionResult result = await ThumbnailExtractor.ExtractAsync(testImagePath, new Size(512, 288));
+
+    Tizen.Log.Info("Data size is " + result.RawData.Length);
+}
+</pre>
+
+
+<div class="note">
+<strong>Note</strong>
+If you do not set the size, a default size of 320 x 240 is used.
+</div>
+
+<script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../../scripts/showhide.js"></script>
+</div></div></div>
+
+
+<a class="top sms" href="#"><img src="../../images/btn_top.gif" alt="Go to top"/></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+</body></html>