nuno-faria / tiler

👷 Build images with images
MIT License
5.89k stars 423 forks source link

Usage from the readme.md doesn't work #11

Closed objque closed 5 years ago

objque commented 5 years ago

Hello, I just install all requirements into virtualenv with py3 on the board and tried to run tiller.py (with raw config from master branch) on the png image from the sample images dir and nothing happen:

$ mkdir result
$ virtualenv -p python3 .env
...
$ source .env/bin/activate
(.env) $ pip install -r requirements.txt
...
(.env) $ python3 tiler.py images/cake_lego.png ./result/
Loading tiles
0it [00:00, ?it/s]
Gettting and processing boxes
0it [00:00, ?it/s]
Creating tiled image
0it [00:00, ?it/s]
(.env) $ ls ./result/
(.env) $

what's wrong with me?

kumardexati commented 5 years ago

Same Issue here.

nuno-faria commented 5 years ago

The second argument of the tiler.py is the folder with the tiles (ex: tiles/circles/gen_circle_100/. Is the 'result' folder you provided empty? (If you want to generate tiles, use the gen_tiles.py script with an image as argument)

Also, the result appears, by default, as a out.png image (in the same dir as the script).

objque commented 5 years ago

I just wanna build my image with tiles, so I use tiller.py as said in the readme.md, is it incorrect? Could you provide command how to convert image with tiles, because cmd from the readme seems incorrect

nuno-faria commented 5 years ago

The tiler.py script is to build the image with the tiles. The script to generate tiles is the gen_tiles.py.

To generate tiles, do: python gen_tiles.py base_image (a folder will be created in the same directory as the base image, with a 'gen_' prefix.

To build an image from tiles, do: python tiler.py image tiles_folder/ (an example of a tiles folder is tiles/circles/gen_circle_100/); the result will be in a out.png image.