[F/OS] PedrozaThumbnail Extension

PedrozaThumbnail Extension

Hello! Here I present to you my fourth extension ever created! This extension provides tools to extract thumbnails from an image or a video.

Background

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.


Description

Tool developed by Carlos Pedroza to extract thumbnails from an image or a video.


Methods

  • 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.
    image

  • 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.
    image

Properties

  • MiniKind: Returns number 1 to be used in the kind parameter for thumbnails with 512 x 384 pixels in size.
    image

  • MicroKind: Returns number 3 to be used in the kind parameter for thumbnails with 96 x 96 pixels in size.
    image


Examples

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.

image

Blocks for getting a thumbnail with 512x384 pixels in size and 100 percent quality from an video located at certain path when clicking Button1.

image

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.


Price

This extension is free and open source!

Yet, if you find this useful, you can donate!


Downloads

.AIX: com.pedroza.PedrozaThumbnail.aix (8,9 KB)
.JAVA Available at: Github


Changelog

  • November 1st, 2017 - Initial release.

Best Regards from :venezuela:,
Carlos Pedroza

24 Likes

Amazing extension! :tada:


What happend with number 2? :sweat_smile:

2 Likes

Hahaha! I don’t know! I searched it and the documentation says that it is equal to FULL_KIND but it is not recommended in this Thumbnail Util class

3 Likes

How to use it live on cloudinary videos

2 Likes

best extension ever

भाई एक्सटेंशन काम नही करता up

This extension does not work

1 Like

You don’t have to quote/copy first post fully, you can just reply it.

1 Like

live testing with work , after export app then not work

Not very helpful however, I suspect that you didn’t grant permissions to make it work

all permissions granted in the app

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

please provide an example result of the local variable selection, as test you might want to display it in a label, then check the documentation of the extension for valid paths
Taifun

1 Like

list in selection path

You are using a path to an external sdcard…
My guess is, the extension is not able to access it… Use the internal sdcard instead…

Taifun

please share example

i tried internal and external storage

Sorry, I never used that extension… You have to try yourself… You might find an example project how to use the extension from that thread you downloaded the extension from… You also might want to check the documentation
Taifun

[quote=“Boban, post:10, topic:788”]
Not very helpful however, I suspect that you didn’t grant permissions to make it work
[/quote]https://kodular-community.s3.dualstack.eu-west-1.amazonaws.com/original/3X/b/2/b283ad89e282ac561a360e688ecc007574220512.png

I think i need to add some more before the path

example

file://
//
etc

what do you mean