# Python image processing libraries

Python image processing libraries open image files, change their pixels, and save the results. These libraries resize uploads, prepare training data for vision models, and convert images between formats.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [Pillow](#pillow) | 436.5M | 14.0K | Oct 2026 | MIT-CMU |
| [imageio](#imageio) | 37.1M | 1.7K | Oct 2026 | BSD-2-Clause |
| [opencv-python](#opencv-python) | 29.9M | 5.4K | Jul 2026 | MIT |
| [torchvision](#torchvision) | 15.5M | 18.0K | Oct 2026 | BSD-3-Clause |
| [kornia](#kornia) | 2.2M | 12.4K | Oct 2026 | Apache-2.0 |
| [imagecodecs](#imagecodecs) | 1.3M | 194 | Oct 2026 | BSD-3-Clause |
| [wand](#wand) | 1.1M | 1.5K | Jun 2026 | MIT |
| [pyvips](#pyvips) | 901.5K | 816 | Aug 2026 | MIT |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Pillow](#pillow) has the most installs, while [torchvision](#torchvision) has the most GitHub stars.

## Capabilities

| Library | Reads video frames | Works on NumPy arrays | Draws shapes and text | Runs on a GPU | Output formats |
| --- | --- | --- | --- | --- | --- |
| [Pillow](#pillow) | Via plugin | Built-in |  | Unsupported | PDF, PNG, JPEG |
| [imageio](#imageio) |  | Built-in |  |  | PNG, JPEG, TIFF |
| [opencv-python](#opencv-python) | Built-in | Built-in | Built-in | Unsupported | PNG, JPEG, WebP |
| [torchvision](#torchvision) | Built-in | Built-in | Built-in | Built-in | PNG, JPEG, WebP |
| [kornia](#kornia) | Built-in | Via plugin | Built-in |  | PNG, JPEG, TIFF |
| [imagecodecs](#imagecodecs) |  | Built-in |  | Unsupported | PNG, JPEG, WebP |
| [wand](#wand) |  | Built-in | Built-in |  | PNG, JPEG |
| [pyvips](#pyvips) |  | Built-in | Built-in | Unsupported | PNG, JPEG |

## Libraries

### Pillow

[GitHub](https://github.com/python-pillow/Pillow) · [PyPI](https://pypi.org/project/pillow/) · [Docs](https://python-pillow.org)

Pillow is the maintained fork of PIL, the Python Imaging Library. `Image.open` reads a file and detects its format from the contents, and `save` writes it back out, choosing the format from the file extension. Between the two, modules such as `ImageDraw`, `ImageFilter`, and `ImageOps` draw, filter, resize, crop, and convert colors. Reading covers many more formats than writing, which sticks to the common interchange formats.

- Downloads / mo: 436.5M
- Stars: 14.0K
- Last release: 13.0.0, Oct 2026
- License: MIT-CMU
- Capabilities: [From the Pillow docs](https://pillow.readthedocs.io/en/latest/reference/Image.html?highlight=Image.fromarray)

**Strengths**

- **Everyday image tasks.** Thumbnails, resizing, format conversion, drawing, and metadata in one package.
- **Text, EXIF, and color profiles.** ImageDraw renders text, and Pillow reads EXIF metadata and converts ICC color profiles.
- **Prebuilt wheels.** pip installs prebuilt wheels, with no separate image program to install.

**Watch out for**

- **Slow on large images.** A large blur took 15 times as long as OpenCV's.
- **No video or camera input.** Use OpenCV or imageio for video.

```sh
pip install pillow
```

**jointakahe/takahe** (1.2K stars)

[jointakahe/takahe](https://github.com/jointakahe/takahe) resizes an uploaded image to a fixed size, applying EXIF rotation and saving it as WebP with Pillow.

```python
def resize_image(
    image: File,
    *,
    size: tuple[int, int],
    cover=True,
    keep_format=False,
) -> ImageFile:
    # ...
    with Image.open(image) as img:
        try:
            # Take any orientation EXIF data, apply it, and strip the
            # orientation data from the new image.
            img = ImageOps.exif_transpose(img)
        # ...

        if cover:
            resized_image = ImageOps.fit(img, size, method=Image.Resampling.BILINEAR)
        else:
            resized_image = img.copy()
            resized_image.thumbnail(size, resample=Image.Resampling.BILINEAR)
        new_image_bytes = io.BytesIO()
        if keep_format:
            resized_image.save(new_image_bytes, format=img.format)
            file = ImageFile(new_image_bytes)
        else:
            resized_image.save(new_image_bytes, format="webp", save_all=True)
            file = ImageFile(new_image_bytes, name="image.webp")
        file.image = resized_image
        return file
```

[files.py · resize_image()](https://github.com/jointakahe/takahe/blob/188e5a244689d5acec04ef5b9f73eb30eed13167/core/files.py#L15-L50) · pushed Aug 2024 · [More projects using Pillow →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20pillow%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**9001/copyparty** (47.3K stars)

[9001/copyparty](https://github.com/9001/copyparty) makes a thumbnail with Pillow, rotating it to match the EXIF orientation and cropping it to fit.

```python
def fancy_pillow(self, im: "Image.Image", fmt: str, vn: VFS) -> "Image.Image":
    # exif_transpose is expensive (loads full image + unconditional copy)
    res = self.getres(vn, fmt)
    r = max(*res) * 2
    im.thumbnail((r, r), resample=Image.LANCZOS)
    try:
        k = next(k for k, v in ExifTags.TAGS.items() if v == "Orientation")
        exif = im.getexif()
        rot = int(exif[k])
        del exif[k]
    except:
        rot = 1

    rots = {8: Image.ROTATE_90, 3: Image.ROTATE_180, 6: Image.ROTATE_270}
    if rot in rots:
        im = im.transpose(rots[rot])

    if "f" in fmt:
        im.thumbnail(res, resample=Image.LANCZOS)
    else:
        iw, ih = im.size
        dw, dh = res
        res = (min(iw, dw), min(ih, dh))
        im = ImageOps.fit(im, res, method=Image.LANCZOS)

    return im
```

[th_srv.py · fancy_pillow()](https://github.com/9001/copyparty/blob/6867ccc51181e7965445c3d158ddddf9a8fd817e/copyparty/th_srv.py#L742-L767) · pushed Oct 2026 · [More projects using Pillow →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20pillow%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from PIL import Image

with Image.open("hopper.jpg") as im:
    print(im.getbands())  # Returns ('R', 'G', 'B')
```

From [the docs](https://github.com/python-pillow/Pillow/blob/1ed0dc3d61bf9f39de46575d8ab4160a672b2022/docs/reference/Image.rst)

### imageio

[GitHub](https://github.com/imageio/imageio) · [PyPI](https://pypi.org/project/imageio/) · [Docs](https://imageio.readthedocs.io)

imageio reads and writes images and video as NumPy arrays through a handful of functions: `imread`, `imwrite`, and `imiter`, which steps through the frames of an animation or video. Its only core dependencies are NumPy and Pillow. Video needs `imageio-ffmpeg` or `pyav`, and TIFF files need `tifffile`. Files, URLs, and bytes all work as input. Unlike [Pillow](#pillow), imageio returns plain arrays rather than image objects.

- Downloads / mo: 37.1M
- Stars: 1.7K
- Last release: 2.38.1, Oct 2026
- License: BSD-2-Clause
- Capabilities: [From the imageio docs](https://imageio.readthedocs.io/en/stable/reference/core_v3.html)

**Strengths**

- **Hundreds of formats.** Reads and writes about 250 image and 100 video formats.
- **Returns NumPy arrays.** Images come back as arrays, ready for NumPy code.

**Watch out for**

- **Some formats need plugins.** Opening one without its backend installed fails.
- **Results vary by backend.** A different backend can change the array shape or metadata.

```sh
pip install imageio
```

**ORB-HD/deface** (1.6K stars)

[ORB-HD/deface](https://github.com/ORB-HD/deface) blurs faces in a photo, reading it and its EXIF metadata with imageio and saving the result.

```python
def image_detect(
        ipath: str,
        opath: str,
        # ...
):
    frame = iio.imread(ipath)

    if keep_metadata:
        # Source image EXIF metadata retrieval via imageio V3 lib
        metadata = imageio.v3.immeta(ipath)
        exif_dict = metadata.get("exif", None)

    # Perform network inference, get bb dets but discard landmark predictions
    dets, _ = centerface(frame, threshold=threshold)

    anonymize_frame(
        dets, frame, mask_scale=mask_scale,
        replacewith=replacewith, ellipse=ellipse, draw_scores=draw_scores,
        replaceimg=replaceimg, mosaicsize=mosaicsize
    )

    # ...

    imageio.imsave(opath, frame)

    if keep_metadata:
        # Save image with EXIF metadata
        imageio.imsave(opath, frame, exif=exif_dict)
```

[deface.py · image_detect()](https://github.com/ORB-HD/deface/blob/50930f71eadbe2a592e577e77773b156d79b3437/deface/deface.py#L186-L225) · pushed Oct 2024 · [More projects using imageio →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20imageio%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**ORB-HD/deface** (1.6K stars)

[ORB-HD/deface](https://github.com/ORB-HD/deface) blurs faces in a video frame by frame, reading and writing it through imageio's FFmpeg plugin.

```python
def video_detect(
        ipath: str,
        opath: str,
        # ...
):
    try:
        if 'fps' in ffmpeg_config:
            reader: imageio.plugins.ffmpeg.FfmpegFormat.Reader = imageio.get_reader(ipath, fps=ffmpeg_config['fps'])
        else:
            reader: imageio.plugins.ffmpeg.FfmpegFormat.Reader = imageio.get_reader(ipath)

        meta = reader.get_meta_data()
        _ = meta['size']
    # ...
    if opath is not None:
        # ...
        writer: imageio.plugins.ffmpeg.FfmpegFormat.Writer = imageio.get_writer(
            opath, format='FFMPEG', mode='I', **_ffmpeg_config
        )

    for frame in read_iter:
        # ...
        if opath is not None:
            writer.append_data(frame)

        # ...
    reader.close()
    if opath is not None:
        writer.close()
    # ...
```

[deface.py · video_detect()](https://github.com/ORB-HD/deface/blob/50930f71eadbe2a592e577e77773b156d79b3437/deface/deface.py#L105-L183) · pushed Oct 2024 · [More projects using imageio →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20imageio%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import imageio.v3 as iio
im = iio.imread('imageio:chelsea.png')  # read a standard image
im.shape  # im is a NumPy array of shape (300, 451, 3)
iio.imwrite('chelsea.jpg', im)  # convert to jpg
```

From [the README](https://github.com/imageio/imageio/blob/master/README.md)

### opencv-python

[GitHub](https://github.com/opencv/opencv-python) · [PyPI](https://pypi.org/project/opencv-python/)

opencv-python installs OpenCV, the computer vision library, as prebuilt wheels that run on the CPU. The project publishes four packages: the main build and a contrib build with extra modules, each with a headless variant that leaves out GUI libraries for Docker and servers. All four share one module name, so each environment takes exactly one package. CUDA and other optional modules need a manual build from source.

- Downloads / mo: 29.9M
- Stars: 5.4K
- Last release: 5.0.0.93, Jul 2026
- License: MIT
- Capabilities: [From the opencv-python docs](https://github.com/opencv/opencv-python/)

**Strengths**

- **Fast filtering and resizing.** Ran a large blur 15 times faster than Pillow.
- **Computer vision and video.** Also handles face detection, tracking, and video files.
- **Server build available.** opencv-python-headless skips GUI libraries for Docker and servers.

**Watch out for**

- **Colors load as BGR.** Convert to RGB before using images with Pillow or PyTorch.
- **One OpenCV package per environment.** Installing a second one overwrites the first.
- **No GPU from pip.** CUDA support means building OpenCV from source.

```sh
pip install opencv-python
```

**andrewdcampbell/OpenCV-Document-Scanner** (648 stars)

[andrewdcampbell/OpenCV-Document-Scanner](https://github.com/andrewdcampbell/OpenCV-Document-Scanner) scans a photographed document by warping it flat, sharpening it, and thresholding it to black and white with OpenCV.

```python
def scan(self, image_path):

    RESCALED_HEIGHT = 500.0
    OUTPUT_DIR = 'output'

    # load the image and compute the ratio of the old height
    # to the new height, clone it, and resize it
    image = cv2.imread(image_path)

    assert(image is not None)

    ratio = image.shape[0] / RESCALED_HEIGHT
    orig = image.copy()
    rescaled_image = imutils.resize(image, height = int(RESCALED_HEIGHT))

    # get the contour of the document
    screenCnt = self.get_contour(rescaled_image)

    if self.interactive:
        screenCnt = self.interactive_get_contour(screenCnt, rescaled_image)

    # apply the perspective transformation
    warped = transform.four_point_transform(orig, screenCnt * ratio)

    # convert the warped image to grayscale
    gray = cv2.cvtColor(warped, cv2.COLOR_BGR2GRAY)

    # sharpen image
    sharpen = cv2.GaussianBlur(gray, (0,0), 3)
    sharpen = cv2.addWeighted(gray, 1.5, sharpen, -0.5, 0)

    # apply adaptive threshold to get black and white effect
    thresh = cv2.adaptiveThreshold(sharpen, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 21, 15)

    # save the transformed image
    basename = os.path.basename(image_path)
    cv2.imwrite(OUTPUT_DIR + '/' + basename, thresh)
    print("Proccessed " + basename)
```

[scan.py · scan()](https://github.com/andrewdcampbell/OpenCV-Document-Scanner/blob/efdcd70b02254153e72dbf8aa106113371695903/scan.py#L266-L303) · pushed Oct 2022 · [More projects using opencv-python →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20opencv-python%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**EdjeElectronics/OpenCV-Playing-Card-Detector** (746 stars)

[EdjeElectronics/OpenCV-Playing-Card-Detector](https://github.com/EdjeElectronics/OpenCV-Playing-Card-Detector) prepares a camera frame for card detection by converting it to grayscale, blurring it, and thresholding it with OpenCV.

```python
def preprocess_image(image):
    """Returns a grayed, blurred, and adaptively thresholded camera image."""

    gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
    blur = cv2.GaussianBlur(gray,(5,5),0)

    # ...
    img_w, img_h = np.shape(image)[:2]
    bkg_level = gray[int(img_h/100)][int(img_w/2)]
    thresh_level = bkg_level + BKG_THRESH

    retval, thresh = cv2.threshold(blur,thresh_level,255,cv2.THRESH_BINARY)

    return thresh
```

[Cards.py · preprocess_image()](https://github.com/EdjeElectronics/OpenCV-Playing-Card-Detector/blob/e7645adacfa3e8a912eefd7e3dc2441e5a3b8c34/Cards.py#L106-L127) · pushed Jan 2018 · [More projects using opencv-python →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20opencv-python%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import cv2 as cv
import sys

img = cv.imread(cv.samples.findFile("starry_night.jpg"))
if img is None:
    sys.exit("Could not read the image.")

cv.imshow("Display window", img)
k = cv.waitKey(0)
if k == ord("s"):
    cv.imwrite("starry_night.png", img)
```

From [the docs](https://docs.opencv.org/4.x/db/deb/tutorial_display_image.html)

### torchvision

[GitHub](https://github.com/pytorch/vision) · [PyPI](https://pypi.org/project/torchvision/) · [Docs](https://pytorch.org/vision)

torchvision is the computer vision package for PyTorch, with datasets, model architectures, and image transforms. Its current transforms API resizes, crops, flips, and normalizes images for training or inference, and moves bounding boxes and masks along with the image. Transforms accept PIL images or tensors, including CUDA tensors that stay on the GPU. Each torchvision release pairs with a single PyTorch version.

- Downloads / mo: 15.5M
- Stars: 18.0K
- Last release: 0.29.2, Oct 2026
- License: BSD-3-Clause
- Runs on: PyTorch
- Capabilities: [From the torchvision docs](https://docs.pytorch.org/vision/0.22/generated/torchvision.io.VideoReader.html)

**Strengths**

- **Pretrained models included.** Ships datasets, reference models, and pretrained weights.
- **Feeds PyTorch directly.** Loaded images go straight into a PyTorch model.
- **Boxes follow the image.** v2 transforms move bounding boxes and masks along with the image.

**Watch out for**

- **OpenCV images need converting.** Convert OpenCV's BGR arrays to RGB first.
- **One random setting per call.** Per-image random settings in a batch need a loop.

```sh
pip install torchvision
```

**jamesWalker55/comfyui-various** (231 stars)

[jamesWalker55/comfyui-various](https://github.com/jamesWalker55/comfyui-various) resizes a batch of image tensors to a given width and height with torchvision's resize.

```python
def execute(
    self,
    image: torch.Tensor,
    width: int,
    height: int,
    interpolation_mode: str,
):
    assert isinstance(image, torch.Tensor)
    assert isinstance(height, int)
    assert isinstance(width, int)
    assert isinstance(interpolation_mode, str)

    interpolation_mode = interpolation_mode.upper().replace(" ", "_")
    interpolation_mode = getattr(InterpolationMode, interpolation_mode)

    image = image.permute(0, 3, 1, 2)
    image = F.resize(
        image,
        (height, width),
        interpolation=interpolation_mode,
        antialias=True,
    )
    image = image.permute(0, 2, 3, 1)

    return (image,)
```

[comfyui_image_ops.py · execute()](https://github.com/jamesWalker55/comfyui-various/blob/50d23bdfc444af630cc6ec55319a50fac21b84ce/comfyui_image_ops.py#L270-L294) · pushed Aug 2026 · [More projects using torchvision →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20torchvision%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**jamesWalker55/comfyui-various** (231 stars)

[jamesWalker55/comfyui-various](https://github.com/jamesWalker55/comfyui-various) flips a batch of image tensors horizontally or vertically with torchvision.

```python
def execute(
    self,
    image: torch.Tensor,
    direction: str,
):
    assert isinstance(image, torch.Tensor)
    assert direction in ("horizontal", "vertical")

    image = image.permute(0, 3, 1, 2)
    if direction == "horizontal":
        image = F.hflip(image)
    else:
        image = F.vflip(image)
    image = image.permute(0, 2, 3, 1)

    return (image,)
```

[comfyui_image_ops.py · execute()](https://github.com/jamesWalker55/comfyui-various/blob/50d23bdfc444af630cc6ec55319a50fac21b84ce/comfyui_image_ops.py#L309-L324) · pushed Aug 2026 · [More projects using torchvision →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20torchvision%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import torch
from torchvision.transforms import v2

H, W = 32, 32
img = torch.randint(0, 256, size=(3, H, W), dtype=torch.uint8)

transforms = v2.Compose([
    v2.RandomResizedCrop(size=(224, 224), antialias=True),
    v2.RandomHorizontalFlip(p=0.5),
    v2.ToDtype(torch.float32, scale=True),
    v2.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])
img = transforms(img)
```

From [the docs](https://docs.pytorch.org/vision/stable/transforms.html)

### kornia

[GitHub](https://github.com/kornia/kornia) · [PyPI](https://pypi.org/project/kornia/) · [Docs](https://kornia.readthedocs.io)

Kornia is a computer vision library built on PyTorch. Its operations are differentiable, so gradients flow through them during training. Its more than a thousand operators cover filters, color conversion, geometric warps, feature matching, and camera models, and most have no equivalent in [torchvision](#torchvision). Functions such as `rotate` take one parameter per image in a batch, and every operator accepts CPU, CUDA, and Apple MPS tensors.

- Downloads / mo: 2.2M
- Stars: 12.4K
- Last release: 0.9.0, Oct 2026
- License: Apache-2.0
- Runs on: PyTorch
- Capabilities: [From the kornia docs](https://kornia.readthedocs.io/en/latest/_sources/augmentation.container.rst.txt)

**Strengths**

- **Works on PyTorch tensors.** No conversion between steps.
- **Trainable image operations.** Filters and transforms keep gradients, so they run inside training.
- **Batched per-image settings.** rotate takes one angle per image in a batch, with no loop.

**Watch out for**

- **Assumes PyTorch experience.** Expects working knowledge of PyTorch and computer vision.
- **Slower than OpenCV on single CPU images.** OpenCV wins when processing one uint8 image at a time on the CPU.

```sh
pip install kornia
```

**Comfy-Org/ComfyUI** (146.0K stars)

[Comfy-Org/ComfyUI](https://github.com/Comfy-Org/ComfyUI) applies a morphology operation such as erosion or dilation to an image batch with Kornia.

```python
@classmethod
def execute(cls, image, operation, kernel_size) -> io.NodeOutput:
    device = comfy.model_management.get_torch_device()
    kernel = torch.ones(kernel_size, kernel_size, device=device)
    image_k = image.to(device).movedim(-1, 1)
    if operation == "erode":
        output = erosion(image_k, kernel)
    elif operation == "dilate":
        output = dilation(image_k, kernel)
    elif operation == "open":
        output = opening(image_k, kernel)
    elif operation == "close":
        output = closing(image_k, kernel)
    elif operation == "gradient":
        output = gradient(image_k, kernel)
    elif operation == "top_hat":
        output = top_hat(image_k, kernel)
    elif operation == "bottom_hat":
        output = bottom_hat(image_k, kernel)
    else:
        raise ValueError(f"Invalid operation {operation} for morphology. Must be one of 'erode', 'dilate', 'open', 'close', 'gradient', 'tophat', 'bottomhat'")
    img_out = output.to(comfy.model_management.intermediate_device()).movedim(1, -1)
    return io.NodeOutput(img_out)
```

[nodes_morphology.py · execute()](https://github.com/Comfy-Org/ComfyUI/blob/07dd46dc4abd9b6af81aae7c590a9a30d5a096c8/comfy_extras/nodes_morphology.py#L31-L53) · pushed Nov 2026 · [More projects using kornia →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20kornia%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import numpy as np
import torch
import kornia

np_img = (np.random.rand(48, 64, 3) * 255).astype(np.uint8)  # (H, W, C) uint8
t = kornia.image.image_to_tensor(np_img)[None].float() / 255.0  # (1, 3, 48, 64) in [0, 1]
```

From [the docs](https://github.com/kornia/kornia/blob/7200ba929f6abac8bde8d1f9c3152b95636f1230/docs/source/get-started/conventions.rst)

### imagecodecs

[GitHub](https://github.com/cgohlke/imagecodecs) · [PyPI](https://pypi.org/project/imagecodecs/)

imagecodecs encodes and decodes image and compression formats in memory, for scientific image packages such as tifffile and zarr. Each codec has a pair of functions named after it, following the `codec_encode` and `codec_decode` pattern, that convert between bytes and NumPy arrays, while `imread` and `imwrite` read and write files directly. Coverage includes AVIF, HEIF, EXR, WebP, and TIFF, plus byte compressors such as Zstandard and Brotli.

- Downloads / mo: 1.3M
- Stars: 194
- Last release: 2026.10.10, Oct 2026
- License: BSD-3-Clause
- Capabilities: [From the imagecodecs docs](https://github.com/cgohlke/imagecodecs/blob/906a0d58aca1e74b4cd5e9a41a8a9cc53e66b717/imagecodecs/imagecodecs.py)

**Strengths**

- **Newer and scientific formats.** Encodes and decodes AVIF, HEIF, EXR, and more as NumPy arrays.
- **Only needs NumPy.** No other runtime dependencies.
- **Decodes in parallel.** Threads can encode and decode at the same time.

**Watch out for**

- **In-memory data only.** Large files and metadata need tifffile or zarr on top.
- **API still changes.** Function signatures can change between releases.
- **Little-endian only.** The package runs only on little-endian platforms.

```sh
pip install imagecodecs
```

**marcinz606/NegPy** (1.2K stars)

[marcinz606/NegPy](https://github.com/marcinz606/NegPy) encodes an image array as a JPEG XL file with imagecodecs, setting bit depth, color tags, and compression effort.

```python
def encode_jxl(
    arr: np.ndarray,
    *,
    photometric: str,
    primaries: Optional[str],
    transfer: Optional[str],
    lossless: bool = True,
    distance: Optional[float] = None,
    effort: int = 7,
) -> bytes:
    """Encode uint8/uint16 pixels as JPEG XL. libjxl tags the color enumeratively,
    so no ICC profile is embedded."""
    bits = imagecodecs.jpegxl_encode(
        np.ascontiguousarray(arr),
        bitspersample=8 if arr.dtype == np.uint8 else 16,
        photometric=photometric,
        primaries=primaries,
        transfer=transfer,
        lossless=lossless,
        distance=None if lossless else distance,
        effort=effort,
        numthreads=0,  # all cores; single-threaded otherwise (~7x slower)
    )
    return bytes(bits)
```

[encoders.py · encode_jxl()](https://github.com/marcinz606/NegPy/blob/045654de82c97fd1a286d4864632e4498f352530/negpy/services/export/encoders.py#L152-L175) · pushed Nov 2026 · [More projects using imagecodecs →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20imagecodecs%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**seung-lab/cloud-volume** (176 stars)

[seung-lab/cloud-volume](https://github.com/seung-lab/cloud-volume) compresses a grayscale or color image chunk to JPEG XL with imagecodecs.

```python
def encode_jpegxl(arr, level, effort, decodingspeed, num_threads):
  if not np.issubdtype(arr.dtype, np.uint8):
    raise ValueError("Only accepts uint8 arrays. Got: " + str(arr.dtype))

  arr, num_channel = as2d(arr)
  lossless = level >= 100

  if num_channel == 1:
    return imagecodecs.jpegxl_encode(
      arr[:,:,0],
      photometric="GRAY",
      level=level,
      lossless=lossless,
      effort=effort,
      decodingspeed=decodingspeed,
      numthreads=num_threads,
    )
  elif num_channel == 3:
    arr = np.transpose(arr, axes=[2, 0, 1])
    return imagecodecs.jpegxl_encode(
      arr,
      photometric="RGB",
      level=level,
      lossless=lossless,
      effort=effort,
      decodingspeed=decodingspeed,
      numthreads=num_threads,
    )
  raise ValueError("Number of image channels should be 1 or 3. Got: {}".format(arr.shape[3]))
```

[chunks.py · encode_jpegxl()](https://github.com/seung-lab/cloud-volume/blob/98e1f3f9e95be8f678d380555883f74e62d2671c/cloudvolume/chunks.py#L220-L248) · pushed Nov 2026 · [More projects using imagecodecs →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20imagecodecs%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import numpy
array = numpy.random.randint(100, 200, (256, 256, 3), numpy.uint8)

from imagecodecs import imwrite, imread
imwrite('_test.jp2', array)
image = imread('_test.jp2')
```

From [the README](https://github.com/cgohlke/imagecodecs/blob/5483bfbd4406379d639b07fdd24ede55da3acaa4/README.rst)

### wand

[GitHub](https://github.com/emcconville/wand) · [PyPI](https://pypi.org/project/wand/) · [Docs](http://docs.wand-py.org/)

Wand is a Python binding for ImageMagick that calls its MagickWand library through `ctypes`, Python's module for calling C libraries, which also lets it run on PyPy, an alternative Python interpreter. `Image(filename=...)` opens a file inside a `with` block, and methods such as `resize` and `save` work on it. ImageMagick itself is installed separately, such as the `libmagickwand-dev` package from APT on Debian and Ubuntu.

- Downloads / mo: 1.1M
- Stars: 1.5K
- Last release: 0.7.2, Jun 2026
- License: MIT
- Capabilities: [From the wand docs](https://docs.wand-py.org/en/latest/whatsnew/0.5.html)

**Strengths**

- **ImageMagick from Python.** Uses the same resize and crop syntax as the ImageMagick command line.
- **Format conversion with quality control.** Converts formats and sets output quality.
- **Converts formats with quality control.** Converts between formats and sets output quality for web and slide exports.

**Watch out for**

- **Needs ImageMagick installed.** Imports fail without ImageMagick on the system.
- **Needs hardening for uploads.** Untrusted files need a locked-down ImageMagick policy.
- **Slow on large photos.** Made a thumbnail about ten times slower than Pillow or OpenCV.

```sh
pip install wand
```

**hendrycks/robustness** (1.2K stars)

[hendrycks/robustness](https://github.com/hendrycks/robustness) adds motion blur to an image with ImageMagick through Wand, then decodes the result into an array.

```python
def motion_blur(x, severity=1):
    c = [(12,4), (17,6), (17, 9), (17,13), (22,16)][severity - 1]

    output = BytesIO()
    x.save(output, format='PNG')
    x = MotionImage(blob=output.getvalue())

    x.motion_blur(radius=c[0], sigma=c[1], angle=np.random.uniform(-45, 45))

    x = cv2.imdecode(np.fromstring(x.make_blob(), np.uint8),
                     cv2.IMREAD_UNCHANGED)

    if x.shape != (299, 299):
        return np.clip(x[..., [2, 1, 0]], 0, 255)  # BGR to RGB
    else:  # greyscale to RGB
        return np.clip(np.array([x, x, x]).transpose((1, 2, 0)), 0, 255)
```

[make_imagenet_c_inception.py · motion_blur()](https://github.com/hendrycks/robustness/blob/e0377d46411fa30c01a9559017bdb6a5f78d4abf/ImageNet-C/create_c/make_imagenet_c_inception.py#L365-L380) · pushed Aug 2022 · [More projects using wand →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20wand%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**hendrycks/robustness** (1.2K stars)

[hendrycks/robustness](https://github.com/hendrycks/robustness) draws a motion-blurred snow layer over an image, blurring the layer with Wand.

```python
def snow(x, severity=1):
    c = [(0.1, 0.3, 3, 0.5, 10, 4, 0.8),
         (0.2, 0.3, 2, 0.5, 12, 4, 0.7),
         (0.55, 0.3, 4, 0.9, 12, 8, 0.7),
         (0.55, 0.3, 4.5, 0.85, 12, 8, 0.65),
         (0.55, 0.3, 2.5, 0.85, 12, 12, 0.55)][severity - 1]

    x = np.array(x, dtype=np.float32) / 255.
    snow_layer = np.random.normal(size=x.shape[:2], loc=c[0], scale=c[1])  # [:2] for monochrome

    snow_layer = clipped_zoom(snow_layer[..., np.newaxis], c[2])
    snow_layer[snow_layer < c[3]] = 0

    snow_layer = PILImage.fromarray((np.clip(snow_layer.squeeze(), 0, 1) * 255).astype(np.uint8), mode='L')
    output = BytesIO()
    snow_layer.save(output, format='PNG')
    snow_layer = MotionImage(blob=output.getvalue())

    snow_layer.motion_blur(radius=c[4], sigma=c[5], angle=np.random.uniform(-135, -45))

    snow_layer = cv2.imdecode(np.fromstring(snow_layer.make_blob(), np.uint8),
                              cv2.IMREAD_UNCHANGED) / 255.
    snow_layer = snow_layer[..., np.newaxis]

    x = c[6] * x + (1 - c[6]) * np.maximum(x, cv2.cvtColor(x, cv2.COLOR_RGB2GRAY).reshape(299, 299, 1) * 1.5 + 0.5)
    return np.clip(x + snow_layer + np.rot90(snow_layer, k=2), 0, 1) * 255
```

[make_imagenet_c_inception.py · snow()](https://github.com/hendrycks/robustness/blob/e0377d46411fa30c01a9559017bdb6a5f78d4abf/ImageNet-C/create_c/make_imagenet_c_inception.py#L420-L445) · pushed Aug 2022 · [More projects using wand →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20wand%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from wand.image import Image
from wand.display import display

with Image(filename='mona-lisa.png') as img:
    print(img.size)
    for r in 1, 2, 3:
        with img.clone() as i:
            i.resize(int(i.width * r * 0.25), int(i.height * r * 0.25))
            i.rotate(90 * r)
            i.save(filename='mona-lisa-{0}.png'.format(r))
            display(i)
```

From [the docs](https://github.com/emcconville/wand/blob/e2c96b349d09d951f5e7e0a4fb9a2e788e31df32/docs/index.rst)

### pyvips

[GitHub](https://github.com/libvips/pyvips) · [PyPI](https://pypi.org/project/pyvips/)

pyvips is the Python binding for libvips. A program builds a pipeline of operations on a source image, and the pipeline runs only when the result is written. libvips then streams the image through it a section at a time, in parallel. Because libvips never loads an entire image into memory, memory use stays low on very large files. `pip install "pyvips[binary]"` installs a self-contained build with the most common libraries.

- Downloads / mo: 901.5K
- Stars: 816
- Last release: 3.2.0, Aug 2026
- License: MIT
- Capabilities: [From the pyvips docs](https://libvips.github.io/pyvips/intro.html)

**Strengths**

- **Fast with low memory.** About 3 times faster than ImageMagick, with 5 times less memory.
- **Handles huge images.** Processes images in sections instead of loading them whole.

**Watch out for**

- **Bundled build skips PDFs.** Reading PDFs needs a system-installed libvips.
- **Slower without a compiler.** Without a C compiler at install, it runs about 20% slower.

```sh
pip install pyvips
```

**zulip/zulip** (26.2K stars)

[zulip/zulip](https://github.com/zulip/zulip) crops and resizes an uploaded avatar to a square PNG with pyvips.

```python
def resize_avatar(image_data: bytes, size: int = DEFAULT_AVATAR_SIZE) -> bytes:
    # This will scale up, if necessary, and will scale the smallest
    # dimension to fit.  That is, a 1x1000 image will end up with the
    # one middle pixel enlarged to fill the full square.
    # The resizing dimensions should be kept in sync with the client-side
    # resizing code in web/upload_widget.ts.
    with libvips_check_image(image_data):
        return pyvips.Image.thumbnail_buffer(
            image_data,
            size,
            height=size,
            crop=pyvips.Interesting.CENTRE,
        ).write_to_buffer(".png")
```

[thumbnail.py · resize_avatar()](https://github.com/zulip/zulip/blob/5ccdbd66e5d4b6f481b05ad8a7e1b8cf9e369196/zerver/lib/thumbnail.py#L209-L221) · pushed Nov 2026 · [More projects using pyvips →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20pyvips%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**zulip/zulip** (26.2K stars)

[zulip/zulip](https://github.com/zulip/zulip) shrinks an uploaded logo to fit within maximum dimensions with pyvips, keeping its aspect ratio.

```python
def resize_logo(image_data: bytes) -> bytes:
    # This will only scale the image down, and will resize it to
    # preserve aspect ratio and be contained within the maximum logo
    # dimensions; it does not add any padding to make it exactly that
    # size.  A 2000x10 pixel image will end up as 1000x5; a 10x10 will
    # end up 10x10.
    # The resizing dimensions should be kept in sync with the client-side
    # resizing code in web/upload_widget.ts.
    with libvips_check_image(image_data):
        return pyvips.Image.thumbnail_buffer(
            image_data,
            MAX_REALM_LOGO_WIDTH,
            height=MAX_REALM_LOGO_HEIGHT,
            size=pyvips.Size.DOWN,
        ).write_to_buffer(".png")
```

[thumbnail.py · resize_logo()](https://github.com/zulip/zulip/blob/5ccdbd66e5d4b6f481b05ad8a7e1b8cf9e369196/zerver/lib/thumbnail.py#L228-L242) · pushed Nov 2026 · [More projects using pyvips →](https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20pyvips%20for%20image%20processing%3A%20resizing%2C%20cropping%2C%20filtering%2C%20and%20transforming%20images&filters=%7B%22highlights%22%3Atrue%2C%22numResults%22%3A10%2C%22type%22%3A%22auto%22%2C%22includeDomains%22%3A%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import pyvips

image = pyvips.Image.new_from_file('some-image.jpg', access='sequential')
image *= [1, 2, 1]
mask = pyvips.Image.new_from_array([
    [-1, -1, -1],
    [-1, 16, -1],
    [-1, -1, -1],
], scale=8)
image = image.conv(mask, precision='integer')
image.write_to_file('x.jpg')
```

From [the README](https://github.com/libvips/pyvips/blob/9699ee2833785e891456937ade107a8fba8795f7/README.rst)

## FAQ

### What is the best Python image processing library?

[Pillow](#pillow) is the usual default for opening, resizing, drawing on, and saving images, with 436.5M downloads a month. [OpenCV](#opencv-python) is faster at heavy filtering and adds computer vision and video. [pyvips](#pyvips) suits very large images, and [torchvision](#torchvision) suits PyTorch training pipelines.

### Pillow or OpenCV: which one to use?

Use [Pillow](#pillow) for opening, converting, resizing, drawing on, and saving images, including text, EXIF data, and color profiles. Use [OpenCV](#opencv-python) for computer vision, video, cameras, and heavy filtering. Both work with NumPy arrays, so many projects use the two together.

### Is OpenCV faster than Pillow?

Yes, on full-resolution work: a large blur ran 15 times faster in [OpenCV](#opencv-python) than in [Pillow](#pillow). For thumbnails the two run at about the same speed, once Pillow uses draft() to decode the JPEG at a smaller size.

### Which Python image library handles very large images?

[pyvips](#pyvips) processes images in sections instead of loading them whole, so it stays fast and uses little memory on huge files. It also suits batch thumbnailing. Its bundled build can't read PDFs, which needs a system-installed libvips.

### Which Python image libraries can read video?

[OpenCV](#opencv-python) and [torchvision](#torchvision) read video frames directly, and OpenCV also reads from cameras. [imageio](#imageio) reads and writes video through its FFmpeg plugin. [Pillow](#pillow) has no video or camera input.

### What is PIL in Python, and is it the same as Pillow?

PIL is the original Python Imaging Library, which stopped getting releases long ago. [Pillow](#pillow) is the maintained fork of PIL, so code still imports it under the name PIL. Install it with pip install pillow, and never install PIL in the same environment.

### What is OpenCV in Python?

OpenCV is a computer vision library, and [opencv-python](#opencv-python) installs it from pip as prebuilt wheels. It loads images as NumPy arrays and covers filtering, geometric transforms, feature detection, face detection, and video.

## How this page was built

Data checked Nov 10, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "open source Python libraries for image processing: resizing, cropping, filtering, and transforming images",
    "numResults": 20,
    "type": "auto",
    "includeDomains": [
      "github.com"
    ]
  }
}
```

The other calls behind this page:

```
POST /search
Query: Python image processing library package
Within: github.com
```

```
POST /contents
Reads: https://github.com/python-pillow/Pillow, https://python-pillow.org, https://pypi.org/project/pillow/
```

```
POST /answer
Query: Can the Python library Pillow (pillow on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library Pillow (pillow on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library Pillow (pillow on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library Pillow (pillow on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library Pillow (pillow) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses pillow for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/imageio/imageio, https://imageio.readthedocs.io, https://pypi.org/project/imageio/
```

```
POST /answer
Query: Can the Python library imageio (imageio on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library imageio (imageio on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library imageio (imageio on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library imageio (imageio on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library imageio (imageio) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses imageio for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/rishabh-16/cs231n-2019-assignments/blob/87c806f8619afed3e694409ea22bc338e406701a/assignment2/cs231n/data_utils.py
```

```
POST /contents
Reads: https://github.com/opencv/opencv-python, https://pypi.org/project/opencv-python/
```

```
POST /answer
Query: Can the Python library opencv-python (opencv-python on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library opencv-python (opencv-python on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library opencv-python (opencv-python on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library opencv-python (opencv-python on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library opencv-python (opencv-python) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses opencv-python for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/pytorch/vision, https://pytorch.org/vision, https://pypi.org/project/torchvision/
```

```
POST /answer
Query: Can the Python library torchvision (torchvision on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library torchvision (torchvision on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library torchvision (torchvision on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library torchvision (torchvision on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library torchvision (torchvision) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses torchvision for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/amaralibey/MixVPR/blob/31de0c35eef2c82589481293a200c9ff61741eb5/models/backbones/resnet.py
```

```
POST /contents
Reads: https://github.com/PacktPublishing/PyTorch-Computer-Vision-Cookbook/blob/d891fc586057e6678390c2c490f58438d0fef54d/Chapter10/myutils.py
```

```
POST /contents
Reads: https://github.com/jamesWalker55/comfyui-various/blob/50d23bdfc444af630cc6ec55319a50fac21b84ce/comfyui_image_ops.py
```

```
POST /contents
Reads: https://github.com/hrzhang1123/DTFD-MIL/blob/61f1ebf1f622fe9ed4093ee8455a581fc5ec3a0c/main_Extract_PerSlide.py
```

```
POST /contents
Reads: https://github.com/kornia/kornia, https://kornia.readthedocs.io, https://pypi.org/project/kornia/
```

```
POST /answer
Query: Can the Python library kornia (kornia on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library kornia (kornia on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library kornia (kornia on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library kornia (kornia on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library kornia (kornia) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses kornia for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/Comfy-Org/ComfyUI/blob/07dd46dc4abd9b6af81aae7c590a9a30d5a096c8/comfy_extras/nodes_morphology.py
```

```
POST /contents
Reads: https://github.com/lucidrains/DALLE2-pytorch/blob/0069857cf838ee2d1ae874df7829cb4324ac6127/dalle2_pytorch/dalle2_pytorch.py
```

```
POST /contents
Reads: https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/02999c896781ff8856695683246708aaab9f686b/art/attacks/evasion/graphite/utils.py
```

```
POST /contents
Reads: https://github.com/cgohlke/imagecodecs, https://pypi.org/project/imagecodecs/
```

```
POST /answer
Query: Can the Python library imagecodecs (imagecodecs on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library imagecodecs (imagecodecs on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library imagecodecs (imagecodecs on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library imagecodecs (imagecodecs on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library imagecodecs (imagecodecs) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses imagecodecs for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/emcconville/wand, http://docs.wand-py.org/, https://pypi.org/project/wand/
```

```
POST /answer
Query: Can the Python library wand (wand on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library wand (wand on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library wand (wand on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library wand (wand on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library wand (wand) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses wand for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/pierrechevalier83/ferris/blob/3b22f44e8018c14102108442ab2d5dcdc60a9839/automation/tools/PcbDraw/pcbdraw/pcbdraw.py
```

```
POST /contents
Reads: https://github.com/HazyResearch/pdftotree/blob/9ee8dec35e1963a9401f9c76e2e3f70c49292cdc/pdftotree/utils/display_utils.py
```

```
POST /contents
Reads: https://github.com/libvips/pyvips, https://pypi.org/project/pyvips/
```

```
POST /answer
Query: Can the Python library pyvips (pyvips on PyPI) read or process video files frame by frame, not only still images? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library pyvips (pyvips on PyPI) operate on images stored as NumPy arrays? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library pyvips (pyvips on PyPI) draw shapes or text onto an image? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: Can the Python library pyvips (pyvips on PyPI) process images on a GPU with CUDA? Answer from its own documentation.
Returns:
  - answer
  - how
  - evidence
```

```
POST /answer
Query: What output formats can the Python library pyvips (pyvips) read and write images as? Answer from its own documentation.
Returns:
  - formats
  - evidence
```

```
POST /search
Query: Python project that uses pyvips for image processing: resizing, cropping, filtering, and transforming images, application code
Within: github.com
```

```
POST /contents
Reads: https://github.com/m87-labs/moondream/blob/84663acafacc43cb7e98aa94d26f36587656b492/moondream/torch/image_crops.py
```

```
POST /contents
Reads: https://github.com/krateng/maloja/blob/a8293063a5e940104eae698b8ea7a232f7bc1714/maloja/server.py
```

```
POST /contents
Reads: https://github.com/barebaric/rayforge/blob/e6dfb53ad623db283d8c2b57e846c7929de9118f/rayforge/image/util/vips.py
```

```
POST /contents
Reads: https://github.com/ecometrica/gdal2mbtiles/blob/61661601dda0fb1b2f35aca5af33bba2b4586850/gdal2mbtiles/vips.py
```

```
POST /contents
Reads: https://github.com/samdobson/image_slicer/blob/a336e96848fcb5b918ea44721b40eefd5f42f3ad/src/image_slicer/slicer.py
```

Docs: https://exa.ai/docs/reference/search
