\hypertarget{group__Evas__Object__Image}{}\section{Image Object Functions}
\label{group__Evas__Object__Image}\index{Image Object Functions@{Image Object Functions}}


Here are grouped together functions used to create and manipulate image objects.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void($\ast$ \mbox{\hyperlink{group__Evas__Object__Image_gadc547fb91772b80bd77dab4d0855f996}{Evas\+\_\+\+Object\+\_\+\+Image\+\_\+\+Pixels\+\_\+\+Get\+\_\+\+Cb}}) (void $\ast$data, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$o)
\begin{DoxyCompactList}\small\item\em Function signature for the evas object pixels get callback function. \end{DoxyCompactList}\item 
typedef Efl\+\_\+\+Gfx\+\_\+\+Colorspace \mbox{\hyperlink{group__Evas__Object__Image_ga518886860939aa347ec493e4eff4e4d6}{Evas\+\_\+\+Colorspace}}
\begin{DoxyCompactList}\small\item\em Colorspaces for pixel data supported by Evas. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Evas__Object__Image_ga5fa34fd24e668429507715a92be1cc58}{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get}} (const char $\ast$file)
\begin{DoxyCompactList}\small\item\em Check if a file extension may be supported by \mbox{\hyperlink{group__Evas__Object__Image}{Image Object Functions}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Evas__Object__Image_gae40ab40412b1c92fc539457b78f4ccc6}{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get}} (const char $\ast$file)
\begin{DoxyCompactList}\small\item\em Check if a file extension may be supported by \mbox{\hyperlink{group__Evas__Object__Image}{Image Object Functions}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$ \mbox{\hyperlink{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}{evas\+\_\+object\+\_\+image\+\_\+add}} (\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} $\ast$e)
\begin{DoxyCompactList}\small\item\em Creates a new image object on the given Evas {\ttfamily e} canvas. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Here are grouped together functions used to create and manipulate image objects. 

They are available to whichever occasion one needs complex imagery on a G\+UI that could not be achieved by the other Evas\textquotesingle{} primitive object types, or to make image manipulations.

Evas will support whatever image file types it was compiled with support to (its image loaders) -- check your software packager for that information and see \mbox{\hyperlink{group__Evas__Object__Image_ga5fa34fd24e668429507715a92be1cc58}{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get()}}.\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Basics}{}\subsection{Image object basics}\label{group__Evas__Object__Image_Evas_Object_Image_Basics}
The most common use of image objects -- to display an image on the canvas -- is achieved by a common function triplet\+: 
\begin{DoxyCode}
img = \mbox{\hyperlink{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}{evas\_object\_image\_add}}(canvas);
evas\_object\_image\_file\_set(img, \textcolor{stringliteral}{"path/to/img"}, NULL);
evas\_object\_image\_fill\_set(img, 0, 0, w, h);
\end{DoxyCode}
 The first function, naturally, is creating the image object. Then, one must set a source file on it, so that it knows where to fetch image data from. Next, one must set {\bfseries how to fill the image object\textquotesingle{}s area} with that given pixel data. One could use just a sub-\/region of the original image or even have it tiled repeatedly on the image object. For the common case of having the whole source image to be displayed on the image object, stretched to the destination\textquotesingle{}s size, there\textquotesingle{}s also a function helper, to be used instead of evas\+\_\+object\+\_\+image\+\_\+fill\+\_\+set()\+: 
\begin{DoxyCode}
evas\_object\_image\_filled\_set(img, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});
\end{DoxyCode}
 See those functions\textquotesingle{} documentation for more details.\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Scale}{}\subsection{Scale and resizing}\label{group__Evas__Object__Image_Evas_Object_Image_Scale}
Resizing of image objects will scale their respective source images to their areas, if they are set to \char`\"{}fill\char`\"{} the object\textquotesingle{}s area (evas\+\_\+object\+\_\+image\+\_\+filled\+\_\+set()). If the user wants any control on the aspect ratio of an image for different sizes, he/she has to take care of that themselves. There are functions to make images to get loaded scaled (up or down) in memory, already, if the user is going to use them at pre-\/determined sizes and wants to save computations.

Evas has even a scale cache that will take care of caching scaled versions of images with more often usage/hits. Finally, one can have images being rescaled {\bfseries smoothly} by Evas (more computationally expensive) or not.\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Performance}{}\subsection{Performance hints}\label{group__Evas__Object__Image_Evas_Object_Image_Performance}
When dealing with image objects, there are some tricks to boost the performance of your application, if it does intense image loading and/or manipulations, as in animations on a UI.\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Load}{}\subsubsection{Load hints}\label{group__Evas__Object__Image_Evas_Object_Image_Load}
In image viewer applications, for example, the user will be looking at a given image, at full size, and will desire that the navigation to the adjacent images on his/her album be fluid and fast. Thus, while displaying a given image, the program can be in the background loading the next and previous images already, so that displaying them in sequence is just a matter of repainting the screen (and not decoding image data).

Evas addresses this issue with {\bfseries image pre-\/loading}. The code for the situation above would be something like the following\+: 
\begin{DoxyCode}
prev = evas\_object\_image\_filled\_add(canvas);
evas\_object\_image\_file\_set(prev, \textcolor{stringliteral}{"/path/to/prev"}, NULL);
evas\_object\_image\_preload(prev, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});

next = evas\_object\_image\_filled\_add(canvas);
evas\_object\_image\_file\_set(next, \textcolor{stringliteral}{"/path/to/next"}, NULL);
evas\_object\_image\_preload(next, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});
\end{DoxyCode}


If you\textquotesingle{}re loading images that are too big, consider setting previously it\textquotesingle{}s loading size to something smaller, in case you won\textquotesingle{}t expose them in real size. It may speed up the loading considerably\+: 
\begin{DoxyCode}
\textcolor{comment}{//to load a scaled down version of the image in memory, if that's}
\textcolor{comment}{//the size you'll be displaying it anyway}
evas\_object\_image\_load\_scale\_down\_set(img, zoom);

\textcolor{comment}{//optional: if you know you'll be showing a sub-set of the image's}
\textcolor{comment}{//pixels, you can avoid loading the complementary data}
evas\_object\_image\_load\_region\_set(img, x, y, w, h);
\end{DoxyCode}
 Refer to Elementary\textquotesingle{}s Photocam widget for a high level (smart) object that does lots of loading speed-\/ups for you.\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Animation}{}\subsubsection{Animation hints}\label{group__Evas__Object__Image_Evas_Object_Image_Animation}
If you want to animate image objects on a UI (what you\textquotesingle{}d get by concomitant usage of other libraries, like Ecore and Edje), there are also some tips on how to boost the performance of your application. If the animation involves resizing of an image (thus, re-\/scaling), you\textquotesingle{}d better turn off smooth scaling on it {\bfseries during} the animation, turning it back on afterwards, for less computations. Also, in this case you\textquotesingle{}d better flag the image object in question not to cache scaled versions of it\+: 
\begin{DoxyCode}
evas\_object\_image\_scale\_hint\_set(wd->img, EVAS\_IMAGE\_SCALE\_HINT\_DYNAMIC);

\textcolor{comment}{// resizing takes place in between}

evas\_object\_image\_scale\_hint\_set(wd->img, EVAS\_IMAGE\_SCALE\_HINT\_STATIC);
\end{DoxyCode}


Finally, movement of opaque images through the canvas is less expensive than of translucid ones, because of blending computations.\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Borders}{}\subsection{Borders}\label{group__Evas__Object__Image_Evas_Object_Image_Borders}
Evas provides facilities for one to specify an image\textquotesingle{}s region to be treated specially -- as \char`\"{}borders\char`\"{}. This will make those regions be treated specially on resizing scales, by keeping their aspect. This makes setting frames around other objects on U\+Is easy. See the following figures for a visual explanation\+:~\newline
  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{image-borders}}
\end{DoxyImageNoCaption}
   
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{border-effect}}
\end{DoxyImageNoCaption}
\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Manipulation}{}\subsection{Manipulating pixels}\label{group__Evas__Object__Image_Evas_Object_Image_Manipulation}
Evas image objects can be used to manipulate raw pixels in many ways. The meaning of the data in the pixel arrays will depend on the image\textquotesingle{}s color space, be warned (see next section). You can set your own data as an image\textquotesingle{}s pixel data, fetch an image\textquotesingle{}s pixel data for saving/altering, convert images between different color spaces and even advanced operations like setting a native surface as image objects\textquotesingle{} data.\hypertarget{group__Evas__Object__Image_Evas_Object_Image_Color_Spaces}{}\subsection{Color spaces}\label{group__Evas__Object__Image_Evas_Object_Image_Color_Spaces}
Image objects may return or accept \char`\"{}image data\char`\"{} in multiple formats. This is based on the color space of an object. Here is a rundown on formats\+:


