carol.gimp.org

gimp2

Python:center a layer

python

A complete script by yosh. Read it and paste it from this page or read it here and download from here and install.

centerylayer.py

File   Edit   Search   Preferences


#!/usr/bin/env python

from gimpfu import *

def python_center_layer(image, layer):
    x = (image.width - layer.width) / 2
    y = (image.height - layer.height) / 2
    layer.set_offsets(x, y)

register(
        "python_fu_center_layer",
        "Center a layer on the image",
        "Center a layer on the image",
        "Manish Singh",
        "Manish Singh",
        "2004",
        "<Image>/Python-Fu/Center Layer",
        "",
        [],
        [],
        python_center_layer)

main()









  

another-gnu-type

Most all of my software is gnu. thanks!

Valid XHTML 1.1!

CC-GNU GPL
This software is licensed under the CC-GNU GPL.