From: Almudever on
I need to open an image of external JPEG in an project. And then this one will
be embedded in the project.
My ask is: There are some Xtra appropiate to this or only lingo is sufficient?
And what is the code?

From: Mike Blaustein on
You can use just Lingo. You would need to make a new bitmap member

newMem=new(#bitmap)

Then set the filename to your external jpg

newMem.filename="path\to\file.jpg"

Now, in order to "embed" it, you can make another bitmap wich has the
same image as the one you just made, and name it.

embeddedVersion=new(#bitmap)
embeddedVersion.image=newMem.image
embeddedVersion.name="WhateverNameYouWant"

Then delete the external one if you wish

newMem.erase()

Then, the last step is to save the cast with the new embedded member

castlib("internal").save()

That's it. If you dont really need to have it saved in the castlib, you
can get away with just setting the filename of any bitmap member. Also,
beware that the save command does not work with compressed castlibs, so
you can not save it in shockwave (cct) format. You can save it in cxt
(encrypted) format.
From: Sean Wilson on
> newMem=new(#bitmap)
>
> Then set the filename to your external jpg
>
> newMem.filename="path\to\file.jpg"
>
> Now, in order to "embed" it, you can make another bitmap wich has the
> same image as the one you just made, and name it.
>
> embeddedVersion=new(#bitmap)
> embeddedVersion.image=newMem.image
> embeddedVersion.name="WhateverNameYouWant"
>
> Then delete the external one if you wish
>
> newMem.erase()

Alternatively:
tMember = _movie.newMember(#bitmap)
tMember.importFileInto("path\to\file.jpg")