home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Products
TV-Server
For The Record - The rule-based scheduling suite
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dvdfreak" data-source="post: 213972" data-attributes="member: 21313"><p>I've thought this through and have come up with the following:</p><p></p><p>1) When you install TV Scheduler itself, there will be an empty "Logos" directory in its installation path.</p><p></p><p>2) You can then copy your logo images to that directory. The naming convention will be to use the DisplayName of the channel, with any extension (.jpg, .png,...).</p><p></p><p>3) There will be a new method on ITvSchedulerService:</p><p></p><p>[code] /// <summary></p><p> /// Get a resized channel logo, if newer than the provided timestamp. The aspect ratio of the</p><p> /// original image is preserved so the returned image is potentially either smaller than</p><p> /// the requested size, or centered on a transparant background.</p><p> /// </summary></p><p> /// <param name="tvChannelId">The ID of the channel.</param></p><p> /// <param name="width">The requested width.</param></p><p> /// <param name="height">The requested height.</param></p><p> /// <param name="useTransparantBackground">Use a transparant background when preserving the aspect ratio.</param></p><p> /// <param name="modifiedAfterTime">Only return a logo if it is newer than the given timestamp.</param></p><p> /// <returns>A byte array containing the bytes of a (transparant) PNG of the resized logo, or null if no (newer) logo was found.</returns></p><p> [OperationContract]</p><p> [FaultContract(typeof(TvSchedulerException))]</p><p> byte[] GetChannelLogo(Guid tvChannelId, int width, int height, bool useTransparantBackground, DateTime modifiedAfterTime);[/code]</p><p></p><p>With this new method clients, like the TV Scheduler Web Access site, can build up a local cache of channel logos resized exactly for their purpose. By passing in the timestamp of the locally cached PNG, refreshing this cache will be very efficient since no logos will be resized or transferred unless they are really newer.</p><p></p><p>I was considering storing the channel logos in the database, but then I realized this would make it very hard for people to distribute "logo packs". By storing the logos in a directory it is very easy to simply unzip such a logo pack there, and hey presto, you've got channel logos <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> The only thing you might have to do is rename some of the logos to match your channel name.</p><p></p><p>The slight hassle is that clients need to build up their own logo cache. But this is by far the best and cleanest solution since every client will have different size requirements depending on how they want to visualize the channels. A client might even build up two caches because it needs two differently sized logos.</p><p></p><p>BTW, the logo packs I mentioned before should ideally contain images of high quality, since it will be the TV Scheduler service itself that resizes them as needed.</p></blockquote><p></p>
[QUOTE="dvdfreak, post: 213972, member: 21313"] I've thought this through and have come up with the following: 1) When you install TV Scheduler itself, there will be an empty "Logos" directory in its installation path. 2) You can then copy your logo images to that directory. The naming convention will be to use the DisplayName of the channel, with any extension (.jpg, .png,...). 3) There will be a new method on ITvSchedulerService: [code] /// <summary> /// Get a resized channel logo, if newer than the provided timestamp. The aspect ratio of the /// original image is preserved so the returned image is potentially either smaller than /// the requested size, or centered on a transparant background. /// </summary> /// <param name="tvChannelId">The ID of the channel.</param> /// <param name="width">The requested width.</param> /// <param name="height">The requested height.</param> /// <param name="useTransparantBackground">Use a transparant background when preserving the aspect ratio.</param> /// <param name="modifiedAfterTime">Only return a logo if it is newer than the given timestamp.</param> /// <returns>A byte array containing the bytes of a (transparant) PNG of the resized logo, or null if no (newer) logo was found.</returns> [OperationContract] [FaultContract(typeof(TvSchedulerException))] byte[] GetChannelLogo(Guid tvChannelId, int width, int height, bool useTransparantBackground, DateTime modifiedAfterTime);[/code] With this new method clients, like the TV Scheduler Web Access site, can build up a local cache of channel logos resized exactly for their purpose. By passing in the timestamp of the locally cached PNG, refreshing this cache will be very efficient since no logos will be resized or transferred unless they are really newer. I was considering storing the channel logos in the database, but then I realized this would make it very hard for people to distribute "logo packs". By storing the logos in a directory it is very easy to simply unzip such a logo pack there, and hey presto, you've got channel logos :D The only thing you might have to do is rename some of the logos to match your channel name. The slight hassle is that clients need to build up their own logo cache. But this is by far the best and cleanest solution since every client will have different size requirements depending on how they want to visualize the channels. A client might even build up two caches because it needs two differently sized logos. BTW, the logo packs I mentioned before should ideally contain images of high quality, since it will be the TV Scheduler service itself that resizes them as needed. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
For The Record - The rule-based scheduling suite
Contact us
RSS
Top
Bottom