16
Img Inside & Out 1 poSoft - Paul Obermeier‘s Portable Software Img Inside & Out Paul Obermeier Third European Tcl/Tk User Meeting. Munich, June 2002 [email protected] [email protected]

Img Inside & Out

Embed Size (px)

DESCRIPTION

Img Inside & Out. Paul Obermeier. [email protected] [email protected]. Third European Tcl/Tk User Meeting. Munich, June 2002. Img Inside & Out: Content. Img is a Tcl extension to support various image file formats for use with the Tk photo image. - PowerPoint PPT Presentation

Citation preview

Page 1: Img Inside & Out

Img Inside & Out 1

poSoft - Paul Obermeier‘s Portable Software

Img Inside & Out

Paul Obermeier

Third European Tcl/Tk User Meeting.

Munich, June 2002

[email protected]

[email protected]

Page 2: Img Inside & Out

Img Inside & Out: Content 2

poSoft - Paul Obermeier‘s Portable Software

Img Inside & Out: Content

Img from the outside:

Img from the inside:

- Example applications from EADS/LFK.

- Example applications from poSoft.

- Current, planned and future state of Img.

- Utilities and test programs.

- Summary: List of supported formats.

Img is a Tcl extension to support various image file formats for use with the Tk photo image.

Besides reading/writing from/to files, it also supports image data in Tcl variables (both in binary and uuencoded form).

Page 3: Img Inside & Out

Img Inside & Out: LFK examples 3

poSoft - Paul Obermeier‘s Portable Software

Tk and Img based applications at EADS/LFK

The system simulation department of EADS/LFK uses Tcl/Tk and Img for pre- and postprocessing of complex simulations.

MDS (Mathematical Digital Simulation): Simulate all relevant components of a missile and it‘s environment in software.

Main design issues: Flexibility and portability (long project durations).

Configuration &

Preprocessing

Simulation

(Batch processing)

Visualization &

Postprocessing

Tk based GUI‘s for safe editing of configuration files.

Tk based GUI‘s for configuration and execution of physical models (Example 1).

Pure batch programs written in C, C++ or Ada reading input files and generating output files.

Tk/Img based GUI‘s for visualization of rendered image sequences (Example 2) and postprocessing of generated simulation data (Example 3).

Page 4: Img Inside & Out

Img Inside & Out: LFK examples 4

poSoft - Paul Obermeier‘s Portable Software

Example 1: GUI‘s for physical models.Left: Graphical frontend for MODTRAN, an atmospheric radiative transfer model.

Right: Graphical frontend for Thermos, a LFK developed thermal model.

Page 5: Img Inside & Out

Img Inside & Out: LFK examples 5

poSoft - Paul Obermeier‘s Portable Software

Example 2: OsmVisReplay of multiple infrared image sequences overlayed with vector graphics.

Images are read from files in Sun Raster format.

Page 6: Img Inside & Out

Img Inside & Out: LFK examples 6

poSoft - Paul Obermeier‘s Portable Software

Example 3: MdsViewer2D and 3D visualization of simulation results with Tk/Img and Performer.

Grid of height values (DTED format) interpreted as a photo image.

Page 7: Img Inside & Out

Img Inside & Out: poSoft examples 7

poSoft - Paul Obermeier‘s Portable Software

Tk and Img based applications from poSoft

www.poSoft.de is my private homepage: Paul Obermeier‘s Portable Software.

Home of poTools, a set of portable Tcl/Tk applications:

poDiff: Portable tool to recursively compare the contents of two directories.

poBitmap: Portable tool to view and manipulate X-Window bitmaps.

poImgdiff: Portable tool to compare two images (Example 4).

poImgview: Portable tool to view and manipulate images (Example 5).

Page 8: Img Inside & Out

Img Inside & Out: poSoft examples 8

poSoft - Paul Obermeier‘s Portable Software

Example 4: poImgdiff

Portable image comparison tool.

Images are placed side by side for visual comparison.

Generation of difference images and histograms.

Page 9: Img Inside & Out

Img Inside & Out: poSoft examples 9

poSoft - Paul Obermeier‘s Portable Software

Example 5: poImgview

Portable image viewer.

Includes image browser and batch format conversion.

Page 10: Img Inside & Out

Img Inside & Out: State of Img 10

poSoft - Paul Obermeier‘s Portable Software

State of Img: Current

The Img extension was developed and maintained in major parts by Jan Nijtmans.

