Studio-42 / elFinder

📁 Open-source file manager for web, written in JavaScript using jQuery and jQuery UI
https://studio-42.github.io/elFinder/
Other
4.64k stars 1.42k forks source link

Rotate png images with 90 °, 180 °, 270 ° destroys transparent background #3583

Closed mkhomytsya closed 1 year ago

mkhomytsya commented 1 year ago

Rotate png images with 90 °, 180 °, 270 ° destroys transparent background

To Reproduce Steps to reproduce the behavior:

  1. Select image with transparent background and format png.
  2. Go to default image editor
  3. Select function rotate.
  4. Select 90 ° or 180 ° or 270 °.
  5. Apply

Expected behavior Image should be rotated and transparent background should be there.

mkhomytsya commented 1 year ago

I found reason was in elfinderconnector/php/elFinderVolumeDriver.class.php - imgRotate function with imgLib='gd'
as workaround I made

    $imgLib = $this->imgLib;
    if ($s[2] === IMAGETYPE_PNG && $degree % 90 === 0) {
        $imgLib = 'convert';
    }

    switch ($imgLib) {
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 50 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.