superkav Posted January 10, 2007 Share Posted January 10, 2007 Hello All,I created an Auto Dealership CMS for a friend of mine. One of the functionalities of it is an Image Gallery for the Cars he sells. How ever when he uploads some images (at around 300-400k) the sharpness on some of them are really bad.Check the gallery out [url=http://lawtonfoley.ie/cardetails.php?carid=10]http://lawtonfoley.ie/cardetails.php?carid=10[/url]The second image in the Mits Colt, the outline is all jaggedy. However he also uploads the images to another car site. Here you can see the same images only more focused. [url=http://carzone.ie/usedcars/index.cfm?fuseaction=car&carID=526624]http://carzone.ie/usedcars/index.cfm?fuseaction=car&carID=526624[/url]What do i need to do to keep quality as the images resize.Please note that I do not administrate this site. If i did i was obviously resize in photoshop before uploading. These images are being uploaded straight off a digital camera, image size approx 400k. The users are IT illiterate, and pretty lazy so they dont want to have to resize them themselves.Is there a way of resizing while keeping quality as i upload using som GD library functions..Any Help is greatly appreciated.RegardsSuperkav Quote Link to comment https://forums.phpfreaks.com/topic/33580-images-loosing-sharpness-in-php-swap-image-gallery/ Share on other sites More sharing options...
HuggieBear Posted January 10, 2007 Share Posted January 10, 2007 The reason this is occurring is because the images aren't being resized at all, they're just scaling down the proportions and displaying it...If you right click the picture to see where it's being hosted and then open that location in a new window, you'll see the file hasn't been resized at all. Look here:http://lawtonfoley.ie/admin/carimages/1769742953/DSCF1001.JPGYou could use the GD library to resize and maintain quality, but you'd need to integrate the code with what you already have.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/33580-images-loosing-sharpness-in-php-swap-image-gallery/#findComment-157335 Share on other sites More sharing options...
superkav Posted January 10, 2007 Author Share Posted January 10, 2007 The reason this is occurring is because the images aren't being resized at all, they're just scaling down the proportions and displaying it...If you right click the picture to see where it's being hosted and then open that location in a new window, you'll see the file hasn't been resized at all. Look here:http://lawtonfoley.ie/admin/carimages/1769742953/DSCF1001.JPGYou could use the GD library to resize and maintain quality, but you'd need to integrate the code with what you already have.RegardsHuggieHi Huggie,Thanks for response.. Yeah i realise that they are not resizing. are your familiar with GD and what functions to use. Ive never worked with them. Is there a class i can utilize Quote Link to comment https://forums.phpfreaks.com/topic/33580-images-loosing-sharpness-in-php-swap-image-gallery/#findComment-157339 Share on other sites More sharing options...
HuggieBear Posted January 10, 2007 Share Posted January 10, 2007 I've used the GD library for a few things, yes.You're after [url=http://uk.php.net/manual/en/function.imagecopyresampled.php]imagecopyresampled()[/url]Although the description of this is [i]"Copy and resize [b]part[/b] of an image with resampling"[/i] you can provide the coordinates of the whole image.There's also a very simple example in the manual on the page I've provided.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/33580-images-loosing-sharpness-in-php-swap-image-gallery/#findComment-157342 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.