メニューに表示されない、これは私がこれまでに出ているものです:のGimp:Pythonスクリプトは、私が<a href="http://www.ibm.com/developerworks/library/os-autogimp/" rel="noreferrer">this</a>チュートリアルに従っ
#!/usr/bin/python
# -*- coding: utf-8 -*-
#http://www.ibm.com/developerworks/library/os-autogimp/
from gimpfu import*
def plugin_main(timg, tdrawable, maxh=540, maxw=800):
currentWidth = tdrawable.width
currentHeight = tdrawable.height
newWidth = currentWidth
newHeight = currentHeight
if (maxw < newWidth):
newWidth = maxw
newHeight = (float(currentHeight)/(float(currentWidth)/newWidth))
if (maxh < newHeight):
newHeight = maxh
newWidth = (float(currentWidth)/(float(currentHeight)/newHeight))
pdb.gimp_image_scale(timg, newWidth, newHeight)
register(
"python_fu_resize",
"Saves the image at a maximum width and height",
"Saves the image at a maximum width and height",
"N N",
"N N",
"2013",
"<Image>/Image/Resize to max...",
"*",
[],
[],
plugin_main)
main()
しかし、プラグインが、私はGIMPを使用しています(GIMPのメニューに表示さwoun't 2.8)。ファイルchmodに+ x権限を与えます。ファイルの場所が問題になる可能性があります:/.gimp-2.8/plug-ins/src/resize.py? srcはEclipseのためです。スクリプトに構文エラーがある場合
いくつかの変更を行いました:スペースを追加し、スクリプトを '/ usr/lib/gimp/2.0/plug-ins'に移動しました。今はメニューに表示されます。ありがとう。 – kyng
デバッグのヒント:コマンドラインからgimpを起動すると、表示されるエラーメッセージの種類を知ることができます。 – kyng
スクリプトが実行可能であることを確認してください。 '$ chmod + x plugin.py'を実行すると私の問題が解決しました。 – arunkumar