overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayoverpaint_gray (Operator)
Name
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayoverpaint_gray — Überschreibt die Grauwerte eines Bildes.
Signatur
Beschreibung
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray zeichnet die Grauwerte des Bildes aus
ImageSourceImageSourceImageSourceImageSourceimageSourceimage_source in das Bild in ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination
ein. Kopiert werden nur die Grauwerte aus dem Definitionsbereich
von ImageSourceImageSourceImageSourceImageSourceimageSourceimage_source (siehe reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain).
Als Alternative zu overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray zeichnet der Operator
paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray die Grauwerte nicht direkt in ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination
ein, sondern gibt das Ergebnis in einem neu erzeugten Bild zurück.
Achtung
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray verändert den Inhalt eines bereits bestehenden Bildes
(ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination). Zudem können aber auch andere Bildobjekte
betroffen sein: Wenn man z.B. ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination mit Hilfe von
copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj aus einem anderen Bildobjekt erzeugt hat (oder umgekehrt),
wird auch dessen Bildmatrix überschrieben. Deshalb sollte
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray nur zum Einzeichnen in neu erzeugte Bildobjekte
verwendet werden. Typische Operatoren hierfür sind z.B.
gen_image_constgen_image_constGenImageConstGenImageConstGenImageConstgen_image_const (erzeugt ein neues Bild mit angegebener Größe),
gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProtogen_image_proto (erzeugt ein Bild mit der Größe eines angegebenen
Prototyp-Bildes) oder copy_imagecopy_imageCopyImageCopyImageCopyImagecopy_image (erzeugt ein Bild als Kopie eines
angegebenen Bildes).
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Dieser Operator modifiziert den Zustand des folgenden Eingabeparameters:
Während der Ausführung dieses Operators muss der Zugriff auf den Wert dieses Parameters synchronisiert werden, wenn er über mehrere Threads hinweg verwendet wird.
Parameter
ImageDestinationImageDestinationImageDestinationImageDestinationimageDestinationimage_destination (input_object, Zustand wird modifiziert) (multichannel-)image → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Eingabebild, in das eingezeichnet werden soll.
ImageSourceImageSourceImageSourceImageSourceimageSourceimage_source (input_object) (multichannel-)image → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Eingabebild, das die zusätzlichen Grauwerte liefert.
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Beispiel (C)
/* Copy a circular part of the image 'monkey' into a new image (New1): */
read_image(&Image,"monkey");
gen_circle(&Circle,200.0,200.0,150.0);
reduce_domain(Image,Circle,&Mask);
/* New image with black (0) background */
gen_image_proto(Image,&New1,0.0);
/* Copy a part of the image 'monkey' into New1 */
overpaint_gray(New1,Mask);
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Ergebnis
Sind die Parameterwerte korrekt, liefert overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGrayoverpaint_gray
den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung
durchgeführt.
Vorgänger
read_imageread_imageReadImageReadImageReadImageread_image,
gen_image_constgen_image_constGenImageConstGenImageConstGenImageConstgen_image_const,
gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProtogen_image_proto
Alternativen
get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1get_image_pointer1,
paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray,
set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval,
copy_imagecopy_imageCopyImageCopyImageCopyImagecopy_image
Siehe auch
paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region,
overpaint_regionoverpaint_regionOverpaintRegionOverpaintRegionOverpaintRegionoverpaint_region
Modul
Foundation