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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    uploading image distorting problem!

    Hi

    I have developed a cms for a car dealership which allows the dealer to upload images into it.

    I am having problems in that whn the images are uploaded and resized they are distorting quiet badly.

    The original images are taken with a good quality didgital camera at 1280 x 960 pixels and whenever they are displayed on the site as a smaller image the proportions are kept the same ie 235 x 176 and 300 x 225.

    i have not set anything to alter the quality and was wonderign if this might help with the distortion if i reduced this.

    you can see the images in teh cms here

    http://www.theoneagencydevelopment.c...ails.php?id=18

    any ideas on how to solve this problem would be very much appreciated

    many thanks

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Looks like you're forcing the browser to change the size (<img height = "y" width="x" />).

    Browsers are notorious for hacking images when they resize. If possible, modify you're upload script to use gdlib or similar and resize the images on the server to the right size. This should produce images that are the proper size and don't need the browser to handle resizing.

  • #3
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Are you using imagecopyresampled()?

  • #4
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no not using it - do you suggest using it?

    thanks

  • #5
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    If you are simply using the "height" and "width" attributes of image (which I believe to be deprecated) then you are not actually resizing your pictures. You are simply showing a a smaller version of that picture without resampling it. You would definately benefit from using the GDLib or ImageMagick to resize your pictures. If you are unfamiliar you can always use a thumbnail class.
    Thumbnail scripts
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #6
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Quote Originally Posted by onead View Post
    no not using it - do you suggest using it?

    thanks
    Yes. When you upload the images generate a thumbnail at the same time.

  • #7
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok thanks for the advice - i'll give it a try


  •  

    Posting Permissions

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