Hello, I need help, how convert Image ("data/image.png") to bytes[] ?
Convert image from file to byte[]?
Clarify, what do you mean by "a file"? Could you show some code?
misticos
Clarify, what do you mean by "a file"? Could you show some code?
It doesnt work
private void OnServerInitialized()
{
img.name = "test";
img.url = "file://" + Interface.Oxide.DataDirectory + Path.DirectorySeparatorChar + "test.png";
byte[] bytes = getImgSize(img.url);
if(bytes == null)
{
Server.Broadcast("null");
return;
}
ImageLibrary.Call("AddImageData", img.name, bytes, 123);
}
private byte[] getImgSize(string url)
{
WWW www = new WWW(url);
if (string.IsNullOrEmpty(www.error))
{
return http://www.bytes;
}
return null;
} misticos
Clarify, what do you mean by "a file"? Could you show some code?
Image doesnt add to storage

Merged post
Can anybody help ?