php - Image not cropped only for browsers? -


i cropped image using php gd imagecopyresampled() function. used function in past, seems somehow, browsers firefox & chrome (latest versions of both) image not cropped, somehow transparent in part should removed.

enter image description here

the osx finder , photoshop shows correct image sizes , no transparency...

what wrong?

this code jpg images...

        if(!($sourceimage = @imagecreatefromjpeg($source)))         {             $image = imagecreate($width, $height);             $colorwhite = imagecolorallocate($image, 255, 255, 255);             $colorblack = imagecolorallocate($image, 0, 0, 0);             imagefill($image, 0, 0, $colorwhite);             imagestring($image, 1, 1, 10, "immagine non disponibile", $colorblack);             imagejpeg($image, $destination);             return(false);         }          $destinationimage = imagecreatetruecolor($width, $height);          imagecopyresampled($destinationimage, $sourceimage,0,0,$x,$y,$width,$height,$width,$height);         imagejpeg($destinationimage, $destination); 

enter image description here

the problem related virtualbox & apache behaviour on guests os.

i solved this change apache2 configuration.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -