Skip to content

Tool to split comic strip images into individual rows or frames.

License

Notifications You must be signed in to change notification settings

mozillamonks/snipstrip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

snipstrip.py
------------
This module provides the ComicPage class which exports methods to split images
of comic pages into individual rows or frames thus making it easier to read
comics on handheld devices such as mobile phones, PDAs and handheld multimedia
players.

API Usage:
----------

Initialization:
>>> from snipstrip import ComicPage
>>> p = ComicPage('some_comic.png')

To snip off the rows within the comic page ...
>>> rows = p.get_by_row()           # returns all the rows from the comic
>>> for row in rows:
...    p.page.crop(row).show()      # displays snipped rows in sequence
...

To snip the frames of any row
>>> frames = p.get_by_frame(row)    # returns all the frames from the row
>>> for frame in p.frames[row]:
...    self.page.crop(frame).show() # displays snipped frames
...

To 'parse' the entire ComicPage in one go
>>> p.process()  # call p.get_by_frame() over all p.get_by_row() rows

CLI Usage:
----------

$ python snipstrip.py <filename> [...]

where arguments are comic strip images

TODO:
-----

- Distutils-lify the module
- Complete the dump() method to serialize the process()ed data

CONTACT:
--------

Project Home: http://code.google.com/p/snipstrip/
Author: Steven Fernandez <[email protected]>

About

Tool to split comic strip images into individual rows or frames.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages