PHP Developers Network
http://forums.devnetwork.net/

Image Resizing Script required - a better one...
http://forums.devnetwork.net/viewtopic.php?f=1&t=143432
Page 37 of 37

Author:  Celauran [ Fri Mar 24, 2017 7:02 am ]
Post subject:  Re: Image Resizing Script required - a better one...

You could pass an empty array to options, or you could specify compression level 9 (which is the highest). How specifically you implement that is up to you and would depend somewhat on your use case. You say "when an image is 2560". When it's exactly that wide? When it's that wide or larger? When you're processing an image for a screen width of 2560?

Author:  simonmlewis [ Fri Mar 24, 2017 10:20 am ]
Post subject:  Re: Image Resizing Script required - a better one...

The problem we are facing, is when certain banners are uploading, with let's say an orange block and some text it in, it gets compressed a bit (we altered it to 95), and the quality is reduced not brilliantly.
But we tried the same banner in Wordpress and it didn't lose that quality.

I thought the 4K versions weren't compressed but they obviously are. On the 1920 versions people are seeing the reduction in quality. I don't know why. Slight blurring on text for example.

Author:  Celauran [ Fri Mar 24, 2017 10:28 am ]
Post subject:  Re: Image Resizing Script required - a better one...

Well to begin with you probably don't want to be using JPG + text, but that's maybe a separate issue. What are you starting with, what are you resizing to, and what are you ending up with?

Author:  Celauran [ Fri Mar 24, 2017 10:28 am ]
Post subject:  Re: Image Resizing Script required - a better one...

simonmlewis wrote:
But we tried the same banner in Wordpress and it didn't lose that quality.

Have you looked at how they do it?

Author:  simonmlewis [ Mon Mar 27, 2017 4:24 am ]
Post subject:  Re: Image Resizing Script required - a better one...

I wouldn't know where to start to look.
Clearly their code is slightly different. I just did another, as we added that code to another page - quality isn't so sharp. Even at 95%!

Author:  Celauran [ Mon Mar 27, 2017 4:57 am ]
Post subject:  Re: Image Resizing Script required - a better one...

You're resizing from the same original image to the same sizes? Quality of all the test images I did was fine, but none had text. Any way you can be more specific? Anything you can show us for the sake of comparison?

Author:  simonmlewis [ Tue Feb 13, 2018 9:27 am ]
Post subject:  Re: Image Resizing Script required - a better one...

Hi. I am usinig this function code now for a slightly different purpose, and need to pass thru to the directory structure, a variable, to dynamically change what folder the image is being saved into.

It's part of a different thread, but as this thread is the core code I am using, wanted to add it here.

Page 37 of 37 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/