Git Product home page Git Product logo

pymarker's People

Contributors

devsalula avatar hugonxc avatar pablodiegoss avatar rodrigocam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pymarker's Issues

Create test for validating that the tool is creating patts correctly

Using pymarker -p input.png, where input png is an image file that you want to create a pattern file, the output is a .patt file that contains a numbers representing each pixel of the marker in Red, Green and Blue.

Using /tests/inputs/hiro.jpg the expected output is the file /tests/inputs/hiro.patt

The test should use these two files to compare if the generate_patt function with the hiro.jpg file generates an output exactly as the hiro.patt file expected.

Image with transparent background, generates the wrong marker.

Describe the bug
When trying to generate a marker image from png with transparent background, it's generating a marker without white background. It fills the background image with black color.

Screenshots
The image I want to generate a marker
sleep

Genareted Marker
sleep_marker

Expected Marker
marker

Additional Information
I tried to change the border size to different values, but I kept finding the bug.

Script i used

from pymarker.core import generate_patt, generate_marker

def main():
    filename = "top/sleep.png"
    border_size = 10 #size in percentage

    generate_marker(filename, border_size)


if __name__ == "__main__":
    main()

Create a -s flag that returns the patt as a string

This flag should avoid creating output files, generating only a string on the screen containing the pattern content. This will be used in Jandig where their own system will create and manage the files inside the system.

Add Poetry to Pymarker

Poetry will make it easier to setup the environment and maintain project dependencies updated

Create flag '-o' for output file folder/

Using the lib Click, receive the -o flag with an output folder, so that users would be able to use pymarkers as:

pymarker /tests/input/hiro.jpg -o /tests/output/
or
pymarker /tests/input/hiro.jpg -o /tests/output/mypatt.patt

using pymarker without any output flag should result in the patt being generated at the same path of the input file
pymarker /tests/input/hiro.jpg -> /tests/input/hiro.patt is created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.