merlin Posted February 24, 2005 Report Share Posted February 24, 2005 Hello Everyone. In my vi-application, i am using some images, that are loaded using "load jpg"/"load png"-functions. Now everytime i load an image, this takes too much time (for my needings; pictures are 600x256px big.) It gets even slower, when i write to the picture-control using the reference (from inside a subvi). I was thinking about storing the images in the final exe. Is that possible? And how would i go about to load the pictures then? thnx in advance. Quote Link to comment
malef Posted February 24, 2005 Report Share Posted February 24, 2005 Merlin, if you need static images on your front panel (??) simply copy and paste them out of the Explorer. Greetings Manfred Quote Link to comment
merlin Posted February 24, 2005 Author Report Share Posted February 24, 2005 not static images. I need to change them. explanation: i built a function, that would draw a list of items onto an image and select one of them. Select means, that it would put a box around the item with a background and change the item's color. So to that function i pass a background image, the items (as a array of strings) and the colors. The function returns the new image (possibly the list has to be displaced, so that the selected item is still visible...). So everytime the user presses arrowdown for example i would pass a pos+1 to the function and the next item will be selected. Then i route the output image to a picture-control. As i said before, the picture is 600x256px big. The first time the picture is loaded it needs about a second or two to load. After that it's much faster but still not fast enough. When you go down in a listing, you wouldn't expect to see the picture flash... Please tell me, if that's still not clear. thnx. Quote Link to comment
didierj Posted February 25, 2005 Report Share Posted February 25, 2005 Merlin, Did you try the picture ring for your purposes? There you embed the images directly into the control (at design-time) and select the desired picture by index at runtime. It is located in the Ring & Enum palette. Select Image by Image from Menu>>Import Picture from File and then with RMB on the control select Import Picture on the desired ring item. Didier Quote Link to comment
merlin Posted February 25, 2005 Author Report Share Posted February 25, 2005 Merlin,Did you try the picture ring for your purposes? There you embed the images directly into the control (at design-time) and select the desired picture by index at runtime. It is located in the Ring & Enum palette. Select Image by Image from Menu>>Import Picture from File and then with RMB on the control select Import Picture on the desired ring item. Didier 4027[/snapback] Hi, thank you, that seems to be exactly what i need. Problem is still, that i'm not able to read the pictures, but i hope this will sort itself out. thnx again. merlin Quote Link to comment
Wizbit Posted March 18, 2005 Report Share Posted March 18, 2005 Hi, Try this VI all you need to do is supply the image path, which can be static or dynamic. The problem I have found with picture rings is trhat when you have many pictures the llb file gets very big and it takes quite a while to load the program because it has to cache all of the images. If you use my vi the pictures are loaded as jpegs as required by your main level VI. Enjoy! Al Download File:post-1633-1111165831.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.