You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Joint between PyPNG module and 3D nested list data structures.
4
-
NOTE: This is special Python 3.4 version!
3
+
"""
4
+
============
5
+
PNG-list-PNG
6
+
============
7
+
--------------------------------------
8
+
Joint between PyPNG and other programs
9
+
--------------------------------------
10
+
11
+
Created by: `Ilya Razmanov<mailto:ilyarazmanov@gmail.com>`_
12
+
aka `Ilyich the Toad<mailto:amphisoft@gmail.com>`_.
5
13
6
14
Overview
7
15
---------
8
16
9
-
`pnglpng` (png-list-png) is a suitable joint between PyPNG and other Python programs, providing data conversion from/to used by PyPNG to/from understandable by ordinary average human.
17
+
**pnglpng** (png-list-png) is a suitable joint between `PyPNG`_
18
+
and other Python programs, providing data conversion from/to used by PyPNG
19
+
to/from understandable by ordinary average human.
10
20
11
-
- `png2list`: reading PNG file and returning all data.
12
-
- `list2png`: getting data and writing PNG file.
13
-
- `create_image`: creating empty nested 3D list for image representation.
21
+
Functions included are:
22
+
23
+
:png2list: reading PNG file and returning all data;
24
+
:list2png: getting data and writing PNG file;
25
+
:create_image: creating empty nested 3D list for image representation.
14
26
15
27
Installation
16
28
-------------
17
-
Should be kept together with png.py module. See `import` for detail.
29
+
30
+
Should be kept together with ``png.py`` module. See ``import`` for detail.
18
31
19
32
Usage
20
33
------
21
-
After `import pnglpng`, use something like:
22
-
23
-
`X, Y, Z, maxcolors, list_3d, info = pnglpng.png2list(in_filename)`
24
-
25
-
for reading data from `in_filename` PNG, where:
26
-
27
-
- `X`, `Y`, `Z` - image dimensions (int);
28
-
- `maxcolors` - number of colors per channel for current image (int);
29
-
- `list_3d` - image pixel data as list(list(list(int)));
30
-
- `info` - PNG chunks like resolution etc (dictionary);
31
-
32
-
and:
33
34
34
-
`pnglpng.list2png(out_filename, list_3d, info)`
35
+
After ``import pnglpng``, use something like
35
36
36
-
for writing data to `out_filename` PNG.
37
+
::
37
38
38
-
Copyright and redistribution
39
-
-----------------------------
40
-
Written by `Ilya Razmanov <https://dnyarri.github.io/>`_ to simplify working with PyPNG module.
41
-
May be freely used and redistributed.
39
+
X, Y, Z, maxcolors, list_3d, info = pnglpng.png2list(in_filename)
0 commit comments