This example shows how to create a simple thumbnail object with Elementary.

The full source code can be found at \hyperlink{thumb_example_01_c}{thumb\-\_\-example\-\_\-01.\-c}

Everything is very simple. First we need to tell elementary that we need Ethumb to generate the thumbnails\-:

 
\begin{DoxyCodeInclude}
   elm_need_ethumb();

\end{DoxyCodeInclude}


Then, after creating the window and background, we setup our client to generate images of 160x160\-:


\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


After that, we can start creating thumbnail objects. They are very similar to image or icon objects\-:


\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


As you can see, the main different function here is \hyperlink{group__Thumb_gad56aa78f873bff3cc41959574f718627}{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\-:

 
\begin{DoxyImage}
\includegraphics{screenshots/thumb_example_01}
\caption{width=}
\end{DoxyImage}
 