Image tools
Moderator: Admins
Image tools
Hey Miles,
Could you install either NetPBM (http://netpbm.sourceforge.net/) or ImageMagick (http://www.imagemagick.org) on www6? They are/can-be used to f.e. create thumbnails and do auto resizes of images.
It could be possible they are already there, but I can't figure out the path. I know the "GD" (http://www.boutell.com/gd) is online and running, but it's either cripled or an old copy, but the images it creates look horrible. (Maybe a reinstall helps?)
Thanks in advance
Could you install either NetPBM (http://netpbm.sourceforge.net/) or ImageMagick (http://www.imagemagick.org) on www6? They are/can-be used to f.e. create thumbnails and do auto resizes of images.
It could be possible they are already there, but I can't figure out the path. I know the "GD" (http://www.boutell.com/gd) is online and running, but it's either cripled or an old copy, but the images it creates look horrible. (Maybe a reinstall helps?)
Thanks in advance
Alexander
-
- Site Admin
- Posts: 704
- Joined: Wed Jun 12, 2002 5:57 pm
- Location: Toronto, Ontario
- Contact:
Re: Image tools
GD is on www6 and definatly should not be crippled, nor a very old copy.Alexander wrote:Hey Miles,
Could you install either NetPBM (http://netpbm.sourceforge.net/) or ImageMagick (http://www.imagemagick.org) on www6? They are/can-be used to f.e. create thumbnails and do auto resizes of images.
It could be possible they are already there, but I can't figure out the path. I know the "GD" (http://www.boutell.com/gd) is online and running, but it's either cripled or an old copy, but the images it creates look horrible. (Maybe a reinstall helps?)
Thanks in advance
I just re-installed Image::Magick, I could have sworn it was there before, but when I did a locate, i didn't find it.... So I guess not
You'll find it under the default path now .
-
- Site Admin
- Posts: 704
- Joined: Wed Jun 12, 2002 5:57 pm
- Location: Toronto, Ontario
- Contact:
rather i should say it will be re-installed soon:
--11:18:02-- http://layer1.cpanel.net/magick.tar.gz
(try: 2) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers.
Retrying.
--11:21:49-- http://layer1.cpanel.net/magick.tar.gz
(try: 3) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers.
Retrying.
--11:25:38-- http://layer1.cpanel.net/magick.tar.gz
(try: 4) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers.
Retrying.
--11:29:27-- http://layer1.cpanel.net/magick.tar.gz
(try: 5) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
Looks like the first attempt didn't fly, burstnet must be having connectivity issues.
--11:18:02-- http://layer1.cpanel.net/magick.tar.gz
(try: 2) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers.
Retrying.
--11:21:49-- http://layer1.cpanel.net/magick.tar.gz
(try: 3) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers.
Retrying.
--11:25:38-- http://layer1.cpanel.net/magick.tar.gz
(try: 4) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers.
Retrying.
--11:29:27-- http://layer1.cpanel.net/magick.tar.gz
(try: 5) => `magick.tar.gz'
Connecting to layer1.cpanel.net[66.197.217.12]:80... connected.
Looks like the first attempt didn't fly, burstnet must be having connectivity issues.
-
- Site Admin
- Posts: 704
- Joined: Wed Jun 12, 2002 5:57 pm
- Location: Toronto, Ontario
- Contact:
the 'locate' and 'whereis' commands are handy in a pinch like this:Alexander wrote:I feel stupid for asking, but hey .. euhmz. .could you post the path to it when you're done? (usr/bin or usr/local or uisr/local/image ,... I forgot which one to use) ...
root@www6 [~]# whereis ImageMagick
ImageMagick: /usr/share/ImageMagick /usr/man/man1/ImageMagick.1
obviously you don't want the man pages, just the program .
GD library
I use the GD library for creating thumbnails and have found that using the function ImageCreateTrueColor creates far better images than the function ImageCreate
If your scripts are using ImageCreate you might like to try the ImageCreateTrueColor function instead. I think there may have been a change between versions of the GD library as I used to use ImageCreate and noticed a change in the quality which led me to make the above change.
If your scripts are using ImageCreate you might like to try the ImageCreateTrueColor function instead. I think there may have been a change between versions of the GD library as I used to use ImageCreate and noticed a change in the quality which led me to make the above change.
I will check that ou. Script using the GD is 4Images (1.7) . .and while on other hosts it works flawlesly here the tumbnails created look like not-so-good-looking-ones (256 colors even I think) .. .I'll try it and let you know
edit, think i found it:
Thats on line of /includes/image_utils.php
edit, think i found it:
Code: Select all
if (defined('CONVERT_IS_GD2') && CONVERT_IS_GD2 == 1) {
$thumb = imagecreatetruecolor($width, $height);
}
else {
$thumb = imagecreate($width, $height);
}
Alexander
4images
I downloaded 4images to have a look.
What I think you need to do is edit the file constants.php
/includes/constants.php
find the line
define('CONVERT_IS_GD2', 0);
and change this to
define('CONVERT_IS_GD2', 1);
What this code is saying is if CONVERT_IS_GD2 is defined and its set to 1 use the true color create otherwise use the normal create. The variable CONVERT_IS_GD2 is set in the constants file and is 0 by default (imagecreate) which produces poor results.
hope this fixes it
What I think you need to do is edit the file constants.php
/includes/constants.php
find the line
define('CONVERT_IS_GD2', 0);
and change this to
define('CONVERT_IS_GD2', 1);
// If you use GD higher 2.0.1 and PHP higher 4.0.6 set this to 1.
// Your thumbnails will be created with better quality
Code: Select all
if (defined('CONVERT_IS_GD2') && CONVERT_IS_GD2 == 1) {
$thumb = imagecreatetruecolor($width, $height);
}
else {
$thumb = imagecreate($width, $height);
}
hope this fixes it
Last edited by isinglass on Sun Jul 20, 2003 6:57 pm, edited 1 time in total.