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

The full source code can be found at \mbox{\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}{0}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Thumb_gaf60949008673f1ec68aa33138663ac57}{elm\_need\_ethumb}}();}

\end{DoxyCodeInclude}
 Then, after creating the window and background, we setup our client to generate images of 160x160\+:


\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 After that, we can start creating thumbnail objects. They are very similar to image or icon objects\+:


\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 As you can see, the main different function here is \mbox{\hyperlink{group__Elm__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\textquotesingle{}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{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/thumb_example_01}}
\end{DoxyImageNoCaption}
 