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
Polyfoto - Create image mosaics.

Polyfoto Create image mosaics. Showcase "Before and After Science" by Brian Eno "Scott 3" by Scott Walker Installation Clone this repository to your l

Shane Drabing 149 Dec 25, 2022
Generates images of calendar month tables and can paste them onto suitable photos.

📆 calendizer README Generates images of calendar month tables and can paste them onto suitable photos. A quick way to make your own calendar for prin

Sean Ryan 2 Dec 14, 2022
Music Thumbnail Maker

Music Thumbnail Installing pip install TMFrame

krypton 4 Jan 28, 2022
A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

CypherToad 8 Sep 12, 2022
Script that organizes the Google Takeout archive into one big chronological folder

Script that organizes the Google Takeout archive into one big chronological folder

Mateusz Soszyński 1.6k Jan 09, 2023
Nanosensor Image Processor (NanoImgPro), a python-based image analysis tool for dopamine nanosensors

NanoImgPro Nanosensor Image Processor (NanoImgPro), a python-based image analysis tool for dopamine nanosensors NanoImgPro.py contains the main class

1 Mar 02, 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
display: a browser-based graphics server

display: a browser-based graphics server Installation Quick Start Usage Development A very lightweight display server for Torch. Best used as a remote

Szymon Jakubczak 205 Oct 17, 2022
A small Python module for BMP image processing.

micropython-microbmp A small Python module for BMP image processing. It supports BMP image of 1/2/4/8/24-bit colour depth. Loading supports compressio

Quan Lin 4 Nov 02, 2022
Glyphtracer is an app for converting images of letters to a font

Glyphtracer takes an image that contains pictures of several letters. It recognizes all them and lets the user tag each letter to a Unicode code point. It then converts the images to vector form and

Jussi Pakkanen 38 Dec 24, 2022
A Blender add-on to create interesting meshes using symmetry

Procedural Symmetries This Blender add-on automates the process of iteratively applying a set of reflection planes to a base mesh. The result will con

1 Dec 29, 2021
Plots is a graph plotting app for GNOME.

Plots is a graph plotting app for GNOME. Plots makes it easy to visualise mathematical formulae. In addition to basic arithmetic operations, it supports trigonometric, hyperbolic, exponential and log

Alex Huntley 138 Dec 14, 2022
Typesheet is a tiny Python script for creating transparent PNG spritesheets from TrueType (.ttf) fonts.

typesheet typesheet is a tiny Python script for creating transparent PNG spritesheets from TrueType (.ttf) fonts. I made it because I couldn't find an

Grayson Chao 12 Dec 23, 2022
The aim is to extract timeseries water level 2D information for any designed boundaries within the EasyGSH model domain

bct_file_generator_for_EasyGSH The aim is to extract timeseries water level 2D information for any designed boundaries within the EasyGSH model domain

Clayton Soares 1 Jul 08, 2022
Sample data for the napari image viewer.

napari-demo-data Sample data for the napari image viewer. This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugi

Genevieve Buckley 1 Nov 08, 2021
👷 Build images with images

👷 Build images with images. About Tiler is a tool to create an image using all kinds of other smaller images (tiles). It is different from other mosa

5.5k Jan 03, 2023
Plots the graph of a function with ASCII characters.

ASCII Graph Plotter Plots the graph of a function with ASCII characters. See the change log here. Developed by InformaticFreak (c) 2021 How to use py

InformaticFreak 2 Apr 29, 2022
Create QR Code for link using Python

Quick Response QR is short and named for a quick read from a cell phone. Used to view information from transitory media and put it on your cell phone.

Coding Taggers 1 Jan 09, 2022
Rembg is a tool to remove images background.

Rembg is a tool to remove images background.

Daniel Gatis 7.8k Jan 05, 2023
Scramb.py is a region based JPEG Image Scrambler and Descrambler written in Python

Scramb.py Scramb.py is a region based JPEG Image Scrambler and Descrambler written in Python. Main features Scramb.py can scramble images regions. So

47 Dec 25, 2022