load image from directory - is it possible?

I mean loading it at runtime, not from the editor. is it possible in gdevelop?

With the shape painter/primitive drawer, there’s an action to load a picture.

Where is that action? I cant find it!

ok second question :slight_smile:

Is it possible to save an image out with alpha as well?

For example I have two sprites loaded from a directory. I overlap one over the other and then save out the result with alpha(png).

I think. The best way to know is test it. :wink:

There is no action to set an external image. :unamused:
or at least I dont see it

Also I dont think export would be possible, as there is no action to capture images

Are you on a native game ?

Ok, I switched to native. Still not sure if the capture command captures with alpha

“Capture command” ? It takes a screenshot from the game, no way you’ll get any transparency here.

ah I see. :slight_smile: I guess it was foolish to think I can make an app that is not a game with gdevelop

But there’s a “save image” action.

There might exist a way to do what your want (drawing an object on a texture and then save it to a file, with alpha) with C++ events. I’ll see what I can do. :wink:

I need to composit two images - one over the other. With alpha.
And export the resulting image - with the alpha

If there was a way (option) to tell the screenshot functionality to ignore the background of the canvas, and make screenshots of sprites with alpha channel - that would make it very simple to use it in a more versatile way - both for cool gameplay mechanics and/or simple graphics apps.

I would personally also love it if there was a way to also specify an area to snap - so as to be able to take a screenshot of a specific game object when it is on top of another one and save it out as a png with alpha.

I’ve been also trying to do it with MMF - there is a way there, but it is just horrible and hacky:
community.clickteam.com/threads/ … ible/page2

Hmm I don’t see the action either. I thought it’d be cool if players could customize textures in my game, but I didn’t see the load external image action. Is this only in gdevapp? Or is it in gdevelop too?

In primitive drawing category, only for native games.

I almost got it working in multimedia fusion. Its a real pain in the neck to do there, but it works

I really wanted to implement it in gdevelop- as a html5 application. :unamused:

You can’t access the user filesystem from an HTML5 app (it’s impossible).

what if you put all the content (png images) at a server and have gdevelop download them?

You can make requests and save the result in a variable but not use it inside a texture after.
If you are really interested in making changing textures loaded from a server, I suggest you to add a few lines of JS code that would do it. It’s quite easy with Pixi.js

But as Victor suggested, remember that HTML5 applications can’t access to the file system. (That’s why you can’t thing anything related).

That’s precisely what GD does when you play to a HTML5 game :smiley:
If you really want to load something from a URL, add a few line of JS code to set texture of a pixi sprite. :slight_smile: