问题
I am using Laravel 5.2. I have almost done the resizing of an image that runs fine. But i am facing one problem When i upload an image of 300 dpi it reduces the dpi to 96 dpi. I don't know what i am doing wrong.I am using Intervention Package of laravel5.2. Here i have done so far:-
// Input::file('image') -> upload file having dpi of 300
$height = 6048; //upload image height
$width = 4032; //upload image width
xxlheight = ($height*60)/100;
$xxlwidth = ($width*60)/100;
$xxlFileName = str_random(4)."xxl".str_random(4).".".$extension;
Image::make(Input::file('image'))->resize($xxlwidth,$xxlheight)->save(storage_path('app/images/secureRealImages/'.$xxlFileName));
$getxxlimage = Image::make(storage_path('app/images/secureRealImages/'.$xxlFileName));
PLease Help me what i am doing wrong. Thanks in advance :)
来源:https://stackoverflow.com/questions/44456351/how-to-maintain-the-dpi-dots-per-inch-of-an-image-in-laravel-5-2-using-interve