lightmap Posted March 14, 2019 Posted March 14, 2019 (edited) Hello Trying to load png image from memory to Image, and got assert "data!=NULL && Image::getPixels2D(): data is NULL" Image.cpp 7642 img = new Unigine.Image(); mas = System.IO.File.ReadAllBytes(@"test.png");//< - mas image in memory, dds == ok, jpg,png == assert b = new Blob((uint)mas.Length); b.setData(mas, (uint)mas.Length); b.seekSet(0); img.load(b.getStream()); imageItem = new WidgetSprite(_gui.getGui()); imageItem.setImage(img); do I need to convert it to dds before load? Edited March 14, 2019 by lightmap
silent Posted March 14, 2019 Posted March 14, 2019 lightmap Currently only DDS images can be loaded from stream (memory). How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts