Gallery: 图片处理库的安装:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: __FORCETOC__ Installing an image processing library is an essential part to install Gallery. We've tried to simplify the process quite a bit to aid in making the install painless. '''G...)
 
→‎NetPBM
 
(未显示同一用户的2个中间版本)
第1行: 第1行:
__FORCETOC__
__FORCETOC__


Installing an image processing library is an essential part to install Gallery.  We've tried to simplify the process quite a bit to aid in making the install painless.
图片处理库的安装时Gallery安装的重要环节。我们尝试稍微简化此安装过程,以使得用户避免些许麻烦。


'''Gallery 1''' supports two processing libraries: NetPBM and ImageMagick.  The Gallery Support Team recommends using NetPBM if you do not have administrator access on the machine, as we supply pre-compiled binaries for you to upload easily.
'''Gallery 1'''支持两类处理库:NetPBM和ImageMagick。如果你没有计算机管理者访问权限,Gallery支持小组推荐使用NetPBM,因为我们提供预先编译好的二进制,这样上传的时候就更简便了。


'''Gallery 2''' supports four image toolkits: NetPBM, ImageMagick, GD and GraphicsMagick. They're all equally good, though some say that NetPBM has slightly better quality and that ImageMagick is slightly faster than NetPBM. GraphicsMagick and ImageMagick are very similar. GD can be very fast, but it will also use a lot of memory so it may cause you to run into predefined server limits.  It is also compiled into PHP by default if your PHP is 4.3.0 or more recent, however it may not have support for all image types (e.g. it might not have JPEG support) and GD is also more error-prone than the other toolkits. If the binaries for NetPBM and ImageMagick are installed in default, or standard, locations then Gallery 2 will auto-detect them during Gallery 2 installation.  It won't cause any harm to enable all of these toolkits—in fact you’ll get the widest file type support if you do so.
'''Gallery 2''' 支持四类图片工具包:NetPBM,ImageMagick,GD和GraphicsMagick。它们的性能都很不错。但有人说NetPBM效能上略胜一筹。而ImageMagick较之NetPBM则更为快速。GD无法完成图片旋转操作。GraphicsMagick与ImageMagick则非常相似。GD可以达到很快的速度,与此同时就要消耗更多的内存。因此可能会招致预定义服务器局限。默认情况下,它也被编译进了PHP4.3.0或更新的版本中,但它不见得支持所有的图片格式(比如它可能不支持JPEG格式)。如果NetPBM和ImageMagick的二进制安装到默认的或标准的位置的话,那么在安装过程中Gallery2会自动检测到。启用所有的这些工具没有什么害处—但是你可能需要更为广泛的文件格式支持机制。


'''Note that the Gallery 2 modules called NetPBM and ImageMagick are ''not'' the toolkits, but the modules that enables Gallery 2 to use them. Do not enter the path to the gallery2/modules/netpbm or gallery2/modules/imagemagick in the toolkit setup in Gallery 2. Instead, point the modules where the actual binary files are located'''.
'''注意被称为 NetPBM和ImageMagick的Gallery模块''不是''工具包,但模块允许Gallery2使用它们。请勿在Gallery2的工具包安装中填入它们的路径gallery2/modules/netpbm或gallery2/modules/imagemagick;而应告知模块实际二进制文件的位置'''






