Dump an IlvManager as an image file

Article ID: 2206
Last updated: 29 May, 2018
Article ID: 2206
Last updated: 29 May, 2018
Revision: 3
Views: 800
Posted: 30 Jun, 2011
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How can I dump an IlvManager as an image file?

Answer

Dumping an IlvManager in an image file can be split in two steps:

  1. draw the IlvManager in a specific java.awt.Graphics object. This specific Graphics object being in fact the Graphics of a java.awt.Image object.
  2. Encode the image in a given file format. Encoding an image is the process of coding the binary representation of an image (also known as an Image object) into an image file in a given format, for example a JPEG file. Such encoders are not part of the Java 1.2 specifications, and generally you need to get one from a tier library (except for the Sun JDK 1.2 that provides a JPEG encoder).

For example: to dump an IlvManager using Java 2 v1.2 in a JPEG file, you can use the Sun JPEG encoder provided with the JDK. This sample application shows how this JPEG enconding can be implemented; download it here: IlvJPEGEncoder30.java

Note: In order to run this sample with JViews 8.7 and later, you must call the log.views.util.IlvProductUtil.DeploymentLicenseRequired method with the appropriate argument. See the General information > Deployment licenses > Declaring the use of Rogue Wave JViews services section in the documentation for more information.

Note: If you use a particular coordinate system, you can transform the view region by implementing a method such as computeCoordinates(Point) in class App6aDemo.java of the app6a sample provided in JViews Maps for Defense distribution.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2206
Last updated: 29 May, 2018
Revision: 3
Views: 800
Posted: 30 Jun, 2011 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Attached files

Also listed in


Others in this category