From 025c64989b647fba8ba1ab0a9669b6ad890535df Mon Sep 17 00:00:00 2001 From: coderhyme Date: Wed, 27 Sep 2017 08:39:44 +0900 Subject: [PATCH] [Multimedia] Add guide for the ThumbnailExtractor PS2: Reviewed Change-Id: Id3c0e703742115e93a77a3fc1357a01ce9756363 Signed-off-by: coderhyme --- .../html/dotnet/media/thumbnail_images.htm | 108 +++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 org.tizen.guides/html/dotnet/media/thumbnail_images.htm 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 index 0000000..559d669 --- /dev/null +++ b/org.tizen.guides/html/dotnet/media/thumbnail_images.htm @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + Thumbnail Images + + + + + +
+ +
+

Dependencies

+
    +
  • Tizen 4.0 and Higher
  • +
+ +

Content

+ + +

Related Info

+ +
+
+ +
+ +

Thumbnail Images

+

You can create a thumbnail from an input media file.

+ +

The main features of the Tizen.Multimedia.Util.ThumbnailExtractor class include:

+ +
    +
  • Video and image thumbnails +

    You can create thumbnails from video and image files. Audio files are not supported.

  • +
  • Custom size +

    You can create the thumbnail using any size you like. The Tizen.Multimedia.Util.ThumbnailExtractor 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.

    +
  • +
+ +

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.

+ +

Prerequisites

+

To use the methods and properties of the Tizen.Multimedia.Util.ThumbnailExtractor class, include the Tizen.Multimedia.Util namespace in your application:

+
+using Tizen.Multimedia.Util;
+
+ +
+ Note + The input media file can be common content in the device storage (internal or external) or private content in your application data. +
+ +

Extracting a Thumbnail

+ +

To extract a thumbnail from a file, use the ExtractAsync() method of the Tizen.Multimedia.Util.ThumbnailExtractor class:

+
+async Task Extract(string testImagePath)
+{
+    ThumbnailExtractionResult result = await ThumbnailExtractor.ExtractAsync(testImagePath, new Size(512, 288));
+
+    Tizen.Log.Info("Data size is " + result.RawData.Length);
+}
+
+ + +
+Note +If you do not set the size, a default size of 320 x 240 is used. +
+ + + +
+ + +Go to top + + + + + -- 2.7.4