parameters: (self)
docstring: Generates image sizes that should be present but aren't by scaling
          from the next higher size.
docstring_summary: Generates image sizes that should be present but aren't by scaling
          from the next higher size.
docstring_tokens: Generates image sizes that should be present but aren t by scaling from the next higher size .
function: def generateMissingImages(self):
          """ Generates image sizes that should be present but aren't by scaling
          from the next higher size. """
  
          for required_size in (256, 128, 48, 32, 16):
              if required_size in self.images:
                  continue
  
              sizes = sorted(self.images.keys())
              if required_size * 2 in sizes:
                  from_size = required_size * 2
              else:
                  from_size = 0
                  for from_size in sizes:
                      if from_size > required_size:
                          break
  
              if from_size > required_size:
                  Icon.notify.warning("Generating %dx%d icon by scaling down %dx%d image" % (required_size, required_size, from_size, from_size))
  
                  from_image = self.images[from_size]
                  image = PNMImage(required_size, required_size)
                  image.setColorType(from_image.getColorType())
                  if from_image.hasAlpha():
                      image.addAlpha()
                  image.quickFilterFrom(from_image)
                  self.images[required_size] = image
              else:
                  Icon.notify.warning("Cannot generate %dx%d icon; no higher resolution image available" % (required_size, required_size))
function_tokens: def generateMissingImages ( self ) : for required_size in ( 256 , 128 , 48 , 32 , 16 ) : if required_size in self . images : continue sizes = sorted ( self . images . keys ( ) ) if required_size * 2 in sizes : from_size = required_size * 2 else : from_size = 0 for from_size in sizes : if from_size > required_size : break if from_size > required_size : Icon . notify . warning ( "Generating %dx%d icon by scaling down %dx%d image" % ( required_size , required_size , from_size , from_size ) ) from_image = self . images [ from_size ] image = PNMImage ( required_size , required_size ) image . setColorType ( from_image . getColorType ( ) ) if from_image . hasAlpha ( ) : image . addAlpha ( ) image . quickFilterFrom ( from_image ) self . images [ required_size ] = image else : Icon . notify . warning ( "Cannot generate %dx%d icon; no higher resolution image available" % ( required_size , required_size ) )