PyPixelArt - A keyboard-centered pixel editor

Overview

PyPixelArt - A keyboard-centered pixel editor

pypixelart-compressed

The idea behind PyPixelArt is uniting:

  • a cmdpxl inspired pixel image editor applied to pixel art.
  • vim 's keyboard-centered approach to improve productivity. Pretty hard to do with an image editor, but it'll be fun to try xD
  • Some very useful functionalities from aseprite and other pixel art editors, such as screen symmetry.

Features and keybindings

  • Draw : i
  • Erase: x
  • Undo: u
  • Save: w
  • Zoom: n, b
  • Move Cursor: k, j, l, h
  • Grid: g
  • Symmetry: s
  • Color selection: c
  • Color: 1, 2, 3, 4, 5, 6
  • Help: Space

Installation

Install the package with:

pip install pypixelart

Usage

Run with pypixelart.

You can also specify the file path and resolution: for example, to create a new image that is 20px wide and 10px tall you can use

pypixelart -f new_image.png -res 20,10

To get the full list of options:

$ pypixelart --help
Usage: pypixelart [OPTIONS]

Options:
  -f, --filepath PATH      Path for the file you want to open
  -res, --resolution TEXT  Image height and width separated by a comma, e.g.
                           20,10 for a 20x10 image. Note that no spaces can be
                           used.
  --help                   Show this message and exit.

Contribute!

Any contributions and forks and welcomed and encouraged!

Here's how you can contribute:

  • Fork the repository
  • Mess around with the code and use black to format it
  • Submit a Pull Request.
Comments
  • Fixed a bug where symmetric pixels wouldn't be drawn or erased if the corresponding pixel was already colored or blank, respectively.

    Fixed a bug where symmetric pixels wouldn't be drawn or erased if the corresponding pixel was already colored or blank, respectively.

    #13

    What does this implement?

    This expands fixes a bug where symmetric pixels wouldn't be drawn or erased if the corresponding pixel was already colored or blank, respectively.

    opened by arthurcamposs 2
  • Allow drawing symmetric pixel when the pixel at the cursor has the same color

    Allow drawing symmetric pixel when the pixel at the cursor has the same color

    After drawing a pixel, setting symmetry on and drawing again the symmetric pixel is not drawn. This happens because of the validation that returns from the draw_pixel function if the current pixel is already of the same color. Fix it so that it is possible to draw a symmetric pixel if the pixel at the cursor already is of that color.

    bug good first issue 
    opened by douglascdev 1
  • Added symmetry functionality to the erase_pixel function.

    Added symmetry functionality to the erase_pixel function.

    #18

    What does this implement?

    This expands the symmetry functionality — that was already present in the draw_pixel function — to the erase_pixel function.

    opened by arthurcamposs 0
  • Rework the undo function

    Rework the undo function

    The current implementation of the undo function is not following the proper design pattern for it and works by indefinitely copying the image into a list, which is very inefficient and problematic. Rework the function following the proper pattern, improving memory efficiency, and limiting the number of times the undo can be done. A redo keybinding would be great as well, but not necessary.

    enhancement 
    opened by douglascdev 0
  • Use lines to draw grid

    Use lines to draw grid

    The draw_grid function works in a very inefficient manner, by drawing a square for every pixel. Draw it using lines instead, creating horizontal and vertical lines covering the whole grid.

    enhancement good first issue 
    opened by douglascdev 0
  • Improve zoom's initialization value

    Improve zoom's initialization value

    The current zoom value is initialized to a fixed value of 1000% of the image size. For very small images this makes the UI text clip, and for big images, the image overflows the screen. To avoid this, initialize the zoom value to make the image take a portion of the current screen size.

    enhancement good first issue 
    opened by douglascdev 0
  • Add logging

    Add logging

    The package was made without the use of logging, which is really bad for debugging and maintenance in general, so for this issue:

    • Create a click command-line option to pass the logging level.
    • Add logging to track application events.
    enhancement 
    opened by douglascdev 0
  • Inform the user when saving an image

    Inform the user when saving an image

    ~~The current saving function writes to the console to say the image was saved. It should show a dialog with text saying whether it saved successfully(and the path, if so) or if there was an error, say so and log the exception.~~

    Instead of a dialog, it would make more sense to do it like vim and show the message in #15's input after writing :w, so this issue now depends on #15 being completed.

    enhancement good first issue 
    opened by douglascdev 1
  • Load palettes from lospec API

    Load palettes from lospec API

    Use the lospec API to load and save palettes to JSON files. Depends on #15 because this'll work with a command and on #6 because currently, the palettes are built-in, not loaded from files.

    enhancement 
    opened by douglascdev 0
  • Add an input field to enter commands

    Add an input field to enter commands

    When the user presses escape or CTRL + c, show an input field at the bottom of the screen that gets input, just like vim's. Close if one of the buttons to show it is pressed again. If enter is pressed, try to run the command and show an error message where the input is if the command errors out or doesn't exist. No commands need to be implemented yet, just make a working input field.

    enhancement 
    opened by douglascdev 0
  • Navigation improvements

    Navigation improvements

    Add more vim navigation keybindings:

    • $ or A to go to the end of a row
    • G to go the bottom left, num + G to go to the num row
    • num + h / j / k / l to move num in any direction
    • 0 to go to the start of a line Depends on #5 because of keybinding conflicts
    enhancement 
    opened by douglascdev 0
Owner
Douglas
Douglas
Image-Viewer is a Windows image viewer based on Python 3.

Image-Viewer Hi! Image-Viewer is a Windows image viewer based on Python 3. Using You must download Image-Viewer.exe from the root of the repository. T

2 Apr 18, 2022
利用近邻法的弱点实现图片缩小后变成另一张图

这是我一个视频的配套代码。 视频是:利用近邻法的弱点实现图片缩小后变成另一张图 https://www.bilibili.com/video/BV1Lf4y1r7dZ 配套代码中,仅generate.py是核心文件,其余的图片神马的,都是赠品。 这个核心文件利用了近邻法缩放的弱点,可以将图a的像素按

偶尔有点小迷糊 182 Dec 19, 2022
reversable image censoring tool

StupidCensor a REVERSABLE image censoring tool to reversably mosiac censor jpeg files to temporarily remove image details not allowed on most websites

2 Jan 28, 2022
Maze generator with most popular shapes - hexagon, triangle, square

Maze-Generator Maze generator with most popular shapes - hexagon, triangle, square (sqaure not implemented yet): Theory: Planar Graph https://en.wikip

Kacper Plesiak 2 Dec 28, 2021
A Python Script to convert Normal PNG Image to Apple iDOT PNG Image.

idot-png-encoder A Python Script to convert Normal PNG Image to Apple iDOT PNG Image (Multi-threaded Decoding PNG). Usage idotpngencoder.py -i inputf

Lrdcq 2 Feb 17, 2022
ScreenTeX is a tool that grabs all text when taking a screenshot rather than getting an image.

The ScreenTeX project By: Seanpm2001 / ScreenTeX, Et; Al. Top README.md Read this article in a different language 🌐 List of languages Sorted by: A-Z

Sean P. Myrick V19.1.7.2 3 Oct 25, 2022
Blender addon to generate better building models from satellite imagery.

Blender addon to generate better building models from satellite imagery.

Ivan Ereshchenko 24 Apr 14, 2022
Rotates your images in the spirit of rot13

Image Rotator (imrot10) Its like rot13 but for images. Calling the algorithm imrot10 for im = image, rot = rotation, 10 = default magnitude. Unfortuna

Sarah 2 Dec 10, 2021
PyPixelArt - A keyboard-centered pixel editor

PyPixelArt - A keyboard-centered pixel editor The idea behind PyPixelArt is uniting: a cmdpxl inspired pixel image editor applied to pixel art. vim 's

Douglas 18 Nov 14, 2022
A pure python implementation of the GIMP XCF image format. Use this to interact with GIMP image formats

Pure Python implementation of the GIMP image formats (.xcf projects as well as brushes, patterns, etc)

FHPyhtonUtils 8 Dec 30, 2022
python binding for libvips using cffi

README PyPI package: https://pypi.python.org/pypi/pyvips conda package: https://anaconda.org/conda-forge/pyvips We have formatted docs online here: ht

libvips 467 Dec 30, 2022
PyLibTiff - a wrapper to the libtiff library to Python using ctypes

PyLibTiff is a package that provides: a wrapper to the libtiff library to Python using ctypes. a pure Python module for reading and writing TIFF and L

Pearu Peterson 105 Dec 21, 2022
Gallery written in Python to manage your photos

GalleryMan Gallery written in Python to manage your photos Installation

Asian Cat 24 Dec 18, 2022
This script is for photographers to do timeslice with one click.

One Click TimeSlice Tool What is this for This is for photographers who want to create TimeSlice pictures without installing PS plugins. Before using

Xi Zhao 13 Sep 23, 2022
Python wrappers for external BART computational imaging tools and internal libraries

bartpy Python bindings for BART. Overview This repo contains code to generate an updated Python wrapper for the Berkeley Advance Reconstruction Toolbo

Max Litster 7 May 09, 2022
A simple programming language for manipulating images.

f-stop A simple programming language for manipulating images. Examples OPEN "image.png" AS image RESIZE image (300, 300) SAVE image "out.jpg" CLOSE im

F-Stop 6 Oct 27, 2022
Kimimaro: Skeletonize Densely Labeled Images

Kimimaro: Skeletonize Densely Labeled Images # Produce SWC files from volumetric images. kimimaro forge labels.npy --progress # writes to ./kimimaro_o

92 Dec 17, 2022
Viewer for NFO files

NFO Viewer NFO Viewer is a simple viewer for NFO files, which are "ASCII" art in the CP437 codepage. The advantages of using NFO Viewer instead of a t

Osmo Salomaa 114 Dec 29, 2022
Open source software for image correlation, distance and analysis

Douglas-Quaid Project Open source software for image correlation, distance and analysis. Strongly related to : Carl-Hauser Problem statement (@CIRCL)

Dominik Dancs 2 May 01, 2022