## IupImageLib

A library of pre-defined stock images for buttons and labels.

### Initialization

To generate an application that uses this function, the program must be linked to the functions library (iupimglib.lib on Windows and libiupimglib.a on Unix).

### Reference

    void IupImageLibOpen(void); [in C]
    iup.ImageLibOpen()  [in Lua]

This function register the names but do not load the images. The images will be loaded only if they are used in a control. The loaded images will be automatically released at IupClose.

In Lua, when require"iupluaimglib" is used this function will be automatically called.

### Usage

The following names can be used after the library initialization. The names are NOT registered using IupSetHandle, they will be automatically loaded when associated with a control.

### Base Library Group

These bitmaps are 16x16-8bpp (Motif) and 32x32-32bpp (Windows) pixels size images that can be used in Buttons, usually inside toolbars. GTK has several image sizes available: 16x16, 18x18, 20x20, 24x24, 32x32, and 48x48. GTK images displayed here are just a sample with the 24x24-32bpp pixels size, they actually depends on the current GTK theme used by the system. Since GTK 3.10 access to stock images directly becomes deprecated, so starting in IUP 3.23 the IupImageLib in GTK3 will contain the base set of GTK images and they will be not affected by the current GTK theme.

In Windows and GTK, to force a specific height for the images use the IMAGESTOCKSIZE global attribute (since 3.16), it can have the following values 24, 32 and 48. In GTK if the system does not provides the image in that size it will be automatically resized from an existing size. In Windows if the image is not 32x32 then it will be automatically resized. The default size depends on the screen resolution: 144 DPI or less = 24, 192 DPI = 32, 288 DPI = 48. The minimum resulted size when automatically resized is 24 pixels height (since 3.29).

Name | Image (Motif) | Image (GTK) | Image (Windows)
--- | --- | --- | ---
"IUP_ActionCancel" |  |  |
"IUP_ActionOk" |  |  |
"IUP_ArrowDown" |  |  |
"IUP_ArrowLeft" |  |  |
"IUP_ArrowRight" |  |  |
"IUP_ArrowUp" |  |  |
"IUP_EditCopy" |  |  |
"IUP_EditCut" |  |  |
"IUP_EditErase" |  |  |
"IUP_EditFind" |  |  |
"IUP_EditPaste" |  |  |
"IUP_EditRedo" |  |  |
"IUP_EditUndo" |  |  |
"IUP_FileClose" |  |  |
"IUP_FileNew" |  |  |
"IUP_FileOpen" |  |  |
"IUP_FileProperties" |  |  |
"IUP_FileSave" |  |  |
"IUP_MediaForward" |  |  |
"IUP_MediaGoToBegin" |  |  |
"IUP_MediaGoToEnd" |  |  |
"IUP_MediaPause" |  |  |
"IUP_MediaPlay" |  |  |
"IUP_MediaRecord" |  |  |
"IUP_MediaReverse" |  |  |
"IUP_MediaRewind" |  |  |
"IUP_MediaStop" |  |  |
"IUP_MessageError" |  |  |
"IUP_MessageHelp" |  |  |
"IUP_MessageInfo" |  |  |
"IUP_NavigateHome" |  |  |
"IUP_NavigateRefresh" |  |  |
"IUP_Print" |  |  |
"IUP_PrintPreview" |  |  |
"IUP_ToolsColor" |  |  |
"IUP_ToolsSettings" |  |  |
"IUP_ToolsSortAscend" |  |  |
"IUP_ToolsSortDescend" |  |  |
"IUP_ViewFullScreen" |  |  |
"IUP_Webcam" |  |  |
"IUP_ZoomActualSize" |  |  |
"IUP_ZoomIn" |  |  |
"IUP_ZoomOut" |  |  |
"IUP_ZoomSelection" |  |  |

The following images were removed from the pre-compiled library (since 3.16): "IUP_FileCloseAll", "IUP_FileSaveAll", "IUP_FileText", "IUP_FontBold", "IUP_FontDialog", "IUP_FontItalic", "IUP_WindowsCascade", "IUP_WindowsTile", "IUP_Zoom". Although their C source code is still available.

