“转换图像成gif”的脚本貌似不起作用嘛……

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
ioonnm
帖子: 53
注册时间: 2009-07-16 18:24

“转换图像成gif”的脚本貌似不起作用嘛……

#1

帖子 ioonnm » 2009-07-18 20:29

ubuntu-tweak里面有这么一个脚本,是加入到右键的Scripts里面的

代码: 全选

#!/usr/bin/python

import os
import sys

def new_name(file):
    os.path.splitext(file)
    return '.'.join([os.path.splitext(file)[0],'gif'])

files = sys.argv[1:]

for file in files:
    os.system('convert %s %s' % (file, new_name(file)))
我右击一个jpg文件,然后Scripts-->Convert Image to GIF
一点反应的没有……
云挡住阳光
太阳没放弃发亮
emma
帖子: 75
注册时间: 2006-08-29 16:45
来自: 广东

Re: “转换图像成gif”的脚本貌似不起作用嘛……

#2

帖子 emma » 2009-07-18 22:07

多半是没有 convert 程序。

sudo apt-get install imagemagick
头像
ioonnm
帖子: 53
注册时间: 2009-07-16 18:24

Re: “转换图像成gif”的脚本貌似不起作用嘛……

#3

帖子 ioonnm » 2009-07-18 23:05

emma 写了:多半是没有 convert 程序。

sudo apt-get install imagemagick
imagemagick是干什么的啊,我装了,好像还是没反应……
云挡住阳光
太阳没放弃发亮
回复