-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create images.js #92
base: main
Are you sure you want to change the base?
Create images.js #92
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
forgot to add this extension doesn't need to be unsandboxed |
@SharkPool-SP , @TheShovel , @JeremyGamer13 .Can someone review my extension?, it has been about a week. |
boowomp |
Don't rush stuff. Give it time |
You need to add an extension thumbnail and edit the extension.js file to include ur extension. Please do it in this pr and not separate ones. |
you infact do not need to do that and instead just have us do it for you although it wouldnt be bad for you to add it on your own :bleh |
I thought the thumbnail / banner was optional... anyways I can create a thumbnail if needed |
...it is optional |
Also the reason I asked is because most of the extensions got reviewed in less than a week |
idk |
seems like its more usefull as an image converter then just general image work in its current state |
Ok I’m probably just gonna close this and add all the features like svg. it’s name is images because it isn’t specifically for modifying images but it is one of the key features |
Added “images” extension
@SharkPool-SP , @RedMan13 . I am gonna add it to the website so I can see the preview (: |
Yeah but it will look like shit without it 🤷♂️ |
still optional |
The extension? |
sorry that this was abandoned for a while
|
half of fix will fix later
I am currently working on fixing this and I have a question, instead of erroring what do you want it to do (right now I'm making it return -1 on anything that has a return) |
i would think detect the error then either throw a new error to the user that actually states whats wrong or eat the error and act as if nothing is wrong |
instead of throwing errors when we go to an invalid index return -1
another option I was considering was adding new blocks called |
also import takes a data uri and sets a new image's source to it so I don't see how to make setting a value async |
hopefully fixed the import function
i forgot something
I'm so sorry for changing this so many times I had to reread the documentation on how to use promises with Turbowarp and PenguinMod extensions.
penguinmod seems to not add the image to the list so I will try something else (btw I'm still trying this snippet first) |
attempting to fix it with RedMan13's idea
aha I see to make it work I should put a blank data uri instead of nothing (I really hope this works) |
might be fixed
might have to scrap the promise idea as it seems to not want to save the image to the |
wadya mean |
I mean it doesn't register it into the saved list of images |
the code you quoted was never meant to? |
Scraped promise system for import image
what's happening is I have it to where it adds the image to the let image = new Image();
saved[name] = image;
return new Promise((resolve, reject) => {
image.onload = resolve;
image.onerror = reject;
image.src = uri;
}); |
I might try making an image using the document but I don't think that will make a difference. |
what do you mean "doesnt add it", because thats just not true taken literally, the item gets added to the saved object in the code you provided |
uri and name exists in the arguments passed to the block. saved is global in the extension so you can never test it without running the extension with the code if you want to try it maybe download it, modify it, and try it on PenguinMod/TurboWarp |
what you said makes no sense. all i did was fabricate an instance for the code that was inside the block that works as the block inteads it to work |
fixed the `writePixel` offset so that it is aligned to top-left
Marking as a draft due: |
i mean if its finnished you wouldnt update it right |
its not though. There are still unsolved issues |
this is my image manipulating library
description
this library is used to manipulate different types of images including pngs, jpegs, and svg
features
allows writing and reading data from an image
allows creating and importing images as well as exporting (svg is not allowed as it would not make sense mostly because of writing pixels makes rectangles so the data would be really long)
notes
bitmap and svg are currently not supported (even though I added bitmap it doesn't work)
updates
might add common svg functions (aka drawing strokes and shapes)
Next thing to add is cropping and resizing (possibly rotating)