by making its redefinition conditional on presence of the EgifOpen function declaration.
The argument order in the gdip_unit_conversion calls were wrong, i.e. dpi and type were switched. Reported by Michael Tautschnig in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688361
It wasn't a GCC bug at all, the code in the function is actually invalid C as the pointer to rect stops being valid after the if. The proper fix is to move the declaration of rect outside the if, so it stays valid in the entire function.
…ffected function GCC 4.7+ incorrectly optimizes the GdipAddPathStringI() function, resulting in the value of r->Y being incorrect in the called GdipAddPathString() function. By compiling with -O0 or adding a printf("Test") after r = &rect this doesn't happen.
The testbits test failure indicates an issue in the definition and use of the BitmapData structure. Document the issue and work around it in the test, to allow the test to actually check the behaviour of the implementation. Also see https://bugzilla.xamarin.com/show_bug.cgi?id=20682 Commit licensed under MIT/X11.
Automakes provides facilities to run tests and collect their results. This can be enabled simply by adding a TESTS setting which contains the names of the test programs to be run. All of the tests in the "tests/" folder are now enabled except for testgdi, which requires interaction with the user. Commit licensed under MIT/X11.
This was removed accidently in PR#18. Commit licensed under MIT/X11.
…and num_palette variables in all cases. This fixes accessing an uninitialized variable e.g. in the 2bpp case. Commit licensed under MIT/X11.
This was changed in PR#8, but the correct variable type is png_charp according to a clang warning and the documentation (http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Desktop-generic/LSB-Desktop-generic/libpng12.png.get.iccp.1.html). Commit licensed under MIT/X11.
png_get_tRNS doesn't initialize supplied variables when no transparency chunk is found (see http://sourceforge.net/p/png-mng/mailman/message/27133707/). In that case the trans_alpha variable still has its initial (indeterminate) value which leads to the crash when using it in set_pixel_bgra() later on. We now check if the transparency chunk is valid before accessing it. Commit licensed under MIT/X11.
The testgdi program makes GDI+ calls without invoking GdiplusStartup(). This fixes the following errors: got st: 3 expected Okgot st: 2 expected Okjpg drawn got st: 3 expected Okgot st: 2 expected Oktif drawn got st: 3 expected Okgot st: 2 expected Okgif drawn got st: 3 expected Okgot st: 2 expected Okpng drawn got st: 3 expected Okgot st: 2 expected Okbmp drawn
Recent versions of clang are much more aggressive in exploiting undefined behavior. Given MaxInt cannot be encoded as float, the compiler would miscompile the macro and produce a negative number.
…FONT has a change of been properly checked against.
As of FreeType 2.1.6 (November 2003), using #include to include Freetype libraries directly is not supported. This has come to a head, as in FreeType 2.5.0, the location of headers has been moved around, breaking building of libgdiplus. This slight change uses the "official" way to include the required header file, without breaking building on older versions of the library.