# Path: kano_avatar/paths.py
# CIRC_ASSET_MASK = os.path.join(
#     AVATAR_ASSET_FOLDER, 'helper_assets', 'circle_mask.png')
# 
# RING_ASSET = os.path.join(
#     AVATAR_ASSET_FOLDER, 'helper_assets', 'grey_ring.png')
# 
# PLAIN_MASK = os.path.join(
#     AVATAR_ASSET_FOLDER, 'helper_assets', 'plain_mask.png')


from PIL import Image
from kano_avatar.paths import CIRC_ASSET_MASK, RING_ASSET, PLAIN_MASK
from kano.logging import logger
from kano_content.extended_paths import content_dir
        self._img_overworld = Image.open(self.get_fname_overworld())

    def save_image(self, file_name):
        """ Save character image (together with items that have been pasted on
        it), to a file.
        :param file_name: filename to be saved to as a string
        """
        self._img.save(file_name)

    def save_image_overworld(self, file_name):
        """ Save character image (together with items that have been pasted on
        it), to a file.
        :param file_name: filename to be saved to as a string
        """
        self._img_overworld.save(file_name)

    def generate_circular_assets(self, file_name_plain, file_name_ring):
        """ This function creates the circular assets that are required for the
        kano profile
        :param file_name: Path to where the completed file should be saved as a
                          string
        """
        rc_plain = self._generate_plain_circular(file_name_plain)

        # 54 is the size of the stamp icon we require
        rc_ring = self._generate_white_circular(file_name_ring, resize=54)
        return rc_plain and rc_ring

    def _generate_white_circular(self, file_name, resize=0):
        return self._generate_ring_circular(

# Path: kano_avatar/paths.py
# CIRC_ASSET_MASK = os.path.join(
#     AVATAR_ASSET_FOLDER, 'helper_assets', 'circle_mask.png')
# 
# RING_ASSET = os.path.join(
#     AVATAR_ASSET_FOLDER, 'helper_assets', 'grey_ring.png')
# 
# PLAIN_MASK = os.path.join(
#     AVATAR_ASSET_FOLDER, 'helper_assets', 'plain_mask.png')


# Path: kano_avatar/character_components.py
from PIL import Image
from kano_avatar.paths import CIRC_ASSET_MASK, RING_ASSET, PLAIN_MASK
from kano.logging import logger
from kano_content.extended_paths import content_dir

        self._img_overworld = Image.open(self.get_fname_overworld())

    def save_image(self, file_name):
        """ Save character image (together with items that have been pasted on
        it), to a file.
        :param file_name: filename to be saved to as a string
        """
        self._img.save(file_name)

    def save_image_overworld(self, file_name):
        """ Save character image (together with items that have been pasted on
        it), to a file.
        :param file_name: filename to be saved to as a string
        """
        self._img_overworld.save(file_name)

    def generate_circular_assets(self, file_name_plain, file_name_ring):
        """ This function creates the circular assets that are required for the
        kano profile
        :param file_name: Path to where the completed file should be saved as a
                          string
        """
        rc_plain = self._generate_plain_circular(file_name_plain)

        # 54 is the size of the stamp icon we require
        rc_ring = self._generate_white_circular(file_name_ring, resize=54)
        return rc_plain and rc_ring

    def _generate_white_circular(self, file_name, resize=0):
        return self._generate_ring_circular(

            file_name, RING_ASSET, CIRC_ASSET_MASK, resize=resize)