Image Representation Samples

See the Representation Guide for simple image representation samples.

Information

This is a command line application that displays information obtained from a file using the IM I/O functions, basically imFile functions. It depends only on the IM main library.

Here is an output sample:

IM Info
  File Name:
    exif_test.tif
  File Size: 9.00 Mb
  Format: TIFF - Tagged Image File Format
  Compression: NONE
  Image Count: 1
  Image #0
    Width: 2048
    Height: 1536
    Color Space: RGB
      Has Alpha: No
      Is Packed: Yes
      Is Top Down: Yes
    Data Type: byte
    Data Size: 9.00 Mb
    Attributes:
      YResolution: 72.00
      XResolution: 72.00
      DateTime: 2004:01:14 11:30:11
      Make: SONY
      ResolutionUnit: DPI
      Model: CD MAVICA
      Photometric: 2

You can view the source code here: im_info.cpp

View Using IUP and CD

This application uses IUP and CD to create a window with a canvas and draw the image into that canvas. It is a very simple application, no zoom nor scrollbar management. The image is obtained from a file using the IM I/O functions, but using the imImage structure to make the implementation easier.

For more about IUP see http://www.tecgraf.puc-rio.br/iup and more about CD see http://www.tecgraf.puc-rio.br/cd.

You can view the source code here: im_view.c, or download it with some makefiles im_view.zip.