| |||||||
| View Pictures General talk, support, improvement suggestions and tips & tricks |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #11 (permalink) | |
| Portal Designer | Quote:
Something like: Code: System.Drawing.Image img = whatever.LoadImage();
string name = "whatever"; // unique per thumbnail, perhaps use the path
Size s = new Size(100,100);
item.ThumbnailImage = buildMemoryImage(img, name, s);
public static string buildMemoryImage(System.Drawing.Bitmap image, string identifier, System.Drawing.Size size)
{
string name = String.Format("[Thumbnail:{0}]", identifier);
try
{
if (GUITextureManager.LoadFromMemory(null, name, 0, 0, 0) == 0)
{
GUITextureManager.LoadFromMemory(image, name, 0, size.Width, size.Height);
}
}
catch (Exception ex)
{
// error
}
return name;
}
__________________ There are only two industries that refer to their customers as "users". - Edward Tufte | |
| | |
| This User Say Thank You: |
| | #12 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | Thanx Inker. That makes sense. I will do some more researches on that. Bye Lars Edit: After just another brief experiment it look much better. I now able to see the embedded pictures in the fascadeview and it is not slower than before. The routine extracts the thumbnails from the pictures so fast that there is no need to have thumbnails in the "thumbs" folder anymore. No I have to think of a texture management to get rid of textures that not used any more. The mentioned OnRetrieveCoverArt is called by the fascadeview if a list item is shown for the first time... so that is perfect to implement my routine. But unfortunately there is no "OnFreeCoverArt" or something like that. Do you know how I can analyse with items are shown and with not? I thought about a List<string> that contains the texture names of the loaded textures, but I have to find out which textures are not needed anymore to free them by time... Bye Lars Edit2: Mmhh. I still haven't found a proper way to know which items are currently visible and which not. that would be the "cleanest" way to keep only textures in the memory that really needed. A different approach would be to keep all textures that has been loaded via the modified OnRetrieveCoverArt till the folder is changed... But after browsing a folder with many images that wouldn't be a perfect solution. Any ideas ![]()
__________________ Using a wide screen and tired of changing the aspect ratio via remote all the time? Use the ViewModeSwitcher Plugin and everything is working automatically. Are you able to find your home in MediaPortal? Yes you are! With the WorldMap plugin! Last edited by lkuech; 2007-08-06 at 19:09. Reason: Automerged Doublepost |
| | |
| | #13 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | Hi again ![]() Here is my first approach... It is not an 100% solution right now... but I'm on my way ![]() The current behaviour is like this:
To test the new function is makes sense to delete all already generated thumbs from the "thumbs\picture" folder (create a backup first ).The background thumb generator does only generate thumbs for images without EXIF thumbs. This will save thousands of files from being created and save a lot of diskspace. But I plan to created an option that gives you the ability to choose if he should generate highres thumbs in the "thumbs\picture" folder instead (this is the old way but will most likely generate thumbs with a slightly better quality as the embedded thumbs). Know "bugs"
EDIT: I fixed the "EXIF thumb will not update the listview automatically" bug. The attached files has been updated EDIT2: I've remove the attachment because it was is outdated. If someone is interested in the updated test files... just let me know. Bye Lars
__________________ Using a wide screen and tired of changing the aspect ratio via remote all the time? Use the ViewModeSwitcher Plugin and everything is working automatically. Are you able to find your home in MediaPortal? Yes you are! With the WorldMap plugin! Last edited by lkuech; 2007-08-19 at 09:29. Reason: Attachment removed |
| | |
| | #14 (permalink) |
| Portal Tester | Did a short test and worked good here. I had fast thumbnails showing and creation of thumbs started in background as usual. But they showed up nearly instantly, so that EXIF-reading seems to work.
__________________ Some say he works as a tester for Team Mediaportal and some say that he smells bugs, even before they are written into the Code. All we know is, he's called The Stig. |
| | |
| | #15 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | I've updated the post before. In the new attachment I have fixed that images without EXIF thumbs are not shown directly if the background updater has created the thumb. Bye Lars
__________________ Using a wide screen and tired of changing the aspect ratio via remote all the time? Use the ViewModeSwitcher Plugin and everything is working automatically. Are you able to find your home in MediaPortal? Yes you are! With the WorldMap plugin! |
| | |
| | #16 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | Because we are currently in a "freeze phase" of the development until the next stable comes out. I'll wait with the final integration till we reach that point. The posted windowplugins.dll (post #13) shows like a "proof of concept" how fast MP may show thumbnails even without the need to pre generate them (and how well they look even on a 40'' FullHD screen). The final integration will make a complete replacement of the current ExifExtractor (that one that is used by MP right now) necessary. That means even classes like the PictureDatabaseSQLLite.cs have to be changed. Of course that is not possible during a freeze phase. Also we have to discuss when and how to generate big thumbs, because these can not be replaced by my routine. Most likely I develop this further (with minor priority ) and we will soon have something to show when the freeze is over.Bye Lars
__________________ Using a wide screen and tired of changing the aspect ratio via remote all the time? Use the ViewModeSwitcher Plugin and everything is working automatically. Are you able to find your home in MediaPortal? Yes you are! With the WorldMap plugin! |
| | |
| | #17 (permalink) | |
| Portal Developer Join Date: Jun 2004 Location: Germany
Posts: 504
Thanks: 7
Thanked 3 Times in 3 Posts
Country: | Quote:
For option 1 (EXIF) the EXIF thumbs will used whenever they exist in a file, only when there is no thumb available, the MP thumb generator starts to create one, which is used then. If a file has exif thumbs no "big" MP thumbs are ever used. For option 2 the best solution would be a section in the configuration program that generates thumbs for all your shares. Like the building of the music db is done already. So you could start this, leave MP alone once for some time, but then you'll have all thumbs ready. For monitoring shares for new picures there is something like the music share watcher. It creates the "big" MP thumbs in the background with a very low priority. If a user enters a folder with no big thumbs created yet, he will see the EXIF thumbs like in option 1. I hope at least somebody can follow my thoughts What do you think?Maschine | |
| | |
| | #18 (permalink) |
| Retired Team Member | works great ! thx one thing: it messed up my TV-guide
__________________ go to the new My Music Wiki, to expand the capabilities of your music collection: http://wiki.team-mediaportal.com/UsingMyMusic Last edited by idioteque; 2007-08-08 at 15:09. |
| | |
| | #19 (permalink) | |
| Portal Member Join Date: Jul 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Country: | Thanks for this nice addition. It sure makes My Pictures much more useful. And I really don't like wasting space just to show icons now and then. Quote:
I would use #1, ie remove all small thumbs and use exif. For images without Exif thums, small thums could be created. About #2: For me it would be enough if big icons were created (slowly) on the fly only when I choosen 'Big Icons' in certain directories. Exif thums would be enough most of the time. I find it a big overkill with a 'thumb-database' like the music db, but maybe that is just me. Ps. I tried reproducing idioteque 'it messed up my TV guide'. I once had the guide 'stuck' on top, without it being possible to remove. That happened only once so I am uncertain if it was the fault of the new windowplugin or not. idioteque, please explain what/how it messed it up, so that it could be checked/fixed. | |
| | |
| | #20 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | Hi @ll. As far as I can say from analysing the current code of the latest MP SVN, the large thumbs are only used for filmstrip panel (also known as cover view). Even if you switch to "Big icons" you use the "small thumbs". That means the only kind of thumbs that can not be replaced by the new EXIF extrator are these "large thumbs". But IMHO the idea of pollyplopp to creating them on the fly when they are required is absolutely worth to think about. How often is the the filmstrip used? Does it really make sense to create thousands of files just for such kind of feature? Why not doing the same thing like the slideshow (even manually) does. Load the picture when it is needed (and do the same with the next and previous one to speed up the user experience). Generating a copy of every picture in a resolution of 768xsomething is a "bit" oversized for our propose... at least from my point of view. Tourette had mentioned good idea on IRC yesterday. Because of the reason that not all cameras may generate thumbs in a quality that can compete with the manually created ones from MP. We should create an option to set which resolution the embedded thumb must have to be used. Otherwise MP generates it's own in the background (but used the embedded one till the new thumb is generated). @idioteque: the file I have posted is just for test propose. It was compiled against a svn that is two days old. To use it with a different SVN may lead to side effects in other modules. So after the testing of the Picture section (and only these you should better return the the original file.
__________________ Using a wide screen and tired of changing the aspect ratio via remote all the time? Use the ViewModeSwitcher Plugin and everything is working automatically. Are you able to find your home in MediaPortal? Yes you are! With the WorldMap plugin! |
| | |
![]() |
| Bookmarks |
| Tags |
| application, test |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MP Freeze with "Error in the Application - Exception in Microsoft Direct3D" | LXB | fixed 0.2.3.0 RC1 bugs | 3 | 2007-06-20 01:46 |
| How to disable recorded TV thumbnail creation | Aquarius | General Support | 1 | 2007-01-24 09:45 |
| Videos take forever to "catch up" when fast forwar | tacroy | General Support | 4 | 2006-03-28 06:57 |
| Disable folder.jpg thumbnail creation for picture folders? | thorazine | General Support | 0 | 2006-01-12 19:02 |
| Simplify the "My Application" thread | Anonymous | Improvement Suggestions | 0 | 2004-10-24 10:58 |