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
An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters.

Ascii Artist An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters. Installing Installing with

18 Jan 03, 2023
Quickly 'anonymize' all people in an image. This script will put a black bar over all eye-pairs in an image

Face-Detacher Quickly 'anonymize' all people in an image. This script will put a black bar over all eye-pairs in an image This is a small python scrip

Don Cato 1 Oct 29, 2021
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
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
Command line utility for converting images to seamless tiles

img2texture Command line utility for converting images to seamless tiles. The resulting tiles can be used as textures in games, compositing and 3D mod

Artёm IG 24 Dec 26, 2022
Simplest QRGenerator with a cool feature (-sh=True :D)

Simple QR-Codes Generator :D Generates QR-codes, nothing more and nothing less . How to use Just run ./install.sh to set all the dependencies up, th

RENNAARENATA 1 Dec 11, 2021
starfish is a Python library for processing images of image-based spatial transcriptomics.

starfish: scalable pipelines for image-based transcriptomics starfish is a Python library for processing images of image-based spatial transcriptomics

199 Dec 08, 2022
imgAnalyser - Un script pour obtenir la liste des pixels d'une image correspondant à plusieurs couleurs

imgAnalyser - Un script pour obtenir la liste des pixels d'une image correspondant à plusieurs couleurs Ce script à pour but, à partir d'une image, de

Théo Migeat 1 Nov 15, 2021
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
Program to export all new icons from the latest Fortnite patch

Assets Exporter This program allows you to generate all new icons of a patch in png! Requierements Python =3.8 (installed on your computer) If you wa

ᴅᴊʟᴏʀ3xᴢᴏ 6 Jun 24, 2022
Python Digital Art Generator

Python Digital Art Generator The main goal of this repository is to generate all possible layers permutations given by the user in order to get unique

David Cuentas Mar 3 Mar 12, 2022
Create a QR-code Generator app using only Python.

QR-code_Generator Create a QR-code Generator app using only Python. This apps generated a QR code for a single link. Libraryes used in this app -- py

Soham P Phasalkar 1 Oct 17, 2021
This piece of code is a User Welcomer with Image Manipulation using Python and Pillow (PIL).

This piece of code is a User Welcomer with Image Manipulation using Python and Pillow (PIL).

Bero 4 Jan 11, 2022
Pythonocc nodes for Ryven

Pythonocc-nodes-for-Ryven Pythonocc nodes for Ryven Here a way to work on Pythonocc with a node editor, Ryven in that case. To get it functional you w

Tanneguy 30 Dec 18, 2022
A sketch like(?) effect for images

lineArt A sketch like(?) effect for images How to run main.py [filename] [option {1,2}] option 1 retains colour option 2 gives gray image #results ori

1 Oct 28, 2021
SGTL - Spectral Graph Theory Library

SGTL - Spectral Graph Theory Library SGTL is a python library of spectral graph theory methods. The library is still very new and so there are many fe

Peter Macgregor 6 Oct 01, 2022
An add to make adding screenshots and copied images to the scene easy

Blender Clipboard to Scene It doesn't work with version 2.93 and higher (I tested it on 2.91 and 2.83) There is an issue with importing the Pillow mod

Mohammad Mehdi Afkhami 3 Dec 29, 2021
LGVL helper script to batch and convert with lvgl offline image converter

script to batch and convert with lvgl offline image converter

Yohann 1 Oct 05, 2022
A Python package implementing various HDRI / Radiance image processing algorithms.

Colour - HDRI A Python package implementing various HDRI / Radiance image processing algorithms. It is open source and freely available under the New

colour-science 111 Dec 06, 2022
Simple Python package to convert an image into a quantized image using a customizable palette

Simple Python package to convert an image into a quantized image using a customizable palette. Resulting image can be displayed by ePaper displays such as Waveshare displays.

Luis Obis 3 Apr 13, 2022