Page 1 of 1
Image tools
Posted: Sat Jul 12, 2003 6:10 am
by Alexander
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
Re: Image tools
Posted: Sat Jul 12, 2003 11:13 am
by porcupine
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
GD is on www6 and definatly should not be crippled, nor a very old copy.
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
.
Posted: Sat Jul 12, 2003 3:58 pm
by porcupine
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.
Posted: Sat Jul 12, 2003 4:08 pm
by Alexander
So thats why it didn;t work
Let us know when it's there
Posted: Sat Jul 12, 2003 4:18 pm
by porcupine
Alexander wrote:So thats why it didn;t work
Let us know when it's there
This time it's actually running smoothly, will be done within 5 minutes.
Posted: Sat Jul 12, 2003 4:28 pm
by Alexander
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) ...
Posted: Sat Jul 12, 2003 11:08 pm
by porcupine
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) ...
the 'locate' and 'whereis' commands are handy in a pinch like this:
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
Posted: Sun Jul 20, 2003 7:35 am
by isinglass
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.
Posted: Sun Jul 20, 2003 7:44 am
by Alexander
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:
Code: Select all
if (defined('CONVERT_IS_GD2') && CONVERT_IS_GD2 == 1) {
$thumb = imagecreatetruecolor($width, $height);
}
else {
$thumb = imagecreate($width, $height);
}
Thats on line of /includes/image_utils.php
4images
Posted: Sun Jul 20, 2003 6:43 pm
by isinglass
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);
// 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);
}
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
Posted: Sun Jul 20, 2003 6:52 pm
by Alexander
Oh I just edited $thumb = imagecreate($width, $height); to $thumb = imagecreatetruecolor($width, $height); ... also does the trick
Thanks for your reply though !