It is currently Sat May 25, 2013 10:38 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Scale Layer to Image Size
PostPosted: Mon May 14, 2012 2:41 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: May 14, 2012
Posts: 10
Image

GIMP 2.8 Python Plug-in.
This plug-in scales the contents of the layer (or layer group) to image size.

Installation:
1. Close GIMP if it is open.
2. Extract "scale-layer-to-image-size.py" from zip archive to the ".../.gimp-2.8/plug-ins" directory.
3. Run GIMP. The plug-in should appear under the menu: "Layer > Scale Layer to Image Size". Don't forget to make the plug-in executable.

Download:
Download from my deviantart page:
slybug.deviantart.com

Tested with GIMP 2.8.
I hope this plug-in will be useful for someone else.

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


Last edited by slybug on Mon Apr 22, 2013 9:40 am, edited 4 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Profile  
 

 Post subject: Re: Scale Layer to Image Size
PostPosted: Mon May 14, 2012 2:58 pm  (#2) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 6979
I guess it doesn't work in gimp-2.6.12. I downloaded and added it to my plug-in folder. It shows under layers but when I click it no dialog comes up. Do I have to have more than one layer or make a selection?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Scale Layer to Image Size
PostPosted: Mon May 14, 2012 3:00 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 3122
Location: UK
Something I could have done with a number of times. When my internet connection is running a bit faster I'll download this one. Thank you.

_________________
Image




Top
 Profile  
 
 Post subject: Re: Scale Layer to Image Size
PostPosted: Mon May 14, 2012 3:14 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 14, 2012
Posts: 10
molly wrote:
I guess it doesn't work in gimp-2.6.12. I downloaded and added it to my plug-in folder. It shows under layers but when I click it no dialog comes up. Do I have to have more than one layer or make a selection?

Sorry, this script most probably does not work in gimp-2.6.12. You may have few layers in a composition, but the script can be applied only to the selected layer.


Top
 Profile  
 
 Post subject: Re: Scale Layer to Image Size
PostPosted: Mon May 14, 2012 3:23 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Oct 25, 2010
Posts: 1307
slybug wrote:
molly wrote:
I guess it doesn't work in gimp-2.6.12. I downloaded and added it to my plug-in folder. It shows under layers but when I click it no dialog comes up. Do I have to have more than one layer or make a selection?

Sorry, this script most probably does not work in gimp-2.6.12. You may have few layers in a composition, but the script can be applied only to the selected layer.

The reason is that you use pdb.gimp_context_set_interpolation() which is new in 2.8.

IMHO this isn't really useful... There is a default interpolation that you can use.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Scale Layer to Image Size
PostPosted: Mon May 14, 2012 3:38 pm  (#6) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 6979
thank you guys

_________________
Image


Top
 Profile  
 
 Post subject: Re: Scale Layer to Image Size
PostPosted: Fri Jun 01, 2012 10:11 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 14, 2012
Posts: 10
v1.3 (01.06.2012)
Added support for working with layer groups.


Top
 Profile  
 

 Post subject: Re: Scale Layer to Image Size
PostPosted: Fri Jun 01, 2012 6:18 pm  (#8) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 9030
Location: "Looking for my eraser" =P
Thanks Slybug. :)

_________________
Image
Gimp Rocks Blog
Simply Gimp Tutorials
"Once your in the cloud, you're in the net"
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: Scale Layer to Image Size
PostPosted: Sun Jun 03, 2012 11:38 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 14, 2012
Posts: 10
Rod wrote:
Thanks Slybug. :)

You are welcome Rod :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login   * Subscribe to RSS Feed


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group