+#if 0
+ // This is nonsense, RR.
+
+ // We do (x, y) -> (x, y)*oldSize/newSize but the valid values of x and y
+ // are from 0 to size-1, hence all decrement the sizes
+ long old_old_width = old_width;
+ old_height--;
+ old_width--;
+ height--;
+ width--;
+ for ( long j = 0; j <= height; j++ )
+ {
+ // don't crash for images with height == 1
+ long y_offset = height ? (j * old_height / height)* old_old_width : 0;
+
+ for ( long i = 0; i <= width; i++ )
+ {
+ long x_offset = width ? (i * old_width) / width : 0;
+
+ memcpy( target_data, source_data + 3*(y_offset + x_offset), 3 );
+ target_data += 3;
+ }
+ }
+#else