This function doesn't modify the current stream position (because it
restores the original position before returning; this however requires the
stream to be seekable; see wxStreamBase::IsSeekable).
*/
This function doesn't modify the current stream position (because it
restores the original position before returning; this however requires the
stream to be seekable; see wxStreamBase::IsSeekable).
*/
This function doesn't modify the current stream position (because it
restores the original position before returning; this however requires the
stream to be seekable; see wxStreamBase::IsSeekable).
*/
bool CanRead( const wxString& filename );
This function doesn't modify the current stream position (because it
restores the original position before returning; this however requires the
stream to be seekable; see wxStreamBase::IsSeekable).
*/
bool CanRead( const wxString& filename );
If @true, initialize the image to black.
*/
wxImage(int width, int height, bool clear = true);
If @true, initialize the image to black.
*/
wxImage(int width, int height, bool clear = true);
/**
Creates an image from data in memory. If @a static_data is @false
then the wxImage will take ownership of the data and free it
/**
Creates an image from data in memory. If @a static_data is @false
then the wxImage will take ownership of the data and free it
*/
wxImage(const wxSize& sz, unsigned char* data, unsigned char* data, unsigned char* alpha,
bool static_data = false);
*/
wxImage(const wxSize& sz, unsigned char* data, unsigned char* data, unsigned char* alpha,
bool static_data = false);
/**
Creates a fresh image.
See wxImage::wxImage(int,int,unsigned char*,bool) for more info.
/**
Creates a fresh image.
See wxImage::wxImage(int,int,unsigned char*,bool) for more info.
@return @true if the call succeeded, @false otherwise.
*/
bool Create( int width, int height, unsigned char* data, bool static_data = false );
@return @true if the call succeeded, @false otherwise.
*/
bool Create( int width, int height, unsigned char* data, bool static_data = false );
/**
Creates a fresh image.
See wxImage::wxImage(int,int,unsigned char*,unsigned char*,bool) for more info.
/**
Creates a fresh image.
See wxImage::wxImage(int,int,unsigned char*,unsigned char*,bool) for more info.
@return @true if the call succeeded, @false otherwise.
*/
bool Create( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data = false );
@return @true if the call succeeded, @false otherwise.
*/
bool Create( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data = false );
/**
@overload
*/
bool Create( const wxSize& sz, unsigned char* data, unsigned char* alpha, bool static_data = false );
/**
@overload
*/
bool Create( const wxSize& sz, unsigned char* data, unsigned char* alpha, bool static_data = false );
*/
wxImage Scale(int width, int height,
wxImageResizeQuality quality = wxIMAGE_QUALITY_NORMAL) const;
*/
wxImage Scale(int width, int height,
wxImageResizeQuality quality = wxIMAGE_QUALITY_NORMAL) const;
/**
Returns a resized version of this image without scaling it by adding either a
border with the given colour or cropping as necessary.
/**
Returns a resized version of this image without scaling it by adding either a
border with the given colour or cropping as necessary.
The returned image uses the luminance component of the original to
calculate the greyscale. Defaults to using the standard ITU-T BT.601
when converting to YUV, where every pixel equals
The returned image uses the luminance component of the original to
calculate the greyscale. Defaults to using the standard ITU-T BT.601
when converting to YUV, where every pixel equals
- wxImage ConvertToGreyscale(double lr = 0.299, double lg = 0.587, double lb = 1.114) const;
+ wxImage ConvertToGreyscale(double weight_r, double weight_g, double weight_b) const;
+
+ /**
+ Returns a greyscale version of the image.
+ @since 2.9.0
+ */
+ wxImage ConvertToGreyscale() const;
colour and black colour everywhere else.
*/
wxImage ConvertToMono(unsigned char r, unsigned char g, unsigned char b) const;
colour and black colour everywhere else.
*/
wxImage ConvertToMono(unsigned char r, unsigned char g, unsigned char b) const;
/**
Computes the histogram of the image. @a histogram is a reference to
wxImageHistogram object. wxImageHistogram is a specialization of
/**
Computes the histogram of the image. @a histogram is a reference to
wxImageHistogram object. wxImageHistogram is a specialization of
@return Returns number of colours in the histogram.
*/
unsigned long ComputeHistogram(wxImageHistogram& histogram) const;
@return Returns number of colours in the histogram.
*/
unsigned long ComputeHistogram(wxImageHistogram& histogram) const;
/**
Finds the first colour that is never used in the image.
The search begins at given initial colour and continues by increasing
/**
Finds the first colour that is never used in the image.
The search begins at given initial colour and continues by increasing
owned by the wxImage object, that will be responsible for deleting it.
Do not pass to this function a pointer obtained through GetData().
*/
void SetData(unsigned char* data, bool static_data = false);
owned by the wxImage object, that will be responsible for deleting it.
Do not pass to this function a pointer obtained through GetData().
*/
void SetData(unsigned char* data, bool static_data = false);
@see GetOption(), GetOptionInt(), HasOption()
*/
void SetOption(const wxString& name, const wxString& value);
@see GetOption(), GetOptionInt(), HasOption()
*/
void SetOption(const wxString& name, const wxString& value);
See wxImageHandler::GetImageCount() for more info.
The parameter @a type may be one of the following values:
See wxImageHandler::GetImageCount() for more info.
The parameter @a type may be one of the following values:
/**
Converts a color in RGB color space to HSV color space.
*/
static wxImage::HSVValue RGBtoHSV(const wxImage::RGBValue& rgb);
/**
Converts a color in RGB color space to HSV color space.
*/
static wxImage::HSVValue RGBtoHSV(const wxImage::RGBValue& rgb);