[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
ImageExportInfo Class Reference | ![]() |
---|
Argument object for the function exportImage(). See exportImage() for usage example. This object must be used to define the properties of an image to be written to disk. More...
#include "vigra/imageinfo.hxx"
Public Methods | |
ImageExportInfo (const char *) | |
ImageExportInfo & | setFileType (const char *) |
ImageExportInfo & | setCompression (const char *) |
ImageExportInfo & | setPixelType (const char *) |
const char * | getPixelType () const |
ImageExportInfo & | setXResolution (float) |
ImageExportInfo & | setYResolution (float) |
Detailed Description |
#include "vigra/imageinfo.hxx"
Namespace: vigra
convert.cxx, edge.cxx, invert.cxx, invert_explicitly.cxx, profile.cxx, pyramid.cxx, resize.cxx, smooth.cxx, subimage.cxx, voronoi.cxx, and watershed.cxx.
|
Construct ImageExportInfo object. The image will be stored under the given filename. The file type will be guessed from the extension unless overridden by setFileType(). Recognized extensions: '.bmp', '.gif', '.jpeg', '.jpg', '.p7', '.png', '.pbm', '.pgm', '.pnm', '.ppm', '.ras', '.tif', '.tiff', '.xv'. JPEG support requires libjpeg, PNG support requires libpng, and TIFF support requires libtiff. |
|
Get the pixel type of the image. Possible values are:
|
|
Set compression type. Recognized strings: "" (no compression), "LZW", "RunLength", "1" ... "100". A number is interpreted as the compression quality for JPEG compression. JPEG compression is supported by the JPEG and TIFF formats. "LZW" is only available if libtiff was installed with LZW enabled. By default, libtiff comes with LZW disabled due to Unisys patent enforcement. In this case, VIGRA stores the image uncompressed. |
|
Store image as given file type. This will override any type guessed from the file name's extension. Recognized file types:
With the exception of TIFF and VIFF, all file types store 1 byte (gray scale and mapped RGB) or 3 bytes (RGB) per pixel. TIFF and VIFF are aditionally able to store short and long integers (2 or 4 bytes) and real values (32 bit float and 64 bit double) without conversion. So you will need to use TIFF or VIFF if you need to store images with high accuracy (the appropriate type to write is automatically derived from the image type to be exported). However, many other programs using TIFF (e.g. ImageMagick) have not implemented support for those pixel types. So don't be surprised if the generated TIFF is not readable in some cases. If this happens, export the image as 'unsigned char' or 'RGBValue<unsigned char>' by calling ImageExportInfo::setPixelType(). |
|
Set the pixel type of the image file. Possible values are:
Usage: FImage img(w,h); by default, float images are exported with pixeltype float when the target format support this type, i.e. is TIFF or VIFF. exportImage(srcImageRange(img), ImageExportInfo("asFloat.tif")); if this is not desired, force a different pixeltype exportImage(srcImageRange(img), ImageExportInfo("asByte.tif").setPixelType("UINT8")); |
|
Set the image resolution in horizontal direction |
|
Set the image resolution in vertical direction |
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|