🌍
English
I think we should remove the test and return the bigger image as possible with given parameters...
Offline
P@t wrote:
I think we should remove the test and return the bigger image as possible with given parameters...
ok
Offline
Is it possible to add function to retrieve derivative size in PwgTemplateAdapter class?
function derivative_get_size($type, $img) { $src_image = new DerivativeImage($type, $img); return $src_image->get_size(); } function derivative_get_size_htm($type, $img) { $src_image = new DerivativeImage($type, $img); return $src_image->get_size_htm(); }
Offline
isn't it better to have just
function derivative($type, $img) { return new DerivativeImage($type, $img); }
you could use any member of DerivativeImage, eventually store the object and reuse it (to avoid recreating the same thing N times)
Offline
Of course, it's better :-)
Offline