A thumbnail object is used for displaying the thumbnail of an image or video. You must have compiled Elementary with Ethumb_Client support. Also, Ethumb’s DBus service must be present and auto-activated in order to have thumbnails generated. You must also have a session bus, not a system one.
Once the thumbnail object becomes visible, it will check if there is a previously generated thumbnail image for the file set on it. If not, it will start generating this thumbnail.
Different configuration settings will cause different thumbnails to be generated even on the same file.
Generated thumbnails are stored under $HOME/.thumbnails/. Check Ethumb’s documentation to change this path, and to see other configuration options.
Play animation once
Keep playing animation until stop is requested
Stop playing the animation
128x128 as defined by FreeDesktop.Org standard
256x256 as defined by FreeDesktop.Org standard
PNG as defined by FreeDesktop.Org standard
JPEGs are often smaller and faster to read/write
EFL’s own storage system, supports key parameter
keep original proportion between width and height
ignore aspect and foce it to match thumbnail’s width and height
keep aspect but crop (cut) the largest dimension
keep orientation as pixel data is
rotate 90° clockwise
rotate 180°
rotate 90° counter-clockwise
flip horizontally
flip vertically
transpose
transverse
use orientation from metadata (EXIF-only currently)
Bases: efl.elementary.__init__.Object
This is the class that actually implements the widget.
Parameters: |
|
---|
Set the animation state for the thumb object. If its content is an animated video, you may start/stop the animation or tell it to play continuously and looping.
See also
Type: | Thumb animation mode |
---|
The aspect for the thumb object.
Type: | Thumb aspect |
---|
New in version 1.8.
This is called when a user has clicked the thumbnail object without dragging it around.
This is called when a user has double-clicked the thumbnail object.
The thumbnail generation failed.
The thumbnail generation has started.
The generation process has stopped.
The thumbnail image loading failed.
This is called when a user has pressed down over the thumbnail object.
Set the compression for the thumb object.
Type: | int |
---|
New in version 1.8.
Set the crop alignment for the thumb object.
Type: | (float cropx, float cropy) |
---|
New in version 1.8.
Make the thumbnail ‘editable’.
This means the thumbnail is a valid drag target for drag and drop, and can be cut or pasted too.
Type: | bool |
---|---|
Raises RuntimeError: | |
when cannot be set as editable |
Changed in version 1.8: Raises RuntimeError if cannot be set as editable
Get the ethumb_client connection state.
Type: | bool |
---|
Get the ethumb_client handle so custom configuration can be made.
This must be called before the objects are created to be sure no object is visible and no generation started.
Note
There’s only one client handle for Ethumb, so once a configuration change is done to it, any other request for thumbnails (for any thumbnail object) will use that configuration. Thus, this configuration is global.
Returns: | Ethumb_Client instance or None. |
---|---|
Return type: | Ethumb_Client |
The FDO size for the thumb object.
Type: | Thumb FDO size |
---|
New in version 1.8.
The file that will be used as thumbnail source.
The file can be an image or a video (in that case, acceptable extensions are: avi, mp4, ogv, mov, mpg and wmv). To start the video animation, use the function animate().
Type: | string or tuple(string file, optional string eet_key) |
---|
The format for the thumb object.
Type: | Thumb format |
---|
New in version 1.8.
The orientation for the thumb object.
Type: | Thumb orientation |
---|
New in version 1.8.
Get the path and key to the image or video thumbnail generated by ethumb.
One just needs to make sure that the thumbnail was generated before getting its path; otherwise, the path will be None. One way to do that is by asking for the path when/after the “generate,stop” smart callback is called.
See also
Type: | (string path, string eet_key) |
---|
Set the quality for the thumb object.
Type: | int |
---|
New in version 1.8.
Reload thumbnail if it was generated before.
This is useful if the ethumb client configuration changed, like its size, aspect or any other property one set in the handle returned by ethumb_client_get().
If the options didn’t change, the thumbnail won’t be generated again, but the old one will still be used.
See also
The size for the thumb object.
Type: | (int tw, int th) |
---|
New in version 1.8.