Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

A little Gimp script

by perlinux (Deacon)
on Apr 27, 2004 at 14:56 UTC ( [id://348528]=perlquestion: print w/replies, xml ) Need Help??

perlinux has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,
I'm trying to write a very simple script to resize my images on Gimp (I love it!). I have installed every kind (a great number..) of modules, and now I have Gimp-2.0pre3 installed.
This is not a code problem, I don't have anything on my mind...but what kind of modules I have to study and use??? I have read something, but I'm thinking that Gimp module (or Gimp::*) works to create new images, layers, backgorunds, channels etc...
I want to open my image with Gimp 2.0.1, and then load my Perl-script (I don't like Scheme..) to resize it...simple! And what about a script to resize any image in a directory??
Any kind of trick?? Thanks a lot!

Excuse me for my english

Replies are listed 'Best First'.
Re: A little Gimp script
by matija (Priest) on Apr 27, 2004 at 15:43 UTC
    That's now how GIMP modules work: they are loaded by GIMP - and they are passed the image to work on.

    If you want to work the other way (i.e. have modules choose the image to work on), then you should look at the Image::Magick modules.

Re: A little Gimp script
by paulbort (Hermit) on Apr 27, 2004 at 17:43 UTC
    From the TIMTOWTDI desk:

    You might also want to consider Image::Magick, which does all the resizing things without having to have an X server running and Gimp loaded.

    Gimp is great for user-driven image manipulation, but when it's script-driven, ImageMagick has been much easier to use for my projects.

    --
    Spring: Forces, Coiled Again!
      I want to thank you all!!! :-) but... :-(
      I'm trying to install Image::Magick but I have errors like these:
      Magick.xs:359: error: (near initialization for `Methods[74].arguments[ +3]') Magick.xs:359: error: initializer element is not constant ...
      and then:
      make: *** [Magick.o] Error 1
      I have installed libraries, perl-magick etc...and edited Makefile to find my libraries...

      And what about Imager module??

      Thanks a lot, monks

        If you can't get the module to install, you can fall back to calling the ImageMagick command line utilities (which is what I do because I didn't know about Image::Magick when I started using ImageMagick.) IM binaries are available for most OSes (even Win32).


        --
        Spring: Forces, Coiled Again!

        Have you tried a binary version of the perl-magick package. I also had problems with a source install of the Image::Magick but I installed the .rpm's for PerlMagick and IM that were packaged for my distro(Mandrake) and I got it to work. On Windows, perlMagick was an option during the ImageMagick binary install.

        I believe .debs are availible as well if you are an apt user.

Re: A little Gimp script
by saintmike (Vicar) on Apr 27, 2004 at 17:15 UTC
    Here's an article (Achtung, German!) featuring a script applying a bunch of effects on an image and then resizing it using the Gimp module, which interfaces with the Gimp.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://348528]
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found