X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02b800ce7c2bb1c1f08075f22be2e7412124b47f..8e1222c7cd2f1378f32b9e5ff56ad322916cb43b:/wxPython/src/_image.i?ds=sidebyside diff --git a/wxPython/src/_image.i b/wxPython/src/_image.i index bc320ba24d..cafe72b758 100644 --- a/wxPython/src/_image.i +++ b/wxPython/src/_image.i @@ -46,10 +46,10 @@ public: //bool LoadFile(wxImage* image, wxInputStream& stream); //bool SaveFile(wxImage* image, wxOutputStream& stream); //virtual int GetImageCount( wxInputStream& stream ); - //bool CanRead( wxInputStream& stream ); bool CanRead( const wxString& name ); - + %Rename(CanReadStream, bool, CanRead( wxInputStream& stream )); + void SetName(const wxString& name); void SetExtension(const wxString& extension); void SetType(long type); @@ -872,6 +872,14 @@ indicates the orientation.", ""); byte r2, byte g2, byte b2 ), "Replaces the colour specified by ``(r1,g1,b1)`` by the colour ``(r2,g2,b2)``.", ""); + + DocDeclStr( + wxImage , ConvertToGreyscale( double lr = 0.299, + double lg = 0.587, + double lb = 0.114 ) const, + "Convert to greyscale image. Uses the luminance component (Y) of the +image. The luma value (YUV) is calculated using (R * lr) + (G * lg) + (B * lb), +defaults to ITU-T BT.601", ""); DocDeclStr( @@ -939,6 +947,12 @@ option is not present, the function returns 0.", " static void AddHandler( wxImageHandler *handler ); static void InsertHandler( wxImageHandler *handler ); static bool RemoveHandler( const wxString& name ); + %extend { + static PyObject* GetHandlers() { + wxList& list = wxImage::GetHandlers(); + return wxPy_ConvertList(&list); + } + } DocDeclStr( static wxString , GetImageExtWildcard(), @@ -999,7 +1013,6 @@ range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees", ""); -// See also wxPy_ReinitStockObjects in helpers.cpp %immutable; const wxImage wxNullImage; %mutable;