Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Merge requests
  • !252

More general to_nd_array

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/wecacuee/master into master Jul 12, 2017
  • Overview 0
  • Commits 7
  • Pipelines 0
  • Changes 2

Created by: wecacuee

More general to_nd_array that handles when plane.line_size != plane.width * channels, data_type.itemsize

Issue #95 (closed)

Test

>>> import av, urllib, PIL
>>> urllib.urlretrieve('http://fate.ffmpeg.org/fate-suite/png1/55c99e750a5fd6_50314226.png', '/tmp/000.png')
>>> frames = (p.decode_one() for p in av.open("/tmp/%03d.png").demux(video=(0,)))
>>> ndarrays = (f.to_nd_array() for f in frames if f is not None)
>>> np.all(np.array(PIL.Image.open("/tmp/000.png")) == next(ndarrays))
True
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/wecacuee/master