From: Alexander Bokovoy <a.bokovoy@sam-solutions.net>
To: mandrake-russian@altlinux.ru
Subject: [mdk-re] Re: [JT] консольный gimp
Date: Tue Mar 12 13:47:25 2002
Message-ID: <20020312104718.GE4293@sam-solutions.net> (raw)
In-Reply-To: <40500764260.20020312110448@talarii.co.ru>
On Tue, Mar 12, 2002 at 11:04:48AM +0300, Artem Pastuchov wrote:
> Hello Mikhail,
>
> Tuesday, March 12, 2002, 1:05:14 AM, you wrote:
>
> MZ> Hello roman_tutov,
>
> MZ> On Mon, Mar 11, 2002 at 03:26:11PM +0300, roman_tutov@mail.ru wrote:
> >>
> >> ЗЫ . Да ну вас линуксоидов . Я удивляюсь почему гимп не консольный .:)
>
> MZ> Ну, а чем плох ImageMagick? :)
> Мало того , никто не мешает применятьGimp в консоли
> для этого есть перловые и питоновые модули
И модули для Ruby. Которые, более того, позволяют действительно в консоли
все проделывать, да еще и из программы, запущенной на другой машине. Вот
пример (взят из рассылки ruby-talk, автор Masahiro Sakai):
1. start up gimp and dRuby server
(its menu path is <Toolbox>/Xtns/Ruby-Fu/dRuby Server/Start...)
BTW you can start up them from command-line like
% gimp --no-interface --batch '(ruby-fu-druby-server 1 "druby://:7950" "")'
2. Then you can use gimp procedures via dRuby.
Following is an example.
require 'gimp/base'
require 'drb/drb'
DRb.start_service(nil, nil)
g = DRbObject.new(nil, 'druby://:7950')
width = 100
height = 100
old_fg = g.gimp_palette_get_foreground
old_bg = g.gimp_palette_get_background
img = g.gimp_image_new(width, height, Gimp::RGB)
begin
img.undo_disable # equivalent to g.gimp_image_undo_disable(img)
d = g.gimp_layer_new(img, width, height, Gimp::RGBA_IMAGE, "Background",
100, Gimp::NORMAL_MODE)
img.add_layer(d, -1) # equivalent to g.gimp_image_add_layer(img, d, -1)
g.gimp_palette_set_background(Gimp::Color.new(255,255,255))
g.gimp_edit_fill(d, Gimp::BG_IMAGE_FILL)
d = g.gimp_layer_new(img, width, height, Gimp::RGBA_IMAGE, "BoxLayer",
100, Gimp::NORMAL_MODE)
img.add_layer(d, -1)
g.gimp_drawable_fill(d, Gimp::TRANS_IMAGE_FILL)
g.gimp_rect_select(img, width/4, height/4, width/2, height/2,
Gimp::ADD, false, 0)
g.gimp_palette_set_foreground(Gimp::Color.new(0,0,255))
g.gimp_bucket_fill(d, Gimp::FG_BUCKET_FILL, Gimp::NORMAL_MODE,
100, 0, false, 0, 0)
g.gimp_selection_none(img)
#g.script_fu_drop_shadow(Gimp::RUN_NONINTERACTIVE, img, d, "8", "8", "5.0",
# Gimp::Color.new(0,0,0), "70", true)
img.active_layer = d
g.gimp_palette_set_foreground(Gimp::Color.new(255, 0, 0))
d = g.gimp_text_fontname(img, nil, width/4, height/4, "Ruby!", 0, true,
15, Gimp::PIXELS,
"-adobe-utopia-medium-r-normal-*-*-*-*-*-p-*-*")
img.flatten # equivalent to g.gimp_image_flatten(img)
filename = '/home/susho/my_src/hoge.bmp'
g.file_bmp_save(Gimp::RUN_NONINTERACTIVE, img, img.active_drawable,
filename, filename)
ensure
img.delete # equivalent to g.gimp_image_delete(img)
g.gimp_palette_set_background(old_bg)
g.gimp_palette_set_foreground(old_fg)
end
There are many many proedures provided by the gimp.
DB Browser (<Toolbox>Xtns/DB Browser...) will be your help
for searching functions.
--
/ Alexander Bokovoy
Software architect and analyst // SaM-Solutions Ltd.
---
I'm having an emotional outburst!!
next prev parent reply other threads:[~2002-03-12 13:47 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-11 12:12 [mdk-re] postgress roman_tutov
2002-03-11 12:15 ` Sergey Krivulja
2002-03-11 12:23 ` Re[2]: " roman_tutov
2002-03-11 12:29 ` roman_tutov
2002-03-11 12:34 ` Korshunov Ilya
2002-03-11 12:42 ` Re[4]: " roman_tutov
2002-03-11 12:49 ` Korshunov Ilya
2002-03-11 13:35 ` Re[6]: " roman_tutov
2002-03-11 13:52 ` Korshunov Ilya
2002-03-11 14:57 ` roman_tutov
2002-03-11 15:01 ` Korshunov Ilya
2002-03-11 15:15 ` Re[8]: " roman_tutov
2002-03-11 15:23 ` Korshunov Ilya
2002-03-11 15:33 ` Re[10]: " roman_tutov
2002-03-11 15:51 ` Korshunov Ilya
2002-03-11 16:02 ` Re[12]: " roman_tutov
2002-03-11 16:06 ` Korshunov Ilya
2002-03-11 16:51 ` Re[14]: " roman_tutov
2002-03-11 17:01 ` Korshunov Ilya
2002-03-11 17:19 ` Re[16]: " roman_tutov
2002-03-11 17:26 ` Korshunov Ilya
2002-03-11 17:43 ` Re[18]: " roman_tutov
2002-03-11 17:48 ` Korshunov Ilya
2002-03-11 17:53 ` Re[20]: " roman_tutov
2002-03-11 17:59 ` Korshunov Ilya
2002-03-11 18:34 ` Re[22]: " roman_tutov
2002-03-11 17:59 ` Re[20]: " Leonid B. Sysoletin
2002-03-11 18:03 ` Korshunov Ilya
2002-03-11 18:22 ` Re[22]: " roman_tutov
2002-03-11 18:29 ` Leonid B. Sysoletin
2002-03-11 18:39 ` Re[24]: " roman_tutov
2002-03-11 18:43 ` Leonid B. Sysoletin
2002-03-11 18:20 ` [mdk-re] postgress Alexander Bokovoy
2002-03-11 18:32 ` roman_tutov
2002-03-11 18:43 ` Alexander Bokovoy
2002-03-11 18:51 ` roman_tutov
2002-03-11 19:41 ` Alexander Bokovoy
2002-03-11 17:56 ` Re[20]: [mdk-re] postgress roman_tutov
2002-03-11 16:02 ` Re[10]: " Korshunov Ilya
2002-03-12 0:50 ` [mdk-re] [JT] консольный gimp Mikhail Zabaluev
2002-03-12 1:08 ` [mdk-re] [JT] консольный gimp рулит! cornet
2002-03-12 1:52 ` [mdk-re] " Mikhail Zabaluev
2002-03-12 2:12 ` [mdk-re] " cornet
2002-03-12 22:07 ` [mdk-re] Re: [JT] " Konstantin Lepikhov
2002-03-12 10:53 ` [mdk-re] Re: [mdk-re] [JT] консольный gimp Artem Pastuchov
2002-03-12 13:47 ` Alexander Bokovoy [this message]
2002-03-11 19:26 ` [mdk-re] postgress Alexei Takaseev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020312104718.GE4293@sam-solutions.net \
--to=a.bokovoy@sam-solutions.net \
--cc=mandrake-russian@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git