You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
There are some values that modern versions of numpy is expecting to be ints but I guess sometime in the past they may have allowed floats.
I was able to work around this issue by adding some int() casting in a few places. I'm not positive if this is the correct solution, but I am now able to get the halftone effect working on my images.
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.
The text was updated successfully, but these errors were encountered: