Mobile app version of vmapp.org
Login or Join
Kevin459

: Quickly resizing canvas using "border pixels" to fill up new space in Gimp I noticed that one of the tasks I often perform in Gimp comes down to making a different aspect ratio version of

@Kevin459

Posted in: #Gimp #Resize

I noticed that one of the tasks I often perform in Gimp comes down to making a different aspect ratio version of a simple PNG (an icon with a simple gradient background for example). They can be resized in a visually appealing way by enlarging the canvas, and simply sampling the pixels on the border of the image to fill up the new space.

My usual workflow:


Set bigger canvas size without scaling image (for example, twice the canvas width, with original little image in the center)
Set layer to image size (So I can edit the empty space)
Select a small "stripe" of the background gradient, copy, paste, drag and press the key so it snaps to horizontal movement.
Copy/paste bigger and bigger stripes, until I reach the edge of the canvas.


This can be a bit labour intensive. Is there a quicker way to do this, or maybe a way to automate the "stretch this 1px-wide selection to the edge of the canvas" part?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin459

2 Comments

Sorted by latest first Latest Oldest Best

 

@Vandalay110

If you have 6 - 7 repetitive steps, you could jsut script then all, and have then as a single menu action. Documentation is scarse, but if you look for my answers on GIMP here and over StackOverflow, I've approached the subject. Also, there is this nice article here: www.ibm.com/developerworks/library/os-autogimp/
Now, without resorting to scripting, you could assign easy to remember shortcuts to the functions you need - go to edit->preferences->interface and enbale the Dynamic Keyboard Shortcuts . From then on, while having a menu item highlighted, just press the desired shortcut for it (no need to go out of you workflow to set up the shortcuts).

SInce what you are doing depend on the gradient and drawing, scripting it would be the way to go. Try getting it done - if you can't code yourself, try asking someone to that for you.

(NB. I recently found out the dynamic menu shortcut feature does not work on the Unit menus of Ubuntu Linux - if you are running Ubuntu, you have to select GIMP Menus through mouse right-clicking in order to be able to pick shortcuts)

10% popularity Vote Up Vote Down


 

@Holmes874

Assuming the gradient is vertical only (ie. uniform width-wise):


Select the vertical stripe to be copied
Copy and paste to a new layer
Scale that layer to full width of image
Move layer below original layer


Alternatively, once you've copied the stripe to GIMP's clipboard, you could just create a new layer and then drag the stripe from the Patterns dialog (clipboard is the first entry) to fill the layer.

If the gradient is not quite uniform width-wise, you will probably need to do the two halves separately, but the same idea.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme