From 9df51bd066ba401802db0c8dff9688a921d1d9e9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 28 Feb 2005 18:45:29 +0000 Subject: [PATCH] Added more image options git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/__core_rename.i | 3 +++ wxPython/src/_image.i | 14 +++++++++++++- wxPython/wxPython/_core.py | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/wxPython/src/__core_rename.i b/wxPython/src/__core_rename.i index f83a845e59..a2adc31170 100644 --- a/wxPython/src/__core_rename.i +++ b/wxPython/src/__core_rename.i @@ -507,6 +507,9 @@ %rename(NullImage) wxNullImage; %rename(IMAGE_RESOLUTION_INCHES) wxIMAGE_RESOLUTION_INCHES; %rename(IMAGE_RESOLUTION_CM) wxIMAGE_RESOLUTION_CM; +%rename(PNG_TYPE_COLOUR) wxPNG_TYPE_COLOUR; +%rename(PNG_TYPE_GREY) wxPNG_TYPE_GREY; +%rename(PNG_TYPE_GREY_RED) wxPNG_TYPE_GREY_RED; %rename(BMP_24BPP) wxBMP_24BPP; %rename(BMP_8BPP) wxBMP_8BPP; %rename(BMP_8BPP_GREY) wxBMP_8BPP_GREY; diff --git a/wxPython/src/_image.i b/wxPython/src/_image.i index 49d17afaf6..ea462f7134 100644 --- a/wxPython/src/_image.i +++ b/wxPython/src/_image.i @@ -150,6 +150,9 @@ public: } } + // TODO: wxImage( char** xpmData ); + + void Create( int width, int height ); void Destroy(); @@ -452,7 +455,16 @@ MAKE_CONST_WXSTRING(IMAGE_OPTION_SAMPLESPERPIXEL); MAKE_CONST_WXSTRING(IMAGE_OPTION_COMPRESSION); MAKE_CONST_WXSTRING(IMAGE_OPTION_IMAGEDESCRIPTOR); - +MAKE_CONST_WXSTRING(IMAGE_OPTION_PNG_FORMAT); +MAKE_CONST_WXSTRING(IMAGE_OPTION_PNG_BITDEPTH); + +enum +{ + wxPNG_TYPE_COLOUR = 0, + wxPNG_TYPE_GREY = 2, + wxPNG_TYPE_GREY_RED = 3 +}; + enum { wxBMP_24BPP = 24, // default, do not need to set diff --git a/wxPython/wxPython/_core.py b/wxPython/wxPython/_core.py index 73af7caab3..ca5f4ecc65 100644 --- a/wxPython/wxPython/_core.py +++ b/wxPython/wxPython/_core.py @@ -694,6 +694,11 @@ wxIMAGE_OPTION_BITSPERSAMPLE = wx._core.IMAGE_OPTION_BITSPERSAMPLE wxIMAGE_OPTION_SAMPLESPERPIXEL = wx._core.IMAGE_OPTION_SAMPLESPERPIXEL wxIMAGE_OPTION_COMPRESSION = wx._core.IMAGE_OPTION_COMPRESSION wxIMAGE_OPTION_IMAGEDESCRIPTOR = wx._core.IMAGE_OPTION_IMAGEDESCRIPTOR +wxIMAGE_OPTION_PNG_FORMAT = wx._core.IMAGE_OPTION_PNG_FORMAT +wxIMAGE_OPTION_PNG_BITDEPTH = wx._core.IMAGE_OPTION_PNG_BITDEPTH +wxPNG_TYPE_COLOUR = wx._core.PNG_TYPE_COLOUR +wxPNG_TYPE_GREY = wx._core.PNG_TYPE_GREY +wxPNG_TYPE_GREY_RED = wx._core.PNG_TYPE_GREY_RED wxBMP_24BPP = wx._core.BMP_24BPP wxBMP_8BPP = wx._core.BMP_8BPP wxBMP_8BPP_GREY = wx._core.BMP_8BPP_GREY -- 2.45.2