Saves the focal point to a property on the image.<p>
542549
private void save() {

        if ((m_focalPoint != null) && isEditable()) {
            int x = (int)m_focalPoint.getX();
            int y = (int)m_focalPoint.getY();
            String val = "" + x + "," + y;
            CmsUUID sid = m_imageInfoProvider.get().getStructureId();
            List<CmsPropertyModification> propChanges = new ArrayList<>();
            propChanges.add(new CmsPropertyModification(sid, CmsGwtConstants.PROPERTY_IMAGE_FOCALPOINT, val, false));
            final CmsPropertyChangeSet changeSet = new CmsPropertyChangeSet(sid, propChanges);
            CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

                @Override
                public void execute() {

                    CmsCoreProvider.getVfsService().saveProperties(changeSet, this);

                }

                @SuppressWarnings("synthetic-access")
                @Override
                protected void onResponse(Void result) {

                    m_savedFocalPoint = m_focalPoint;

                    if (m_pointWidget != null) {
                        m_pointWidget.setIsDefault(false);
                    }
                    m_imageInfoProvider.get().setFocalPoint(m_focalPoint);
                    if (m_nextAction != null) {
                        m_nextAction.run();
                    }

                }
            };
            action.execute();

        }
    }
764082
private void handleMove(NativeEvent nativeEvent) {

        Element imageElem = m_image.getElement();
        int offsetX = ((int)pageX(nativeEvent)) - imageElem.getParentElement().getAbsoluteLeft();
        int offsetY = ((int)pageY(nativeEvent)) - imageElem.getParentElement().getAbsoluteTop();
        if (m_coordinateTransform != null) {
            CmsPoint screenPoint = new CmsPoint(offsetX, offsetY);
            screenPoint = m_region.constrain(screenPoint); // make sure we remain in the screen region corresponding to original image (or crop).
            m_pointWidget.setCenterCoordsRelativeToParent((int)screenPoint.getX(), (int)screenPoint.getY());
            CmsPoint logicalPoint = m_coordinateTransform.transformForward(screenPoint);
            m_focalPoint = logicalPoint;
        }
    }
316737
@Override
	public void set(int x, int y, int value) {
		if (!isInBounds(x, y))
			throw new ImageAccessException("Requested pixel is out of bounds: "+x+" "+y);

		data[getIndex(x, y)] = (byte) value;
	}
436847
function () {
        this.image = null;
        this.border = null;
        if (this.canvasContext)
            this.canvasContext.clearRect(0, 0, this.size.w, this.size.h);
    }
896676
def copy_image_to_context(self, context, position, rotation=0, zoom=None):
        
        if not zoom:
            zoom = self.__zoom
        zoom_multiplicator = zoom * self.multiplicator
        context.save()
        context.scale(1. / zoom_multiplicator, 1. / zoom_multiplicator)

        image_position = round(position[0] * zoom_multiplicator), round(position[1] * zoom_multiplicator)
        context.translate(*image_position)
        context.rotate(rotation)
        context.set_source_surface(self.__image, 0, 0)

        context.paint()
        context.restore()
735852
public void set(int x, int y, long... value) {
		if (!isInBounds(x, y))
			throw new ImageAccessException("Requested pixel is out of bounds");

		unsafe_set(x,y,value);
	}
766967
function() {
            if (this._image instanceof IMSoftcrop.Image == false) {
                return;
            }

            this._image.clear();
            this._crops = [];
            this._crop = undefined;
            this._image = undefined;
            this._previewContainer.innerHTML = '';
            this.redraw();
        }
50209
def onCMapSave(self, event=None, col='int'):
        """"""
        file_choices = 'PNG (*.png)|*.png'
        ofile = 'Colormap.png'
        dlg = wx.FileDialog(self, message='Save Colormap as...',
                            defaultDir=os.getcwd(),
                            defaultFile=ofile,
                            wildcard=file_choices,
                            style=wx.FD_SAVE|wx.FD_CHANGE_DIR)

        if dlg.ShowModal() == wx.ID_OK:
            self.cmap_panels[0].cmap_canvas.print_figure(dlg.GetPath(), dpi=600)
589031
public void set(int x, int y, short... value) {
		if (!isInBounds(x, y))
			throw new ImageAccessException("Requested pixel is out of bounds");

		int index = getIndex(x, y, 0);
		for (int i = 0; i < numBands; i++, index++) {
			data[index] = value[i];
		}
	}