"IUP_CircleProgressAnimation" animation added in version 3.17. To be used in IupAnimatedLabel to show indefinite progress. It has 12 frames of 32x32 with 32bpp, and FRAMETIME is set to 83ms (approximately 1 second for a full turn).

### Logo Group 32x32

These images are 32x32-32bpp pixels size (or just 32 pixels height) images that can be used in Labels, usually inside toolbars. These images are not automatically resized when loaded (since 3.25).

Name | Image (Generic)
--- | ---
"IUP_Tecgraf" |
"IUP_PUC-Rio" |
"IUP_BR" |
"IUP_Lua" |

Name | Image (Generic)
--- | ---
"IUP_TecgrafPUC-Rio" |
"IUP_Petrobras" |

### Logo Group 48x48 (since 3.3)

These images are 48x48-32bpp pixels size (or just 48 pixels height) images that can be used in Labels, usually inside dialogs. These images are not automatically resized when loaded (since 3.25).

NOT included in the pre-compiled library, but available as C source code.

Name | Image (Generic)
--- | ---
"IUP_LogoTecgraf" |
"IUP_LogoPUC-Rio" |
"IUP_LogoBR" |
"IUP_LogoLua" |

Name | Image (Generic)
--- | ---
"IUP_LogoTecgrafPUC-Rio" |
"IUP_LogoPetrobras" |

### Icon Group 48x48 (since 3.3)

Here are other images available in the IUP stock library, commonly used by the respective systems. All images are 48x48-32bpp pixels size. These images are not automatically resized when loaded (since 3.25).

IUP_Device* images are NOT included in the pre-compiled library, but available as C source code (since 3.26).

Name | Image (Windows) | Image (GTK) | Image (GTK3)
--- | --- | --- | ---
"IUP_IconMessageSecurity" |  |  |
"IUP_IconMessageWarning" |  |  |
"IUP_IconMessageInfo" |  |  |
"IUP_IconMessageError" |  |  |
"IUP_IconMessageHelp" |  |  |

Name | Image (Windows)
--- | ---
"IUP_DeviceCamera" |
"IUP_DeviceCD" |
"IUP_DeviceCellPhone" |
"IUP_DeviceComputer" |
"IUP_DeviceFax" |
"IUP_DeviceHardDrive" |
"IUP_DeviceMP3" |
"IUP_DeviceNetwork" |
"IUP_DevicePDA" |
"IUP_DevicePrinter" |
"IUP_DeviceScanner" |
"IUP_DeviceSound" |
"IUP_DeviceVideo" |

### Icon Group 32x32 () (since 3.16)

Here are other images available in the IUP stock library, commonly used in Windows. All images are 32x32-32bpp pixels size.

NOT included in the pre-compiled library, and NOT available as C source code. The image files are available for download here:

Image (Windows)

### Notes

All images are available as PNG files in the "iup/html/en/imglib/*" folder.

Use the IupView application can import images in several formats, and can export images to C, LED or Lua.

All 8 bpp images are from the old ImageLib and since Motif does not have any stock images, we selected this set to be used in Motif. Although the IUP Motif driver supports 32 bpp images.

The pre-compiled library does not include images larger than 48x48 (inclusive). If you want to use them you must include their source code, or re-compile the library defining USE_IUP_IMGLIB_LARGE during compilation, for example: "make USE_IUP_IMGLIB_LARGE=1".

All "Windows" images copyright Microsoft and were extracted from the Visual Studio 2013 Image Library. Their use must be used consistently with their description in the Visual Studio Image Library, and so consistently with the IUP name. These files are available for free on the link: Visual Studio Image Library. You can find a copy of the license terms here: "Visual Studio 2013 Image Library EULA.docx". The most important statement on this document is: "Media Elements. You may copy and use images in the Image Library provided with the software and identified for such use in documents and projects that you create."

GTK stock images are released under the GTK license.

PUC-Rio, Tecgraf/PUC-Rio, Petrobras and Lua images are copyright of the respective companies or owners. The Petrobras logo images follow the company established rules.

Lua image graphic design by A. Nakonechnyj. Copyright © 1998. All rights reserved.

### See Also

IupImage