You are right thanks for the heads up!! It currently works in linear color space. I wasn't familiar with the issue.
I need to figure out if it's enough in Webgl to add gl.SRGB8_ALPHA8 when loading/ copying textures or I should gamma correct in all the color handling shaders. Will do some testing to figure it out.
rorylaitila 12 hours ago [-]
I've been looking for an open source image editor that I can embed in my app for managing my vintage ad archives (https://adretro.com). Basically I just need to rotate, crop, adjust color. But the images come from from the archive database rather than upload. And I want to work with them quickly, rather than save/open like a desktop app. Last time I looked I couldn't find something with good documentation that was easy to get started with. Right now I bulk edit in Google Photos.
Thanks I'll check it out again. Last I looked I think it was v1 branch.
shunia_huang 7 hours ago [-]
Would be very nice if it is provided as a library to be able to integrated into another app with partial/full customizations for UI with different theme and stack.
Couple of issues I had: on mobile (Brave on Android) the touch controls for cropping are very janky. Feels like it steals control each time the picture updates maybe?
It's hard to see the controls under the picture on this small screen. Could you add a control to adjust the size of the controls and shrink the picture maybe?
axelMI 1 hours ago [-]
Sorry, this at the moment is desktop only. Maybe in the future I'll work on a separate PWA, but UI would need a complete re-design
GlassOwAter 8 hours ago [-]
I’m getting some touch control issues and inability to download the image on iOS.
ww520 12 hours ago [-]
Excellent work. The UI looks very clean and functional. It's feature packed. Good choice on using WebGL. It has support everywhere in most if not all browsers.
popalchemist 10 hours ago [-]
Hey, awesome work! This is sorely needed in the OSS package space.
Are you taking into account separation of concerns? I could see myself adopting this if the UI were customizable in Vue, React, etc.
As for the more complex UI modules (ie crop) in theory it shouldn't be too difficult to build a vanilla-js separate module, but not sure I'll have the time as these kind of solutions need to take into account so many use-cases and edge-cases that they easily become a nightmare to maintain ...
gtb_1 16 hours ago [-]
Did you consider using WebGPU, or creating a bridge between WebGPU / WebGL for this? Also, have you considered deploying on Cloudflare Pages [1] (unlimited bandwidth) instead of netlify?
I did consider WebGPU but I couldn't find many advantages for the current use case.
Yes I'm planning to move to the edge as soon as it's in a later stage of development
zorgmonkey 6 hours ago [-]
The biggest difference for you is probably that WebGPU has compute shaders and WebGL does not, they are pretty nice if you want to implement more complex algorithms.
axelMI 29 minutes ago [-]
That's true. But current shaders are very simple.
The big issue I have with WebGPU is that it's still not supported by all browser (see Safari) while WebGL is nowadays everywhere.
I work on a MacBook and I need to make sure that at least Safari (soooo many issues/ bugs/ specific behaviours it drives my crazy) works fine
Really nice work. I had been using Photopea for cropping and quick edits when preparing references for painting but this is super clean and simple.
woranl 8 hours ago [-]
It would be nice if I can feed an image blob to it, and return the edited image as a blob programmatically - i.e. without the need for an UI to open or download the image. That will help integration/embed it into other apps.
The constructor requires
- a canvas (which can be an OffscreenCanvas)
- an arrayBuffer with the image (which you easily get from a blob with "await blob.arrayBuffer();" )
amadeuspagel 16 hours ago [-]
Nice. I tried it with an image from Unsplash. Maybe you can use the Unsplash API[1] to give people an example to play with.
Will have a look at this thanks! in the meantime I've added a quick sample gallery to test the editor out
PaulDavisThe1st 10 hours ago [-]
Extremely nice work.
I'd like it if there were separate buttons for (a) reset a section (e.g. colors) back to the default and (b) do not use a section (e.g. colors). Right now, turning (e.g.) colors off loses the settings there. Maybe I missed something though.
sgc 9 hours ago [-]
I too agree this is great, and see space for another low-hanging UI tweak:
Allow editing numbers to right directly, instead of only using the slider. I really dislike using sliders beyond a first general impression because it is too slow to get things exactly as I want them. I would guess this is a relatively common sentiment.
One feature I don't see but would love to see is text overlay, but that is perhaps moving away from the spirit of the project.
axelMI 44 minutes ago [-]
Editing number yes, will do next as I agree it's high priority from a usability pov.
PaulDavisThe1st 9 hours ago [-]
I don't do web based development (all native desktop), but I'd be quite surprised if this was "low hanging".
We have widgets that do this in Ardour and they were far from simple to implement.
axelMI 40 minutes ago [-]
Actually it's very easy to implement in a webapp. I will just need to think if there's a sleeker way to do it in terms of UI than just adding a simple input box ... although generally simpler is better so
sgc 8 hours ago [-]
I have done similar. It is pretty easy, you just have the slider update the input, that is used for the actual calculations. If I ever get past looking and actually download, I will do it.
flashblaze 15 hours ago [-]
I'm so glad this exsist. I've been meaning to get something similar started, but did not due to one reason or the other. I'll definitely try to contribute.
axelMI 14 hours ago [-]
Whenever you feel like, ping me on github
Dwedit 10 hours ago [-]
Is there any interference from "anti-fingerprinting" which corrupts the image canvas?
axelMI 33 minutes ago [-]
ehm, what? I'm not familiar with this issue
kreelman 10 hours ago [-]
This does useful things easily.
How hard would it be to use it as a batch process?
axelMI 37 minutes ago [-]
Batch processing would ideally require a backend.
Batch processing in the browser would be limited by memory space and therefore everything would have to be queued (even if on more webworkers) and very slow/ unreliable IMHO.
What I'll implement next, if there's a request, is the possibility to save the recipes of the adjustments (crop/ perspective excluded) in order to quickly apply them to subsequent images
GlassOwAter 8 hours ago [-]
I like this. It reminds me of Snapseed. Feature request if it isn’t too hard, the ability to overlay an image and blend them together.
axelMI 36 minutes ago [-]
Easy, will add to the TODOs
asadm 17 hours ago [-]
in the editor, do add a way to load sample random image to try out the editor instead of having to uploading my own (which most won't bother / don't trust / can't do at work).
axelMI 17 hours ago [-]
Great advise. Will add it next.
Bust just to be clear, images are handled 100% locally on the user machine. No data is sent to servers, no adv, no cookies, nothing ...
sam1r 8 hours ago [-]
wow, awesome turnaround dev time, i see the feature req has shipped already. \^-^/
asadm 16 hours ago [-]
Yup I get that.
axelMI 15 hours ago [-]
sample images added. thanks for the tip
fidotron 16 hours ago [-]
This is neat. Any plans to add blurs and related effects?
axelMI 15 hours ago [-]
yes, I don't use them but if required it will be easy to add
atonse 17 hours ago [-]
Very cool! What's the license, and how does it compare to some of the other croppers/editors out there? Was it mainly the GL integration?
axelMI 17 hours ago [-]
Ops forgot to add MIT license
As for the underlying modules on which it relies
Will fix it shortly
cmenge 15 hours ago [-]
Lol, I added a todo yesterday: "find or build good image cropper, ideally gl based" ;)
Guess the search might be over, thanks!
axelMI 14 hours ago [-]
let me know of any usability issue. I tried different combinations and this seemed intuitive for me (compared to other solution), but of course I'm too biased.
rendaw 15 hours ago [-]
What does comparable refer to here? Web based image editors? Like what?
axelMI 14 hours ago [-]
there are several web based image editors leveraging webgl out there.
I hope to match some of them in terms of features, but with a lightweight and opensource solution
neosat 15 hours ago [-]
Nice! Good performance, clean UI, and core functionality.
axelMI 14 hours ago [-]
thanks. It started as a proof of concept for a custom reactivity engine (based on signals and tagged template literals). But while at it I realised I needed something quick and easy for my needs.
I already have a prototype for a self-hosted photogallery that integrates this editor (something like https://immich.app to give you an idea). But it's still too early to share
stared 17 hours ago [-]
Thank you for sharing!
What's the license?
axelMI 17 hours ago [-]
MIT. thanks for point that out, I did forget to add it
quantadev 17 hours ago [-]
I tried to figure out how to crop an image and found nothing. There doesn't seem to be a crop feature as far as I could tell. I'm sure it's probably there, but not easy for anyone to figure out. Would be super easy to make it intuitive right?
axelMI 16 hours ago [-]
it's the composition menu ... will rename it
just select the area you wish to crop and then move to the other settings (colors, ...) to edit it
atonse 15 hours ago [-]
I did this but when I hit download, I got back the original image instead of the cropped image.
quantadev 15 hours ago [-]
I tried it again, and finally noticed you have to click the corner of the image to move the selection area. It works, but then I didn't see a "Crop" button. Only trying to be helpful, and not complaining. Nice work tho on this component.
axelMI 14 hours ago [-]
No no I absolutely need this kind of feedback thanks! Being a solo developer is very difficult to gage usability and UX is definitely not my strength.
I tried to integrate the crop/ composition in the natural workflow of image processing, without a discreet "crop" button. But I guess it's not necessarily the most intuite thing to do :)
quantadev 8 hours ago [-]
I'm the new member of your QA team now! haha. I'll try to crop again when you're ready. :)
It seems to use mini-gl[0] for the filtering. I had a brief look at the mini-gl source and it seems to use color as-is?
If that were true, for 99% of content that people would upload -- stuff in non-linear sRGB --, the filters would do the wrong thing.
Or am I missing something?
[0] https://github.com/xdadda/mini-gl
I need to figure out if it's enough in Webgl to add gl.SRGB8_ALPHA8 when loading/ copying textures or I should gamma correct in all the color handling shaders. Will do some testing to figure it out.
There is also React-Cropper if you want to CropperJS with React: https://github.com/react-cropper/react-cropper
Couple of issues I had: on mobile (Brave on Android) the touch controls for cropping are very janky. Feels like it steals control each time the picture updates maybe?
It's hard to see the controls under the picture on this small screen. Could you add a control to adjust the size of the controls and shrink the picture maybe?
Are you taking into account separation of concerns? I could see myself adopting this if the UI were customizable in Vue, React, etc.
As for the more complex UI modules (ie crop) in theory it shouldn't be too difficult to build a vanilla-js separate module, but not sure I'll have the time as these kind of solutions need to take into account so many use-cases and edge-cases that they easily become a nightmare to maintain ...
[1] - https://pages.cloudflare.com/
Yes I'm planning to move to the edge as soon as it's in a later stage of development
I work on a MacBook and I need to make sure that at least Safari (soooo many issues/ bugs/ specific behaviours it drives my crazy) works fine
The constructor requires - a canvas (which can be an OffscreenCanvas) - an arrayBuffer with the image (which you easily get from a blob with "await blob.arrayBuffer();" )
[1]: https://unsplash.com/developers
I'd like it if there were separate buttons for (a) reset a section (e.g. colors) back to the default and (b) do not use a section (e.g. colors). Right now, turning (e.g.) colors off loses the settings there. Maybe I missed something though.
Allow editing numbers to right directly, instead of only using the slider. I really dislike using sliders beyond a first general impression because it is too slow to get things exactly as I want them. I would guess this is a relatively common sentiment.
One feature I don't see but would love to see is text overlay, but that is perhaps moving away from the spirit of the project.
We have widgets that do this in Ardour and they were far from simple to implement.
Batch processing in the browser would be limited by memory space and therefore everything would have to be queued (even if on more webworkers) and very slow/ unreliable IMHO.
What I'll implement next, if there's a request, is the possibility to save the recipes of the adjustments (crop/ perspective excluded) in order to quickly apply them to subsequent images
Bust just to be clear, images are handled 100% locally on the user machine. No data is sent to servers, no adv, no cookies, nothing ...
Guess the search might be over, thanks!
Some of them are very good such as https://img.ly/products/photo-sdk or https://www.polarr.com/web/ or https://pqina.nl/pintura/
I hope to match some of them in terms of features, but with a lightweight and opensource solution
I already have a prototype for a self-hosted photogallery that integrates this editor (something like https://immich.app to give you an idea). But it's still too early to share
What's the license?
just select the area you wish to crop and then move to the other settings (colors, ...) to edit it
I tried to integrate the crop/ composition in the natural workflow of image processing, without a discreet "crop" button. But I guess it's not necessarily the most intuite thing to do :)