Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

void GBitmap::set_grays ( int  grays  ) 

Sets the number of gray levels without changing the pixels. Argument grays# must be in range #2# to #256#.

Definition at line 479 of file GBitmap.cpp.

References monitor(), and uncompress().

Referenced by change_grays(), rotate(), and GBitmapScaler::scale().

{
  if (ngrays<2 || ngrays>256)
    G_THROW( ERR_MSG("GBitmap.bad_levels") );
  // set gray levels
  GMonitorLock lock(monitor());
  grays = ngrays;
  if (ngrays>2 && !bytes)
    uncompress();
}


Generated by  Doxygen 1.6.0   Back to index