Giter Club home page Giter Club logo

image's People

Contributors

igortimofeev avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

image's Issues

Image.load

I have tried to get image.load to work, but I am unsure of how. I tried to use image.create to make sure the image should be compatible with image.load.

local image = require("image")
local GUI = require("GUI")

local mainContainer = GUI.fullScreenContainer()

image.save("/test/img.pic", image.create(128, 128, 0x000040, 0x000040, a, x, 4), nil)
img = image.load("img.pic")

print(img)

--------------------------------------------------------------------------------

mainContainer:addChild(GUI.panel(1, 1, mainContainer.width, mainContainer.height, 0x2D2D2D))

-- Load image, create widget from it and add it to main container
mainContainer:addChild(GUI.image(2, 2, img))

mainContainer:drawOnScreen(true)
mainContainer:startEventHandling()

When I run this I see that it creates an image in my directory and prints false.
After that I get an error. I suspect its either because I don't create the image correctly or the image.load function doesn't work, but I am not sure.

Maybe I do something else wrongly.. :)

billede
Image of the error I get

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.