menüde görünmüyor ve bu ana kadar geldi budur:Gimp: python komut dosyası ben <a href="http://www.ibm.com/developerworks/library/os-autogimp/" rel="noreferrer">this</a> öğretici izledi
#!/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()
Ama eklenti ben Gimp'ten kullanıyorum (Gimp menüde gösterilir woun't 2.8). Chmod a + x haklarını verdi. Dosya konumu bir sorun olabilir: /.gimp-2.8/plug-ins/src/resize.py? Src tutulması nedeniyle. senaryonuz herhangi sözdizimi hatalar varsa
Bazı değişiklikler yapıldı: eksik alanı ekledi ve komut dosyasını '/ usr/lib/gimp/2.0/plug-ins' konumuna taşıdı. Şimdi menüde görünür. Teşekkürler. – kyng
Hata ayıklama için başka bir ipucu: komut satırından gimp'i başlatın ve ne tür hata mesajlarının göründüğünü görebilirsiniz. – kyng
Komut dosyasının yürütülebilir olduğundan emin olun. '$ Chmod + x plugin.py' dosyasını çalıştırmak benim için sorunu çözdü. – arunkumar