Latest version of Img (1.2.4) was uploaded to SourceForge by A. Kupries in May 2002.

- Project page: http://sourceforge.net/projects/tkimg

- Project maintainers: Jeff Hobbs, Andreas Kupries, Jan Nijtmans.

- Additional developers: Paul Obermeier.

- Supported image formats: BMP: Windows bitmap

GIF: Graphics interchange format

JPEG: JPEG

PNG: Portable network graphics format

POSTSCRIPT: Postscript (needs ghostscript)

TIFF: Tagged image file format

WINDOW: Put the content of a window into a photo

XBM: X-Windows bitmap

XPM: X-Windows pixmap

Page 11: Img Inside & Out

Img Inside & Out: State of Img 11

poSoft - Paul Obermeier‘s Portable Software

Most of the code for the following planned actions is already implemented in an alpha version available at www.poSoft.de. It will be added to SourceForge in two steps:

Step1 (June 2002): Enhancements and bug fixes of existing formats:

- Add support routines for reading image data in small pieces (RLE).

- Add reading of run-length encoded Windows bitmaps.

- Speed improvements and bugfixes for XPM format.

- Add PPM format to Img to enable -data option.

- Various bug fixes.

Step2 (July 2002): Addition of new image formats:DTED: Digital Terrain Elevation Data

PCX: Paintbrush‘s PCX format

RAW: Raw image data (matrix of floats)

SGI: Silicon Graphics native format

SUN: Sun Raster format

TGA: Truevision‘s Targa format

State of Img: Planned

Img 1.3

Page 12: Img Inside & Out

Img Inside & Out: State of Img 12

poSoft - Paul Obermeier‘s Portable Software

State of Img: Future

The following actions are taken from my personal wish list. Implementation will need the help of the community. Please feel free to contribute in any form.

Near future actions:

- Remove usage of Tk-internal structures to enable stubs.

- Update versions of external libraries: libpng, libjpeg, libtiff, libz.

- Improve existing format handlers for full compliance.

- Additional image formats: Windows icons, PICT, WMF, Photoshop, ???

Issues influencing Img and Tk:

- Better transparency support.

- Improved image manipulation: Scaling, rotation, filter, etc.

(see extension poImg at www.poSoft.de)

Page 13: Img Inside & Out

Img Inside & Out: Utilities and tests 13

poSoft - Paul Obermeier‘s Portable Software

Img utility: poImgtype

Tk package for selection of image formats and corresponding options.

Available functions:

OpenWin: Open selection window.GetFmtList: Get list of image formats.GetExtList: Get list of file extensions.GetOptByExt: Get option string by file extension.GetOptByFmt: Get option string by format identifier.LoadFromFile: Load settings from file.SaveToFile: Save settings to file.

Page 14: Img Inside & Out

Img Inside & Out: Utilities and tests 14

poSoft - Paul Obermeier‘s Portable Software

Img utility: Test programs

Test 1: Using full imagesTest 2: Using -from optionTest 3: Using -to optionTest 4: Using all sizes from 1x1 till 4x4 pixels

These tests try to store the content of a canvas window in image files using all file formats and all methods (file, binary and uuencoded string) available in the Img package.After writing we try to read the image back into a photo by using the auto-detect mechanism of Img. If that fails, we use the "-format" option.

Page 15: Img Inside & Out

Img Inside & Out: List of supported formats 15

poSoft - Paul Obermeier‘s Portable Software

Summary: List of supported formats

BMP: Windows bitmap

DTED: Digital Terrain Elevation Data

GIF: Graphics interchange format

JPEG: JPEG

PCX: Paintbrush‘s PCX format

PNG: Portable network graphics format

POSTSCRIPT: Postscript (Read-Only)

RAW: Raw image data (matrix of floats)

SGI: Silicon Graphics native format

SUN: Sun Raster format

TIFF: Tagged image file format

TGA: Truevision‘s Targa format

WINDOW: Put the content of a window into a photo

XBM: X-Windows bitmap

XPM: X-Windows pixmap

Page 16: Img Inside & Out

Img Inside & Out: Goodbye 16

poSoft - Paul Obermeier‘s Portable Software

Happy Tcl‘ing

E-Mail at home: [email protected]

E-Mail at work: [email protected]

My homepage: http://www.poSoft.de

Jan‘s homepage: http://purl.oclc.org/net/nijtmans/

Img project page: http://sourceforge.net/projects/tkimg