Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Posts
    216
    Thanks
    9
    Thanked 0 Times in 0 Posts

    php image resize thumbnails

    Hello,

    I am putting together an image gallery using open source code. I have a script to generate thumbnails but it is not ideal because the quality loss from the original images is high. Secondly, ideally i would like the portrait images to resize to the same size as landscape images but i am not sure how to achieve this.

    does anyone have or know of any code to create thumbnails like this??

    Thanks

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Alex ...

    Give us a link to the gallery where you put your full-size images.
    There is a PHP method using GD library that could do it for you.

  • #3
    Regular Coder
    Join Date
    Sep 2006
    Posts
    216
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Im afraid the gallery isnt hosted yet, I am developing on my local machine. What is the PHP method you are refering to?

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    The PHP GD Library where you manipulate images.

    You can use PHP to scan your directory and automatically create
    another directory filled with thumbnails of the same name as the
    full-size.

    Your local PC needs all of the server stuff with GD.

    http://us.php.net/gd

    Specifically, this page:
    http://us.php.net/manual/en/function...yresampled.php

    Where there are good examples on creating thumbnails.

  • #5
    Regular Coder
    Join Date
    Sep 2006
    Posts
    216
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Ah thank you, I will go through that as it seems to be exactly what I am looking for thanks. I will eventually move my work to my webspace which is hosted by Powweb. I dont expect you to have heard of it but would it be reasonable to assume that Powweb would include the GD libraries - it does offer a lot of support for server side scripting.


  •  

    Posting Permissions

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