Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using a Bitmap received from a roUrlTransfer?

I need to get a bitmap using a roUrlTransfer object. The roUrlTransfer object needs to be created in a task node, but I need to use the bitmap in the main part of my video player screen code. I placed the image in the tmp local directory. I can successfully create this bitmap within the task node. 

However, I need to use this bitmap in my video player screen code and when I attempt to recreate this bitmap in that code and could not create it. I attempt to place a reference to the bitmap created in the task node within an associative array, but for some reason the bitmapbecomes invalid when I assign it to an object with the type of  "assocarray"

How can I ensure a file received using a roUrlTransfer object can be used at other parts of the code?

(I asked this same question in another thread but the main purpose of that thread was not to resolve this issue.)
Below is the code I used to get the image into the local file system:

'//The following code is placed in the task node
url = "http://filePathToImage"
http = CreateObject("roUrlTransfer")
imagePath = "tmp:/tempBitmapImage.jpg"
wait(0, http.GetPort())
bmp = CreateObject("roBitmap", imagePath) '//If I log what bmp is, it returns a valid bitmap'

'//In the Video player code
 CreateObject("roBitmap", "tmp:/tempBitmapImage.jpg")  '//This produces an "invalid" object

0 Kudos