igortimofeev / image Goto Github PK
View Code? Open in Web Editor NEWImplementation of image format for OpenComputers mod
License: MIT License
Implementation of image format for OpenComputers mod
License: MIT License
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.. :)
откуда её брать ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.