NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 30 31 32 33 34 … 93 Next »
Retrieving Images from GetRenderList

 
  • 0 Vote(s) - 0 Average
Retrieving Images from GetRenderList
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#1
2008-08-10, 12:50 AM
Hi sub. A request from martin, is it possible to convert a GetRenderList back to a foreground/background image that I could then save to a file?

http://forums.gbpvr.com/showpost.php?p=2...stcount=24

In the "old" days we were dealing with the images directly so it was pretty easy. What about for the new stuff or would this be some helper function that we could get you to add?

Basically I guess I want to ask for an image so i can save it, or know the method that you use to convert a render array list back to an image.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#2
2008-08-10, 02:43 AM
There isnt really a single image covering the whole screen. You'd have to make your own with something like:

Code:
Bitmap compositeRendering = new Bitmap(1280,720);
            Graphics g = Graphics.FromImage(compositeRendering);

            
            // draw each element from the render list to the appropriate place
            foreach (GBPVRUiElement uiElement in renderList)
            {
                int x1 = (int)((compositeRendering.Width / 100.0) * uiElement.oneOffRect.X);
                int y1 = (int)((compositeRendering.Height / 100.0) * uiElement.oneOffRect.Y);
                int width = (int)((compositeRendering.Width / 100.0) * uiElement.oneOffRect.Width);
                int height = (int)((compositeRendering.Height / 100.0) * uiElement.oneOffRect.Height);

                g.DrawImage(uiElement.image, new Rectangle(x1, y1, width, height));
            }

            compositeRendering.Save(Path.GetTempPath() + "\\pch.jpg");
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,843
Threads: 954
Joined: May 2006
#3
2008-08-10, 03:30 AM
Thanks sub I was hoping the DirectFB offered this type of ability so I could save the surface myself but I can't.

psycik could you try .Save in both png and jpg extensions I'd like to standardize on something with alpha capabilities if I can.

Martin
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#4
2008-08-10, 03:37 AM
So martin, do you want the whole screen, or just the info panel from the bottom?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,843
Threads: 954
Joined: May 2006
#5
2008-08-10, 03:47 AM
I'm just a dumb client, so whatever you save will be rendered full screen and your aspect ratio will not necessarily be preserved.

Martin
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#6
2008-08-10, 04:02 AM
Doesn't seem to work too well, there must be something else sub is doing that I don't see.

Seems to miss/invert the backgrounds.

Considering this is supposed to be blue.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#7
2008-08-10, 04:10 AM
You just need to initially draw the background image, to fill the entire composite image, prior to drawing each item in the render list.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#8
2008-08-10, 04:12 AM
And to get the background image I'd have to figure out what my background image is called from he skin file, since at the moment I think you control that bit.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#9
2008-08-10, 06:28 AM
You'll probably have to do something like use an instance of the SkinHelper2 object and call skinHelper.loadImageFromFile("Menu\\background.jpg"), or use the Image.LoadFromFile to load the same thing manually.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,843
Threads: 954
Joined: May 2006
#10
2008-08-10, 01:06 PM
psycik could you implement this "as is" for the next test release? It will allow me to do some work on it and I might be able to tell if you are writing in the the overscan area.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Images in lists using a lot of memory cncb 4 3,996 2015-11-12, 12:02 AM
Last Post: sub
  GetRenderList() always called with "block-extras..." element in renderlist alibert 1 1,608 2012-06-18, 10:24 AM
Last Post: sub
  A list of changing images McBainUK 1 1,841 2011-06-21, 04:36 PM
Last Post: sub
  Updating images scb147 11 4,269 2010-07-30, 06:11 PM
Last Post: scb147
  Displaying images ACTCMS 6 2,433 2009-12-29, 12:37 PM
Last Post: ACTCMS
  GetRenderList() herrmannj 5 2,347 2008-10-14, 08:05 PM
Last Post: herrmannj
  Creating a jpg from GetRenderList ACTCMS 8 3,091 2008-09-14, 01:21 AM
Last Post: ACTCMS
  needsRendering() and GetRenderList() JavaWiz 3 1,836 2008-05-22, 03:25 AM
Last Post: sub
  Controlling fixedAspectRatio images in a skin ACTCMS 2 1,699 2008-03-29, 03:14 AM
Last Post: ACTCMS
  Problems retrieving providers using MceEpg2xmlTv kiekar 4 1,795 2007-10-13, 04:08 PM
Last Post: kiekar

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

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

Linear Mode
Threaded Mode