Web Hosting Forums

Page 1 of 3 1 2 ... LastLast
Results 1 to 15 of 31

This is a discussion on High quality image resizing @ Jaguar in the Hosting Talk & Chit-chat forum
Hi, I'm making use of GD to create thumbnails on-the-fly from bigger images uploaded through an HTML form. I'm using a prefab php class that ...

  1. #1
    hip
    hip is offline
    Loyal Client
    Join Date
    Apr 2002
    Posts
    49

    High quality image resizing @ Jaguar

    Hi,

    I'm making use of GD to create thumbnails on-the-fly from bigger images uploaded through an HTML form. I'm using a prefab php class that acts with GD, and have everything installed in my server space at Aletia (Jaguar). Everything works ok, but image quality for the thumbs is pretty low.

    Large images have a 70% quality jpg compresion. I've tried both, 70 and 95 for the thumbs, but compressed image quality is still low. I've googled for it and found out everybody agrees that GD compresion quality is low if compared to Imagemagik and Netpbm, for instance.

    My question: May I use Imagemagik or other graphic module within this host? Are they (the modules) already installed or may I install them?

    [ not having root access, I may need modules (may they be PHP, Perl,...) * I only need thumbnail creation (though more capabilities may be interesting for future projects) * I may ask the Tech Support but prefer to have some real cases information beforehand]

    Thanx in advance for any info,
    hip

  2. #2
    Loyal Client
    Join Date
    Mar 2005
    Posts
    125
    Imagemagick can be used: /usr/local/bin/convert (on my server, atom) If that's not your path, try using "whereis convert" on your shell and it will tell you where it is. I don't know if there are any other image conversion tools on there..

  3. #3
    hip
    hip is offline
    Loyal Client
    Join Date
    Apr 2002
    Posts
    49
    Thanx Rye,

    Ok, I'll give it a try, but it'll be tomorrow, for I'm already done today, and still have some code to do. As soon as I find the path I'll try to manage with Imagemagik (I've never used it before), google a bit for it, check their site and, probably, come back for some extra advice.

    No news will mean good news. ;-)

    Thanx again,
    hip

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    Netpbm is also installed on at least some of the servers, although I've never used it no do I know how.

    Another thing to check: if your script is kind of old, it might be using the older imagecreate() and imagecopyresized() functions. Changing them to imagecreatetruecolor() and imagecopyresampled() will allow you to resize images using a much larger color palette (millions of colors vs. 256), which will result in much higher quality thumbnails. The new functions are part of GD versions 2.0+, which should be fully supported on JPC servers these days.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    Sorry! I don't have the time or patience to read this whole thread...

    However, 'GD' blows! Use 'Image Magick'

    On 'my' server, the path I use is ' /usr/bin/X11/mogrify'

    Sheesh, hold on. I haven't checked it for a while...

    Code:
    bash-2.05a$ whereis mogrify
    mogrify: /usr/bin/mogrify /usr/X11R6/bin/mogrify /usr/bin/X11/mogrify /usr/local/bin/mogrify /usr/man/man1/mogrify.1
    Your choice...
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  6. #6
    Anime fan ;)
    Join Date
    Mar 2004
    Location
    Wisconsin
    Posts
    87
    heh really? i use phpnuke port of coppermine, and it defaulted to GD2.0 ....i guess ill switch to imagemagick and try it out...hmm
    Technical Support
    Hours : 7 days a week (24hrs a day)

    Sales : [email protected]


    Customer Service
    Hours : Mon - Fri (8AM-5PM CST)
    Telephone:713.960.1502 *
    Toll Free:1.800.558.5869 *
    FAX:713.589.2531
    * Not a support number

    I dont work for jagpc, but i CAN read!!

  7. #7
    Loyal Client
    Join Date
    Sep 2002
    Posts
    640

    GD is OK

    GD library is perfectly capable of producing high quality thumbnails.
    The attached thumbnail was produced by GD library. Original image is also provided for comparison.
    Attached Images Attached Images

  8. #8
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,503
    I switched coppermine over to ImageMagick and my thumbnail size went from usually under 6k to around 30k. I switched back.

  9. #9
    || $name ne 'R.Stiltskin'
    Join Date
    Jun 2003
    Location
    Tejas
    Posts
    2,414
    One might also need to evaluate performance and not just image quality. ImageMagick might be too heavy duty for most needs and less likely to be resident in memory since more people use GD. Image Magick, from my brief experience, is a good tool in that it has many filtering tools... but at the cost I mentioned. If it needs to be loaded into RAM, there's going to be a delay. I've not benchmarked the difference but just observed it anecdotally. Not very scientific but something to be considered.

  10. #10
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,503
    It seemed speedy enough, and there's probably a setting somewhere to tell it to reduce the quality/filesize on the thumbnails, but "crikey"! 33K for a thumbnail is just way, way too high.

  11. #11
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,491
    Quote Originally Posted by Ron
    It seemed speedy enough, and there's probably a setting somewhere to tell it to reduce the quality/filesize on the thumbnails, but "crikey"! 33K for a thumbnail is just way, way too high.
    Ron have to agree with that. I try to keep all pages under 20 KB. I'm on a slow dial up an a lot of Internet users are. If the page does not load in 15 to 20 seconds the user will probably hit the back button.

  12. #12
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    Quote Originally Posted by clssam
    If the page does not load in 15 to 20 seconds the user will probably hit the back button.
    You could always defeat the back button...
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  13. #13
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    Quote Originally Posted by Ron
    I switched coppermine over to ImageMagick and my thumbnail size went from usually under 6k to around 30k. I switched back.
    Aha! Check this out, Ron...

    I've been experimenting with Menalto Gallery 2 (my wife's standalone photo gallery - not for PHP-Nuke) and ran across this thread.

    http://gallery.menalto.com/index.php...&postorder=asc

    Read better the lines, my man! +profile "*" seems to be the key...
    Last edited by Vin DSL; 08-12-2005 at 01:30 PM.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  14. #14
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    To convert a directory full of JPEG images to thumbnails, use:

    mogrify -size 120x120 -resize 120x120 +profile "*" *.jpg

    In this example, '-size 120x120' gives a hint to the JPEG decoder that the images are going to be downscaled to 120x120, allowing it to run faster by avoiding returning full-resolution images to ImageMagick for the subsequent resizing operation. The '-resize 120x120' specifies the desired dimensions of the output images. It will be scaled so its largest dimension is 120 pixels. The '+profile "*"' removes any ICM, EXIF, IPTC, or other profiles that might be present in the input and aren't needed in the thumbnails.
    SOURCE: http://maconlinux.net/linux-man-pages/en/mogrify.1.html
    Last edited by Vin DSL; 08-09-2005 at 08:50 PM.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  15. #15
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,503
    I guess that would require me to crawl through the source , find where the directives are constructed and modify it, then test it a bunch of ways to Sunday.

    I think I'll stick with the GD lib ! Seems to be working ok. I've got about 900 user entries so far, I think.

    Thanks for keeping me in mind though!
    Last edited by Ron; 08-09-2005 at 11:50 PM.

Page 1 of 3 1 2 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •