Skip to content
  • Dmitry Kazakov's avatar
    Fix Transorm Worker to shrink device bounds when doing scale-down · 7d412c71
    Dmitry Kazakov authored
    When doing a scale-down a great portion of the image becomes filled
    with the default pixel. If the default pixel of a paint device is not
    fully transparent, then the exactBounds() will not shrink automatically.
    That is why we need to purge() all the default tiles of the paint device
    here.
    
    Note: the Crop visitor needs *not* the same stuff, since
          KisPaintDevice::crop() calls KisDataManager::setExtent() which
          explicitly drops all the tiles outside of the requested area.
    
    Special thanks to Boud, who has found the real cause of the bug!
    
    BUG:327860
    7d412c71