{ "info": { "author": "Roman Dobosz", "author_email": "gryf73@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2 :: Only", "Topic :: Multimedia :: Graphics", "Topic :: Multimedia :: Graphics :: Graphics Conversion" ], "description": "======\nC64img\n======\n\nC64img is a python package which provides an abstraction layer for creating\nimages which Commodore 64 understands. This is especially useful in converting\nimages created on PC graphics tools, with C64 limitation in mind.\n\nThis project was inspired by `PNG2HIRES_ v0.2 gfx format converter`_ /enthusi\n(onslaught), which was initially used as simple graphics converter between\nPNG/GIF images to C64 hires (Art studio + executable). It evolved to bunch of\nmodules, which have own purposes - from simply converting graphics, to\ngenerating data for C64 programs written in cross compilers, or even generating\ndata for memory optimised animations out of sequence of images.\n\nImage2c64\n=========\n\nImage2c64 is a frontend program to ``c64img`` module, which can converts\nvirtually any image supported by `Pillow`_ to C64 hires or multicolor formats.\nBest results are achieved with filetypes PNG or GIF.\n\nAs an input 320x200 (multicolor or hires) or 160x200 (mutlicolor) picture is\nexpected. Mutlicolor pictures will be scaled down to 160x200. Picture will be\nconverted to 16 colors. During that process some information can be lost, if\nused more than 16 colors.\n\nRequirements:\n-------------\n\n+ `Python 2.7`_\n+ `Pillow`_ module\n\n\nInstallation\n------------\n\nLike other standard Python pro programs, ``c64img`` provide a convenient way to\ninstall using `setuptools`_, so the procedure will look like:\n\n.. code:: shell-session\n\n $ python setup.py install\n\nor, `pip`_ might be used as well:\n\n.. code:: shell-session\n\n $ pip install -e /path/to/c64img_repository\n\nor, you can grab latest stable version from `pypi`_:\n\n.. code:: shell-session\n\n $ pip install c64img\n\nfinally, if you prefer to use virtualenv:\n\n.. code:: shell-session\n\n $ virtualenv -p python2 venvname\n $ source venvname/bin/activate\n (venvname) $ pip install c64img\n\nAfter that, you should be able to access ``image2c64`` script or import\n``c64img`` module in Python interpreter.\n\nUsage:\n------\n\nFirst of all, check up the switches program provides:\n\n.. code:: shell-session\n\n $ image2c64 --help\n\nBesides fine-tuning options like ``-b``/``--border`` for selecting border\ncolor, ``-g``/``--background`` for selecting background color, it allows to\nselect aprorpiate output format:\n\n- *multi* - for pure data located at ``$6000``\n- *hires* - same, but for hires bitmap and colors (``$2000``)\n- *koala* - multicolor bitmap in Koala format\n- *art-studio-hires* - high resolution bitmap in Art Studio format (hires\n version)\n\nThose formats should be passed using ``-f``/``--format`` parameter.\n\nFurthemore two more switches can be used for output format:\n\n- *raw* (``-r``, ``--raw``) - this will produce four files (*prefix* is\n obtained from the input image file name, or by using ``-o`` switch for\n output):\n\n - ``prefix_bg.raw`` 1-byte file with background color,\n - ``prefix_screen.raw`` - screen colors (usually placed at $0400),\n - ``prefix_color-ram.raw`` - additional 3rd color (supposed to be placed at\n ``$d800``)\n - and finally ``prefix_bitmap.raw`` - with bitmap matrix of the picture\n\n- *executable* - produces *prg* which can be executed on emulator or real C64.\n Note, that this is just a image data and little displayer added to the image\n data.\n\nFor example:\n\n+ Convert PNG image to koala with detailed log:\n\n .. code:: shell-session\n\n $ image2c64 -vv -f koala image.png\n\n Output will be written to ``image.prg``.\n\n+ Convert GIF image to executable hires image, and write output to\n ``output.prg`` file:\n\n .. code:: shell-session\n\n $ image2c64 -f hires -x -o output.prg image.gif\n\n+ Convert several images to raw data. Put the files in ``out`` directory:\n\n .. code:: shell-session\n\n $ image2c64 -f multi -r -o out image.png image1.gif image2.gif image3.gif\n\nParameter ``-v``/``-verbose`` can be use multiple times (effective, maximum\namount is double v) which increase verbosity of the output. Using\n``-q``/``--quiet`` have opposite effect - it will suppress the output.\n\nColor clashes\n.............\n\nScript can make several things in case of color clashes. In C64 graphics modes\nyou cannot put pixels in as one like, since there was hardware limitations\n(memory, processing power etc), which provided to restrictions in graphics\nmodes. For example, in standard hires mode (320x200) it is impossible to use\nmore than 2 colors in 8x8 pixel area.\n\nUnderneath, c64img provides several options for color clash situation. By using\n``-e``/``--errors`` switch with one of the following parameter, user can\ninfluence conversion process in case of clashes/errors:\n\n- no parameter or ``none`` - raport it on the console\n- ``show`` - will display it - every wrong area will be marked with red\n rectangle\n- ``save`` - will produce file with suffix ``_error.png`` next to original file\n- ``grafx2`` - will save the error file, and open `grafx2`_ image editor with\n original image in front screen and error image on the spare screen. This is\n useful for manual clash corrections. Executable ``grafx2`` must be reachable\n by the environment variable ``PATH``.\n- ``fix`` - will **try** to fix the clashes. Note, that this method is pretty\n na\u00efve - the approximation of the colors is coarse, and may produce strange\n results.\n\nExample of output for ``save`` and ``fix`` arguments for ``--error`` parameter:\n\n.. code:: shell-session\n\n $ ./image2c64 -f multi -x -e save test_images/clash.multi.png\n ERROR: Too many colors per block in char 10, 11 near x=76, y=84.\n ERROR: Too many colors per block in char 11, 13 near x=84, y=100.\n ERROR: Too many colors per block in char 12, 15 near x=92, y=116\n $ ./image2c64 -f multi -x -e fix test_images/clash.multi.png\n WARNING: Cannot remap color; using background - 'Light green'\n $\n\nChanges\n-------\n\n+ 2018-06-12 Added information about possibility to convert picture to chars\n (no conversion! Just an info in log!)\n+ 2015-09-10 Rearranged repository into separate modules for maintainability\n+ 2014-11-16 Added mechanism for automatic clashes fix\n+ 2014-11-11 Fixed issue with color clash check in multicolor\n+ 2014-11-11 Added ``grafx2`` option into error param. In such case image will\n be opened in `grafx2`_ program alongside with the error pic on spare screen.\n+ 2014-02-09 Rewrite the core of the converter (introduced *char* abstraction),\n added ability to convert sequence of images.\n+ 2012-11-20 Added executable output format for multicolor\n+ 2012-11-19 Added multicolor support, changes to the docstrings\n+ 2012-11-18 First public release\n\nLicence\n-------\n\nThis software is licensed under 3-clause BSD license. See LICENSE file for\ndetails.\n\n\n.. _PNG2HIRES_ v0.2 gfx format converter: http://www.atlantis-prophecy.org/onslaught/legal.html\n.. _pillow: https://github.com/python-imaging/Pillow\n.. _grafx2: http://grafx2.chez.com\n.. _python 2.7: https://www.python.org\n.. _setuptools: https://pypi.python.org/pypi/setuptools\n.. _pip: https://github.com/pypa/pip\n.. _pypi: https://pypi.org\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://bitbucket.org/gryf/image2c64.git", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/gryf/image2c64", "keywords": "c64,image,converter,koala,Art Studio,raw", "license": "", "maintainer": "", "maintainer_email": "", "name": "c64img", "package_url": "https://pypi.org/project/c64img/", "platform": "", "project_url": "https://pypi.org/project/c64img/", "project_urls": { "Download": "https://bitbucket.org/gryf/image2c64.git", "Homepage": "https://bitbucket.org/gryf/image2c64" }, "release_url": "https://pypi.org/project/c64img/3.1/", "requires_dist": [ "Pillow" ], "requires_python": "", "summary": "Image processing and converter for C64 graphic formats", "version": "3.1" }, "last_serial": 3971027, "releases": { "3.1": [ { "comment_text": "", "digests": { "md5": "f0e1d410bd0d2cd0057827119b64ccb4", "sha256": "439a9888ab83dfa07d64b44286ca4e760fe6633b126edc913dd069da826ab7ac" }, "downloads": -1, "filename": "c64img-3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f0e1d410bd0d2cd0057827119b64ccb4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17926, "upload_time": "2018-06-17T13:02:31", "url": "https://files.pythonhosted.org/packages/a0/1f/62b310aa15998fffc14ca4ce8caf30dc42d676d9138daaa307dc14c616e1/c64img-3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8d821738ec3f6efaced4a8322fe6169", "sha256": "f75501afe6d6c1c3251283c7a1abee3cac4e9c8d7b464d770b3e90dfbb26988f" }, "downloads": -1, "filename": "c64img-3.1.tar.gz", "has_sig": false, "md5_digest": "d8d821738ec3f6efaced4a8322fe6169", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15020, "upload_time": "2018-06-17T13:02:33", "url": "https://files.pythonhosted.org/packages/b0/e6/4b9efb98ab2ef8c60b53d55a8b37d942d9dce193d0d581ecc5342a9943e7/c64img-3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f0e1d410bd0d2cd0057827119b64ccb4", "sha256": "439a9888ab83dfa07d64b44286ca4e760fe6633b126edc913dd069da826ab7ac" }, "downloads": -1, "filename": "c64img-3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f0e1d410bd0d2cd0057827119b64ccb4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17926, "upload_time": "2018-06-17T13:02:31", "url": "https://files.pythonhosted.org/packages/a0/1f/62b310aa15998fffc14ca4ce8caf30dc42d676d9138daaa307dc14c616e1/c64img-3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8d821738ec3f6efaced4a8322fe6169", "sha256": "f75501afe6d6c1c3251283c7a1abee3cac4e9c8d7b464d770b3e90dfbb26988f" }, "downloads": -1, "filename": "c64img-3.1.tar.gz", "has_sig": false, "md5_digest": "d8d821738ec3f6efaced4a8322fe6169", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15020, "upload_time": "2018-06-17T13:02:33", "url": "https://files.pythonhosted.org/packages/b0/e6/4b9efb98ab2ef8c60b53d55a8b37d942d9dce193d0d581ecc5342a9943e7/c64img-3.1.tar.gz" } ] }