Comments (2)
Hello. I don't remember the exact configurations but here are some approximations:
If you want to build images with dynamic shapes and sizes, it is better to provide a relatively small PIXEL_SHIFT
and multiple RESIZING_SCALES
.
For example, to build the cake with the dynamic circles:
# config (everything else uses the default values)
RESIZING_SCALES = [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1]
PIXEL_SHIFT = (5, 5)
# command
python .\tiler.py .\cake.png .\tiles\circles\gen_circle_100\
Or to build the cake with the paper clips:
RESIZING_SCALES = [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1]
PIXEL_SHIFT = (5, 5)
python .\tiler.py .\cake.png .\tiles\clips\gen_clip\
If you instead want images with grid-like tiles (e.g., lego tiles), just use a single value for the RESIZING_SCALES
and set PIXEL_SHIFT
to None
.
For example, to build the cake with the fixed circles:
RESIZING_SCALES = [0.1] # each circle will be 10x10, since 0.1 * 100x100 = 10x10
PIXEL_SHIFT = None # each shift will be the size of the image, i.e., 10x10
python .\tiler.py .\cake.png .\tiles\circles\gen_circle_100\
Likewise, to build the cake with a cross-stitch pattern:
RESIZING_SCALES = [0.1]
PIXEL_SHIFT = None
python .\tiler.py cake.png .\tiles\times\gen_times\
All examples provided in the README use either one or the other technique, except for the striped cake. To build that, we just need to provide small lines (tiles/lines/gen_line_h/
) and a wide PIXEL_SHIFT
on the x axis.
RESIZING_SCALES = [0.16]
PIXEL_SHIFT = (30, 1)
python .\tiler.py cake.png .\tiles\lines\gen_line_h\
Hope this helps.
from tiler.
Thank you very much for your reply, best wishes!
from tiler.
Related Issues (20)
- Feature : Use vector image or input and output HOT 1
- "invalid syntax" or "AttributeError: 'Pool' object has no attribute 'starmap'" HOT 1
- AttributeError: 'NoneType' object has no attribute 'shape' HOT 1
- AttributeError: 'NoneType' object has no attribute 'shape' HOT 3
- [Error] - Running tiler.py HOT 1
- TypeError: flip() missing 1 required positional argument: 'axis' HOT 4
- Requesting permission to use some of your Tiles HOT 2
- Config details for example output HOT 8
- AttributeError: 'NoneType' object has no attribute 'shape' HOT 10
- Starting Tiler Error HOT 20
- test HOT 2
- Sorry,you've spelt the word wrong. HOT 1
- How do I count the number of each color block used in each picture? HOT 7
- IndexError: tuple index out of range HOT 2
- who can help me about: <python tiler.py path/to/image path/to/tiles_folder/> HOT 3
- Can I batch convert? HOT 2
- It takes a long time HOT 1
- stuck at "Getting and processing boxes" HOT 1
- Not able to create mosaic using human face image (tile image) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiler.