Lana-chan / webgbcam

Game Boy Camera-style filter made in HTML5 and JavaScript
Other
138 stars 12 forks source link

When running from index.html offline, colour palette is unchangeable from B&W #7

Closed Darthagnon closed 3 years ago

Darthagnon commented 4 years ago

Lovely web app! Works great (though Edgium Dev doesn't like it for some reason, but that's M$'s problem).

I downloaded the repo, and ran it from index.html in Ungoogled Chromium and Edgium Dev. Runs and all functionality works, except for the colour palette. It seems to be stuck at B&W for display, and doesn't cycle when pressing the (I assume) colour-palette-cycle button?

Lana-chan commented 4 years ago

I can try to look into this a bit but the way the DOM is used to load the UI images, at some point the app was never meant to work through file access anymore and must be served from a web host with HTTPS, and in Firefox the UI does not work at all any other way, so I just stopped testing it locally

Lana-chan commented 4 years ago

i fear there's no easy way to solve this as i'm loading .png files from the DOM to overlay the UI and if the application is not served from HTTPS this causes a cross-origin policy issue, unless i find another way to hard-code the UI pictures into JS this may not be possible to solve. the app is still available offline if you use ServiceWorkers/CacheStorage

https://stackoverflow.com/questions/44730766/html5-canvas-the-operation-is-insecure-but-its-my-own-image

Darthagnon commented 4 years ago

Thank you for checking! tbh it's mainly just a cosmetic issue - I was able to run the filter and save photos from it (in full colour) offline.