Returns true if the image is a less-than (<) shape.
337001
function isType2or4(frameData) {
    var zeroPositions = [0, 1, 8, 9, 24, 25, 48, 49, 80, 81, 120, 121, 168, 169, 224, 225];
    for (var i = 0; i < zeroPositions.length; i++) {
        if (frameData[zeroPositions[i]] !== 0) {
            return false;
        }
    }

    return true;
}
169542
public static boolean getF(GrayU8 image, int x, int y) {
		if (image.isInBounds(x, y)) {
			return image.get(x, y) != 0;
		} else {
			return false;
		}
	}
115930
def imagej_shape(shape, rgb=None):
    
    shape = tuple(int(i) for i in shape)
    ndim = len(shape)
    if 1 > ndim > 6:
        raise ValueError('invalid ImageJ hyperstack: not 2 to 6 dimensional')
    if rgb is None:
        rgb = shape[-1] in (3, 4) and ndim > 2
    if rgb and shape[-1] not in (3, 4):
        raise ValueError('invalid ImageJ hyperstack: not a RGB image')
    if not rgb and ndim == 6 and shape[-1] != 1:
        raise ValueError('invalid ImageJ hyperstack: not a non-RGB image')
    if rgb or shape[-1] == 1:
        return (1, ) * (6 - ndim) + shape
    return (1, ) * (5 - ndim) + shape + (1,)
172180
def image_shape(img):
    ''''''
    if hasattr(img, 'shape'):
        return (img.shape[1], img.shape[0])
    return (img.width, img.height)
781481
public static boolean isFullyTransparent(BufferedImage image) {
		boolean transparent = true;
		for (int x = 0; x < image.getWidth(); x++) {
			for (int y = 0; y < image.getHeight(); y++) {
				transparent = isTransparent(image, x, y);
				if (!transparent) {
					break;
				}
			}
			if (!transparent) {
				break;
			}
		}
		return transparent;
	}
760690
def is_image(filename):
    """"""
    # note: isfile() also accepts symlinks
    return os.path.isfile(filename) and filename.lower().endswith(ImageExts)
778055
public static boolean getT(GrayU8 image, int x, int y) {
		if (image.isInBounds(x, y)) {
			return image.get(x, y) != 0;
		} else {
			return true;
		}
	}
726309
public boolean isInBounds( int c_x , int c_y ) {
		return BoofMiscOps.checkInside(image, c_x, c_y, radiusWidth, radiusHeight);
	}
1374284
def _check_image(self, X):
        

        if (len(X.shape) < 3) or (len(X.shape) > 4):
            raise ValueError('Input has to have shape [n_samples, n_pixels_y, n_pixels_x] '
                             'or [n_samples, n_pixels_y, n_pixels_x, n_bands].')

        self._samples = X.shape[0]
        self._image_size = X.shape[1:3]

        if (self._image_size[0] % self.receptive_field[0]) or (self._image_size[0] % self.receptive_field[0]):
            raise ValueError('Image (%d,%d) and receptive fields (%d,%d) mismatch.\n'
                             'Resize your image to be divisible with receptive field.'
                             % (self._image_size[0], self._image_size[0], self.receptive_field[0],
                                self.receptive_field[1]))
504744
public boolean lessThanOrEqual(XObject obj2) throws javax.xml.transform.TransformerException
  {
    return compare(obj2, S_LTE);
  }
60179
def is_oriented(self):
        
        if util.is_shape(self.primitive.transform, (4, 4)):
            return not np.allclose(self.primitive.transform[
                                   0:3, 0:3], np.eye(3))
        else:
            return False
1142478
public boolean lessThanOrEqual(Object left, Object right) {
    if (left == right) {
      return true;
    }
    else if (left == null || right == null) {
      return false;
    }
    else {
      return compare(left, right, "<=") <= 0;
    }
  }
613489
def pad_bin_image_to_shape(image, shape):
    
    h, w = shape
    ih, iw = image.shape
    assert ih <= h
    assert iw <= w
    if iw < w:
        result = numpy.hstack((image, numpy.zeros((ih, w - iw), bool)))
    else:
        result = image
    if ih < h:
        result = numpy.vstack((result, numpy.zeros((h - ih, w), bool)))
    return result
647526
def IsImage(self, filename):
		""""""
		mimetype =  mimetypes.guess_type(filename)[0]
		if not mimetype:
			return False
		return mimetype.startswith("image/")
208371
public static BufferedImage checkInputs(ImageBase src, BufferedImage dst) {
		if (dst != null) {
			if (dst.getWidth() != src.getWidth() || dst.getHeight() != src.getHeight()) {
				throw new IllegalArgumentException("Shapes do not match: "+
						"src = ( "+src.width+" , "+src.height+" )  " +
						"dst = ( "+dst.getWidth()+" , "+dst.getHeight()+" )");
			}
		} else {
			if(src instanceof GrayI8)
				dst = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
			else if(src instanceof GrayF)
				// no good equivalent.  Just assume the image is a regular gray scale image
				// with pixel values from 0 to 255
				dst = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
//			throw new RuntimeException("Fail!");
			else if(src instanceof GrayI)
				// no good equivalent.  I'm giving it the biggest pixel for the range
				dst = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_USHORT_GRAY);
			else
				dst = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_RGB);
		}
		return dst;
	}
1193368
public static boolean isPlaceholderShape(int[] shape) {
        if(shape == null)
            return true;
        else {
            for(int i = 0; i < shape.length; i++) {
                if(shape[i] < 0)
                    return true;
            }
        }

        return false;
    }
941420
protected int isBetter3D(Box a, Box b, Space space) {
		int compare = Long.compare(a.getVolume(), b.getVolume());
		if(compare != 0) {
			return compare;
		}
		// determine lowest fit
		a.fitRotate3DSmallestFootprint(space);
		b.fitRotate3DSmallestFootprint(space);

		return Long.compare(b.getFootprint(), a.getFootprint()); // i.e. smaller i better
	}