Closed Jany-M closed 10 years ago
There is definitely someone not understanding the plugin and not reading the code / readme.
I do understand the plugin and you should definitely write clearly that, as WP doesnt allow it, images cannot be resized if size is bigger than original. So write your README better and people wont be confused and waste time understanding what's wrong.
However, the script can be improved quite easily. Check if sizes are bigger than original, if yes, use the crop (not resize) WP function (with distance 0 0).
This is not Facebook here. If you are changing your major issue content (twice) you are destroying context.
Oh and just by the way the script can scale up. There is just an option passed to the function which does that. It's quite clear, especially it should be clear for someone who understands code.
I was looking into the code when you replied, didnt get the chance to edit in time before you replied, sorry. However, the scaling up isnt anywhere in your readme nor examples, which are made so developers dont waste hours reading into the code. If it is, can you please point it out?
I can see the upscale in the code now... would have been nice to see it in the readme and options too before wasting a lot of time. Thank you anyway for your work, every piece of code written is always a good thing.
WordPress resizing functions is really dumb. If you set the resize dimensions larger than the original image dimensions, no resizing or cropping will be performed. BUT you can use the crop method to enlarge photos.
Also, adding $editor->set_quality( 100 ); by default, would be good.