clayflannigan / halftone Goto Github PK
View Code? Open in Web Editor NEWGenerate CMYK halftone images
License: Apache License 2.0
Generate CMYK halftone images
License: Apache License 2.0
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.
Python: 3.5
Pillow: 3.4.2
Scipy: 0.18.1 <--- EDITED
Numpy: 1.11.2
Command: python halftone.py snake.jpg
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.