Skip to main content

Python3 module to check for corrupted images using "identify" from ImageMagick as underlying mechanism.

Project description

checkcorruptedimages

Python3 module to check for corrupted images using "identify" from ImageMagick as underlying mechanism.

Installation

Install with pip

pip3 install -U checkcorruptedimages

Usage

In [1]: import checkcorruptedimages

In [2]: from pathlib import Path

In [3]: m = checkcorruptedimages.CheckCorruptedImages()

In [4]: m.verbose = True

In [5]: m.get_corrupted_images(
    folder_to_check=Path("/home/user/Pictures"),
    file_extensions_list=["jpg"]
    )

Path: /home/user/Pictures/notcorruptedimage.jpg, corrupted: False
Path: /home/user/Pictures/corruptedimage.jpg, corrupted: True
Out[5]: [PosixPath('/home/user/Pictures/corruptedimage.jpg'),
    PosixPath('/home/user/Pictures/corruptedimage2.jpg'
    ]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checkcorruptedimages-0.2.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file checkcorruptedimages-0.2.tar.gz.

File metadata

  • Download URL: checkcorruptedimages-0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for checkcorruptedimages-0.2.tar.gz
Algorithm Hash digest
SHA256 32de879c110b6cf0fc51282a97e0ec23edb71792a57ef8e10224f35ca36792d8
MD5 d175e1455996677207412d5d17ac21ec
BLAKE2b-256 030397247f4921da849fb89c4ef0a7ce4eee4fedf84916617b19968f3dc0ec43

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page