image icon indicating copy to clipboard operation
image copied to clipboard

image size is bigger than source image

Open boxshadow opened this issue 6 years ago • 1 comments

when I use Image::make() to make a source image, the new image's size bigger than source image, but I didn't do anything on new image, just $image = Image::make($realPath); $realPath is the absolute path of the source image how can i fix this issue

by the way: source image is a jpeg pic

laravel 5.8.21

boxshadow avatar Jun 06 '19 10:06 boxshadow

Are there any solutions?

mayken avatar May 13 '20 16:05 mayken

It depends on the output quality used for encoding. Of course, high quality also means large file size. Note that the quality passed to the encoding method if this library is an absolute value and has nothing to do with the previous (original) quality of the image.

For example, it is possible to read a highly compressed Jpeg image with a size of 1 KB. If you encode it with an average quality of '50', the file size will still be larger than 1 KB because the original quality was lower than 50 and probably in the single digits. Hope this makes sense.

olivervogel avatar Mar 27 '24 15:03 olivervogel