Sets the image to be displayed.

@param img
the image to be displayed
330882
public void setImage(BufferedImage img) {
        this.img = img;
        Dimension dim;
        if (img != null) {
            dim = new Dimension(img.getWidth(), img.getHeight());
        } else {
            dim = new Dimension(DEFAULT_WIDTH, DEFAULT_HEIGHT);
        }

        setSize(dim);
        setPreferredSize(dim);
        repaint();
    }
1069644
public void setImageBuilders(java.util.Collection<ImageBuilder> imageBuilders) {
        if (imageBuilders == null) {
            this.imageBuilders = null;
            return;
        }

        this.imageBuilders = new java.util.ArrayList<ImageBuilder>(imageBuilders);
    }
1145541
public static void showDialog(BufferedImage img) {
		ImageIcon icon = new ImageIcon();
		icon.setImage(img);
		JOptionPane.showMessageDialog(null, icon);
	}
7781
public void setImage(T gray) {
		integral.reshape(gray.width,gray.height);
		integralSq.reshape(gray.width,gray.height);

		GIntegralImageOps.transform(gray,integral);
		if( gray.getDataType().isInteger())
			transformSq((GrayU8)gray,(GrayS64)integralSq);
		else
			transformSq((GrayF32)gray,(GrayF64)integralSq);
	}
138776
function setDivTag(image, img) {
  var setElemStyle = DOM.setStyle(image.element);
  setElemStyle('backgroundImage', 'url(' + img.src + ')');

  if (image.preserveAspectRatio) {
    var w, h;

    if (image.knownDimensions) {
      w = image.knownDimensions[0];
      h = image.knownDimensions[1];
    } else {
      w = img.width;
      h = img.height;
    }

    setElemStyle('backgroundSize', 'cover');

    if (image.isFlexible) {
      setElemStyle('paddingBottom', ((h / w) * 100.0) + '%');
    } else {
      setElemStyle('width', w + 'px');
      setElemStyle('height', h + 'px');
    }
  }
}
1137655
def set_image(self, img, bgr=False):
        ''''''
        if not self.is_alive():
            return
        if bgr:
            img = cv.CloneImage(img)
            cv.CvtColor(img, img, cv.CV_BGR2RGB)
        self.in_queue.put(MPImageData(img))
594702
def set_image(self, img):
        ''''''
        self._bmp = wx.BitmapFromImage(img)
        self.SetMinSize((self._bmp.GetWidth(), self._bmp.GetHeight()))
1364052
public void setImagesData(List data) {
        if (data == null || data.isEmpty()) {
            this.setVisibility(GONE);
            return;
        } else {
            this.setVisibility(VISIBLE);
        }

        if (mMaxSize > 0 && data.size() > mMaxSize) {
            data = data.subList(0, mMaxSize);
        }

        int[] gridParam = calculateGridParam(data.size());
        mRowCount = gridParam[0];
        mColumnCount = gridParam[1];
        if (mImgDataList == null) {
            int i = 0;
            while (i < data.size()) {
                ImageView iv = getImageView(i);
                if (iv == null)
                    return;
                addView(iv, generateDefaultLayoutParams());
                i++;
            }
        } else {
            int oldViewCount = mImgDataList.size();
            int newViewCount = data.size();
            if (oldViewCount > newViewCount) {
                removeViews(newViewCount, oldViewCount - newViewCount);
            } else if (oldViewCount < newViewCount) {
                for (int i = oldViewCount; i < newViewCount; i++) {
                    ImageView iv = getImageView(i);
                    if (iv == null) {
                        return;
                    }
                    addView(iv, generateDefaultLayoutParams());
                }
            }
        }
        mImgDataList = data;
        requestLayout();
    }
214618
public void setData(BufferedImage image, String imageFormat)
			throws IOException {
		setData(image, imageFormat, null);
	}
1121198
public void setImageName(String imageName) {
		if (imageName.length() == 0) {
			imageName = null;
		}

		this.imageName = imageName;
		if (imageName == null) {
			image = null;
		} else {
			updateImage = true;
		}
	}
1222089
public void setImage(String src) {
        if (src == null) {
            throw new RuntimeException("Cannot set image to null. Call removeImage() if you wanted to remove the image");
        }

        if (imageElem == null) {
            imageElem = Document.get().createImageElement();
            // must be first child according to jquery.mobile-1.4.x.css
            if (anchor != null) anchor.insertFirst(imageElem);
            else insertFirstChild(imageElem);
        }
        imageElem.setAttribute("src", src);
        getElement().addClassName(STYLE_UI_LI_HAS_THUMB);
    }
290955
def set_image(self, image='auto'):
        
        if image=="auto": image = _pylab.gca().images[0]
        self._image=image
        self.update_image()
602654
public void setImageUI(final BufferedImage image) {
		BoofSwingUtil.invokeNowOrLater(() -> {
			repaintJustImage(ImagePanel.this.img,adjustmentGUI);
			ImagePanel.this.img = image;
			repaintJustImage(ImagePanel.this.img,adjustmentGUI);
		});
	}
673355
public void setLogo(String url) {
        if (url != null && url.trim().length() > 0) {
            if (Url.isUrl(url) || url.startsWith("data:image/")) {
                this.logo = url.trim();
            } else {
                throw new IllegalArgumentException(url + " is not a valid URL.");
            }
        }
    }
1143615
public void setImages(java.util.Collection<WorkspaceImage> images) {
        if (images == null) {
            this.images = null;
            return;
        }

        this.images = new com.amazonaws.internal.SdkInternalList<WorkspaceImage>(images);
    }
580897
public void setImage(java.lang.String image) {
        getStateHelper().put(PropertyKeys.image, image);
    }
725314
public void setImageTags(java.util.Collection<String> imageTags) {
        if (imageTags == null) {
            this.imageTags = null;
            return;
        }

        this.imageTags = new java.util.ArrayList<String>(imageTags);
    }