Browse Source

Add SaveWEBP() bindings.

carnalis 8 years ago
parent
commit
3dfc8f750c

+ 1 - 1
Source/Urho3D/AngelScript/ResourceAPI.cpp

@@ -230,7 +230,7 @@ static void RegisterImage(asIScriptEngine* engine)
     engine->RegisterObjectMethod("Image", "bool SaveTGA(const String&in) const", asMETHOD(Image, SaveTGA), asCALL_THISCALL);
     engine->RegisterObjectMethod("Image", "bool SaveJPG(const String&in, int) const", asMETHOD(Image, SaveJPG), asCALL_THISCALL);
     engine->RegisterObjectMethod("Image", "bool SaveDDS(const String&in) const", asMETHOD(Image, SaveDDS), asCALL_THISCALL);
-    engine->RegisterObjectMethod("Image", "bool SaveWEBP(const String&in) const", asMETHOD(Image, SaveWEBP), asCALL_THISCALL);
+    engine->RegisterObjectMethod("Image", "bool SaveWEBP(const String&in, float) const", asMETHOD(Image, SaveWEBP), asCALL_THISCALL);
     engine->RegisterObjectMethod("Image", "Color GetPixel(int, int) const", asMETHODPR(Image, GetPixel, (int, int) const, Color), asCALL_THISCALL);
     engine->RegisterObjectMethod("Image", "Color GetPixel(int, int, int) const", asMETHODPR(Image, GetPixel, (int, int, int) const, Color), asCALL_THISCALL);
     engine->RegisterObjectMethod("Image", "uint GetPixelInt(int, int) const", asMETHODPR(Image, GetPixelInt, (int, int) const, unsigned), asCALL_THISCALL);

+ 1 - 1
Source/Urho3D/LuaScript/pkgs/Resource/Image.pkg

@@ -37,7 +37,7 @@ class Image : public Resource
     bool SaveTGA(const String fileName) const;
     bool SaveJPG(const String fileName, int quality) const;
     bool SaveDDS(const String fileName) const;
-    bool SaveWEBP(const String fileName) const;
+    bool SaveWEBP(const String fileName, float compression) const;
 
     Color GetPixel(int x, int y) const;
     Color GetPixel(int x, int y, int z) const;