C# Class TraktPlugin.GUI.GUIImageHandler

Afficher le fichier Open project: trakt/Trakt-for-Mediaportal Class Usage Examples

Private Properties

Свойство Type Description
GetDefaultPoster string
GetRatingOverlay RatingOverlayImage

Méthodes publiques

Méthode Description
DownloadImage ( string url, string localFile ) : bool

Download an image if it does not exist locally

DrawOverlayOnAvatar ( string origAvartar, RatingOverlayImage ratingType, Size size ) : Bitmap

Draws a trakt overlay, rating icon on a poster This is done in memory and wont touch the existing file

DrawOverlayOnEpisodeThumb ( string origThumb, MainOverlayImage mainType, RatingOverlayImage ratingType, Size size ) : Bitmap

Draws a trakt overlay, library/seen/watchlist icon on a episode thumb This is done in memory and wont touch the existing file

DrawOverlayOnPoster ( string origPoster, MainOverlayImage mainType, RatingOverlayImage ratingType ) : Bitmap
DrawOverlayOnPoster ( string origPoster, MainOverlayImage mainType, RatingOverlayImage ratingType, Size size ) : Bitmap

Draws a trakt overlay, library/seen/watchlist icon on a poster This is done in memory and wont touch the existing file

GetTextureIdentFromFile ( string filename ) : string

Gets a MediaPortal texture identifier from filename

GetTextureIdentFromFile ( string filename, string suffix ) : string
LoadFanart ( TraktPlugin.GUI.ImageSwapper backdrop, string filename ) : void
LoadImage ( string file ) : Image

Loads an image FAST from file

LocalImageFilename ( this image, ArtworkType type ) : string

Gets the local filename of an image from a Trakt URL

ToClearUrl ( this url ) : string

Cleans a uri such that a friendly file system name can be derived

Private Methods

Méthode Description
GetDefaultPoster ( bool largePoster = true ) : string

Returns the default Poster to display in the facade

GetRatingOverlay ( int userRating ) : RatingOverlayImage

Get a overlay for images that represent a users rating

Method Details

DownloadImage() public static méthode

Download an image if it does not exist locally
public static DownloadImage ( string url, string localFile ) : bool
url string Online URL of image to download
localFile string Local filename to save image
Résultat bool

DrawOverlayOnAvatar() public static méthode

Draws a trakt overlay, rating icon on a poster This is done in memory and wont touch the existing file
public static DrawOverlayOnAvatar ( string origAvartar, RatingOverlayImage ratingType, Size size ) : Bitmap
origAvartar string
ratingType RatingOverlayImage
size System.Drawing.Size Size of returned image
Résultat System.Drawing.Bitmap

DrawOverlayOnEpisodeThumb() public static méthode

Draws a trakt overlay, library/seen/watchlist icon on a episode thumb This is done in memory and wont touch the existing file
public static DrawOverlayOnEpisodeThumb ( string origThumb, MainOverlayImage mainType, RatingOverlayImage ratingType, Size size ) : Bitmap
origThumb string Filename of the untouched episode thumb
mainType MainOverlayImage
ratingType RatingOverlayImage
size System.Drawing.Size Size of returned image
Résultat System.Drawing.Bitmap

DrawOverlayOnPoster() public static méthode

public static DrawOverlayOnPoster ( string origPoster, MainOverlayImage mainType, RatingOverlayImage ratingType ) : Bitmap
origPoster string
mainType MainOverlayImage
ratingType RatingOverlayImage
Résultat System.Drawing.Bitmap

DrawOverlayOnPoster() public static méthode

Draws a trakt overlay, library/seen/watchlist icon on a poster This is done in memory and wont touch the existing file
public static DrawOverlayOnPoster ( string origPoster, MainOverlayImage mainType, RatingOverlayImage ratingType, Size size ) : Bitmap
origPoster string Filename of the untouched poster
mainType MainOverlayImage
ratingType RatingOverlayImage
size System.Drawing.Size Size of returned image
Résultat System.Drawing.Bitmap

GetTextureIdentFromFile() public static méthode

Gets a MediaPortal texture identifier from filename
public static GetTextureIdentFromFile ( string filename ) : string
filename string Filename to generate texture
Résultat string

GetTextureIdentFromFile() public static méthode

public static GetTextureIdentFromFile ( string filename, string suffix ) : string
filename string
suffix string
Résultat string

LoadFanart() public static méthode

public static LoadFanart ( TraktPlugin.GUI.ImageSwapper backdrop, string filename ) : void
backdrop TraktPlugin.GUI.ImageSwapper
filename string
Résultat void

LoadImage() public static méthode

Loads an image FAST from file
public static LoadImage ( string file ) : Image
file string
Résultat Image

LocalImageFilename() public static méthode

Gets the local filename of an image from a Trakt URL
public static LocalImageFilename ( this image, ArtworkType type ) : string
image this
type ArtworkType The Type of image to get
Résultat string

ToClearUrl() public static méthode

Cleans a uri such that a friendly file system name can be derived
public static ToClearUrl ( this url ) : string
url this
Résultat string