Y

Build an addon with a resize icon to maintain the aspect ratio issue

  • Thread starter Thread starter Yenxji
  • Start date Start date

Visitor Greeting

Welcome to NullWarehouse.com... We are currently seeking Mod's and Contributors. If you wish to apply for a Mod position then please click on Members dropdown arrow, then click on Staff App and fill it out completely and submit it. If you want to be a Contributor then start contributing and we will have our eye on you and take notice, something great could come of it.

  • We have redone the forum. If you notice any issues or errors please open a Support Ticket under the Members dropdown and let us know.
Y

Yenxji

Guest

When you are trying to upload an image that would resize the image to 320x320, but XenForo built self keeps using Maintain Aspect Ratio to adjust the image, is there any method to prevent Maintain Aspect Ratio and let resize the image only?

PHP:
Code:
        if ($upload = $this->request->getFile('image_icons')) {
            if ($upload->isValid()) {
                $dataDir = \XF::getRootDirectory() . '/data/image_icons/';
                \XF\Util\File::createDirectory($dataDir, false)...

Read more

Continue reading...
 
Similar content Most view View more
Back
Top Bottom