Is there anyone who can help me with a minor problem..i have a folder with large images that gets uploaded from a form.i have a thumb folder where thumbnail images of the images from the large folder gets automatically generated.the problem is that the thumbnail image created is nothing but a block of black color.i guess the problem is wid the imagetruecolor option which is not working even wid gd library installed in the project.
so please give your suggestion as to how i can conserve the color of the thumbnail images.
any kind of help will be really helpful.thank u
Thumbnail Creation of An Image from a directory
Moderator: General Moderators
help!
thank u but i have used the same thing but it still doesnt work and im still generating black blocks instead of the thumbnail version of the original images.
help!
if($ftype=="image/jpeg"){
$im=ImageCreateFromJPEG($fname);
$width=ImageSx($im); // Original picture width is stored
$height=ImageSy($im); // Original picture height is stored
$newimage=@ImageCreateTrueColor($n_width,$n_height);
ImageCopyResized($newimage,$im,0,0,0,0,$n_width,$n_height,$width,$height);
ImageJPEG($newimage,$tsrc);
chmod("$tsrc",0777);
}}
help!
if($ftype=="image/jpeg"){
$im=ImageCreateFromJPEG($fname);
$width=ImageSx($im); // Original picture width is stored
$height=ImageSy($im); // Original picture height is stored
$newimage=@ImageCreateTrueColor($n_width,$n_height);
ImageCopyResized($newimage,$im,0,0,0,0,$n_width,$n_height,$width,$height);
ImageJPEG($newimage,$tsrc);
chmod("$tsrc",0777);
}}