You are here

Tiles

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

This script will take up to 8 colours chosen by the user and create a tiled image by choosing a colour at random for each tile. The colour and brush to use for the grout can also be chosen, along with the width and height of the image and the width and height of the tiles themselves.

Check out the README.txt for more info.

Comments and any useful info are welcome since this is my first attempt at a script.

If anyone wants to modify the script then they are more than welcome to do so.

NuttyMonk

[edit] updated the script to v2 based on comments from RobA. The changes only affect the tile grout which is now much faster at being drawn.

AttachmentSize
tiles.zip221.29 KB
tiles-v2.zip221.05 KB
Code License: 
GIMP Version: 
Scripting Engine: 

Comments

That is a great effort at a first script! It works well, and is useful. I would suggest the biggest area for improvement is in speed. This is where leveraging features of gimp come into play. For example, if you created your initial image as xtiles by ytiles then used gimp-paintbrush-default to paint 1 pixel at a time, then resizing the entire image by the x/y tilesize with no interpolation, it would probably be faster than making the rectangular selections and filling. This will lstill be fairly slow, as ccanvas access in script-fu is slow. Even more outside the box, the fastest way I can think to do it would be to create a white image xTiles by yTiles, then fill it with HSV noise completely maxed out. Convert the image to greyscale, then convert it to indexed, specifying the number of colours and no dithering. Get the colourmap using (gimp-image-get-colormap) then change the values to the colours selected, then change the image using (gimp-image-set-colormap). Scale up the image and paint your grout lines. Also, it would be faster to use the render-grid filter to make the grout lines than stroking lines in a loop. Hope you find these comments constructive and give you some good ideas! -Rob A>

Thanks for your idea RobA. I applied the grid idea already. The idea about noise is a bit more tricky. By doing it slightly differently from what you suggested i can get it to work when i do it manually. The problems i have when writing a script to do it mostly relate to the colourmap. I also find that when you scale the image up (resize it) the tiles around the outside of the script don't scale properly. So for the moment, i'm gonna leave it the way it is. I was getting too frustrated trying to figure it all out the last time i tried. :-) Cheers
Subscribe to Comments for "Tiles"