ID:253064
 
(See the best response by DarkCampainger.)
winset(usr,"window1.label18","image='LIGHT.dmi'")

or

winset(usr,"label18","image='LIGHT.dmi'")

or

winset(usr,"window1.label18","image=LIGHT.dmi")

or

winset(usr,"label18","image=LIGHT.dmi")

...

None of these work.
Use fcopy_rsc to copy the image into the rsc like so:

var/rsc_img = fcopy_rsc("LIGHT.dmi") // Can be 'LIGHT.dmi' as well.
winset(usr, "window1.label18", "image=\ref[rsc_image]")
This works, but the host needs the source of the game too. I dont want to distribute the source, so there is any other way of doing it?
The host most certainly does not need the source code for your game to host it.

Under the Build tab in Dream Maker, go to Package Files. Select "World executable files". Hit finish and it will generate a .dmb and .rsc file inside a .zip file that can be distributed to host the game with.
I know the host does not need the files. But for some reason using fcopy_rsc makes him need it. I don't know why.
When you package the world executable files, you can include extra files under "Additional files"
If the file is compiled into the RSC, you can just use it directly (or use icon() if you need a specific icon_state):
winset(usr, "window1.label18", "image=\"['LIGHT.dmi']\"")
is it possible to center a image in output?

im doing:
src << 'lalala.dmi'


How can I make it centered?
Using the <center></center> tags?

src << "<center>\icon['icon.dmi']</center>"
Thank you all for the answers.

And centering using <center> works. But what I'm trying to show in output is an 100x60 image, not a common icon. What to do?
In response to Muvuca (#9)
Muvuca wrote:
Thank you all for the answers.

And centering using <center> works. But what I'm trying to show in output is an 100x60 image, not a common icon. What to do?

You can't yet.
How I can't? There are a game called Duel Monster Genesis that do this. There is a way, I just don't know how.

Basically what I want is to show a Image centered in the output.

Look to what I already have:

src << 'lalala.dmi'


This code shows the image exactly how I want, but the problem is that this way the image cannot be centered. Or can it?
- bump -
- bump -
Best response
This seems to work fine:
var/icon/I = icon('tallicon.dmi')
src<<"<center><img style=\"width:[I.Width()]px;height:[I.Height()]px\" src=\"\ref[I.icon]\"></center>"


The icon text macro entry talks all about it.
THANK YOU!!!!!!!!!!!!

Helped a lot.
In response to ExPixel (#1)
ExPixel wrote:
Use fcopy_rsc to copy the image into the rsc like so:

> var/rsc_img = fcopy_rsc("LIGHT.dmi") // Can be 'LIGHT.dmi' as well.
> winset(usr, "window1.label18", "image=\ref[rsc_image]")
>

FYI: The example declares rsc_img but references rsc_image.