Page 37 of 37

Re: Image Resizing Script required - a better one...

Posted: Fri Mar 24, 2017 7:02 am
by Celauran
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?

Re: Image Resizing Script required - a better one...

Posted: Fri Mar 24, 2017 10:20 am
by simonmlewis
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.

Re: Image Resizing Script required - a better one...

Posted: Fri Mar 24, 2017 10:28 am
by Celauran
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?

Re: Image Resizing Script required - a better one...

Posted: Fri Mar 24, 2017 10:28 am
by Celauran
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?

Re: Image Resizing Script required - a better one...

Posted: Mon Mar 27, 2017 4:24 am
by simonmlewis
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%!

Re: Image Resizing Script required - a better one...

Posted: Mon Mar 27, 2017 4:57 am
by Celauran
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?

Re: Image Resizing Script required - a better one...

Posted: Tue Feb 13, 2018 8:27 am
by simonmlewis
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.