HOME | DD

slybug — Scale Layer to Image Size

Published: 2012-05-13 23:20:44 +0000 UTC; Views: 19767; Favourites: 95; Downloads: 4495
Redirect to original
Description GIMP 2.8 Python Plugin.
This plugin scales the contents of the layer (or layer group) to image size.
I hope this plugin will be useful for someone else.

Installation Instructions:
1. Extract "scale-layer-to-image-size.py" from .zip archive to the ".../.gimp-2.x/plug-ins/" directory.
2. Make sure that the extracted file is executable.
3. If you are already running GIMP, close and reopen it.

This plugin requires Python!
If you have the "Filters > Python-Fu > Console" menu item you are all set. If not, install Python support for GIMP.

Version History:
v1.3 (01.06.2012)
- Added support for working with layer groups.
- To the two types of scaling added three more.
- Added "Align to image center" option.
- Fixed bug in "Crop to Image Size" which leads to cropping of the whole image, and not the selected layer.
v1.2 (19.05.2012)
- Added "Crop to Image Size" option.
- The value "Addition" is now measured as a percentage (%).
- Some code improvements.
v1.0 (13.05.2012)
- Initial release.

My other plugins:
Create Layer Mask from...
Duplicate to another Image
Layer via Copy/Cut
Place Layer into Selection


The latest versions of the plugins
you also can download from:
some-gimp-plugins.com

Related content
Comments: 29

godofredo000 [2024-04-01 22:35:59 +0000 UTC]

👍: 0 ⏩: 0

Mayamag [2020-11-07 19:05:44 +0000 UTC]

👍: 0 ⏩: 0

rosiecar [2019-03-10 14:21:48 +0000 UTC]

Will your plugins work in ver. 2.10.x?

👍: 0 ⏩: 0

fbronnie [2017-11-12 10:38:40 +0000 UTC]

Thanks a lot!

👍: 0 ⏩: 0

Tsumerai-Kyon [2017-09-10 03:15:29 +0000 UTC]

Mine is in russian, what did I do wrong?

👍: 0 ⏩: 0

Plumplucker [2016-03-08 11:48:26 +0000 UTC]

I just installed in 2.9 pre-release and it seems to work fine. Great Plugin! Thank you

👍: 0 ⏩: 0

T1thinker [2014-04-17 04:29:24 +0000 UTC]

What do you mean by make sure the file is executable.

👍: 0 ⏩: 1

slybug In reply to T1thinker [2014-04-17 09:08:33 +0000 UTC]

In Nautilus (the file browser), find plugin file, and right-click on it. Click Properties.
Click the Permissions tab, and check the box labeled Allow executing file as program. Then click Close.
> Screenshot

👍: 0 ⏩: 0

sesame1990 [2013-10-14 02:38:50 +0000 UTC]

Hi there
Thanks for your sharing.I like it very much.My previous image SDK can only scale image.Here is the site:www.rasteredge.com/how-to/csha…
But I want to scale layer to image size.So your sharing really help me a lot.I'd like to have a try.

👍: 0 ⏩: 0

aysquared [2012-12-10 22:35:52 +0000 UTC]

this is a really useful plugin, especially for resizing textures and colour layers in XCFs.
thank you so much for sharing it!

👍: 0 ⏩: 1

slybug In reply to aysquared [2012-12-11 17:52:37 +0000 UTC]

You're welcome!

👍: 0 ⏩: 0

CaliforniaBabeWV [2012-09-22 21:13:04 +0000 UTC]

Ignore that other comment, I found it in the lib folder. Another question though, I have python-fu installed but when I try to add your scale layer to image script to the plug in folder it says I can't because libgimp-2.0-0.dll is missing. Help?

👍: 0 ⏩: 2

slybug In reply to CaliforniaBabeWV [2012-09-23 14:14:55 +0000 UTC]

Don't forget to remove the plugin from the lib/ folder.

👍: 0 ⏩: 1

CaliforniaBabeWV In reply to slybug [2012-09-23 20:52:19 +0000 UTC]

Okay, thank you!!

👍: 0 ⏩: 0

slybug In reply to CaliforniaBabeWV [2012-09-23 14:06:46 +0000 UTC]

Under Windows XP the path should look like this:
\Documents and Settings\\.gimp-2.8\plug-ins
Windows 7:
\Users\\.gimp-2.8\plug-ins
On Unix, the plug-in directory is usually located at:
$HOME/.gimp-2.8/plug-ins

👍: 0 ⏩: 0

CaliforniaBabeWV [2012-09-22 20:56:54 +0000 UTC]

I can't find my plug ins folder... I go to the correct folder but I don't see a plugins folder. I see a scripts folder but not one for plugins. Could you help?

👍: 0 ⏩: 0

TheShock [2012-07-26 09:56:34 +0000 UTC]

Excelent presentation. and well explained. I like to find this type of works. I am going to test for sure.

👍: 0 ⏩: 0

Jheric [2012-06-25 18:48:06 +0000 UTC]

Thanks!! Your plugins are great!

👍: 0 ⏩: 0

AlonteSamuels [2012-06-01 22:17:01 +0000 UTC]

cool plug-in thanks

👍: 0 ⏩: 1

slybug In reply to AlonteSamuels [2012-06-03 15:54:17 +0000 UTC]

You are welcome!

👍: 0 ⏩: 0

al-dy [2012-05-20 00:22:06 +0000 UTC]

Tested on Linux, it works great. Good job!

👍: 0 ⏩: 1

slybug In reply to al-dy [2012-05-20 12:59:38 +0000 UTC]

Thanks for testing!

👍: 0 ⏩: 0

ShortcakeNova [2012-05-18 01:55:12 +0000 UTC]

Nevermind the first question but Does it work in Windows 7? i'd really would love something like this but sadly i dont have windows OS

👍: 0 ⏩: 1

slybug In reply to ShortcakeNova [2012-05-18 17:05:55 +0000 UTC]

The script works fine in Windows 7. (Windows OS - Windows Operating System)

👍: 0 ⏩: 1

ShortcakeNova In reply to slybug [2012-05-18 17:18:43 +0000 UTC]

Well i downloaded Gimp 2.8 and added your script and did as the directions said but i still doesn't appear in my Gimp....can you please help me?

👍: 0 ⏩: 1

slybug In reply to ShortcakeNova [2012-05-18 17:49:31 +0000 UTC]

Under Windows XP the path should look like this:
C:\Documents and Settings\\.gimp-2.8\plug-ins
And under Windows 7:
C:\Users\\.gimp-2.8\plug-ins

👍: 0 ⏩: 1

ShortcakeNova In reply to slybug [2012-05-18 18:53:44 +0000 UTC]

Okay thanks a bunch i have it working now its nice btw >3.

👍: 0 ⏩: 0

ShortcakeNova [2012-05-17 23:16:41 +0000 UTC]

Uh will it work with any other versions of gimp or just version 2.8?

👍: 0 ⏩: 1

slybug In reply to ShortcakeNova [2012-05-18 17:09:14 +0000 UTC]

Sorry, this script most probably doesn't work in earlier versions of GIMP.

👍: 0 ⏩: 0