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
Pixel art as well as various sets for hand crafting

Pixel art as well as various sets for hand crafting

null 1 Nov 9, 2021
Pixel Brush Processing Unit

Pixel Brush Processing Unit The Pixel Brush Processing Unit (PBPU for short) is a simple 4-Bit CPU I designed in Logisim while I was still in school a

Pixel Brush 2 Nov 3, 2022
👾 Python project to help you convert any image into a pixel art.

?? Pixel Art Generator Python project to help you convert any image into a pixel art. ⚙️ Developer's Guide Things you need to get started with this co

Atul Anand 6 Dec 14, 2022
sK1 2.0 cross-platform vector graphics editor

sK1 2.0 sK1 2.0 is a cross-platform open source vector graphics editor similar to CorelDRAW, Adobe Illustrator, or Freehand. sK1 is oriented for prepr

sK1 Project 238 Dec 4, 2022
An open source image editor which can manipulate an image in many ways!

Image Editor - An open source image editor which can manipulate an image in many ways! If you need any more modes in repo or I

TroJanzHEX 44 Nov 17, 2022
cmdpxl: a totally practical command-line image editor

cmdpxl: a totally practical command-line image editor Features cmdpxl has many exciting functionalities, including Editing pixels one at a time! Savin

Jieruei Chang 475 Dec 23, 2022
a lite weight photo editor written in python for day to day photo editing!

GNU-PhotoShop A lite weight Photo editing Program (currently CLI only) written in python3 for day to day photo editing. Disclaimer : Currently we don'

Kunal Sharma 5 May 30, 2022
Next-generation of the non-destructive, node-based 2D image graphics editor

Non-destructive, node-based 2D image graphics editor written in Python, focused on simplicity, speed, elegance, and usability

Gimel Studio 238 Dec 30, 2022
GTK and Python based, simple multiple image editor tool

System Monitoring Center GTK3 and Python3 based, simple multiple image editor tool. Note: Development of this application is not completed yet. The ap

Hakan Dündar 1 Feb 2, 2022
Brogrammer-keyboard - FIrmware for the Brogrammer Keyboard v1.0

Brogrammer Keyboard Firmware The package contains the firmware that runs on the Brogrammer Keyboard v1.0 See https://imgur.com/a/oY5QZ14 This keyboard

Devin Hartleben 1 Apr 21, 2022
[IROS'21] SurRoL: An Open-source Reinforcement Learning Centered and dVRK Compatible Platform for Surgical Robot Learning

SurRoL IROS 2021 SurRoL: An Open-source Reinforcement Learning Centered and dVRK Compatible Platform for Surgical Robot Learning Features dVRK compati

Med-AIR@CUHK 55 Jan 3, 2023
SQL centered, docker process running game

REQUIREMENTS Linux Docker Python/bash set up image "docker build -t game ." create db container "run my_whatever/game_docker/pdb create" # creating po

null 1 Jan 11, 2022
HSC4D: Human-centered 4D Scene Capture in Large-scale Indoor-outdoor Space Using Wearable IMUs and LiDAR. CVPR 2022

HSC4D: Human-centered 4D Scene Capture in Large-scale Indoor-outdoor Space Using Wearable IMUs and LiDAR. CVPR 2022 [Project page | Video] Getting sta

null 51 Nov 29, 2022
OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality video editing and animation solutions to the world.

OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality v

OpenShot Studios, LLC 3.1k Jan 1, 2023
Python-Text-editor: a simple text editor on Python and Tkinter

Python-Text-editor This is a simple text editor on Python and Tkinter. The proje

Innokentie 1 Jan 3, 2022
Hook and simulate global keyboard events on Windows and Linux.

keyboard Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.

BoppreH 3.2k Dec 30, 2022
A module for cross-platform control of the mouse and keyboard in python that is simple to install and use.

PyUserInput PyUserInput is a group project so we've moved the project over to a group organization: https://github.com/PyUserInput/PyUserInput . That

Paul Barton 1k Dec 27, 2022
A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.

PyAutoGUI PyAutoGUI is a cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard. pip inst

Al Sweigart 7.5k Dec 31, 2022
A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.

PyAutoGUI PyAutoGUI is a cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard. pip inst

Al Sweigart 7.6k Jan 1, 2023
https://there.oughta.be/a/macro-keyboard

inkkeys Details and instructions can be found on https://there.oughta.be/a/macro-keyboard In contrast to most of my other projects, I decided to put t

Sebastian Staacks 209 Dec 21, 2022