==NetPBM==
==NetPBM==
#Verify which architecure and operating system your server is running.  You can either ask your host, or try entering your site's URL into http://www.netcraft.com/whats
#确认你的服务器所运行的体系及操作系统。你可以询问你的host,或尝试在http://www.netcraft.com/whats 中输入你的网站URL。
:: Note: i386, i686, x86, ... are all intel compatible architectures (if you are unsure, try the intel / x86 binaries first)
:: 注意: i386, i686, x86, ... 都是intel兼容的体系(如果你不放心可以先试试intel/x86二进制)
#Download NetPBM binary package from the [http://sourceforge.net/project/showfiles.php?group_id=7130&package_id=14464 Gallery Download Page].  Be sure to download the correct binaries for your system (see previous step).  ''If Netcraft said your system is running "Linux," you can generally assume you want the linux-intel binaries, not linux-alpha''
#[http://sourceforge.net/project/showfiles.php?group_id=7130&package_id=14464 Gallery下载页面]下载NetPBM二进制包。请确保下载正确对应你所使用系统的二进制(见前面的步骤)。''如果Netcraft告知你的系统运行的是"Linux,"基本上就可以确定你需要的是linux-intel二进制,而非linux-alpha''
#Unzip the package and upload the extracted binaries to a subdirectory in your base Gallery directory (usually name the directory '''netpbm'''). ''Remember where you uploaded them''
#解压此包并将解压后的二进制上传到Gallery基目录(该文件夹一般命名为'''netpbm''')下的一个子目录中。''请记住之前上传它们的位置''
#[[Chmod]] the directory, and every file inside the directory 0755 (in graphical FTP clients, this is Owner -> Read, Write, Execute; Group -> Read, Execute; Other -> Read, Execute) '''It is very important that you chmod both the directory and ''every'' file inside'''
#[[Chmod]] 0755目录 (在图形FTP软件中这是所有者(Owner) -> 读,写,执行(Read, Write, Execute); 组(Group) -> 读,执行(Read, Execute); 其他(Other) ->读,执行( Read, Execute)) 中的目录及所有文件。'''对其下的目录及''所有的''文件执行chmod是很重要的'''
#Run the [[Gallery1:Configuration Wizard|Configuration Wizard]] (Gallery 1) / Go to ''Site admin'' -> ''Plugins'' (Gallery 2) and enter the path to the NetPBM binaries (remember the path where you uploaded them) and hit save
#运行[[Gallery1:Configuration Wizard|配置向导]](Gallery 1)/打开''站点管理(Site admin)'' -> ''插件(Plugins)''(Gallery 2)并将路径输入NetPBM 二进制(记住之前上传它们的位置)并点击保存
:: Note: The path you're asked to enter must be an '''absolute filesystem path''' (''not'' the address that you'd type in the browser). If you uploaded the NetPBM binaries yourself, the path will be very similar to the albums path (G1) / storage directory path (G2) that you can find in your Gallery config.php file.  
:: 注:你被要求输入的路径必须为'''绝对文件系统路径'''(而''不是''你在浏览器中输入的地址)。如果你是自己上传NetPBM二进制的话,那么路径就会与相册路径(G1)或存储目录的路径(G2)极为相似,这些路径可以在Gallery的config.php文件中找到。
Windows 2003 / IIS 6: See [[Gallery:Installation_on_Windows_Server_2003_and_IIS6#NetPBM|NetPBM for Windows 2003]]
Windows 2003 / IIS 6:请参见[[Gallery:Installation_on_Windows_Server_2003_and_IIS6#NetPBM|Windows 2003的NetPBM]]


==ImageMagick==
==ImageMagick==
Information on how to install '''[http://imagemagick.org/script/index.php ImageMagick]''' is available from their website. Installing from '''[http://imagemagick.org/script/install-source.php source]''' and installing '''[http://imagemagick.org/script/binary-releases.php binary releases]'''
有关如何安装'''[http://imagemagick.org/script/index.php ImageMagick]'''的信息可以在他们的网站上找到。由'''[http://imagemagick.org/script/install-source.php 源文件]'''的安装及'''[http://imagemagick.org/script/binary-releases.php 二进制版本]'''的安装。


Also, most Linux distributions offer '''[http://imagemagick.org/script/index.php ImageMagick]''' via their respective package management interfaces.
通过他们对应的软件包管理界面,大部分Linux版本提供'''[http://imagemagick.org/script/index.php ImageMagick]'''


Note that you will most likely need administrator access to the computer to be able to install '''[http://imagemagick.org/script/index.php ImageMagick]'''. If you don't have that kind of access, you can either ask your host to install it for you or switch to using our precompiled NetPBM binaries instead.
注意,你很可能需要有管理员访问权限才能够安装'''[http://imagemagick.org/script/index.php ImageMagick]'''。如果你不具备这种访问权限的话,可以找你的host帮忙安装,或者你可以使用我们为你准备的经过预编译的NetPBM二进制。


Easy-to-install MacOS X packages can be found at [http://www.entropy.ch/software/macosx/#imagemagick www.entropy.ch]
MacOS X上的快捷安装包可以在[http://www.entropy.ch/software/macosx/#imagemagick www.entropy.ch]中找到。


==GD==
==GD==
[http://www.php.net/GD GD] is only supported by Gallery 2. Gallery 2 detects GD automatically. In site admin -> modules -> image toolkits GD, you can either activate it or not. If you can't activate it, then either your GD version is too old or more probably, GD is not loaded in your PHP. If your Gallery 2 is running on a webserver on a Windows platform and GD is not loaded, you have to uncomment a line in php.ini to load the GD extension:
[http://www.php.net/GD GD]仅被Gallery2支持。Gallery2将自动检测GD的存在。在站点管理->模块->图片工具包GD中,你可以启用或禁用它。如果你无法激活它的话,那么可能你的GD版本过低或更有可能的是,PHP中尚未装载GD。如果你的Gallery2是在Windows平台上运行而GD没有装载的话,你可能需要对php.ini中的某行执行取消批注操作以装载GD扩展:
  Change
 
  ;extension=php_gd2.dll
  ;extension=php_gd2.dll
  to
  修改为
  extension=php_gd2.dll
  extension=php_gd2.dll


==GraphicsMagick==
==GraphicsMagick==
[http://www.graphicsmagick.org/ GraphicsMagick] is only supported by Gallery 2. Gallery 2's imagemagick module works with binaries from either ImageMagick or GraphicsMagick.
[http://www.graphicsmagick.org/ GraphicsMagick]只被Gallery2所支持。Gallery2的imagemagick模块与ImageMagick或GraphicsMagick的二进制都兼容。


Similar to ImageMagick, you can download either precompiled binaries or the source from [http://www.graphicsmagick.org/www/download.html GraphicsMagick Download Page].
与ImageMagick相似,你可以从[http://www.graphicsmagick.org/www/download.html GraphicsMagick下载页面]下载预先编译好了的二进制或是源文件。


[[Category:Gallery 1:Installation|Image Processing Library]]
[[Category:Gallery 1:Installation|Image Processing Library]]
[[Category:Gallery 2:Installation|Image Processing Library]]
[[Category:Gallery 2:Installation|Image Processing Library]]

2008年8月4日 (一) 14:32的最新版本


图片处理库的安装时Gallery安装的重要环节。我们尝试稍微简化此安装过程,以使得用户避免些许麻烦。

Gallery 1支持两类处理库:NetPBM和ImageMagick。如果你没有计算机管理者访问权限,Gallery支持小组推荐使用NetPBM,因为我们提供预先编译好的二进制,这样上传的时候就更简便了。

Gallery 2 支持四类图片工具包:NetPBM,ImageMagick,GD和GraphicsMagick。它们的性能都很不错。但有人说NetPBM效能上略胜一筹。而ImageMagick较之NetPBM则更为快速。GD无法完成图片旋转操作。GraphicsMagick与ImageMagick则非常相似。GD可以达到很快的速度,与此同时就要消耗更多的内存。因此可能会招致预定义服务器局限。默认情况下,它也被编译进了PHP4.3.0或更新的版本中,但它不见得支持所有的图片格式(比如它可能不支持JPEG格式)。如果NetPBM和ImageMagick的二进制安装到默认的或标准的位置的话,那么在安装过程中Gallery2会自动检测到。启用所有的这些工具没有什么害处—但是你可能需要更为广泛的文件格式支持机制。

注意被称为 NetPBM和ImageMagick的Gallery模块不是工具包,但模块允许Gallery2使用它们。请勿在Gallery2的工具包安装中填入它们的路径gallery2/modules/netpbm或gallery2/modules/imagemagick;而应告知模块实际二进制文件的位置


NetPBM[编辑 | 编辑源代码]

  1. 确认你的服务器所运行的体系及操作系统。你可以询问你的host,或尝试在http://www.netcraft.com/whats 中输入你的网站URL。
注意: i386, i686, x86, ... 都是intel兼容的体系(如果你不放心可以先试试intel/x86二进制)
  1. Gallery下载页面下载NetPBM二进制包。请确保下载正确对应你所使用系统的二进制(见前面的步骤)。如果Netcraft告知你的系统运行的是"Linux,"基本上就可以确定你需要的是linux-intel二进制,而非linux-alpha
  2. 解压此包并将解压后的二进制上传到Gallery基目录(该文件夹一般命名为netpbm)下的一个子目录中。请记住之前上传它们的位置
  3. Chmod 0755目录 (在图形FTP软件中这是所有者(Owner) -> 读,写,执行(Read, Write, Execute); 组(Group) -> 读,执行(Read, Execute); 其他(Other) ->读,执行( Read, Execute)) 中的目录及所有文件。对其下的目录及所有的文件执行chmod是很重要的
  4. 运行配置向导(Gallery 1)/打开站点管理(Site admin) -> 插件(Plugins)(Gallery 2)并将路径输入NetPBM 二进制(记住之前上传它们的位置)并点击保存
注:你被要求输入的路径必须为绝对文件系统路径(而不是你在浏览器中输入的地址)。如果你是自己上传NetPBM二进制的话,那么路径就会与相册路径(G1)或存储目录的路径(G2)极为相似,这些路径可以在Gallery的config.php文件中找到。

Windows 2003 / IIS 6:请参见Windows 2003的NetPBM

ImageMagick[编辑 | 编辑源代码]

有关如何安装ImageMagick的信息可以在他们的网站上找到。由源文件的安装及二进制版本的安装。

通过他们对应的软件包管理界面,大部分Linux版本提供ImageMagick

注意,你很可能需要有管理员访问权限才能够安装ImageMagick。如果你不具备这种访问权限的话,可以找你的host帮忙安装,或者你可以使用我们为你准备的经过预编译的NetPBM二进制。

MacOS X上的快捷安装包可以在www.entropy.ch中找到。

GD[编辑 | 编辑源代码]

GD仅被Gallery2支持。Gallery2将自动检测GD的存在。在站点管理->模块->图片工具包GD中,你可以启用或禁用它。如果你无法激活它的话,那么可能你的GD版本过低或更有可能的是,PHP中尚未装载GD。如果你的Gallery2是在Windows平台上运行而GD没有装载的话,你可能需要对php.ini中的某行执行取消批注操作以装载GD扩展:

将
;extension=php_gd2.dll
修改为 
extension=php_gd2.dll

GraphicsMagick[编辑 | 编辑源代码]

GraphicsMagick只被Gallery2所支持。Gallery2的imagemagick模块与ImageMagick或GraphicsMagick的二进制都兼容。

与ImageMagick相似,你可以从GraphicsMagick下载页面下载预先编译好了的二进制或是源文件。