\begin{DoxyItemize}
\item \#\+E\+V\+A\+S\+\_\+\+C\+O\+L\+O\+R\+S\+P\+A\+C\+E\+\_\+\+A\+R\+G\+B8888\+: This pixel format is a linear block of pixels, starting at the top-\/left row by row until the bottom right of the image or pixel region. All pixels are 32-\/bit unsigned int\textquotesingle{}s with the high-\/byte being alpha and the low byte being blue in the format A\+R\+GB. Alpha may or may not be used by evas depending on the alpha flag of the image, but if not used, should be set to 0xff anyway. ~\newline
~\newline
 This colorspace uses premultiplied alpha. That means that R, G and B cannot exceed A in value. The conversion from non-\/premultiplied colorspace is\+: ~\newline
~\newline
 R = (r $\ast$ a) / 255; G = (g $\ast$ a) / 255; B = (b $\ast$ a) / 255; ~\newline
~\newline
 So 50\% transparent blue will be\+: 0x80000080. This will not be \char`\"{}dark\char`\"{} -\/ just 50\% transparent. Values are 0 == black, 255 == solid or full red, green or blue.
\end{DoxyItemize}
\begin{DoxyItemize}
\item \#\+E\+V\+A\+S\+\_\+\+C\+O\+L\+O\+R\+S\+P\+A\+C\+E\+\_\+\+Y\+C\+B\+C\+R422\+P601\+\_\+\+PL\+: This is a pointer-\/list indirected set of Y\+UV (Y\+Cb\+Cr) pixel data. This means that the data returned or set is not actual pixel data, but pointers TO lines of pixel data. The list of pointers will first be N rows of pointers to the Y plane -\/ pointing to the first pixel at the start of each row in the Y plane. N is the height of the image data in pixels. Each pixel in the Y, U and V planes is 1 byte exactly, packed. The next N / 2 pointers will point to rows in the U plane, and the next N / 2 pointers will point to the V plane rows. U and V planes are half the horizontal and vertical resolution of the Y plane. ~\newline
~\newline
 Row order is top to bottom and row pixels are stored left to right. ~\newline
~\newline
 There is a limitation that these images M\+U\+ST be a multiple of 2 pixels in size horizontally or vertically. This is due to the U and V planes being half resolution. Also note that this assumes the itu601 Y\+UV colorspace specification. This is defined for standard television and mpeg streams. H\+D\+TV may use the itu709 specification. ~\newline
~\newline
 Values are 0 to 255, indicating full or no signal in that plane respectively.
\end{DoxyItemize}
\begin{DoxyItemize}
\item \#\+E\+V\+A\+S\+\_\+\+C\+O\+L\+O\+R\+S\+P\+A\+C\+E\+\_\+\+Y\+C\+B\+C\+R422\+P709\+\_\+\+PL\+: Not implemented yet.
\end{DoxyItemize}
\begin{DoxyItemize}
\item \#\+E\+V\+A\+S\+\_\+\+C\+O\+L\+O\+R\+S\+P\+A\+C\+E\+\_\+\+R\+G\+B565\+\_\+\+A5P\+: In the process of being implemented in 1 engine only. This may change. ~\newline
~\newline
 This is a pointer to image data for 16-\/bit half-\/word pixel data in 16bpp R\+GB 565 format (5 bits red, 6 bits green, 5 bits blue), with the high-\/byte containing red and the low byte containing blue, per pixel. This data is packed row by row from the top-\/left to the bottom right. ~\newline
