Slashdot Mirror


Graphic Slicing with The Gimp?

Ivo asks: "I'm a webdeveloper working almost exclusively in Linux. But I currently still use Windows to use Adobe's ImageReady, to splice up the designs that we get from our webdesign partners. Usually, if someone asks 'can I do Adobe Photoshop stuff on Linux', the answer is of course, Gimp. Gimp rules. No doubt about that, and I use it all the time. But I miss the features that ImageReady has, like automatic generation of a lot of small images and buttons for a website, including mouseover and mouseoff variants. Doing that manually in Gimp or Photoshop takes hours. Is there a program for Linux, or even better a plugin for Gimp, that does what ImageReady does?" How difficult would something like this be to do using Script-Fu?

4 of 13 comments (clear)

  1. try python by DrSkwid · · Score: 3, Interesting

    and the PIL module

    you can even do it interactively

    python is cross platform too so your scripts won't be wasted if/wehn you move platforms

    I use it for generating thumbnails and <img> tags and whatever

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:try python by DrSkwid · · Score: 3, Interesting

      quick cut and paste from the pythonware site

      Example: Create JPEG Thumbnails
      import os, sys
      import Image

      for infile in sys.argv[1:]:
      outfile = os.path.splitext(infile)[0] + "-thumb.jpg"
      if infile != outfile:
      try:
      im = Image.open(infile)
      im.thumbnail((128, 128))
      im.save(outfile, "JPEG")
      except IOError:
      print "cannot create thumbnail for", infile

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  2. try checking our Gimp Script-fu by pwagland · · Score: 3, Informative
    Try checking out Gimp Script-fu or Gimp plugins.

    Or check to see if you have perl-o-tine installed. From the image, right click, filters/web/perl-o-tine... It is included in my SuSE install of gimp 1.2.2, bymmv. Perl-o-tine will split an image into a set of squares for you, I don't really know how to use guides, so at the moment I can only create nxn grids, however, each box can be of an arbitrary size. Doesn't really help with rollovers though.

    The rollover plugin may help more here, but I have never used it, so don't know how it works.

    Good luck!

  3. Script-Fu yes, and Perl-Fu... by WWWWolf · · Score: 2, Informative
    Script-Fu is good for zillions of things, like automatical creation of whatever your heart desires.

    Of course, it's based on rather "limited" Scheme implementation. I'd recommend Perl-Fu - everything Script-Fu can do and more, in a vastly easier-to-debug environment.

    Neither of the languages are too hard, but Perl-Fu will be my favorite from now on.

    I have some example scripts in the web, too. In case anyone cares. Not much of Perl yet, but more than enough Scheme to confuse anyone =)