On 13.03.2013 11:53, Vladimir Testov wrote: > + int min = width; > + if (height < min) { > + min = height; > + } Please avoid using variables like max/min which can easily conflict with macros defined on some systems