ImageMan DLL Suite Version 8Submit feedback on this topic   

Working with Embedded Images

In addition to enabling your application to work with individual image files, ImageMan also provides support for images that are embedded in other files; for instance, you could use ImageMan to load a TIFF file that's a part of a larger document file (we use this feature ourselves to extract the TIFF portion of an EPSF file).

 

To load an embedded image, you use the ImgOpenEmbedded function. This function is similar to the ImgOpenSolo function, but takes a couple of extra parameters: the name of the file which contains the image, the offset of the image from the beginning of the file and the length of the image within the file. Aside from these differences, you work with the image just as you would if it were not embedded. The following sample shows this:

.

.

.

// The embedded image is a TIFF image embedded

// in the file DOCUMENT.FIL. The image is at

// offset 3212 in the file, and is 34500 bytes long

// Note that if you don't specify an image

// type ("TIF", "PCX")

// ImageMan will determine the image type

// automatically.

hImage = ImgOpenEmbedded("document.dat", 3212L, 34500L, "TIF");

// now you treat it just like a non-embedded image...

ImgDrawImage(hImage, hDC, &rDest, NULL);

ImgClose(hImage);

.

.

.

 

There's really no difference between an embedded and a stand-alone image once it's opened. This functionality helps to make ImageMan the most flexible product available for image management.

 

 

 


© 1995-2004 Data Techniques, Inc. All rights reserved.