![]() |
Pylab, StringIO and viz.add
I have been trying to generate some charts on the fly and then apply them as textures to objects. However, viz.add triggers the following message when I try to add an image that has been saved to memory:
File "C:\Program Files (x86)\WorldViz\Vizard30/python\viz.py", line 8704, in add raise ValueError, 'Unrecognized file extension: '+fileType This is my code: t = pylab.arange(0.0, 2.0, 0.01) Is it a limitation of vizard? or am I doing something wrong? I really don't want to save the file to the disk as it greatly reduces performance. Thanks |
The texture objects have a few functions for loading images from memory.
If the data is from an image format that is in memory (png, jpeg, bmp, etc..), then you can use Here is some sample code: Code:
# Create a blank texture that will be updated later |
It worked nicely!
Thank you very much for your quick reply. Your fast support is really driving us towards adopting Vizard as one of our main platforms for development. |
In fact, after using this for a while, I realized that que quality of the texture is much inferior than what I obtain by using a real image. Any ideas?
|
All times are GMT -7. The time now is 05:57 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC