Assembling PNG tiles automatically to create an image

Hi,

this is my first post to this forum, I hope I’m going it right, and at the correct place.

I have a very simple problem to solve but I’m not a Gimp pro, ad could not find a good answer by searching on the web, then on this forum.

I have an image made of hundreds of tiles, all 128x128 in png format, and I would like to program a small code that will place all the tiles to build the complete image.

It seems the .png do contain some X-Y shifting information because if I drag and drop one of these, Gimp asks me if I want to keep the X-Y shift. One issue is that if I say yes, it actually does not keep it and places the tile in the middle of the canvas :frowning:

If that were working, maybe a manual drag and drop of all the tiles would make it.
One potential issue though, is that each tile seems to be created on a separate layer. As there are about 1000 tiles per image, I do not know if GIMP is supporting that number of un-flatten layers.

So, what would be the best way to proceed ? Ideally a small program looping on each tile and placing them automatically on the surface would be good to have.

Thanks for sharing your ideas.

Hi, no idea from anyone ?
At least wrt the shift that does not seem to be working correctly in Gimp ?

Thanks.

Perhaps it’s already done, check the scripts ofn-tiles (tiles are files) and ofn-layer-tiles (tiles are layers), both available here. Installation instructions at the bottom of the page, and the ZIP contains a HTML doc well worth reading.

Thanks for this Ofnuts. I’m kind of very new on Gimp and have not managed to find the way to install this scrtip. I have tried to copy it in plug_ins inr scrtips and none of them made the magic menu entries added :frowning:
I’m using GIMP 2.10.24 (révision 3) and wonder if that script, created back in 2017, mais need to be updated.

If you have any idea, feel free, netiher Google nor YT provided me with a good answer. (maybe I’ve badly searched)

Cheers.

Script works fine on my 2.10.32.

Could be a problem with your Pythin v2 support. Have you got a menu entry Filters > Python-fu > Console?

If not:

  • If you are on a recent Linux, you have to add support for Python v2 in Gimp because distros no longer add it by default. See here for solutions.
  • If you are on Windows, Gimp comes with a built-in Pythonv2 support, but it may clash with other Python runtimes that you have installed.

Hi, i just found this script (ofn-layer-tiles) and i have same issue, after installing plugin i cant see Layer>tile menu
Im not using gimp much but im convinced that I installed plugin correctly, gimp 2.10.32
thanks

What is your OS? Windows, OSX or Linux (which distro/version)?

im on Win10, droped files to appdata>plugins folder
edit: also I see plugin loading in startup splash screen

  • ofn-layer-tiles adds a Tiles submenu at the bottom of the Layer drop-down.
  • ofn-tiles adds an Open tiles menu in the “open” section of the File drop-down, and an Export tiles submenu in the “export” section of the same File drop-down.
  • appdata/plugins is I believe AppData\Roaming\GIMP\2.10\plug-ins (it’s one of the two listed in Edit > Preferences > Folders > Plug-ins. With Gimp stopped, you can edit the AppData\Roaming\GIMP\2.10\pluginrc file with a text editor and see if it references the python file. You can also check the plugin browser (Help > Plug-in browser`):

If you checked the Python file itself with a random text editor, you could have damaged it (python is picky on tabs & spaces and editors often replace tabs by spaces and vice-versa). In which case, unzip again.

It seems that none plugin is working, I tried another plugin and it also didnt work.
I cant see installed plugins in plugin browser, but I see name of plugin when gimp is loading.

Anyway, turns out I dont need to use this anymore, but many thanks for your effort.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.