be wrong.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11406
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
char unsigned *source_data = M_IMGDATA->m_data;
char unsigned *target_data = data;
char unsigned *source_data = M_IMGDATA->m_data;
char unsigned *target_data = data;
+#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;
// 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;
+#else
+ for (long j = 0; j < height; j++)
+ {
+ long y_offset = (j * old_height / height) * old_width;
+
+ for (long i = 0; i < width; i++)
+ {
+ memcpy( target_data,
+ source_data + 3*(y_offset + ((i * old_width )/ width)),
+ 3 );
+ target_data += 3;
+ }
+ }
+#endif
wxHashTable h;
wxObject dummy;
unsigned char r, g, b;
wxHashTable h;
wxObject dummy;
unsigned char r, g, b;
unsigned long size, nentries, key;
p = GetData();
unsigned long size, nentries, key;
p = GetData();
unsigned long wxImage::ComputeHistogram( wxHashTable &h )
{
unsigned char r, g, b;
unsigned long wxImage::ComputeHistogram( wxHashTable &h )
{
unsigned char r, g, b;
unsigned long size, nentries, key;
wxHNode *hnode;
unsigned long size, nentries, key;
wxHNode *hnode;