Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Batch conversion of images using gimp and Perl

by Anonymous Monk
on Aug 12, 2002 at 02:40 UTC ( #189375=note: print w/ replies, xml ) Need Help??

in reply to Batch conversion of images using gimp and Perl

Excellent perl script. Works like a charm and does a great job: jpeg file size went down without any noticeable quality degradation. One request though: Would it be possible to add an image re-size option please?

Comment on Re: Batch conversion of images using gimp and Perl
Replies are listed 'Best First'.
Re: Re: Batch conversion of images using gimp and Perl
by IlyaM (Parson) on Aug 12, 2002 at 12:58 UTC
    You can find names of methods that correspond to various Gimp operations via Gimp's PDB Explorer (menu Xtns/PDB Explorer). In this case it is gimp_image_scale. According docs avialable via PDB Explorer this function expects following parameters:
    In: IMAGE image INT32 new_width INT32 new_height
    Perl module Gimp that provides bindings allows you to call this function as
    Gimp->gimp_image_scale($img, $new_width, $new_height);
    It also does some magick so you can call same operation under different names. All following calls do the same thing:
    Gimp->gimp_image_scale($img, $new_width, $new_height); Gimp->image_scale($img, $new_width, $new_height); $img->scale($new_width, $new_height);
    All you have to do is adding such call before saving jpeg file.

    You can learn more from documenation in Gimp module and from Gimp-Perl web site.

    Ilya Martynov (

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://189375]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2015-11-29 22:20 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (753 votes), past polls