True if this request is for a scaled full image.

        To be used to determine whether this request should be used
        in the set of `sizes` specificed in the Image Information.
191851
def is_scaled_full_image(self):
        
        return(self.region_full and
               self.size_wh[0] is not None and
               self.size_wh[1] is not None and
               not self.size_bang and
               self.rotation_deg == 0.0 and
               self.quality == self.default_quality and
               self.format == 'jpg')
836158
public boolean isRequestComplete() {
        PooledByteBuffer[] data = getAttachment(BUFFERED_REQUEST_DATA);
        if(data != null) {
            return false;
        }
        return allAreSet(state, FLAG_REQUEST_TERMINATED);
    }
1329405
public function isImage(): bool
    {
        return is_resource($this->content) && in_array($this->contentType, [
            self::CONTENT_TYPE_IMAGE_JPEG, self::CONTENT_TYPE_IMAGE_PNG, self::CONTENT_TYPE_IMAGE_GIF,
        ]);
    }
1177452
private function image_sizes_differ( $image_sizes, $meta_sizes ) {
		// Check if have new image size(s).
		if ( array_diff( array_keys( $image_sizes ), array_keys( $meta_sizes ) ) ) {
			return true;
		}
		// Check if image sizes have changed.
		foreach ( $image_sizes as $name => $image_size ) {
			if ( $image_size['width'] !== $meta_sizes[ $name ]['width'] || $image_size['height'] !== $meta_sizes[ $name ]['height'] ) {
				return true;
			}
		}
		return false;
	}
374632
private void checkBorderAndCenterWhenScale() {

		RectF rect = getMatrixRectF();
		float deltaX = 0;
		float deltaY = 0;

		int width = getWidth();
		int height = getHeight();

		if (rect.width() >= width) {
			if (rect.left > 0) {
				deltaX = -rect.left;
			}
			if (rect.right < width) {
				deltaX = width - rect.right;
			}
		}
		if (rect.height() >= height) {
			if (rect.top > 0) {
				deltaY = -rect.top;
			}
			if (rect.bottom < height) {
				deltaY = height - rect.bottom;
			}
		}
		// Always center the image when it's smaller than the imageView
		if (rect.width() < width) {
			deltaX = width * 0.5f - rect.right + 0.5f * rect.width();
		}
		if (rect.height() < height) {
			deltaY = height * 0.5f - rect.bottom + 0.5f * rect.height();
		}

		scaleMatrix.postTranslate(deltaX, deltaY);

	}
283521
def make_request(self, image, *features):
        
        return {
            "image": {
                "content": self.image_to_base64(image)
            },
            "features": [{
                             "type": feature.type_,
                             "maxResults": feature.max_results
                         } for feature in features]
        }
1257564
def is_full(self):
        
        if len(self.grid) == 0:
            return False

        for i in range(len(self.grid)):
            for j in range(len(self.grid[0])):
                if self.grid[i][j] is None:
                    return False
        return True
851859
private boolean hasBeenAllImagesStarted(Queue<ImageConfiguration> imagesWaitingToStart, Queue<ImageConfiguration> imagesStarting) {
        return imagesWaitingToStart.isEmpty() && imagesStarting.isEmpty();
    }
111057
def _sanity_check_scale(self, scale_x, scale_y):
        
        win_wd, win_ht = self.get_window_size()
        if (win_wd <= 0) or (win_ht <= 0):
            raise ImageViewError("window size undefined")

        # final sanity check on resulting output image size
        if (win_wd * scale_x < 1) or (win_ht * scale_y < 1):
            raise ValueError(
                "resulting scale (%f, %f) would result in image size of "
                "<1 in width or height" % (scale_x, scale_y))

        sx = float(win_wd) / scale_x
        sy = float(win_ht) / scale_y
        if (sx < 1.0) or (sy < 1.0):
            raise ValueError(
                "resulting scale (%f, %f) would result in pixel size "
                "approaching window size" % (scale_x, scale_y))
1080913
def checkReszie(self):
        ''''''
        if not self.resized:
            oldypx = self.ypx
            oldxpx = self.xpx
            self.ypx = self.figure.get_size_inches()[1]*self.figure.dpi
            self.xpx = self.figure.get_size_inches()[0]*self.figure.dpi
            if (oldypx != self.ypx) or (oldxpx != self.xpx):
                self.resized = True
            else:
                self.resized = False
363428
def _size_is_needed(layer):
    
    exposure = layer.keywords.get('exposure')
    if not exposure:
        # The layer is not an exposure.
        return False

    indivisible_exposure_keys = [f['key'] for f in indivisible_exposure]
    if exposure in indivisible_exposure_keys:
        # The exposure is not divisible, We don't need to compute the size.
        return False

    if layer.geometryType() == QgsWkbTypes.PointGeometry:
        # The exposure is a point layer. We don't need to compute the size.
        return False

    # The layer is divisible and not a point layer.
    # We need to check if some fields are absolute.

    fields = layer.keywords['inasafe_fields']

    absolute_field_keys = [f['key'] for f in count_fields]

    for field in fields:
        if field in absolute_field_keys:
            return True
    else:
        return False
584879
public boolean isSingleDataImage()
    {
    	if (this.getScreenField().getConverter() != null)
        	if (this.getScreenField().getConverter().getField() != null)
            	if (this.getScreenField().getConverter().getField().getComponent(1) == null)
    		return true;
    	return false;
    }
1095401
public function ModernoLoadingImageExists()
    {
        if ($image = $this->owner->ModernoLoadingImage()) {
            return ($image->exists() && file_exists($image->getFullPath()));
        }
        
        return false;
    }
447152
def image_exists(self, image_name, tag='latest'):
        
        code, image = self.image_tags(image_name)
        if code != httplib.OK:
            return False
        tag = tag.lower()
        return any(x.lower() == tag for x in image.tags)
1086332
def validate_dimensions
      return unless image?(self)

      manipulate! do |image|
        raise CarrierWave::IntegrityError, I18n.t("carrierwave.errors.image_too_big") if image.dimensions.any? { |dimension| dimension > max_image_height_or_width }
        image
      end
    end
647952
protected RenderedImage doFilter(BufferedImage pImage, ServletRequest pRequest, ImageServletResponse pResponse) {

        // Get quality setting
        // SMOOTH | FAST | REPLICATE | DEFAULT | AREA_AVERAGING
        // See Image (mHints)
        int quality = getQuality(pRequest.getParameter(PARAM_SCALE_QUALITY));

        // Get units, default is pixels
        // PIXELS | PERCENT | METRIC | INCHES
        int units = getUnits(pRequest.getParameter(PARAM_SCALE_UNITS));
        if (units == UNITS_UNKNOWN) {
            log("Unknown units for scale, returning original.");
            return pImage;
        }

        // Use uniform scaling? Default is true
        boolean uniformScale = ServletUtil.getBooleanParameter(pRequest, PARAM_SCALE_UNIFORM, true);

        // Get dimensions
        int width = ServletUtil.getIntParameter(pRequest, PARAM_SCALE_X, -1);
        int height = ServletUtil.getIntParameter(pRequest, PARAM_SCALE_Y, -1);

        // Get dimensions for scaled image
        Dimension dim = getDimensions(pImage, width, height, units, uniformScale);

        width = (int) dim.getWidth();
        height = (int) dim.getHeight();

        // Return scaled instance directly
        return ImageUtil.createScaled(pImage, width, height, quality);
    }
606633
private String getBigImageScaleParam() {

        return IMAGE_SCALE_PARAM
            + ",w:"
            + I_CmsLayoutBundle.INSTANCE.galleryResultItemCss().bigImageWidth()
            + ",h:"
            + I_CmsLayoutBundle.INSTANCE.galleryResultItemCss().bigImageHeight();
    }