You are here

pan to bow

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
script-fu-pan-to-bow.scm4.99 KB

Takes a wide panoramic image and bends it into a rainbow-shaped image in a way that preserves scale and aspect ratio.

sangre de cristo mountains

is morphed into

pan to bow

ONE MOTIVATION: On image hosting sites like flickr, images are displayed according to their largest linear dimension, so large aspect-ratio shots end up with very little real estate. By bending the image into a semi (or full) circle, you can give your image a lot more area of the screen. Not only that but since the linear dimension is smaller, the image details will actually be larger (by a factor of as much as pi=3.14159...) when the image is scaled to fit within the fixed linear dimension.

USAGE NOTES:

Angle of the bow (eg, shown above is 270 degrees) is an input parameter; default is 180 degrees.

Although the new image keeps the same scale as the original, the created image will have a larger number of pixels (because of all the empty pixels).

The attempt at non-distortion applies only to the central horizontal band of the image; depending on the initial aspect ratio, you will see distortion above and below that centerline. (The larger the initial aspect ratio, the smaller the distortion will be.)

This overwrites the current layer. So you should copy the current layer if you want to keep it around. But since the new layer will be of a different size than the current layer, you may prefer to overwrite it.

The part of the image that is outside the original image will be white.

BUGS:

If the aspect ratio isn't wide enough, then aspect ratio cannot be preserved. (This isn't actually a bug, it's basic geometry.) In particular, you want width/height > angle / 114.6. For instance, for default 180-degree bow, width/height > 1.57 The program will still "work" in this case, but scale and aspect ratio will be compromised.

Because it uses plug-in-polar-coords, it has, as an intermediate step, to resize the image, in some cases by quite a large factor. (And pan images tend to be pretty large to begin with.) So there could be problems on computers with limited memory. It might have made more sense to just enhance the plug-in directly.

Disabled use of angle<45, since that leads to huge intermediate images!

Might be a nice feature to toggle whether the user wants to copy the current layer before altering it.

Currently, this tries to maintain scale along the middle of the image; one can imagine situations when it would be preferable to keep the scale accurate at the top or the bottom of the image.

I would prefer that the background be transparent instead of white; and if I create an image from scratch, and save it as an .xcf file, I can get the transparent background. But when I start with a jpeg file, I get a white background.

Code License: 
GIMP Version: 
Scripting Engine: 

Comments

Just wanted to thank you again for this cool Script-fu. Created this thread (http://www.gimpchat.com/viewtopic.php?f=9&t=787&p=8257#p8257) using it. Not hard to get transparent backgrounds with starting with a jpeg. Just open the jpeg, add an alpha channel, and then after done, save it as a png file. :)

New I wasn't going crazy and remember seeing this one. Looked for bend, warp,etc. to no avail. Found it the hard way (after over an hour of searching; never give up; never surrender. lol

Thanks. Going to download this one and give it a spin. :)

hi

i cannot download how can i do

To download this, look above the comment and click the link under "Attachment", name is "script-fu-pan-to-bow.scm"

Subscribe to Comments for "pan to bow"