| Table of Contents ▸ List of Commands ▸ Image Drawing ▸ pack_sprites | ◀ newton_fractal | piechart ▶ |
pack_sprites
Arguments:
- [sprite_set],_nb_scales>=1,0<_min_scale<=100,_allow_rotation={ 0:None | 1:180 deg. | 2:90 deg. | 3:Any },_spacing,_max_attempts>0
Description:
Try to randomly pack as many sprites as possible onto the empty areas of an image.Sprites can be eventually rotated and scaled during the packing process.
Selected image is the canvas that will be filled with the sprites.
The zero values of its alpha channel defines the potential locations for drawing the sprites.
[sprite_set] defines the set of sprites considered for filling the canvas.
The zero values of their alpha channels defines the sprite shape.
Sprite packing is done on random locations and iteratively with decreasing scales.
nb_scales sets the number of decreasing scales considered for all specified sprites to be packed.
min_scale (in %) sets the minimal size considered for packing (specified as a percentage of the
original sprite size).
spacing can be positive or negative.
max_attempts defines the maximum number of attempts to pack a sprite for each scale.
Default values:
nb_scales=1, min_scale=25, allow_rotation=0, spacing=1 and max_attempts=512.
Example of use:
shape_heart 512 negate normalize 0,255 channels -3,0 repeat 2 { ball 48,${-rgb} } +pack_sprites[0] [^0],5,15


Home
Download
News
Mastodon
Bluesky
X
Summary - 17 Years
Summary - 16 Years
Summary - 15 Years
Summary - 13 Years
Summary - 11 Years
Summary - 10 Years
Resources
Technical Reference
Scripting Tutorial
Video Tutorials
Wiki Pages
Image Gallery
Color Presets
Using libgmic
G'MIC Online
Community
Discussion Forum (Pixls.us)
GimpChat
IRC
Report Issue