# Install re2ce
# http://re2c.org/
tar xzf re2c-0.12.3.tar.gz
cd re2c-0.12.3
./configure
make
make install
rm -Rf re2c-0.12.3
# Install libjpeg-devel
yum -y install libjpeg-devel
# Install jpeg.v6b
# http://www.ijg.org/files/
tar xzf jpegsrc.v6b.tar.gz
cd jpeg-6b
cp /usr/share/libtool/config.guess ./
cp /usr/share/libtool/config.sub ./
./configure –enable-shared
make
install -d /usr/local/man/man1
make install
rm -Rf jpeg-6b
# Install libtiff & libtiff-devel
yum -y install libtiff libtiff-devel
# Install libpng
# http://www.libpng.org/pub/png/libpng.html
tar xzf libpng-1.2.22.tar.gz
cd libpng-1.2.22
./configure
make
make install
rm -Rf libpng-1.2.22
# Install Ghostscript (needed for ImageMagick)
yum -y install ghostscript
# Install ImageMagick
yum -y install ImageMagick ImageMagick-devel
pecl install imagick
Tuesday, October 16, 2007
Friday, September 28, 2007
centos 4,5 mod rewrite enable
# nano /etc/httpd/conf/httpd.confFIND SECTION BEGINNING
Options Indexes FollowSymLinksAND CHANGE
AllowOverride NoneTO
AllowOverride All
Order allow,denySAVE FILE AND THEN
Allow from all
# service httpd restart
Monday, September 03, 2007
Samba Configuration
/etc/samba/smb.conf
/etc/samba/smb.conf
[global]Create a separate password file for Samba:
workgroup = TOPRAKALTI #workgroup name eg: WORKGROUP
server string = uyguLama #server name eg: My Server
; security = user
wins support = yes
username map = /etc/samba/smbusers
; encrypt passwords = yes
; guest ok = no
; guest account = nobody
[www]
comment = www
path = /var/www
writeable = yes
; printable = no
create mask = 0765
; browseable = yes
valid users = adm, root
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswdAdd user:
smbpasswd -a admin
Labels:
centos,
configuration,
linux,
network,
samba
Wednesday, August 08, 2007
php imagick text on image
$image = new Imagick('test.jpg'); //open image file
$draw = new imagickDraw();
$draw->setFont('arial'); //open "/usr/share/fonts/default/TrueType/arial.ttf"
$image->annotateImage ($draw, 10, 10, 1, 'test text'); //write "test text" on image
$image->writeImage('test2.jpg'); //save image file
Labels:
annotateImage,
image magick,
imagickdraw,
php,
text on image,
TrueType
php Imagick on CENTOS 5
# pear upgrade PEARphp Imagic example:
# pear config-set preferred_state beta
# pecl install imagick
error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate...
# yum install php-devel
# peardev install pecl/imagick
OK!
# nano /etc/php.ini
add php.ini "extension=imagick.so"
contrastImage(1); //contrast image ( 0 or 1 )
$image->sharpenImage(0.5,0); //sharpen image
$image->thumbnailImage(100,100); //creat thumbnail
$image->cropImage(100,100,0,0); //crop image
$image->writeImage('test2.jpg'); // save image
?>
save test.php
Labels:
bug,
centos,
fatal error,
image contrast,
image magick,
imagick,
pear,
pecl,
php,
sharpen,
thumb
Subscribe to:
Posts (Atom)