Convert a JPEG, GIF or any other image into the IVL format using the JViews library

Article ID: 2266
Last updated: 29 May, 2018
Article ID: 2266
Last updated: 29 May, 2018
Revision: 3
Views: 775
Posted: 21 Jul, 2005
by Dean J.
Updated: 29 May, 2018
by Gargani A.

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);
This article was:   Helpful | Not helpful
Report an issue
Article ID: 2266
Last updated: 29 May, 2018
Revision: 3
Views: 775
Posted: 21 Jul, 2005 by Dean J.
Updated: 29 May, 2018 by Gargani A.

Others in this category