SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-17-2006, 09:36 PM
aperry's Avatar
aperry aperry is offline
Sage Expert
 
Join Date: Jan 2005
Posts: 680
Is MediaFile Required?

I have some JPEG images that I want to show thumbnails of in a menu. The only way I have been able to get them to show is to do something similar to the following:

Code:
+ currFile = new_java_io_File(filename)
  + if GetMediaFileForFilePath(currfile) == null
    + true
      + AddMediaFile(currfile, "")
        + Refresh()
          + GetThumbnail(GetMediaFileForFilePath(currfile))
    + false
      + GetThumbnail(GetMediaFileForFilePath(currfile))
        -pic- Untitled
My question is, do I really need to do the "AddMediaFile" or is there another way of pulling in the image? Is there really a problem doing the AddMediaFile, or am I worrying for nothing?

Thanks for any help!

Last edited by aperry; 04-17-2006 at 10:22 PM.
Reply With Quote
  #2  
Old 04-17-2006, 09:48 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
No, you don't need to do all that. There are several simpler ways to do it.

1. Call LoadImageFile with the filename, and pass that in to the Image widget.
2. Create a java.io.File, and pass that in to the Image widget.
3. Put the filename string into an attribute variable, and reference the variable from the Image widget's Source File property.
__________________
-- Greg
Reply With Quote
  #3  
Old 04-17-2006, 10:29 PM
aperry's Avatar
aperry aperry is offline
Sage Expert
 
Join Date: Jan 2005
Posts: 680
Cool, thanks. I went with option 1. Worked great!
Reply With Quote
  #4  
Old 04-18-2006, 01:17 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
You can also just pass the string itself into the Image Widget(by using an Action parent). It'll then load the image from the path/URL or whatever it was given.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #5  
Old 04-18-2006, 01:27 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Rats! I missed a chance to post a manual reference for p. 37 of the v4.1 Studio manual. Oh well, it is never too late, I suppose.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #6  
Old 04-18-2006, 02:37 PM
aperry's Avatar
aperry aperry is offline
Sage Expert
 
Join Date: Jan 2005
Posts: 680
Quote:
Originally Posted by Narflex
You can also just pass the string itself into the Image Widget(by using an Action parent). It'll then load the image from the path/URL or whatever it was given.
I like that even better!

I'm sure there's going to be about 23490084 things I could have done better in my STVI, and hopefully as time goes on, I'll learn these...

Last edited by aperry; 04-18-2006 at 02:44 PM.
Reply With Quote
  #7  
Old 04-18-2006, 02:42 PM
aperry's Avatar
aperry aperry is offline
Sage Expert
 
Join Date: Jan 2005
Posts: 680
Quote:
Originally Posted by Opus4
Rats! I missed a chance to post a manual reference for p. 138 of the v4.1 Studio manual. Oh well, it is never too late, I suppose.
I don't see a reference to image stuff on page 138 (at least not in the one in your sig).
Reply With Quote
  #8  
Old 04-18-2006, 02:49 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by aperry
I don't see a reference to image stuff on page 138 (at least not in the one in your sig).
Hmmm... If anyone can explain to me how I managed to change '37' into '138', please let me know! I edited the above post to reference p. 37.

(That's the page for the Image Widget details.)

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #9  
Old 04-18-2006, 03:05 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by Opus4
Hmmm... If anyone can explain to me how I managed to change '37' into '138', please let me know!
Take 37 and add 1 to both ends
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:44 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.