+1 vote

In my new game I have a scene where the user can paint on a Viewport using a Sprite.

At the end, I want to save the texture drawn by the user with the following code sample:

var image_texture = ImageTexture.new()
image_texture.create_from_image(viewport_texture.get_data(), 0)

As specified in the documentation the second argument for create_from_image is for flags and a 0 means that there is no flags and no filtering.

But, if it works well on desktop (texture is sharp), I have a "jpegy" kind of compression that appears when exporting to the web. Is there an additional step from preventing it to occur ?

in Engine by (13 points)

Can you take screenshots of the desktop and HTML5 exports? Upload them to a website like Imgur and paste the link here as a comment (not an answer).

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories