Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::metadata::MetaData::getThumbnailData (   self,
  max_size_needed = 0 
)

Returns a thumbnail of the image.

If the image supports multiple thumbnails, and max_size_needed
is not 0, then it will search for the smallest thumbnail that 
matches the size required 

The image will be in whatever format the thumbnail itself is, 
typically a jpeg or tiff.

Definition at line 452 of file metadata.py.

00452                                                  :
        """
        Returns a thumbnail of the image.
        
        If the image supports multiple thumbnails, and max_size_needed
        is not 0, then it will search for the smallest thumbnail that 
        matches the size required 
        
        The image will be in whatever format the thumbnail itself is, 
        typically a jpeg or tiff.
        """
        if self.__version01__:
            return pyexiv2.Image.getThumbnailData(self)[1]

        else:
            if not self.previews:
                return None, None
            else:
                if max_size_needed:
                    for thumbnail in self.previews:
                        if thumbnail.dimensions[0] >= max_size_needed or thumbnail.dimensions[1] >= max_size_needed:
                            break
                else:
                    thumbnail = self.previews[-1]
                        
                return thumbnail.data
                
    def read(self):


Generated by  Doxygen 1.6.0   Back to index