Giter Club home page Giter Club logo

halftone's People

Contributors

clayflannigan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

halftone's Issues

Not working with NumPy 1.20.1

I tried halftoning an image using Halftone.py using python halftone.py -l Banff.jpg (-l command for halftoning the images) but the following errors occurred

(Haltone) C:\Users\shank\Documents\Documents\Haltone>python halftone.py -l Banff.jpg
Traceback (most recent call last):
File "halftone.py", line 219, in
CMYK = halftone(CMYK, args.size, args.angles, args.fill, args.sharpness)
File "halftone.py", line 111, in halftone
tiled_kernel = np.tile(kernel, num_kernels)
File "<array_function internals>", line 5, in tile
File "C:\Users\shank\anaconda3\envs\Haltone\lib\site-packages\numpy\lib\shape_base.py", line 1260, in tile
return c.reshape(shape_out)
TypeError: 'numpy.float64' object cannot be interpreted as an integer

If I do not use the -l command, then the resultant images are not halftoned.

Please help me solve this issue.

Thanks,
Shankhya.

ValueError: total size of new array must be unchanged

Python: 3.5
Pillow: 3.4.2
Scipy: 0.18.1 <--- EDITED
Numpy: 1.11.2

Command: python halftone.py snake.jpg

snake

  File "halftone.py", line 219, in <module>
    CMYK = halftone(CMYK, args.size, args.angles, args.fill, args.sharpness)
  File "halftone.py", line 110, in halftone
    tiled_kernel = np.tile(kernel, num_kernels)
  File "/nix/store/ln8h5m522ijvljp9n9rd0bhxwpl694wx-python3.5-numpy-1.11.2/lib/python3.5/site-packages/numpy/lib/shape_base.py", line 873, in tile
    return c.reshape(shape_out)
ValueError: total size of new array must be unchanged

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.