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 esoteric visual language that takes image files as input based on a multi-tape turing machine, designed for compatibility with C.

vizh An esoteric visual language that takes image files as input based on a multi-tape turing machine, designed for compatibility with C. Overview Her

Sy Brand 228 Dec 17, 2022
Image generation API.

Image Generator API This is an api im working on Currently its just a test project Im trying to make custom readme images with your discord account pr

Siddhesh Zantye 2 Feb 19, 2022
Clip Bing Maps backgound as RGB geotif image using center-point from vector data of a shapefile and Bing Maps zoom

Clip Bing Maps backgound as RGB geotif image using center-point from vector data of a shapefile and Bing Maps zoom. Also, rasterize shapefile vectors as corresponding label image.

Gounari Olympia 2 Nov 22, 2021
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
Easy to use Python module to extract Exif metadata from digital image files.

Easy to use Python module to extract Exif metadata from digital image files.

ianaré sévi 719 Jan 05, 2023
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
A simple Streamlit Component to compare images in Streamlit apps. It integrates Knightlab's JuxtaposeJS

streamlit-image-juxtapose A simple Streamlit Component to compare images in Streamlit apps using Knightlab's JuxtaposeJS. The images are saved to the

Robin 30 Dec 31, 2022
Nudity detection with Python

nude.py About Nudity detection with Python. Port of nude.js to Python. Installation from pip: $ pip install --upgrade nudepy from easy_install: $ eas

Hideo Hattori 881 Jan 06, 2023
Make GIFs from time-stacked xarray.DataArrays (time, [optional band], y, x), dead-simple.

GeoGIF Make GIFs from time-stacked xarray.DataArrays (time, [optional band], y, x), dead-simple. from geogif import gif, dgif gif(data_array) dgif(das

Gabe Joseph 47 Dec 22, 2022
Gaphor is the simple modeling tool

Gaphor Gaphor is a UML and SysML modeling application written in Python. It is designed to be easy to use, while still being powerful. Gaphor implemen

Gaphor 1.3k Dec 31, 2022
📷 Python package and CLI utility to create photo mosaics.

📷 Python package and CLI utility to create photo mosaics.

Loic Coyle 7 Oct 29, 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
GIMP script to export bitmap as GRAPHICS 4 file (aka SCREEN 5)

gimpfu-msx-gr4.py GIMP script to export bitmap as GRAPHICS 4 file (aka SCREEN 5). GRAPHICS 4 specs are: 256x212 (or 256x192); 16 color palette (from 5

Pedro de Medeiros 4 Oct 17, 2022
Forza painter app with python

forza-painter Discord: A-Dawg#0001 (AE) Supports: Forza Horizon 5 Offically (OTHER v1.405.2.0, MS STORE v3.414.967.0, STEAM v1.414.967.0) Unofficially

320 Dec 31, 2022
Demo of using Auto Encoder for Image Denoising

Demo of using Auto Encoder for Image Denoising

2 Aug 04, 2022
GPU-accelerated image processing using cupy and CUDA

napari-cupy-image-processing GPU-accelerated image processing using cupy and CUDA This napari plugin was generated with Cookiecutter using with @napar

Robert Haase 16 Oct 26, 2022
Extract the ISO 11146 beam size from an image file

laserbeamsize Simple and fast calculation of beam sizes from a single monochrome image based on the ISO 11146 method of variances. Some effort has bee

Scott Prahl 21 Jan 06, 2023
A Robust Avatar Generator with a huge number of templates

CoolAvatars Welcome to this repository of CoolAvatars. Using this project, you can generate cool avatars not only from the samples present in my image

RAVI PRAKASH 5 Oct 12, 2021
A quick and dirty QT Statusbar implementation for grabbing GIFs from Tenor, since there is no offical or unofficial one I found. This was intended for use under Linux, however it was also functional enough on MacOS.

Statusbar-TenorGIF App for Linux A quick and dirty QT Statusbar implementation for grabbing GIFs from Tenor, since there is no offical one and I didnt

Luigi DaVinci 1 Nov 01, 2021
Python Script to generate posters out of the images in directory.

Poster-Maker Python Script to generate posters out of the images in directory. This version is very basic ligthweight code to combine organize images

1 Feb 02, 2022