X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c551d959447b3aea01cc35f45aa4cacff2173ba..f21b2fd89d02837dfd0d195f8ff0f3f5640af017:/src/mac/carbon/pnghand.cpp diff --git a/src/mac/carbon/pnghand.cpp b/src/mac/carbon/pnghand.cpp index 8d6d6544f5..5e6840f40d 100644 --- a/src/mac/carbon/pnghand.cpp +++ b/src/mac/carbon/pnghand.cpp @@ -31,11 +31,14 @@ # include #endif -#include -#include -#include -#include -#include +#ifndef __WXMAC_X__ +# include +#endif +#include "wx/msgdlg.h" +#include "wx/palette.h" +#include "wx/bitmap.h" +#include "wx/mac/pnghand.h" +#include "wx/mac/pngread.h" extern "C" { #include "png.h" @@ -47,7 +50,7 @@ extern "C" void png_write_init PNGARG((png_structp png_ptr)); extern CTabHandle wxMacCreateColorTable( int numColors ) ; extern void wxMacDestroyColorTable( CTabHandle colors ) ; extern void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ; -extern GWorldPtr wxMacCreateGWorld( int height , int width , int depth ) ; +extern GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ; extern void wxMacDestroyGWorld( GWorldPtr gw ) ; void @@ -115,7 +118,8 @@ wxPNGReader::Create(int width, int height, int depth, int colortype) { wxMacDestroyGWorld( lpbi ) ; } - if (lpbi = wxMacCreateGWorld( Width , Height , Depth) ) + lpbi = wxMacCreateGWorld( Width , Height , Depth); + if (lpbi) { EfeWidth = (long)(((long)Width*Depth + 31) / 32) * 4; int bitwidth = width ; @@ -410,7 +414,8 @@ bool wxPNGReader::ReadFile(char * ImageFileName) wxPNGReaderIter iter(this); /* open the file */ - fp = fopen(wxUnix2MacFilename( ImageFileName ), "rb"); + fp = fopen( ImageFileName , "rb" ); + if (!fp) return FALSE;