internal bool TryGetTranslatedImage(string key, out byte[] data, out TranslatedImage image)
        {
            if (_translatedImages.TryGetValue(key, out var translatedImage))
            {
                try
                {
                    data  = translatedImage.GetData();
                    image = translatedImage;
                    return(data != null);
                }
                catch (Exception e)
                {
                    XuaLogger.AutoTranslator.Error(e, "An error occurrd while attempting to load image: " + translatedImage.FileName);

                    // clear the image???
                    _translatedImages.Remove(key);
                }
            }

            data  = null;
            image = null;
            return(false);
        }
 private void RegisterTranslatedImage(string fileName, string key, byte[] data, ITranslatedImageSource source)
 {
     _translatedImages[key] = new TranslatedImage(fileName, data, Settings.CacheTexturesInMemory ? null : source);
 }