WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   textures bug/problem? (https://forum.worldviz.com/showthread.php?t=3020)

Renato Lima 10-12-2010 10:24 AM

textures bug/problem?
 
I have to choose between to methods of applying a texture.
I would like to use A, but the resolution is MUCH lower than B. Why? How do I make is as good? Thanks

Method A:
pngData = cStringIO.StringIO()
pylab.savefig(pngData, format='png')
pylab.close()
T = viz.addBlankTexture([1, 1])
T.loadBuffer('.png', pngData.getvalue())
TMP = vr_world.getChild("object")
TMP.texture(T)


Method B:
pngData = "mydo_chart.png"
pylab.savefig(pngData, format='png')
pylab.close()
T = viz.add(pngData)
TMP = vr_world.getChild("object")
TMP.texture(T)

farshizzo 10-12-2010 03:12 PM

How much lower is the resolution? Add the following line at the end of each sample to see what the images sizes are:
Code:

print T.getSize()


All times are GMT -7. The time now is 11:58 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC