def METHOD_NAME(self):
    if self._trimmed:
        return
    bbox = self.image.getbbox()
    trimmed = self.image.crop(bbox)
    g_base = Geometry(*self.image.size)
    g_trimmed = Geometry.from_bbox(bbox)
    self.padding = self.padding + Padding.relative(g_base, g_trimmed) * self.scale
    self.image.close()
    self.image = trimmed
    if self.alphamap_image is not None:
        alphamap_trimmed = self.alphamap_image.crop(bbox)
        self.alphamap_image.close()
        self.alphamap_image = alphamap_trimmed
        self._check_alphamap()
    self._trimmed = True