Loaded .png images are flipped and rotated in v1.2.170 BETA (SOLVED)

#1

I use this code to load a .png image:

25

local data, error = sys.load_resource("/custom_resources/star.png")
local img = image.load(data, true)
gui.new_texture( "star", img.width, img.height, img.type, img.buffer, false)
local node = gui.new_box_node(vmath.vector3(100,100,0), vmath.vector3(img.width,img.height,0))
gui.set_texture( node, "star" )

It worked in previous version of Defold, but in v1.2.170 I get this result:

32

Minimal project: LoadPng.zip (45.5 KB)

Am I missing a new setting somewhere?

2 Likes

#2

Yes, this is a regression, and I’m looking into it!

3 Likes

#3

The beta is now updated with a fix (the editor/engine sha1 is 44409d8fccd244472ee7562194e0c741648f7cb4)
Please try it out!

1 Like

#4

I just updated Defold and can confirm it’s fixed. Thanks so much!

4 Likes