GIMPER.NET - The Gimp Community

The GIMP Community
It is currently Sat Jul 12, 2014 9:40 am


All times are UTC




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Jun 05, 2010 4:57 pm 
Offline
Administrator
User avatar

Joined: Wed Jul 22, 2009 2:28 am
Posts: 5472
Location: Western New York
Yes, I guess it didn't make it.

_________________
Image
Image


Top
 Profile  
 

Re: How to select multiple layers?


Sponsor

Sponsor
 

PostPosted: Tue Jun 08, 2010 2:09 am 
Offline
Global Moderator
User avatar

Joined: Mon Apr 19, 2010 7:58 pm
Posts: 1740
hmmmm...FencePost just wrote a script that changes ALL layers to image size.I wonder if someone could rewrite that script to select a few layers or all of them , and then act on just those layers?
I really dont know of what use it would or could be though. :question:

_________________
Image
Check out my Flickr gallery


Top
 Profile  
 
PostPosted: Tue Jun 08, 2010 2:10 am 
Offline
Administrator
User avatar

Joined: Wed Jul 22, 2009 2:28 am
Posts: 5472
Location: Western New York
Scripts are different, can make changes to multiple layers but you couldn't select layers. :)

_________________
Image
Image


Top
 Profile  
 
PostPosted: Sat Jul 10, 2010 8:13 pm 
Offline
Newbie

Joined: Sat Jul 10, 2010 12:43 am
Posts: 29
I am raising this theme.

Is there a way to change the scale of several layers at once?


Top
 Profile  
 
PostPosted: Sat Jul 10, 2010 11:54 pm 
Offline
Global Moderator
User avatar

Joined: Mon Apr 19, 2010 7:58 pm
Posts: 1740
There is a script called layer groups or another called multi layer options that may do these things.

Multi layer options - scales or crops specific layers.
Layer Groups - moves any layers that are linked wherever you want them.
both may be python scripts though.

You can find them both at the gimp repository.
http://registry.gimp.org/search/node/layers

good luck

_________________
Image
Check out my Flickr gallery


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 12:02 am 
Offline
Global Moderator
User avatar

Joined: Mon Apr 19, 2010 7:58 pm
Posts: 1740
Layer group information can be found here.
http://registry.gimp.org/node/16563

or direct dl here
http://registry.gimp.org/files/mig-gimp ... groups.scm


i cant seem to find the other layer script,(multi layer options) perhaps i uploaded it to mediafire, ill look.
i think it may have been included in 2.7.1

_________________
Image
Check out my Flickr gallery


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 1:08 pm 
Offline
Newbie

Joined: Sat Jul 10, 2010 12:43 am
Posts: 29
Thank you very much but i already have layer groups scripts in many instances in *.scm scripts and python *.py plug-ins.
They all very huge but i don't find them to be able to change scale of different layers at at time. I think they are just performing any operations with linked layers such as arranging them in a layer stack. Meanwhile at a canvas editing abilities is still the same and as i think they not able to scale different layers.
I was googling yesterday and did not find any mentions about multi layer options even in the plug-ins registry. I'm hoping it will be embedded in the following versions.
I believe that open programs may be professional too for many purposes but without handy layer editing it would be problematic.
It's a pity a have no time (and maybe brains :question:) for C.


Top
 Profile  
 
PostPosted: Mon Jul 12, 2010 9:50 pm 
Offline
Global Moderator
User avatar

Joined: Mon Apr 19, 2010 7:58 pm
Posts: 1740
This is the one i have...

; Script designed to apply scale or crop to the selected range of layers

; This script is released into the public domain.
; You may redistribute and/or modify this script or extract segments without prior consent.

; This script is distributed in the hope of being useful
; but without warranty, explicit or otherwise.

; Define Script

