| | | | Browse by category |
Question
Is it possible to convert a JPEG, GIF or any other image into the IVL format using the JViews library?
Answer
The information stored in the .ivl
format is not equivalent to the information saved in a bitmap file of type .jpg
, .gif
, .png
and others.
A bitmap file format stores a grid of pixels with their colors, which define the bitmap data. An .ivl
file stores the contents of an IlvManager
, which is a more complex structure; it is a 2D space where heterogeneous drawings (IlvGraphic
objects) of different nature exist, composing a more complex rendering than a simple bitmap.
However, an IlvManager
can display a bitmap as an IlvGraphic
. This graphic is an IlvIcon
that you can add to the manager to display the contents of a bitmap file in the IlvManager
space. Example:
IlvIcon iconMap = new IlvIcon("background.jpg", new IlvRect(0, 0, 400, 400)); manager.addObject(iconMap, true);