~\newline
 If the image has an alpha channel enabled there will be an extra alpha plane after the color pixel plane. If not, then this data will not exist and should not be accessed in any way. This plane is a set of pixels with 1 byte per pixel defining the alpha values of all pixels in the image from the top-\/left to the bottom right of the image, row by row. Even though the values of the alpha pixels can be 0 to 255, only values 0 through to 32 are used, 32 being solid and 0 being transparent. ~\newline
~\newline
 R\+GB values can be 0 to 31 for red and blue and 0 to 63 for green, with 0 being black and 31 or 63 being full red, green or blue respectively. This colorspace is also pre-\/multiplied like E\+V\+A\+S\+\_\+\+C\+O\+L\+O\+R\+S\+P\+A\+C\+E\+\_\+\+A\+R\+G\+B8888 so\+: ~\newline
~\newline
 R = (r $\ast$ a) / 32; G = (g $\ast$ a) / 32; B = (b $\ast$ a) / 32;
\end{DoxyItemize}
\begin{DoxyItemize}
\item \#\+E\+V\+A\+S\+\_\+\+C\+O\+L\+O\+R\+S\+P\+A\+C\+E\+\_\+\+G\+R\+Y8\+: The image is just an alpha mask (8 bit\textquotesingle{}s per pixel). This is used for alpha masking.
\end{DoxyItemize}

\begin{DoxyWarning}{Warning}
We don\textquotesingle{}t guarantee any proper results if you create an Image object without setting the evas engine.
\end{DoxyWarning}
Some examples of this group of functions can be found \mbox{\hyperlink{Example_Evas_Images}{here}}. 

\subsection{Typedef Documentation}
\mbox{\Hypertarget{group__Evas__Object__Image_gadc547fb91772b80bd77dab4d0855f996}\label{group__Evas__Object__Image_gadc547fb91772b80bd77dab4d0855f996}} 
\index{Image Object Functions@{Image Object Functions}!Evas\+\_\+\+Object\+\_\+\+Image\+\_\+\+Pixels\+\_\+\+Get\+\_\+\+Cb@{Evas\+\_\+\+Object\+\_\+\+Image\+\_\+\+Pixels\+\_\+\+Get\+\_\+\+Cb}}
\index{Evas\+\_\+\+Object\+\_\+\+Image\+\_\+\+Pixels\+\_\+\+Get\+\_\+\+Cb@{Evas\+\_\+\+Object\+\_\+\+Image\+\_\+\+Pixels\+\_\+\+Get\+\_\+\+Cb}!Image Object Functions@{Image Object Functions}}
\subsubsection{\texorpdfstring{Evas\+\_\+\+Object\+\_\+\+Image\+\_\+\+Pixels\+\_\+\+Get\+\_\+\+Cb}{Evas\_Object\_Image\_Pixels\_Get\_Cb}}
{\footnotesize\ttfamily typedef void($\ast$ Evas\+\_\+\+Object\+\_\+\+Image\+\_\+\+Pixels\+\_\+\+Get\+\_\+\+Cb) (void $\ast$data, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}} $\ast$o)}



Function signature for the evas object pixels get callback function. 

\begin{DoxySeeAlso}{See also}
evas\+\_\+object\+\_\+image\+\_\+pixels\+\_\+get()
\end{DoxySeeAlso}
By {\itshape data} it will be passed the private data. By {\itshape o} it will be passed the Evas\+\_\+\+Object image on which the pixels are requested. \mbox{\Hypertarget{group__Evas__Object__Image_ga518886860939aa347ec493e4eff4e4d6}\label{group__Evas__Object__Image_ga518886860939aa347ec493e4eff4e4d6}} 
\index{Image Object Functions@{Image Object Functions}!Evas\+\_\+\+Colorspace@{Evas\+\_\+\+Colorspace}}
\index{Evas\+\_\+\+Colorspace@{Evas\+\_\+\+Colorspace}!Image Object Functions@{Image Object Functions}}
\subsubsection{\texorpdfstring{Evas\+\_\+\+Colorspace}{Evas\_Colorspace}}
{\footnotesize\ttfamily typedef Efl\+\_\+\+Gfx\+\_\+\+Colorspace \mbox{\hyperlink{group__Evas__Object__Image_ga518886860939aa347ec493e4eff4e4d6}{Evas\+\_\+\+Colorspace}}}



Colorspaces for pixel data supported by Evas. 

