Post Reply 

Question about grids

Sep 1, 2014, 17:06
Post: #1
Question about grids
Hi this is my first question. I am a programmer creating some assets for a POC project I am working on. My question is in a tile map with a grid size of 34x34 px (but the tiles are only 32x32 px with transparent areas in between (2px wide)) Can you resize the grid to 32x32 px and execute a function that aside from resizing the grid crops out all of the gaps in between (a total reduction in my case of 14x50 pixels). Please see attached image.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Sep 1, 2014, 18:19 (This post was last modified: Sep 1, 2014 19:40 by rich2005.)
Post: #2
RE: Question about grids
Quote: Hi this is my first question. I am a programmer creating some assets for a POC project I am working on. My question is in a tile map with a grid size of 34x34 px (but the tiles are only 32x32 px with transparent areas in between (2px wide)) Can you resize the grid to 32x32 px and execute a function that aside from resizing the grid crops out all of the gaps in between (a total reduction in my case of 14x50 pixels). Please see attached image.

edit: I will leave this up since there are some useful tools referenced but skip to the next post

I do not know of a single tool operation for this, not to say there is not one.

The sequence that springs to mind is

Set up some guides, there are tools for placing multiple guides
One of them GAT http://registry.gimp.org/node/25332

Gimp will slice up an image into chunks along guides menu Image -> Transform -> Guillotine
That gets you lots of separate images to export so scripts to ease the process
guillotine-into-layers http://registry.gimp.org/node/19886
and export-layers-as-png http://registry.gimp.org/node/18440

Those separate images can be bulk cropped with a batch plugin BIMP
http://registry.gimp.org/node/26259

Then import the cropped tiles back into Gimp as layers
But joining them back together is a chore, join into a row with the align tool and merge
then join those rows again with the align tool and merge.

Of course not paying attention and managed to get the sequence mixed up on a sample image I made.

before: http://i.imgur.com/j4tQ0DB.jpg
after: http://i.imgur.com/dVXYE9Z.jpg

It did not take that long to do, but then I have all those tools already available.

Hopefully someone will come up with a better offer.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Sep 1, 2014, 19:38
Post: #3
RE: Question about grids
A bit of thought, and a more direct way using the Gimp liquid-rescale (seam-carving) plugin

http://liquidrescale.wikidot.com/

To save a lot of explanations a video, hope it helps.

http://www.youtube.com/watch?v=pz0tCFZDb20&hd=1

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Layers question lpvmc 1 197 Jun 10, 2017 18:40
Last Post: ythgilb
  quick newbie question oneshot 1 176 May 29, 2017 18:36
Last Post: blighty
  Real basic question mgh13 3 330 Oct 4, 2014 13:06
Last Post: mgh13
  Morphing Question! b.morphing 1 207 Oct 1, 2014 15:19
Last Post: rich2005
  Morphing Question! b.morphing 3 283 Sep 17, 2014 19:47
Last Post: b.morphing

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS