Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sketchpy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sketchpy

sketchpy

  • 0.1.7
  • PyPI
  • Socket score

Maintainers
1

Welcome to sketchpy

Intro to the project and some quick information,followed by an image of the project.

Description

This is the beginning level python project to do some awesome drawing animation using the turtle module, hope it grows in the future It is a Python module for animating drawings of images. The sketchpy module is created on top of the turtle module in Python. To install sketchpy on your computer, you can go to your command prompt (command line) and run the following command.

Usage

  • Just install the package pip install sketchpy
  • Import it to you project import sketchpy and use as you want😊

Built with

  • Turtle
  • Open-cv
  • Pillow
  • numpy
  • Svgpathtools

Getting started

Prerequisites

  • Python
  • Basic text editor
  • creativity😂

Install

    pip install sketchpy

it should probably work, If not then try the following code

    pip install turtle open-cv wheel sketchpy

Example

Open your code editor and write the example Python code snippets given below. Run your code and see the magic by yourself.

Drawing Robert Downey Jr. Using Python

    from sketchpy import library as lib
    obj = lib.rdj()
    obj.draw()

OUTPUT

Drawing Tom Holland Using Python

    from sketchpy import library
    myObject = library.tom_holland()
    myObject.draw()

OUTPUT

More examples

    from sketchpy import library as lib

    obj = lib.bts()
    obj.draw()
    from sketchpy import library as lib

    obj = lib.vijay()
    obj.draw()

Drawing Iron Man ASCII Animation Using Python

    from sketchpy import library
    myObject = library.ironman_ascii()
    myObject.draw()

OUTPUT

Drawing from SVG file

Use the following code to draw a file from svg file, insted of tracing full image

NOTE: use this specific website to convert image to svg, sketchpy is specifically made to work with this website only
    from sketchpy import canvas
    obj = canvas.sketch_from_svg('FILE PATH')
    obj.draw()

Saving a loaded svg file

Insted of waiting for the svg file to load, you can save as .npy file and use that for future use

    from sketchpy import canvas
    obj = canvas.sketch_from_svg('FILE PATH')
    obj.load_svg(filename = 'data.npy')

Drawing form .npy file

use the following code to draw your image from saved data file

    from sketchpy import canvas
    obj = canvas.sketch_from_svg('FILE PATH')
    obj.draw(filename = 'data.npy')

Drawing from raw image

use the following code to draw any image, it need not to be an svg file

    from sketchpy import canvas
    obj = canvas.sketch_from_image('IMAGE PATH')
    obj.draw(threshold = 127)
NOTE: you can change the value of threshold to draw more detailed image, it's range is 0 - 255,use values between 90-190

Troubleshooting

Acknowledgements

Thanks to all who helped inspire this project.❤

See also

Consider supporting me

  • upi id sriramanand23@okicici
  • scan and encourage us to develop more features
  • even one rupee make a huge difference

gpay qr code

License

This project is licensed under the MIT License.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc