public TexturePreviewController(string imagePath, TexturePreviewViewModel viewModel, PackFileService packFileService) { _imagePath = imagePath; _viewModel = viewModel; _packFileService = packFileService; _scene = new SceneContainer(); _scene.Components.Add(new ResourceLibary(_scene, packFileService)); _scene.ForceCreate(); _resourceLib = _scene.GetComponent <ResourceLibary>(); _textureRenderer = new TextureToTextureRenderer(_scene.GraphicsDevice, new SpriteBatch(_scene.GraphicsDevice), _resourceLib); CreateImage(); }