Hello! Here I present to you my fourth extension ever created! This extension provides tools to extract thumbnails from an image or a video.
There isn’t a deep background for this extension as the previous one. It all started when a friend asked me how to get the thumbnail of a video to use it in his app, and I told him that I could try a way, and here it is! I hope you can find it useful. If you find how to make it better, please let me know so I can learn from it!
For reference of the classes used in this extension, please consider reading the Android Developer’s Reference for Android about the ThumbnailUtils class.
Tool developed by Carlos Pedroza to extract thumbnails from an image or a video.
GetFromVideo: Method for getting a thumbnail from a video. Parameters: String path - Text with the path to the video to create the new thumbnail. Number kind - Number with the specifications of the new thumbnail to be created. Use 1 for MiniKind or 3 for MicroKind. Number quality - Number with the desired quality of the image from 1 to 100. It returns a string with the path of the new thumbnail created.
GetFromImage: Method for getting a thumbnail from an image. Parameters: String path - Text with the path to the image to create the new thumbnail. Number width - Number with the desired width in pixels (px). Number height - Number with the desired height in pixels (px). Number quality - Number with the desired quality of the image from 1 to 100. It returns a string with the path of the new thumbnail created.
MiniKind: Returns number 1 to be used in the kind parameter for thumbnails with 512 x 384 pixels in size.
MicroKind: Returns number 3 to be used in the kind parameter for thumbnails with 96 x 96 pixels in size.
Blocks for getting a thumbnail with 150x150 pixels in size and 100 percent quality from an image displayed in an Image1 component when clicking Button1.
Blocks for getting a thumbnail with 512x384 pixels in size and 100 percent quality from an video located at certain path when clicking Button1.
Also, I recommend using the last Juan Antonio’s Explorer extension for getting the paths of the video or Taifun’s Metadata extension for more metadata information from an image.
This extension is free and open source!
Yet, if you find this useful, you can donate!
.AIX: com.pedroza.PedrozaThumbnail.aix (8.9 KB)
.JAVA Available at: Github
- November 1st, 2017 - Initial release.
Best Regards from ,