Colorspaces for pixel data supported by Evas 

\subsection{Function Documentation}
\mbox{\Hypertarget{group__Evas__Object__Image_ga5fa34fd24e668429507715a92be1cc58}\label{group__Evas__Object__Image_ga5fa34fd24e668429507715a92be1cc58}} 
\index{Image Object Functions@{Image Object Functions}!evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get@{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get}}
\index{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get@{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get}!Image Object Functions@{Image Object Functions}}
\subsubsection{\texorpdfstring{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get()}{evas\_object\_image\_extension\_can\_load\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file }\end{DoxyParamCaption})}



Check if a file extension may be supported by \mbox{\hyperlink{group__Evas__Object__Image}{Image Object Functions}}. 


\begin{DoxyParams}{Parameters}
{\em file} & The file to check \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} if we may be able to open it, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} if it\textquotesingle{}s unlikely. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+1
\end{DoxySince}
If file is an Eina\+\_\+\+Stringshare, use directly \mbox{\hyperlink{group__Evas__Object__Image_gae40ab40412b1c92fc539457b78f4ccc6}{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get}}.

This functions is threadsafe. 

References eina\+\_\+stringshare\+\_\+add(), and eina\+\_\+stringshare\+\_\+del().

\mbox{\Hypertarget{group__Evas__Object__Image_gae40ab40412b1c92fc539457b78f4ccc6}\label{group__Evas__Object__Image_gae40ab40412b1c92fc539457b78f4ccc6}} 
\index{Image Object Functions@{Image Object Functions}!evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get@{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get}}
\index{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get@{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get}!Image Object Functions@{Image Object Functions}}
\subsubsection{\texorpdfstring{evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get()}{evas\_object\_image\_extension\_can\_load\_fast\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+fast\+\_\+get (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file }\end{DoxyParamCaption})}



Check if a file extension may be supported by \mbox{\hyperlink{group__Evas__Object__Image}{Image Object Functions}}. 


\begin{DoxyParams}{Parameters}
{\em file} & The file to check, it should be an Eina\+\_\+\+Stringshare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} if we may be able to open it, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} if it\textquotesingle{}s unlikely. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+1
\end{DoxySince}
This functions is threadsafe. \mbox{\Hypertarget{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}\label{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}} 
\index{Image Object Functions@{Image Object Functions}!evas\+\_\+object\+\_\+image\+\_\+add@{evas\+\_\+object\+\_\+image\+\_\+add}}
\index{evas\+\_\+object\+\_\+image\+\_\+add@{evas\+\_\+object\+\_\+image\+\_\+add}!Image Object Functions@{Image Object Functions}}
\subsubsection{\texorpdfstring{evas\+\_\+object\+\_\+image\+\_\+add()}{evas\_object\_image\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object}}$\ast$ evas\+\_\+object\+\_\+image\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} $\ast$}]{e }\end{DoxyParamCaption})}



Creates a new image object on the given Evas {\ttfamily e} canvas. 


\begin{DoxyParams}{Parameters}
{\em e} & The given canvas. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The created image object handle.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
If you intend to {\bfseries display} an image somehow in a G\+UI, besides binding it to a real image file/source (with evas\+\_\+object\+\_\+image\+\_\+file\+\_\+set(), for example), you\textquotesingle{}ll have to tell this image object how to fill its space with the pixels it can get from the source. See evas\+\_\+object\+\_\+image\+\_\+filled\+\_\+add(), for a helper on the common case of scaling up an image source to the whole area of the image object.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
evas\+\_\+object\+\_\+image\+\_\+fill\+\_\+set()
\end{DoxySeeAlso}
Example\+: 
\begin{DoxyCode}
img = \mbox{\hyperlink{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}{evas\_object\_image\_add}}(canvas);
evas\_object\_image\_file\_set(img, \textcolor{stringliteral}{"/path/to/img"}, NULL);
\end{DoxyCode}
 

Referenced by ecore\+\_\+evas\+\_\+cursor\+\_\+set(), ecore\+\_\+evas\+\_\+ews\+\_\+new(), emotion\+\_\+file\+\_\+meta\+\_\+artwork\+\_\+get(), and ethumb\+\_\+dup().

