GIMP :: Script-fu - Best Way To Use Drawable-transform-rotate?
Jul 10, 2013
I'm new here, as well as to script-fu, although I've looked into Scheme and Lisp and know how to program. I'm using Gimp 2.6.12 (the latest version on Linux - Ubuntu 12.04.2)
So, an overview of what I'm trying to do: create a simple clock face (black) with 12 solid white rectangles at the hour marks.
I have a single layer, (black background, white foreground colours), I select a circle, invert the selection and bucket fill.
Then I select a rectangle, fill it, rotate the layer (which cuts out the rectangle, creates a floating selection with it, and rotates that) anchor the flt-sel (and then repeat 12 times).
> (gimp-rect-select image 570 396 25 8 2 0 0) ; select rectangle
(#t)
> (gimp-bucket-fill layer 0 0 100 0 0 0 0) ; fills the selection (stays selected)
(#t)
> (gimp-drawable-transform-rotate layer (/ PI 2) 0 400 400 0 2 0 3 0) ; creates a flt-sel, but returns layer instead of the flt-sel(!?) ...
(4) ; (also deactivates selection)
> (set! fs (car (gimp-image-get-floating-sel image))) ; ... so have to get the flt-sel explicitly
26
> (gimp-floating-sel-anchor fs)
(#t)
This kinda works, but doesn't feel like the optimal way to do it . What I was expecting to do is something like copying the selection, 12 x (rotate and add), bucket-fill.
How can I move (rotate or otherwise transform) a Selection.
1. Suppose I have a single Layer, on which I draw an image.
2. Now I activate a Selection Tool (Rectangular, Elliptical, Lasso, etc.) and make a Selection.
3. Then I activate the Move Tool and click on the "Move Selection" option, not the "Move Layer" option. [Oddly, when the "Move Selection" option is activated, there are two greyed out (unavailable) sub-options, both indication "Move Selection".]
4. With the Move Tool, I am able to move the Selection, but not the contents of that Selection.
The Gimp Documentation guide says:"If you click-and-drag the selection without handles, you create a new selection! To move the selection contents, you have to hold down Ctrl+Alt keys and click-and-drag the selection. This makes the original place empty. A floating selection is created. The required key commands may differ on your system, look in the status bar to see if another combination is specified; for example, Shift+Ctrl+Alt."
I have tried every combination of Shift, Ctrl and Alt (Shift+Ctrl, Ctrl+Alt and Shift+Alt). None of these allow me to move the contents of the selection. Further, there are no "handles" on the Selection. I suppose the key is to get the handles to appear, but I have not been able to discover the secret combination of keys to make that happen.
I have a horizontal bar graphic and I want to make it have the same shape than a circular graphic that I have as background. Â What I do first is to rotate the graph (after converting it in an image) to the right angle, depending on where it has to be positioned. After that, I use the Effect->Deform->Arc to make it fit in the same shape as the circular graph. But when I do those processes (in any order) I get a distorted image, with lines not describing concentric lines (not as radius, I mean). Â I got the perfect shape working on a MAC, but now I am working on PC. How can I achieve the same? Â I attach an image descrbing what I am telling.
I am trying to create a pattern that I have created in previous itterations of Illustrator. In CC when I create a triangle (either via Star, Poly, or Pen tool) and then try to rotate it via Transform Each > Transform again, the rotation point moves according to what the bounding box would be if I reset it, rather than staying in one (original) spot relative to the actual bounding box and triangle. I cannot find any settings that would be affecting the rotate point in this way. I am pretty confident that I am using the same procedure now that I did in older versions of Illustrator. Perhaps I am using the wrong procedure. Â Naturally, if you are rotating something around its center you should expect that it would end up create a circular pattern. It is more of a square with concave sides. The red is a perfect circle that I grouped to the triangle to demonstrate the rotate points movement. It is located in the exact center according to the align tools.
Using transform tool to rotate, often gradients do not rotate. In the example below only the "w" gradient did. Good news is the rotate tool works fine.  Appears this has something to do with compound paths, as this normally does not happen on a new single path. Releasing the compound also rotates the gradient unexpectedly.
I have a custom AcGiDrawable entity that I want to wrap in .Net. All this is done and compiles fine but when I try to instance the object I get the message "Cannot create an instance of the abstract class or interface '....'.
I have several custom entities (derived from AcDbEntity and AcDbObject) that aren't a problem, but for this one, problems arise.
I have checked the road map for GIMP and I have seen that the Unified transform tool can be expected in version 3.8. (ugh)
Now what I would like to ask is there any tool or plugin for GIMP that can transform my selections? Or is there any open source image editor that can do it.
I'm not an artist and just for this I have to use Photoshop. For me PS is an overkill for just cutting up an image.
My goal is to write a Drawable Overrule, which would change the entities color to dark gray, except when they are on a specific layer. For closed-only curves in this layer, I want to add a semi-transparent hatch.
All works great, until user moves the mouse over this hatch : AutoCAD throws a fatal error and closes. I've no exception in debugger...
When I remove the code concerning the hatch, I've no error at all. Â Public Class ClosedCurveDrawableOverrule Inherits DrawableOverrule Public Const HighlightColorIndex As Short = 1 'Color Red Public Const BaseColor As Short = 251 ' Color DarkGray Public Const SpecificLayer As String = "Layer1" ' Set our transparency to 50% (=127) ' Alpha value is Truncate(255 * (100-n)/100) Public [code].......
I was trying to rotate an image, and after successfully doing so, now I can't exit out of the rotate tool. The layer keeps saying (Transformation). How do I get out of this mode? I want to start duplicating this image and rotating them to different positions, but I need to learn how to get out of this mode.
I'm working on a project with two layers: (1) a photograph, and (2) a line drawing. The line drawing provides the accurate shape, and I need to stretch the photograph to fit the line drawing fairly precisely. The line drawing is the top layer, and I've already added an alpha layer to it so that I can see the photograph through it. Now I need to rotate, scale, and stretch the photograph to fit. Two questions:
--Does Gimp have a tool akin to P$hop's "free transform," which allows you to rotate, scale, and stretch in a single tool before committing the changes?
--Whenever I start using the rotate or perspective tools, the photograph appears on top (even though it's the bottom layer) and I can no longer see the line drawing. Obviously, this makes it nigh impossible to get an accurate fit. Is there a way of preventing this from happening, so that I can see the transparent top layer even while I'm working on the bottom layer?
how can I transform a picture, like a landscape, into a curtain? I mean, if I have my picture I want to "blend" it also with shadows, etc... like this effect: URL.... not red, but as on it there is my picture...
I need to transform a rectangle part of my picture to a triangle, linearly, only with horizontal distortion, keeping vertical positions in place. (a rectangle to a triangle standing on its side, by moving the top corners to one point).
I tried the Cage Transform: the top of the picture seems good, but it also distorts the bottom line in this case. Other tools seem not suitable at all.
I wanted to transform only selected part of image and instead all the layers and all the image was transformed by 1800 degree. How to do this what I want to do with the aid of free gimp?
When I have a photo that has come out portrait rather than landscape which is a normal case the rotate function seems to cut off some of the two sides of the photo. If I want to rotate it what I call correctly I use Gnome Image Viewer.
I download a few new brushes but i cant rotate them. they stay the way i downloaded them... is there a way i can rotate them... double click the brush i wanted and brush editor pops up but says "READ ONLY"... i do see an angle position but its not movable so cant rotate it.
Is there any way to just rotate a rectangular image? I have often scanned in something that's not square, it's often a brochure that's taller than it is wide. But when I scanned it, I had turn it sideways to get the whole thing visible to the scanner. So it scans completely, but now I have an image of it that's not "up is up"-- I have "up is right" or "up is left." But now I have to do all this junkbutter: 1) Look at the canvas size, 2) make the width & height equal to the larger of the two, 3) use the Rotate tool to turn the image 90 degrees, then 4) do some magic to move the image to start at the upper-left, and 5) crop it back down to get rid of the blank space on the bottom. YUCKY! Is there some magic tool I haven't found yet that will rotate, move and crop all in one step? I just want to turn the entire image on it's side without any other fuss. Is that possible somehow? I have to assume it is, but I sure couldn't find it...
I can find image rotate easily enough. But I can't find any way I can rotate it a few degrees. I frequently scan stuff in and it frequently needs 1 degree or such to straighten it up. I used to do that with Paint Shop Pro. Surely Gimp has the same functionality?
I am looking for a way to rotate a image, but not the normal clockwise rotation, rather a spin rotation. I have tried the the transform tool with slight success . imagine looking at a front view of a wheel & tire that needs turned slightly.
Is there a way in gimp to rotate a 2D image (e.g. BMW%20M3%20-%202002%20-%2003.jpg) about the Y Axis? I tried GMIC but that rotates the layer in 3D. I would like to create a view of the front of the car or any any in between.
In a discussion today, a group of us were trying to figure out why whenrotating layers that don't have 100% opacity, go back to totally opaquewhen you try to arbitrarily rotate the layers? Is that an expectedbehavior? Such behavior makes it difficult to align layers.
When Rotating or Resizing an image I have recently run into an issue. This is new behavior so I think I either have something set incorrectly, or it came in with a recent re-install.
When Rotating or Resizing, and setting Clipping to Adjust, it always Crops the image.
In other words: If I were to attempt to stretch an image bigger than 1000x1000 to say 1500x1500 it appears to do all the correct calculations, and does stretch the image, but anything outside the original 1000x1000 disappears.
Likewise if I were to attempt to rotate an image that were say, 1000x1500, 90°, I would end up with a rotated image 1000x1000 in size, and transparent/background for the balance of the original 1000x1500 sized image.
I've tried uninstalling/reinstalling (it remembered all my settings, so I don't know how much good this might have done), setting the Clipping option to Clip, then Crop and back to Adjust again (also with no result).
Is there a way to rotate the paintbrush tool? There's many times when I'm using a brush and it's at the wrong angle. Placing the brush on a separate layer and then rotating the layer is a huge hassle. Therefore, I was wondering if there was a way to rotate brushes.