Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Graphic Slicing with The Gimp? 13

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?
This discussion has been archived. No new comments can be posted.

Graphic Slicing with The Gimp?

Comments Filter:
  • try python (Score:3, Interesting)

    by DrSkwid ( 118965 ) on Thursday November 22, 2001 @06:44AM (#2600030) Homepage Journal
    and the PIL module [pythonware.com]

    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
    • Re:try python (Score:3, Interesting)

      by DrSkwid ( 118965 )
      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
      • Example: Create JPEG Thumbnails

        I think ImageMagick [imagemagick.org] will do this better: mkdir thn; cp *.jpg thn; cd thn; mogrify -format jpeg -geometry 128x128 *.jpg or something like that...



        • I think ImageMagick [imagemagick.org] will do this better

          better in that you can't even remember the commands ?:)

          personally the thumbnail example is a bit noddy

          My real script would shink the thumbnails to fit inside a bounding box and preserve their apsect ratio

          PLUS

          tag on a :
          print "" % (filename, img.width, img.height)

          and maybe even throw in some javascript

          show me image magik doing that and I'll be impressed
          • oh ffs stupid bastard htmlfilter

            print "<a href='%'><img src='%' border=0 width='%' height='%' alt='%'></a>" % (filename, thumbfilename, img.width, img.height, 'thumbnail')
  • by pwagland ( 472537 ) on Thursday November 22, 2001 @08:54AM (#2600199) Journal
    Try checking out Gimp Script-fu [gimp.org] or Gimp plugins [gimp.org].

    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 [gimp.org] may help more here, but I have never used it, so don't know how it works.

    Good luck!

    • There's an unlimited supply of guides hidden in the rulers at the side of the images. Just drag a few of them out onto the image.
    • Actually perl-o-tine was one of the very few apps I have ever seen that completely locked up my Linux box - even login via ssh didn't work anymore, had to do a power cycle. After that, I rolled my own Perl script using ImageMagik. Things may have improved since then, didn't try the latest release of gimp.
  • RTFM (Score:1, Troll)

    by Howie ( 4244 )
    I haven't used it, but a trivial google search found the GIMP Table Magic plugin in the gimp manual. That seems to do what you want.
    • by Howie ( 4244 )
      could whoever modded that as a troll please explain?

      I *did* do a simple google search, and *did* find the Table Magic plugin which appears to do exactly as requested, and *is* in the gimp manual. What's the troll? I don't normally care about moderation, but this is silly.
  • 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 [www.iki.fi], too. In case anyone cares. Not much of Perl yet, but more than enough Scheme to confuse anyone =)

Nothing is more admirable than the fortitude with which millionaires tolerate the disadvantages of their wealth. -- Nero Wolfe

Working...