mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
This commit is contained in:
@@ -49,11 +49,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
|
||||
public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary)
|
||||
{
|
||||
AssetBase asset = new AssetBase();
|
||||
asset.FullID = UUID.Random();
|
||||
AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture);
|
||||
asset.Data = OpenJPEG.EncodeFromImage(data, lossless);
|
||||
asset.Name = "MRMDynamicImage";
|
||||
asset.Type = 0;
|
||||
asset.Description = "MRM Image";
|
||||
asset.Local = false;
|
||||
asset.Temporary = temporary;
|
||||
|
||||
Reference in New Issue
Block a user