downrightnifty / computercraft-stuff Goto Github PK
View Code? Open in Web Editor NEWComputerCraft image stuff
License: The Unlicense
ComputerCraft image stuff
License: The Unlicense
Hello, I am the cc:restitched mod (A derivative of the computercraft mod) users
I used your project to try to convert the in-game hand-drawn nfp (called nft in the cc: restitched mod) to a png image and failed
After researching, I found out the reason. The reason is that the pixels that are not painted in the game will be stored as spaces or the entire line is blank in the nft, so that these transparent colors cannot be displayed when the nft image is converted in your program. Converting to RGB colors will cause the sequence of images to be of different lengths, which will cause PIL to fail to store the image and report an error.
I added the standardize(nfp) function in your code nfp.py
This function will format the incoming nfp string.
Please consider adding this function to your project if you can.
nfp.txt
The above content was translated using Google Translate
This isn't an issue, more of a question.
What is the max resize if I have a 3 by 2 monitor setup using the 0.5 scale provided in the disp_nfp lua script?
Traceback (most recent call last):
File "D:\projekts\turtle\py.py", line 4, in
nfp.img_to_nfp("t.png")
File "D:\projekts\turtle\nfp.py", line 44, in img_to_nfp
im = _quantize_with_colors(im, CC_COLORS)
File "D:\projekts\turtle\nfp.py", line 89, in _quantize_with_colors
image = image.convert("RGB")
AttributeError: 'str' object has no attribute 'convert'
My python code:
import nfp
nfp.img_to_nfp("t.png")
from PIL import Image
ImportError: No module named PIL
I HAVE PIP INSTALLED PILLOW. I HAVE TRIED SO MUCH STUFF.
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.