NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 21 22 23 24 25 … 93 Next »
Displaying images

 
  • 0 Vote(s) - 0 Average
Displaying images
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#1
2009-12-28, 11:41 PM
When I want to display an image I am using
Code:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]Image[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] imgCurrent = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]...[/SIZE]
[SIZE=2]imgCurrent = [/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]Image[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].FromFile([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].CurrentEntry);[/SIZE]
where "this.CurrentEntry" is a string containing the full path to the image file. This works fine, but the image file is 'in use' while it is being displayed so can't be changed but I'd like to be able to overwrite the image file with a different image file while the original one is still being displayed. Have I missed something with "Image.FromFile" or is there some other technique I should be looking at?
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#2
2009-12-28, 11:47 PM
Are you recalling the "imgCurrent = Image.FromFile(this.CurrentEntry);" when you change the CurrentEntry value?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#3
2009-12-29, 12:08 AM
You can do something like this instead:

Code:
FileStream fs;
fs = new FileStream(filename, FileMode.Open, FileAccess.Read);
Image image = Image.FromStream(fs);
fs.Close();
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#4
2009-12-29, 12:19 AM
sub Wrote:You can do something like this instead:
Thanks, you're a real gent...
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#5
2009-12-29, 01:16 AM
And it works just fine...
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,909
Threads: 956
Joined: May 2006
#6
2009-12-29, 01:26 AM
Does that mean I will hear those Highland pipes and drums heralding in the new MLPanel yearly soon?

Martin
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#7
2009-12-29, 12:37 PM
mvallevand Wrote:Does that mean I will hear those Highland pipes and drums heralding in the new MLPanel yearly soon?

Martin
Who knows? - I could send you a copy of my latest dev version tho'

Alex
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Images in lists using a lot of memory cncb 4 4,021 2015-11-12, 12:02 AM
Last Post: sub
  FanArt & displaying a background image Jaggy 2 1,704 2012-01-31, 11:39 PM
Last Post: sub
  A list of changing images McBainUK 1 1,847 2011-06-21, 04:36 PM
Last Post: sub
  Updating images scb147 11 4,288 2010-07-30, 06:11 PM
Last Post: scb147
  Displaying web pages in pvrx2 psycik 4 2,032 2009-01-23, 07:59 PM
Last Post: psycik
  Retrieving Images from GetRenderList psycik 11 3,711 2008-08-10, 08:33 PM
Last Post: mvallevand
  Controlling fixedAspectRatio images in a skin ACTCMS 2 1,707 2008-03-29, 03:14 AM
Last Post: ACTCMS
  Using getnamedimage and images of specific sizes pastro 4 1,881 2007-09-26, 03:10 AM
Last Post: pastro
  Common Images Plugins Skins & Community Skin Project MixMan 98 21,111 2006-08-24, 01:51 PM
Last Post: MixMan
  Required OSD images question McBainUK 2 1,722 2006-07-18, 01:40 PM
Last Post: tipstir

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode