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
MediaPortal 1
Development
General Development (no feature request here!)
GUIImage/GUIButton help
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="sa_ddam213" data-source="post: 654478" data-attributes="member: 89205"><p>Hi all,</p><p></p><p>I'm currently writing a MP plugin and I am stuck on a problem that may be simple fix <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>My plugin creates an System.Drawing.Image and I would like to display and update this image on a GUIImage/GUIButton background texture, The problem is the GUIImage/GUIButton class only allows me to pass a filename for the texture not a Image or Bitmap.</p><p></p><p>Saving the image as a file first is not an option as it update at 30fps (too fast for create and show).</p><p></p><p>Option 1: rendering the image to the surface myself (not too keen as I would like to use focus/click and mouse events of the GUIControl)</p><p>Option 2: Is it possible to make a MP user GUIControl.</p><p></p><p></p><p>Any help/Ideas would be awesome</p><p></p><p>Edit: can I use the GUIImage.MemoryImage method to set the memoryimage?</p><p></p><p></p><p>Cheers Sa_ddam213</p><p></p><p>[CODE]</p><p>public static Image movingIMG;</p><p></p><p> public void DrawMovingImage(GUIImage image)</p><p> {</p><p> image.RemoveMemoryImageTexture();</p><p> Bitmap bmp = new Bitmap(movingIMG.Width, movingIMG.Height);</p><p> movingIMG.DrawToBitmap(bmp,movingIMG.ClientRectangle);</p><p> bmp.Save(@"c:\test.png");</p><p> image.FileName = @"c:\test.png";</p><p> bmp.dispose();</p><p> }[/CODE]</p><p></p><p>Can do it this way but Max fps = 6fps <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /> </p><p></p><p>If I pass this to a Windows.forms picturebox (as an Image not file) I can get 30-40 fps <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p>so if I can get the GUIImage to do the same would be perfect</p></blockquote><p></p>
[QUOTE="sa_ddam213, post: 654478, member: 89205"] Hi all, I'm currently writing a MP plugin and I am stuck on a problem that may be simple fix :) My plugin creates an System.Drawing.Image and I would like to display and update this image on a GUIImage/GUIButton background texture, The problem is the GUIImage/GUIButton class only allows me to pass a filename for the texture not a Image or Bitmap. Saving the image as a file first is not an option as it update at 30fps (too fast for create and show). Option 1: rendering the image to the surface myself (not too keen as I would like to use focus/click and mouse events of the GUIControl) Option 2: Is it possible to make a MP user GUIControl. Any help/Ideas would be awesome Edit: can I use the GUIImage.MemoryImage method to set the memoryimage? Cheers Sa_ddam213 [CODE] public static Image movingIMG; public void DrawMovingImage(GUIImage image) { image.RemoveMemoryImageTexture(); Bitmap bmp = new Bitmap(movingIMG.Width, movingIMG.Height); movingIMG.DrawToBitmap(bmp,movingIMG.ClientRectangle); bmp.Save(@"c:\test.png"); image.FileName = @"c:\test.png"; bmp.dispose(); }[/CODE] Can do it this way but Max fps = 6fps :( If I pass this to a Windows.forms picturebox (as an Image not file) I can get 30-40 fps :) so if I can get the GUIImage to do the same would be perfect [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
GUIImage/GUIButton help
Contact us
RSS
Top
Bottom