Coder Social home page Coder Social logo

meocong / imageio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imageio/imageio

0.0 0.0 0.0 3.34 MB

Python library for reading and writing image data

Home Page: https://imageio.readthedocs.io

License: BSD 2-Clause "Simplified" License

Python 99.45% PowerShell 0.55%

imageio's Introduction

IMAGEIO

CI CD codecov Docs

Supported Python Versions PyPI Version PyPI Downloads DOI

Website: https://imageio.readthedocs.io/

Imageio is a Python library that provides an easy interface to read and write a wide range of image data, including animated images, video, volumetric data, and scientific formats. It is cross-platform, runs on Python 3.7+, and is easy to install.

Professional support is available via Tidelift and xs:code.

Example

Here's a minimal example of how to use imageio. See the docs for more examples.
import imageio
im = imageio.imread('imageio:chelsea.png')  # read a standard image
im.shape  # im is a NumPy array
>> (300, 451, 3)
imageio.imwrite('~/chelsea-gray.jpg', im[:, :, 0])

API in a nutshell

As a user, you just have to remember a handful of functions:
  • imread() and imwrite() - for single images
  • mimread() and mimwrite() - for image series (animations)
  • volread() and volwrite() - for volumetric image data
  • get_reader() and get_writer() - for more control (e.g. streaming or compression)
  • See the API docs for more information

Features

  • Simple interface via a concise set of functions
  • Easy to install using Conda or pip
  • Few dependencies (only NumPy and Pillow)
  • Pure Python, runs on Python 3.7+, and PyPy
  • Cross platform, runs on Windows, Linux, macOS
  • Lots of supported formats
  • Read/Write support for various [resources](https://imageio.readthedocs.io/en/stable/getting_started/requests.html) (files, URLs, bytes(), file objects, ...)
  • Code quality is maintained via continuous integration and continous deployment

Dependencies

Minimal requirements:

  • Python 3.7+
  • NumPy >=1.20.0
  • Pillow >= 8.3.2

Optional Python packages:

  • imageio-ffmpeg (for working with video files)
  • itk or SimpleITK (for ITK plugin)
  • astropy (for FITS plugin)
  • osgeo (for GDAL plugin)
  • imageio-flif (for working with FLIF image files)

Citing imageio

If you use imageio for scientific work, we would appreciate a citation. We have a DOI!

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

ImageIO for enterprise

Available as part of the Tidelift Subscription.

The maintainers of imageio and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Details

The core of ImageIO is a set of user-facing APIs combined with a plugin manager. API calls choose sensible defaults and then call the plugin manager, which deduces the correct plugin/backend to use for the given resource and file format. The plugin manager then adds sensible backend-specific defaults and then calles one of ImageIOs many backends to perform the actual loading. This allows ImageIO to take care of most of the gory details of loading images for you, while still allowing you to customize the behavior when and where you need to. You can find a more detailed explanation of this process in [our documentation](https://imageio.readthedocs.io/en/stable/getting_started/overview.html).

Contributing

We welcome contributions of any kind. Here are some suggestions on how you are able to contribute

  • add missing formats to the format list
  • suggest/implement support for new backends
  • report/fix any bugs you encounter while using ImageIO

To assist you in getting started with contributing code, take a look at the development section of the docs. You will find instructions on setting up the dev environment as well as examples on how to contribute code.

imageio's People

Contributors

actions-user avatar almarklein avatar anntzer avatar arashrai avatar blink1073 avatar clbarnes avatar dennisvang avatar firefoxmetzger avatar geyang avatar ghisvail avatar ginggs avatar hmaarrfk avatar hugovk avatar jackwalker64 avatar jni avatar jnises avatar joesingo avatar kmilos avatar landingellipse avatar lschr avatar niklasrosenstein avatar organicirradiation avatar paulmueller avatar rreilink avatar scivision avatar sunpoet avatar tdsmith avatar thewtex avatar west-rynes avatar zulko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.