Ignore:
Timestamp:
2008-11-19T19:09:03+01:00 (16 years ago)
Author:
stoecker
Message:

sometimes white is not white

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/webkit-image.cpp

    r11988 r11990  
    3434      QImage im = QPixmap::grabWidget(view).toImage();
    3535      QRgb white = QColor(255,255,255).rgb();
     36      /* sometimes the white is shifted one bit */
     37      QRgb white2 = QColor(254,254,254).rgb();
    3638
    3739      /* didn't find a way to reduce image directly, so we scan for white background */
     
    4446        {
    4547          QRgb p = im.pixel(x, y);
    46           if(p != white && p)
     48          if(p != white && p != white2 & p)
    4749            iswhite = false;
    4850        }
     
    5658        {
    5759          QRgb p = im.pixel(x, y);
    58           if(p != white && p)
     60          if(p != white && p != white2 && p)
    5961            iswhite = false;
    6062        }
Note: See TracChangeset for help on using the changeset viewer.