php thumbnail - creates a grainy back and white image -


My code creates thumbs down, but it is very grainy and although it does not look black and white is very beautiful.

Any ideas how can I make thumbs of a better quality?

  $ thumb = $ targetPath "Thumbs / files. $ Image = imagecreatefromjpeg ($ targetFile); $ width = 200; // new width of image $ height = 92; // This ratio retains $ thumbWidth = 200; $ thumethhite = 92; $ SourceImage = Imagecreatefromjpeg ($ targetFile); $ TargetImage = imagecreate ($ thumbWidth, $ thumbHeight); imagecopyresampled ($ targetImage, $ sourceImage, 0,0,0,0,0, $ thumbWidth, $ thumbHeight, imagesx ($ sourceImage), imagesy ($ sourceImage ); // imagejpeg ($ target image, "$ thumbPath / $ thumbName"); Imagejpeg ($ target image, $ thumbs, 100); Chmod ($ thumb, 0755)  

;

Thanks R.

Use imagery, it will give better results < / P> < / Div>

Comments