1322712
public void saveProperty(DbSession session, PropertyDto property) {
    save(getMapper(session), property.getKey(), property.getUserId(), property.getResourceId(), property.getValue());
  }
430551
function savePoint() {
  if (input.value.trim().length > 0) {
    let clientX = parseInt(input.style.left, 10);
    let clientY = parseInt(input.style.top, 10);
    let content = input.value.trim();
    let svg = findSVGAtPoint(clientX, clientY);
    if (!svg) {
      return;
    }

    let rect = svg.getBoundingClientRect();
    let { documentId, pageNumber } = getMetadata(svg);
    let annotation = Object.assign({
        type: 'point'
      }, scaleDown(svg, {
        x: clientX - rect.left,
        y: clientY - rect.top
      })
    );

    PDFJSAnnotate.getStoreAdapter().addAnnotation(documentId, pageNumber, annotation)
      .then((annotation) => {
        PDFJSAnnotate.getStoreAdapter().addComment(
          documentId,
          annotation.uuid,
          content
        );

        appendChild(svg, annotation);
      });
  }

  closeInput();
}
542297
public void saveValue()
    {
        PropertyOwner pRegistration = this.retrieveUserProperties();
        if (pRegistration != null) if (pRegistration instanceof UserProperties)
            ((UserProperties)pRegistration).saveField(this.getOwner());
    }
465538
public void fillContent(CmsImageInfoBean imageInfo, CmsJSONMap imageAttributes, boolean initialFill) {

        m_initialImageAttributes = imageAttributes;
        for (Entry<Attribute, I_CmsFormWidget> entry : m_fields.entrySet()) {
            String val = imageAttributes.getString(entry.getKey().name());
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(val)) {
                entry.getValue().setFormValueAsString(val);
            } else {
                if (entry.getKey() == Attribute.alt) {
                    entry.getValue().setFormValueAsString(
                        imageInfo.getProperties().get(CmsClientProperty.PROPERTY_TITLE));
                }
                if (entry.getKey() == Attribute.copyright) {
                    entry.getValue().setFormValueAsString(imageInfo.getCopyright());
                }
                if (initialFill && (entry.getKey() == Attribute.align)) {
                    entry.getValue().setFormValueAsString("left");
                }
            }
        }
    }
1338544
def saveLastScreenImage(self):
        
        bitmap = self.getLastScreenImage()
        _, target_file = tempfile.mkstemp(".png")
        cv2.imwrite(target_file, bitmap)
1341002
public void fillContent(CmsImageInfoBean imageInfo) {

        //checking for enhanced image options
        m_form.hideEnhancedOptions(
            (getDialogMode() != GalleryMode.editor) || !CmsPreviewUtil.hasEnhancedImageOptions());
        CmsJSONMap imageAttributes = CmsPreviewUtil.getImageAttributes();
        boolean inititalFill = false;
        // checking if selected image resource is the same as previewed resource
        if ((imageAttributes.containsKey(Attribute.emptySelection.name()))
            || (imageAttributes.containsKey(Attribute.hash.name())
                && !imageAttributes.getString(Attribute.hash.name()).equals(
                    String.valueOf(m_handler.getImageIdHash())))) {
            imageAttributes = CmsJSONMap.createJSONMap();
            inititalFill = true;
        }
        m_form.fillContent(imageInfo, imageAttributes, inititalFill);
    }
540689
@Override
    public void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters)
    {
        saveEvent(EventType.ON_IMAGE, reference, freestanding, parameters);
    }
218003
function (event) {
            var point = this.getMousePoint(event);

            if (this._crop instanceof IMSoftcrop.Softcrop && typeof this.handle === 'string') {
                this.updateImageInfo(true);
                this._dragPoint = point;
                this._dragObject = this.handle;
            }
            else if (this._crop instanceof IMSoftcrop.Softcrop && this._crop.inArea(point)) {
                this.updateImageInfo(true);
                this._dragObject = this._crop;
                this._dragPoint = point;
            }
            else if (this._image instanceof IMSoftcrop.Image && this._image.inArea(point)) {
                this.updateImageInfo(false);
                this._dragObject = this._image;
                this._dragPoint = point;
            }
        }