ClassesClassesClassesClasses | | | | Operators

dump_windowdump_windowDumpWindowdump_windowDumpWindowDumpWindow (Operator)

Name

dump_windowdump_windowDumpWindowdump_windowDumpWindowDumpWindow — Write the window content to a file.

Signature

dump_window( : : WindowHandle, Device, FileName : )

Herror dump_window(const Hlong WindowHandle, const char* Device, const char* FileName)

Herror T_dump_window(const Htuple WindowHandle, const Htuple Device, const Htuple FileName)

Herror dump_window(const HTuple& WindowHandle, const HTuple& Device, const HTuple& FileName)

void HWindow::DumpWindow(const HTuple& Device, const HTuple& FileName) const

void DumpWindow(const HTuple& WindowHandle, const HTuple& Device, const HTuple& FileName)

void HWindow::DumpWindow(const HTuple& Device, const HString& FileName) const

void HWindow::DumpWindow(const HString& Device, const HString& FileName) const

void HWindow::DumpWindow(const char* Device, const char* FileName) const

void HOperatorSetX.DumpWindow(
[in] VARIANT WindowHandle, [in] VARIANT Device, [in] VARIANT FileName)

void HWindowX.DumpWindow(
[in] VARIANT Device, [in] BSTR FileName)

static void HOperatorSet.DumpWindow(HTuple windowHandle, HTuple device, HTuple fileName)

void HWindow.DumpWindow(HTuple device, string fileName)

void HWindow.DumpWindow(string device, string fileName)

Description

dump_windowdump_windowDumpWindowdump_windowDumpWindowDumpWindow writes the content of the window to a file. You may continue to process this file by convenient printers or other programs. The content of a display is prepared for each special device (DeviceDeviceDeviceDeviceDevicedevice), i.e., it is formated in a manner, that you may print this file directly or it can be processed furthermore by a graphical program.

To transform gray values the current color table of the window is used, i.e., the values of set_lut_styleset_lut_styleSetLutStyleset_lut_styleSetLutStyleSetLutStyle remain unconsidered.

Possible values for DeviceDeviceDeviceDeviceDevicedevice

'postscript':

PostScript - file. File extension: '.ps'

'postscript',Width,Height:

PostScript - file with specification of the output size. Width and Height refer to the size. In this case a tupel with three values as DeviceDeviceDeviceDeviceDevicedevice is passed.

File extension: '.ps'

'tiff':

TIFF format; Compression is possible with Adobe deflate compression ('deflate [num]'"deflate [num]""deflate [num]""deflate [num]""deflate [num]""deflate [num]", lossless), JPEG ('jpeg [num]'"jpeg [num]""jpeg [num]""jpeg [num]""jpeg [num]""jpeg [num]", lossy), LZW ('lzw'"lzw""lzw""lzw""lzw""lzw", lossless), and PackBits ('packbits'"packbits""packbits""packbits""packbits""packbits", lossless). Here, '[num]'"[num]""[num]""[num]""[num]""[num]" denotes an optional specification of a compression parameter. For 'deflate'"deflate""deflate""deflate""deflate""deflate", a number between 0 (no compression) and 9 (maximum compression) can be specified. For 'jpeg'"jpeg""jpeg""jpeg""jpeg""jpeg", a number between 0 and 100 can be specified. The semantics are identical to the semantics of 'jpeg' described below. The different options can be accumulated by appending them separated by a space character. Examples: 'tiff deflate 9'"tiff deflate 9""tiff deflate 9""tiff deflate 9""tiff deflate 9""tiff deflate 9": Maximum Adobe deflate compression; 'tiff jpeg 90'"tiff jpeg 90""tiff jpeg 90""tiff jpeg 90""tiff jpeg 90""tiff jpeg 90": JPEG compression with high quality; 'tiff lzw'"tiff lzw""tiff lzw""tiff lzw""tiff lzw""tiff lzw": LZW compression; 'tiff'"tiff""tiff""tiff""tiff""tiff" or 'tiff none'"tiff none""tiff none""tiff none""tiff none""tiff none": no compression.

File extension: '.tif'

'bmp':

Windows-BMP format, RGB image, 3 bytes per pixel. The color resolution pendends on the VGA card.

File extension: '.bmp'

'jpeg':

JPEG format, with lost of information; together with the format string the quality value determining the compression rate can be provided: e.g., 'jpeg 30'.

File extension: '.jpg'

'jpegxr':

JPEG-XR format (lossless and lossy compression); together with the format string the quality value determining the compression rate can be provided: e.g., 'jpegxr 30'.

File extension: '.jxr'

'jp2':

JPEG2000 format (lossless and lossy compression); together with the format string the quality value determing the compression rate can be provided (e.g. 'jp2 40'). This value corresponds to the ratio of the size of the compressed image and the size of the uncompressed image (in percent). As lossless JPEG2000 compression reduces the file size significantly already, only smaller values (typically smaller than 50) influence the file size. Is no value provided (and only then), the image is compressed without loss.

File extension: '.jp2'

'png':

PNG format (lossless compression); together with the format string, a compresion level between 0 and 9 can be specified, where 0 corresponds to no compression and 9 to the best possible compression. Alternatively, the compression can be selected with the following strings: 'best', 'fastest', and 'none'. Hence, examples for correct parameters are 'png', 'png 7', and 'png none'.

File extension: '.png'

Attention

Under Unix-like systems, the graphics window must be completely visible on the root window, because otherwise the contents of the window cannot be read due to limitations in X Windows. If larger graphical displays are to be written to a file, the window type 'pixmap'"pixmap""pixmap""pixmap""pixmap""pixmap" can be used.

Parallelization

Parameters

WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Window identifier.

DeviceDeviceDeviceDeviceDevicedevice (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong) (BSTR / Hlong) (char* / Hlong)

Name of the target device or of the graphic format.

Default value: 'postscript' "postscript" "postscript" "postscript" "postscript" "postscript"

List of values: 'bmp'"bmp""bmp""bmp""bmp""bmp", 'jp2 20'"jp2 20""jp2 20""jp2 20""jp2 20""jp2 20", 'jp2 30'"jp2 30""jp2 30""jp2 30""jp2 30""jp2 30", 'jp2 40'"jp2 40""jp2 40""jp2 40""jp2 40""jp2 40", 'jp2 50'"jp2 50""jp2 50""jp2 50""jp2 50""jp2 50", 'jp2'"jp2""jp2""jp2""jp2""jp2", 'jpeg 100'"jpeg 100""jpeg 100""jpeg 100""jpeg 100""jpeg 100", 'jpeg 20'"jpeg 20""jpeg 20""jpeg 20""jpeg 20""jpeg 20", 'jpeg 40'"jpeg 40""jpeg 40""jpeg 40""jpeg 40""jpeg 40", 'jpeg 60'"jpeg 60""jpeg 60""jpeg 60""jpeg 60""jpeg 60", 'jpeg 80'"jpeg 80""jpeg 80""jpeg 80""jpeg 80""jpeg 80", 'jpeg'"jpeg""jpeg""jpeg""jpeg""jpeg", 'jpegxr 20'"jpegxr 20""jpegxr 20""jpegxr 20""jpegxr 20""jpegxr 20", 'jpegxr 30'"jpegxr 30""jpegxr 30""jpegxr 30""jpegxr 30""jpegxr 30", 'jpegxr 40'"jpegxr 40""jpegxr 40""jpegxr 40""jpegxr 40""jpegxr 40", 'jpegxr 50'"jpegxr 50""jpegxr 50""jpegxr 50""jpegxr 50""jpegxr 50", 'jpegxr'"jpegxr""jpegxr""jpegxr""jpegxr""jpegxr", 'png best'"png best""png best""png best""png best""png best", 'png fastest'"png fastest""png fastest""png fastest""png fastest""png fastest", 'png none'"png none""png none""png none""png none""png none", 'png'"png""png""png""png""png", 'postscript'"postscript""postscript""postscript""postscript""postscript", 'tiff deflate 9'"tiff deflate 9""tiff deflate 9""tiff deflate 9""tiff deflate 9""tiff deflate 9", 'tiff jpeg 90'"tiff jpeg 90""tiff jpeg 90""tiff jpeg 90""tiff jpeg 90""tiff jpeg 90", 'tiff lzw'"tiff lzw""tiff lzw""tiff lzw""tiff lzw""tiff lzw", 'tiff packbits'"tiff packbits""tiff packbits""tiff packbits""tiff packbits""tiff packbits", 'tiff'"tiff""tiff""tiff""tiff""tiff"

FileNameFileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

File name (without extension).

Default value: 'halcon_dump' "halcon_dump" "halcon_dump" "halcon_dump" "halcon_dump" "halcon_dump"

Example (HDevelop)

* PostScript - Dump of Image and Regions
disp_image(Image,WindowHandle)
set_colored(WindowHandle,12)
disp_region(Regions,WindowHandle)
dump_window(WindowHandle,'postscript','/tmp/halcon_dump')
system_call('lpr /tmp/halcon_dump.ps')

Example (C)

/* PostScript - Dump of Image and Regions */
disp_image(Image,WindowHandle) ;
set_colored(WindowHandle,12) ;
disp_region(Regions,WindowHandle) ;
dump_window(WindowHandle,"postscript","/tmp/halcon_dump") ;
system_call("lpr /tmp/halcon_dump.ps") ;

Example (HDevelop)

* PostScript - Dump of Image and Regions
disp_image(Image,WindowHandle)
set_colored(WindowHandle,12)
disp_region(Regions,WindowHandle)
dump_window(WindowHandle,'postscript','/tmp/halcon_dump')
system_call('lpr /tmp/halcon_dump.ps')

Example (HDevelop)

* PostScript - Dump of Image and Regions
disp_image(Image,WindowHandle)
set_colored(WindowHandle,12)
disp_region(Regions,WindowHandle)
dump_window(WindowHandle,'postscript','/tmp/halcon_dump')
system_call('lpr /tmp/halcon_dump.ps')

Example (HDevelop)

* PostScript - Dump of Image and Regions
disp_image(Image,WindowHandle)
set_colored(WindowHandle,12)
disp_region(Regions,WindowHandle)
dump_window(WindowHandle,'postscript','/tmp/halcon_dump')
system_call('lpr /tmp/halcon_dump.ps')

Example (HDevelop)

* PostScript - Dump of Image and Regions
disp_image(Image,WindowHandle)
set_colored(WindowHandle,12)
disp_region(Regions,WindowHandle)
dump_window(WindowHandle,'postscript','/tmp/halcon_dump')
system_call('lpr /tmp/halcon_dump.ps')

Result

If the appropriate window is valid and the specified parameters are correct dump_windowdump_windowDumpWindowdump_windowDumpWindowDumpWindow returns 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow, set_drawset_drawSetDrawset_drawSetDrawSetDraw, set_colorset_colorSetColorset_colorSetColorSetColor, set_coloredset_coloredSetColoredset_coloredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthset_line_widthSetLineWidthSetLineWidth, open_textwindowopen_textwindowOpenTextwindowopen_textwindowOpenTextwindowOpenTextwindow, disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion

Possible Successors

system_callsystem_callSystemCallsystem_callSystemCallSystemCall

See also

open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow, open_textwindowopen_textwindowOpenTextwindowopen_textwindowOpenTextwindowOpenTextwindow, set_systemset_systemSetSystemset_systemSetSystemSetSystem, dump_window_imagedump_window_imageDumpWindowImagedump_window_imageDumpWindowImageDumpWindowImage

Module

Foundation


ClassesClassesClassesClasses | | | | Operators