Attach existing attached image plane to newly created Camera. MEL - maya

Does anyone know how to attach an exisiting image plane to another camera? Then be able to delete the camera the image plane was initially connected to. Everytime i try, it deletes the image plane from both cameras. I have even tried disconnecting the connection from the previous camera before deleting the first camera. No luck.. Any help would be great. Thanks for any help!

If you duplicate camera, imageplane stay in the old camera shape. You need to detach from old camera and attach it to the new one:
imagePlane -e -detach imagePlane1;
imagePlane -e -camera camera2;

Related

Save picture from camera to SQLlite as blob

I'm trying to solve some issue. I need to take picture from camera and save it to database (sqllite), after that i want to upload it all at the end of the day. I spent several hours to solve it.
My question is how to save picture to local database for my task. I tried to convert result form camera (blob:http://localhost:44000/...) to base64 but it takes long time.
Maybe there is more effectively way to make it?

Is it possible with Codename One to take a temporary photo?

Part of the process used in my app involves taking a photo (done with Capture.capturePhoto()). The photo is then resized to a small square of 200px and finally sent to a server.
I am able to delete the resized image with FileSystemStorage.delete() however the initial photo taken with Capture.capturePhoto() cannot be deleted because of the app being sand boxed (as described in this SO question )
This can be embarrassing for the user because these photos are polluting their gallery (the photos have no value for the user).
As deleting the initial photo is not possible, I was wondering if I could force the Captured photo to be stored in cache so that it gets automatically removed by the OS.
Maybe this question could be a solution for Android but I would prefer to avoid having to go native?
Consequently is it possible with Codename one to take a photo that will only be temporary and be deleted automatically ?
Thanks a lot,
Cheers
We try to delete the file automatically but since the OS takes the photo some platforms just stick it in the gallery and there isn't much we can do there. It's literally a matter of "this works on Android device A and fails on Android device B".
Apps like snapchat etc. don't use the device camera app but instead use the low level camera API's which are more complex and flaky. At this time we don't map these API's in Codename One so if you need something with lower level control you will need to use native interfaces. This is a non-trivial API though.

Display different output on secondary monitor

I am creating simple application for altering an image projected by projector.
I would like that projected image to be different than the desktop.
Consider simple example. My application would take a print-screen and add some bitmap to it. Than it will displayed on the projector. While original image on notebook monitor is the same, the projected image will contain this added bitmap.
I am using GDI for altering image the image in C++/CLI, and Windows Forms.
You just create two windows, and position one such that it's on the secondary display, and one such that it's on the primary display. There's nothing "magical" about the second monitor you have to mess with.
I'll add to what Billy said, and provide information that you should use Screens collection for that. It will give you exact coordinates of each screen that is available on the system.
More info here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx

WP7 - compass pointer

Sorry for the really general question, but I don't have a clue where to start. There's a component I want to develop for a WP7 application which is a an arrow that points in the direction (preferable X, Y, Z planes) of an address from where the user is currently located.
So for example, if you're lost in the woods and you have the address (long/latitude) of your house, it will always point you home.
Anyone know of any way to get started with this or samples or.....?
Thx in advance!
With the release of Mango you can now use the Compass class.
There is also the Raw Sensor Data Sample and How to: Get Data from the Compass Sensor for Windows Phone.
Unfortunately as of January 2011, Microsoft has not yet exposed the compass functionality with a public API. You'll have to wait till a later release for that.
If you are interested in the Latitude and Longitude, the GeoCoordinateWatcher is the place to start.
You can write so many miles East/West/North/South on the app page ( not worth much) if required.
You can even show a dynamic bing map with an indication of current location and destination using pins. But can't show the directions/orientation of the device w.r.t. actual direction.
You can get current GPS location and home GPS location. check the location service API http://msdn.microsoft.com/en-us/library/ff431803.aspx
Cant you use the GeoCoordinate.Course to get direction you are going?
Sebulba

Silverlight - Saving an already downloaded image to disk

I have a silverlight application that displays images. These images display fine but I would like to go one step further and let people save an image to disk.
I don't want to redownload the image using the WebClient class.
I can see the image so I know it's already cached somewhere on my computer. Technically, I don't think it should be necessary to open any new connections...
Ideas?
You can Render your image into a WritableBitmap, encode it using one of the free encoders available (like ImageTools) and save it to disk using SaveFileDialog. The only other choice is to load image using WebClient. If you want to avoid loading image twice you could load it with WebClient from the start.

Resources