@Override
    public void read(JmeImporter importer) throws IOException {
        InputCapsule capsule = importer.getCapsule(this);
        name = capsule.readString("name", null);
        key = (TextureKey) capsule.readSavable("key", null);

        // load texture from key, if available
        if (key != null) {
            // key is available, so try the texture from there.
            try {
                Texture loadedTex = importer.getAssetManager().loadTexture(key);
                image = loadedTex.getImage();
            } catch (AssetNotFoundException ex){
                Logger.getLogger(Texture.class.getName()).log(Level.SEVERE, "Cannot locate texture {0}", key);
                image = PlaceholderAssets.getPlaceholderImage(importer.getAssetManager());
            }
        }else{
            // no key is set on the texture. Attempt to load an embedded image
            image = (Image) capsule.readSavable("image", null);
            if (image == null){
                // TODO: what to print out here? the texture has no key or data, there's no useful information ..
                // assume texture.name is set even though the key is null
                Logger.getLogger(Texture.class.getName())
                        .log(Level.SEVERE, "Cannot load embedded image {0}", toString());
            }
        }

        setAnisotropicFilter(capsule.readInt("anisotropicFilter", 1));
        setMinFilter(capsule.readEnum("minificationFilter",
                MinFilter.class,
                MinFilter.BilinearNoMipMaps));
        setMagFilter(capsule.readEnum("magnificationFilter",
                MagFilter.class, MagFilter.Bilinear));
    }
@return a new Texture
@deprecated Use {@link Texture#clone()} instead.
jme3-core/src/main/java/com/jme3/texture/Texture.java