WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-20-2012, 06:52 AM
mhead10 mhead10 is offline
Member
 
Join Date: Mar 2012
Posts: 40
Failed to load jpeg

Hello,

I'm trying to simply import a .jpeg and then .wrl file from solidworks, however I've not been successful with either.

I saved an arbitrary jpeg (lake.jpeg) in the same folder as my python program (cube_test). I run the test script with the following code to import the picture:


import viz
viz.go()
background=viz.addChild('lake.jpeg')

I've also tried 'lake.jpg', as well as trying a .wrl file from solidworks. However, I alway get and error, like the following:

ERROR: Failed to load 'lake.jpeg'

Any thoughts on what I'm doing wrong?

Thanks ahead of time for any help!
Reply With Quote
  #2  
Old 03-20-2012, 07:20 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,448
To load an image, use the viz.addTexture command instead of viz.addChild:
Code:
texture = viz.addTexture('lake.jpg')
Reply With Quote
  #3  
Old 03-20-2012, 11:53 AM
mhead10 mhead10 is offline
Member
 
Join Date: Mar 2012
Posts: 40
Thank you for your help! I knew it was something silly!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
artoolkit load 3d objects into application xcuddlex Vizard 8 04-18-2011 02:00 AM
ERROR: Failed to load .ive file turgutm Vizard 1 09-16-2010 05:16 AM
Failed to load wav file BrynJ Vizard 1 04-24-2008 09:35 AM
intersense: Failed to set control word on \\.\COM1 OueOue Precision Position Tracker (PPT) 2 01-18-2007 12:51 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


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


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