(define (userscript-layers-scalecrop theImage theDraw theLayer1 theLayer2 TypeCheck theBound theNewWidth theNewHeight varX varY theCenter)

; Define Variables

(let*
(
(theNumber nil)
(theRepeat nil)
(theName nil)
(theLayerRef nil)
)


; If the end layer is set below the start layer create an error message and terminate
(if (> theLayer1 theLayer2)
(begin
(set! theLayerRef (car (gimp-message-get-handler)))
(gimp-message-set-handler 0)
(gimp-message "Error: End layer number must be set higher than start layer number!")
(gimp-message-set-handler theLayerRef))
(begin

; Begin an undo group
(gimp-undo-push-group-start theImage)

; Get the number of layers in an image and set to a variable
(set! theNumber (car (gimp-image-get-layers theImage)))

; If layer2 is set above total layers change layer2 value to the total number of layers
(if (> theLayer2 theNumber)
(set! theLayer2 theNumber))

; Set the repeat variable by subtracting the user input values from the total number of layers
(set! theRepeat (+ (- theLayer2 theLayer1) 1))

; Set up variable for setting active layers and attributes
(set! theLayerRef (cadr (gimp-image-get-layers theImage)))

; Alter theNumber for use in setting active layers and attributes
(set! theNumber (- theNumber (- theLayer1 1)))

; Set up offset values for crop for direct usage if crop was selected
(if (= TypeCheck 1)
(begin
(set! varX (- (* varX 2)))
(set! varY (- (* varY 2)))
))

; Begin loop and continue while repeat is higher than zero
(while (> theRepeat 0)

; Check for type. Do first set of actions if Scale is requested. Otherwise do second set of actions.
(if (= TypeCheck 0)
(begin
; scale layer to requested dimensions
(if (= theBound 0)
(gimp-layer-scale (aref theLayerRef (- theNumber 1)) theNewWidth theNewHeight FALSE)
(gimp-layer-scale (aref theLayerRef (- theNumber 1)) (gimp-image-width theImage) (gimp-image-height theImage) FALSE))
)
(begin
; Crop layer to requested dimensions
(if (= theBound 0)
(gimp-layer-resize (aref theLayerRef (- theNumber 1)) theNewWidth theNewHeight varX varY)
(gimp-layer-resize-to-image-size (aref theLayerRef (- theNumber 1))))
)
)

; Place affected layers in the center if requested
(if (= theCenter 0)
(gimp-layer-set-offsets (aref theLayerRef (- theNumber 1)) (- (/ (car (gimp-image-width theImage)) 2) (/ (car (gimp-drawable-width (aref theLayerRef (- theNumber 1)))) 2)) (- (/ (car (gimp-image-height theImage)) 2) (/ (car (gimp-drawable-height (aref theLayerRef (- theNumber 1)))) 2))))

; Alter variables ready for checking for next layer and applying to next layer
(set! theNumber (- theNumber 1))
(set! theRepeat (- theRepeat 1))

)

; Update visual display
(gimp-displays-flush)

; End undo group
(gimp-undo-push-group-end theImage)

))
))

; Register script
(script-fu-register "userscript-layers-scalecrop"
"<Image>/Layer/Multi-Layer Options/Scale or Crop Layers..."
"Scales or Crops layers from the specified layer range"
"Daniel Bates"
"Daniel Bates"
"Dec 2007"
"*"
SF-IMAGE "SF-IMAGE" 0
SF-DRAWABLE "SF-DRAWABLE" 0
SF-ADJUSTMENT _"Start at which layer?" '(1 1 2000 1 5 0 1)
SF-ADJUSTMENT _"End at which layer?" '(2 1 2000 1 5 0 1)
SF-OPTION _"Scale or Crop?" '(_"Scale" _"Crop")
SF-OPTION _"To Image Boundaries? (Further options are ignored if yes)" '(_"No" _"Yes")
SF-ADJUSTMENT _"New Width" '(200 1 9000 1 5 0 1)
SF-ADJUSTMENT _"New Height" '(200 1 9000 1 5 0 1)
SF-ADJUSTMENT _"Offset X (for crop)" '(0 0 9000 1 5 0 1)
SF-ADJUSTMENT _"Offset Y (for crop)" '(0 0 9000 1 5 0 1)
SF-OPTION _"Center Adjusted Layers?" '(_"Yes" _"No")
)


Hope that helps you. =)

_________________
Image
Check out my Flickr gallery


Top
 Profile  
 
PostPosted: Mon Jul 12, 2010 11:00 pm 
Offline
Newbie

Joined: Sat Jul 10, 2010 12:43 am
Posts: 29
Great post! ;D

Okay, not so handy as in "adobe's" but better than nothing.
Still want it to be fully embedded onetime.

Thank you so much!


Top
 Profile  
 
PostPosted: Tue Jul 13, 2010 4:13 am 
Offline
Global Moderator
User avatar

Joined: Mon Apr 19, 2010 7:58 pm
Posts: 1740
anytime, glad i could help. :)

_________________
Image
Check out my Flickr gallery


Top
 Profile  
 
PostPosted: Fri May 11, 2012 12:05 am 
Offline
Newbie
User avatar

Joined: Fri Nov 25, 2011 1:50 am
Posts: 16
Location: Miami Beach FL USA
Hello, I did a trial using two images opened as layers, in an attempt to link and lock them and resize them so as to prep to be used in an animation whether for a slideshow or a .gif animation, whichever..

Well anyway, below is what happened, and, obviously I missed something.

I do positively recall that a few months ago while browsing randomly among threads I had read that resizing of multiple layers by locking them and using the scale option will indeed work.
Well, please let me know what I did wrong. Thank You. (see below)

This is screenshot 1. It shows that the two layers of pane to the left are NOT locked.

Image

This is screenshot 2. It shows that the two layers of pane to the left ARE now LOCKED.

Image

This is Scr3. It shows the scale tool BEFORE resizing -


Image

This is Scr4. It shows the scale tool AFTER resizing -

Image

This is Scr5. This final screenshot shows that only the TOP layer resized to the dimensions specified into the scale tool -

Image


Okay- there you have it, with screenshots and all... ???

You tell me what I did wrong please, and again- thank you sincerely.

_________________
Image

Uploaded with ImageShack.us


Top
 Profile  
 
PostPosted: Fri May 11, 2012 3:04 pm 
Offline
Global Moderator
User avatar

Joined: Mon Oct 12, 2009 1:34 pm
Posts: 2199
I'm kind of confused about what result you wanted to have.
Anyway, locking the alpha channel should be completely useless in this operation: Locking the Alpha channel (the box you ticked, screenshot 2) basically means that you cannot edit any transparent part of your image. You prevent the transparency channel to be altered by any tools (for example, if I have a photo in front of a transparent background and I lock the Alpha Channel, I can paint all over the image with the Paintbrush Tool but I will only be able to paint over the photo, and NOT the background.)
Your photos don't even HAVE an Alpha Channel, so there shouldn't be any use for that option for your problem.

Or, as the official Gimp docs say:
Quote:
“Lock alpha channel” setting

In the upper left corner of the Layers dialog appears a small checkbox that controls the “Lock” setting for the transparency of the layer (see the figure below). If this is checked, then the alpha channel for the layer is locked, and no manipulation has any effect on it. In particular, nothing that you do to a transparent part of the layer will have any effect.



Anyway.
I'll make the same operation and document every single step:

- Start Gimp
- Open two images as seperate layers
- Click on the chain symbol next to both layers
- Click on the resize-tool
- Cick on the top layer
- Drag and drop it to a smaller value


Works like a charm. Both layers get resized to the correct size.
Try it again and use my steps. If all of that doesn't work, get Gimp 2.8 and put the two layers into 1 layergroup which can be resized as well.

_________________
Inactive.
Spoiler: show
Willy wrote:
arzorac

Maffe811 wrote:
Arcoroc

David Wood wrote:
Arzorac

sagtek wrote:
Arzonic

Legionenigmatics wrote:
azornac

Cyrilshark wrote:
Argzornack, I still have to congratulate you on having the most epic signature ever. haha

*bow*


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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

Jump to:  
cron


Powered by phpBB® Forum Software © phpBB Group