Minor cleanup, no real changes
Remove unneeded forward declaration, unused variable
This commit is contained in:
@@ -42,9 +42,6 @@
|
|||||||
// local functions
|
// local functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// init the alpha channel for the image and fill it with 1s up to (x, y)
|
|
||||||
static unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y);
|
|
||||||
|
|
||||||
// is the pixel with this value of alpha a fully opaque one?
|
// is the pixel with this value of alpha a fully opaque one?
|
||||||
static inline
|
static inline
|
||||||
bool IsOpaque(unsigned char a)
|
bool IsOpaque(unsigned char a)
|
||||||
@@ -207,6 +204,8 @@ PNGLINKAGEMODE wx_PNG_error(png_structp png_ptr, png_const_charp message)
|
|||||||
// LoadFile() helpers
|
// LoadFile() helpers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// init the alpha channel for the image and fill it with 1s up to (x, y)
|
||||||
|
static
|
||||||
unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y)
|
unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y)
|
||||||
{
|
{
|
||||||
// create alpha channel
|
// create alpha channel
|
||||||
@@ -289,7 +288,7 @@ void
|
|||||||
wxPNGImageData::DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo)
|
wxPNGImageData::DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo)
|
||||||
{
|
{
|
||||||
png_uint_32 width, height = 0;
|
png_uint_32 width, height = 0;
|
||||||
int bit_depth, color_type, interlace_type;
|
int bit_depth, color_type;
|
||||||
|
|
||||||
image->Destroy();
|
image->Destroy();
|
||||||
|
|
||||||
@@ -315,7 +314,7 @@ wxPNGImageData::DoLoadPNGFile(wxImage* image, wxPNGInfoStruct& wxinfo)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
png_read_info( png_ptr, info_ptr );
|
png_read_info( png_ptr, info_ptr );
|
||||||
png_get_IHDR( png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL );
|
png_get_IHDR( png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL );
|
||||||
|
|
||||||
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
png_set_expand( png_ptr );
|
png_set_expand( png_ptr );
|
||||||
|
Reference in New Issue
Block a user