Compressed images are a special type of image that can be displayed but not edited or otherwise manipulated. In exchange for a limit on functionality, compressed images deliver very fast display capability even when the images involved are very large.
Manifold supports use of compressed images using industry-standard ECW format, the same as used with ER Mapper, or using industry-standard JPEG2000 format. The technology in both ECW and JPEG2000 allows astonishingly fast loading and display of large images (especially with ECW) but this speed is achieved by trading off the benefits achieved against significant limitations. Compressed images may be kept within the project, linked from an external ECW or JPEG2000 file, or linked from an external ECWP server.
The limitations of compressed images are:
· Display only - Compressed images may be viewed but not manipulated. They are read-only.
· No selection - Compressed images cannot be altered and their pixels may not be selected.
· Limited on-the-fly re-projection - A compressed image may be viewed only within a map the coordinate system of which is more or less similar to that of the image. If the re-projection between the coordinate system of a compressed image and the coordinate system of a map containing the image is curvilinear, the compressed image layer will not be displayed in the map.
· Reduced information content - The compression process eliminates the original pixel information in the image. Although compressed images when reconstituted for display may appear visually identical to an original uncompressed image, the reconstituted pixels are a synthetic approximation of the originals.
· No transparent pixels - ECW and JPEG2000 compression do not support four channel (RGBa) data so there is no channel available to save transparent pixel information. Note that when working with other types of images and "deleting" pixels the pixels are not really deleted - they are simply made transparent. The only way to delete pixels in an image is to crop the image, in which case the cropped pixels are genuinely deleted. If images containing transparent pixels are converted to a compressed image the transparent pixels will be restored as black regions.
Compressed images nonetheless provide significant benefits:
· Fast display - The reconstitution process provides for very rapid display of an image view at any desired zoom or pan.
· Fast loads and saves - Projects containing compressed images load and save much faster than projects using uncompressed images.
· Linked images - Compressed images may be left in their original .ecw files or in their JPEG2000 files instead of being imported into the Manifold .map project file.
· Reduced disk space - Compressed images require much less room than uncompressed images. Using linked images to utilize a single image file in many different projects will also save much disk space as compared to duplicating that image within many projects as an imported image.
· Streaming links - Compressed images in ECW format may be linked into a Manifold project from an ECWP server URL, loading from a data stream served by an ER Mapper Image Web Server.
· Dynamic channel combinations - The Image - Display Options command allows selection of which channels from a multi-channel image will be used for R, G, B and alpha channels.
Compressed images are a good choice for images displayed for their visual merit only, such as when images are used to form a background layer for a map, or when a background image layer will be traced to create a new vector map.
Any image type within Manifold may be converted into a compressed image, and any compressed image may be converted into other image types using the Image - Convert to dialog.
To create a compressed image:
1. Open the image that is to be converted to a compressed image.
2. Choose Image - Convert to
3. In the Convert To dialog, choose Compressed as the Target format. Choose the desired Ratio of compression. Larger Ratio numbers will result in greater compression at the cost of lower image quality.
4. If desired, check Save result as new component to save the result as a new image component instead of converting the opened image. Press OK.
The Ratio value specifies how large the compressed image is relative to the original image. A ratio of 10 will create a compressed image that is one-tenth the size of the original image.
To import a compressed image:
1. Choose File - Import - Image.
2. In the Open dialog choose ECW / JPEG2000 Files in the Files of type box.
3. Browse over to the desired .ecw or JPEG2000 file desired and open it.
Importing any .ecw or JPEG2000 file will automatically create a compressed image.
To link a compressed image from an ECW or JPEG2000 file:
1. Choose File - Link - Image.
2. In the Open dialog choose ECW / JPEG2000 Files in the Files of type box.
3. Browse over to the .ecw file or JPEG2000 file desired and open it.
Linking any .ecw file or JPEG2000 file will automatically create a compressed image referring to a linked file. Working with the image will fetch image data on the fly.
To link a compressed image from an ECWP server:
1. Choose File - Link - Image.
2. In the Open dialog choose ECWP Image Servers () in the Files of type box.
3. In the resulting Link ECWP Data dialog, provide the URL for an ECWP image server in the Server box. The Server box remembers most recently used ECWP servers, including those used in previous Manifold sessions.
4. If desired, press the Test button to verify the connection. Press OK.
Linking to an ECWP image server will automatically create a compressed image referring to that server. Working with the image will fetch image data on the fly.
To export a compressed image:
1. Choose File - Export - Image.
2. In the Export dialog choose ECW / JPEG2000 Files in the Files of type box.
3. Enter a name for the file in the File name box, using .ecw extension if an ECW file is desired and a .j2k extension if JPEG2000 is desired and press Save.
Compressed images can only be exported into .ecw files if the benefits of the compression technology are to be retained. Exporting into any other image format will lose the ability to do dynamic compression. Although some file formats, such as .jpg, do use compression they do not allow dynamic, multi-resolution compression as does .ecw format.
Limitations on Re-Projection
Except for limited exceptions of interest only to experts, compressed images, linked images and image libraries cannot in general be re-projected.
For example, opening an ECW compressed image and attempting to re-project it to a different projection or dragging and dropping either an ECW compressed image or an image linked from some image server into a map that uses a different projection will fail. In such cases, Manifold will pop open a dialog telling us of the projection incompatibility.
If we would like to re-project such images, we should first convert them to an unlinked local image (in the case of linked images) or to an uncompressed image type (in the case of compressed images) or to a regular local image (in the case of an image library). We can then re-project the image as desired.
Note by the way that attempting to re-project such images on the fly by dropping them into a map that uses a different projection usually indicates a conceptual error on the part of the user: usually, large images of the sort that are used as compressed images, linked images or image libraries are likely to be the largest, or among the largest, layers in any such map. It is therefore would be wisest to use their native projection as the projection for the map, so that when the map is displayed it is other, smaller layers that must be re-projected on the fly to display the map and not the large image layer.
To do so, create the map using the image layer first. This will assure that the map uses the image's projection. Next, drag and drop the other layers into the map. For maximum speed, re-project the other layers to match the projection used by the map. This is easily accomplished by (in the map window) right-clicking on the layer's tab and choosing Project to Map from the context menu.
About Compressed Images
Any grayscale, palette, RGB or RGBa image is a static image in that it consists of a fixed number of pixels where each pixel consists of an unchanging channel value or values. Every time the image is opened the values will be exactly the same.
Compressed images are dynamic images that are created from static images by a compression algorithm that reads the fixed pattern of pixels and encodes the apparent visual content of those pixels as seen by humans into a reduced amount of data. Whenever we wish to view the dynamic image, the data representing it is fetched and used by a special algorithm to reconstitute an image with the same approximate visual appearance as the original static image.
The compression and dynamic reconstitution process allows very large images to be saved in a much smaller amount of disk space and allows very fast viewing. The reconstitution algorithm fetches only that part of the compressed data that is necessary to reconstitute an acceptable visual effect at whatever zoom level (resolution) we wish to view the image. When creating a compressed image, Manifold allows us to choose what level of compression we want. Higher levels of compression will result in images that have less visual fidelity to the original.
Consider the RGB image seen at high zoom level above. We have zoomed in so that individual pixels are visible. The scene illustrated is the Northern part of Baja California in Mexico and the Sea of Cortez.
After conversion to a compressed image, the scene at the same zoom level appears above. Note that individual pixels are no longer discernable because the compression technology used synthesizes a scene using full screen resolution to utilize however many pixels are available in the computer monitor's display.
Although the scene looks very realistic (considering the high zoom into what was originally a low-resolution image), it is very important for scientific purposes to understand that the information content in the compressed image is less than that of the original. The compressed image only looks good visually because a clever decompression-on-the-fly algorithm was used to synthesize a visually appealing image from a smaller number of bytes.
The compressed image may appear to be the same but the data content of compressed images is not fixed as with non-compressed images. Non-compressed images have fixed, constant values for their pixel channels while compressed images have variable results depending upon the scale at which they are displayed and the variation caused by the compression/decompression process. If the content of images contains some specific data, such as representations of heights or specific measurements by instruments at a given location, compressed images will not preserve that data exactly. At best, they will provide an interpolation that approximates the original data.
For this reason, compressed images should not be used to store image data if that data will subsequently be subjected to analyses in which the original value of each pixel must be preserved. For example, some satellite sensors may measure reflectance and save the specific reflectance values in the R, G and B channels of an image, which will then later be analyzed to determine the material constituents of the view (such as snow, ice, sand, water, etc.) based upon reflectance of each pixel. Such an image should not be stored as a compressed image because the compression and decompression process will alter the stored values from the original measurements made by the satellite sensor.
Compressed images are best suited for visual display. The compression / decompression process is a very reasonable compromise considering the perceptual interpolation done by the human visual system. In fact, the results of the process often will give compressed images a "better" appearance to the human eye than the original uncompressed image.
Many tasks in GIS involve the use of images purely for display. Using images as backgrounds in maps with drawing layers overhead is a part of very many tasks ranging from the display of various maps to use of tracing to create new drawings. Compressed images are ideal for such purposes.
Importing and Linking Images
Compressed images may be either imported into a Manifold project or they may be left outside the project and linked into it. Compressed images may be linked into a Manifold project either from an .ecw file, a JPEG2000 file or from an ECWP image server.
Compressed images that are linked into a project will be shown in the project pane using a linked image icon.
To link a compressed image into a Manifold project from a file:
1. Choose File - Link - Image
2. In the Files of type box choose ECW / JPEG2000 Files.
3. Browse over to the .ecw file or JPEG2000 file to be linked and open it (either by double-clicking on it or by clicking on it and choosing Open).
Linking a compressed image from an ECWP image server is similar.
To link a compressed image into a Manifold project from an ECWP server:
1. Choose File - Link - Image
2. In the Files of type box choose ECWP Image Servers ().
3. In the Link ECWP Data dialog that pops open, specify the URL to a server.
4. To test connectivity to the server without commanding a link, press the Test button. If a connection can be correctly established, a Connection successful message box will appear. Press OK to close the message box.
5. In the Link ECWP Data dialog, press the OK button.
6. A linked image icon will appear for the data from the image server.
Maintaining compressed images in external .ecw files provides several advantages:
· Fast project loading - Projects containing linked compressed images will open very rapidly because they will be relatively small in size since the .map project file does not contain any storage space for the linked images.
· Fast image loading - Compressed images loaded from disk files will load just as fast as if they were stored inside the project.
· Reduced disk space - If several projects use the same compressed image only one copy of the image need be kept on disk.
Linking compressed images into a project has these disadvantages:
· Multiple files - If parts of a project are stored outside the .map project file one can no longer send a single .map file to a colleague and be sure that all data is included. All .ecw files used in the project must also be sent. In addition, we must be careful not to delete or move .ecw files that are used in projects.
· Network delays - If image files are linked over a network or when linking image files from ECWP servers through a network image display speed may be dramatically reduced due to delays caused by relatively slow network speeds compared to processor - disk speeds in a local system. This will not be a factor on gigabyte local area networks but may be a significant factor if image files are linked through Internet connections.
If a linked image cannot be found (perhaps because the project file has been moved), when the compressed image is opened an empty image window will result. To reconnect the image, right click on the linked image in the project pane and choose Relink, browsing over to the new location of the image.
Preserving Paths to Linked Images
Linked images are saved within Manifold projects using relative pathnames. Moving a .map file that contains a linked image will preserve the link to the image provided that the relative path from the .map file to the linked image file has not changed.
For example, suppose we have a .map file located in C:\projects\Carson\mymap.map that contains a linked image located in the file C:\projects\Carson\images\airport.ecw. If we move the .map file to D:\backups\January\mymap.map it will still preserve the link to the image if the image file is moved to D:\backups\January\images\airport.ecw.
Unlinking a Linked Image
Compressed images that are linked into a project may be converted into an imported image at any time.
To convert a linked image into an image within the project:
1. Right click on the linked compressed image in the project pane.
2. In the context menu choose Unlink.
Unlinking a compressed image linked from a file will import that image into the project as a compressed image stored within the project.
Unlinking a compressed image linked from an ECWP image server will import that image into the project as an RGB image (since necessary wavelet data cannot be fetched through ECWP protocol to construct a local compressed image). Be careful when unlinking an ECWP server image since the resulting RGB image can be a very large image. Once the ECWP server image is unlinked into a local image it can be converted into a compressed image to save space and improve performance.
Compressed Images and MrSID Format
If a suitable decoder has been installed, Manifold has the ability to import MrSID format images. See the Import Image - SID, MrSID topic for details.
Since MrSID has largely been replaced in modern usage by open formats such as ECW and JPEG2000, Manifold will import MrSID images but it will not export images to MrSID nor utilize MrSID as a native format for linking images as compressed images as is possible with ECW and JPEG2000.
The assumption is that if you are working with Manifold and must deal with an image in MrSID format, your first objective will be to immediately convert the image into a compressed image and to save it out as an ECW or JPEG2000 format image. Once the image has been converted into and saved as a compressed image, loading it and viewing it will be instantaneous and it no longer will be imprisoned in MrSID format.
Because many images are trapped in MrSID format and most GIS users would prefer to use a more open format, some software developers who have licenses to work with both MrSID and ECW or JPEG2000 have created scripts or utilities that can automatically traverse a hard disk and find and convert all MrSID files into ECW files. That is the most efficient way of freeing images trapped in MrSID format since the lengthy process of converting a MrSID image to a more modern format can be accomplished at night or over the weekend. Check the manifold.net website's Free Stuff page for examples of such scripts.
Image - Convert to
Export Image - ECW / JPEG2000