This example shows how to create a simple thumbnail object with Elementary.
The full source code can be found at thumb_example_01.c
Everything is very simple. First we need to tell elementary that we need Ethumb to generate the thumbnails:
Then, after creating the window and background, we setup our client to generate images of 160x160:
After that, we can start creating thumbnail objects. They are very similar to image or icon objects:
As you can see, the main different function here is elm_thumb_reload(), which will check if the options of the Ethumb client have changed. If so, it will re-generate the thumbnail, and show the new one.
Notice in this example that the thumbnail object is displayed on the size of the window (320x320 pixels), but the thumbnail generated and stored has size 160x160 pixels. That's why the picture seems upscaled.
Ideally, you will be generating thumbnails with the size that you will be using them.
The example will look like this when running: