You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kinda confused what does .data contain in loaded object and how to use pixels() method.
I've ended up doing something like this because data was length of 4 * width * height, but that gave no positive result...
local data = testpnmg.load(pngContents)
local charArray = ffi.new("unsigned char[" .. #data.data .."]")
ffi.copy(charArray, data.data, #data.data)
for i=1, #data.data / 4 do
print("R ", charArray[i], " G ", charArray[i + 1], " B ", charArray[i + 2], " A ", charArray[i + 3])
end
The text was updated successfully, but these errors were encountered:
Kinda confused what does .data contain in loaded object and how to use pixels() method.
I've ended up doing something like this because data was length of 4 * width * height, but that gave no positive result...
The text was updated successfully, but these errors were encountered: