sbrin / lopaka

Lopaka - Stunning graphics for embedded systems displays
https://lopaka.app
Apache License 2.0
315 stars 18 forks source link

release v0.4 #118

Closed sbrin closed 4 months ago

sbrin commented 4 months ago

New Features:

Interactive Editor Support: The editor now supports interaction across all platforms, with improved source code parameters parsing and cursor position preservation.

BDF Font Support: Dynamic loading and rendering of BDF fonts have been integrated, optimizing the compiled font size and ensuring correct text rendering as per specifications.

Image operations: Rotate, mirror, invert paint and image layers. Merge any layers into a single drawing. Download image as PNG.

Source code settings Different code styles for Arduino and ESP_IDF. Enable/disable PROGMEM declaration. Wrap code in a single draw() function.

U8g2 XOR "inverse" mode Set any layer to render as XOR bitmap.

Enhancements:

codesandbox[bot] commented 4 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

cloudflare-pages[bot] commented 4 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3540941
Status: ✅  Deploy successful!
Preview URL: https://d58bbd42.lopaka-dev.pages.dev

View logs

Gaai commented 4 months ago

Imported images aren't rendered correctly. Other updates looking promising btw, with idf support and image tools!!! Got some new icons coming too.

sbrin commented 4 months ago

Imported images aren't rendered correctly. Other updates looking promising btw, with idf support and image tools!!! Got some new icons coming too.

Thanks! Can you share more details regarding images? a screenshot or video recording would be cool

Gaai commented 4 months ago
screenshot-2024-02-23 180533
deadlink commented 4 months ago

@Gaai share me this icon please, i will check

Gaai commented 4 months ago
cards_spades_15x16

It happens with any icon. Not sure if this is the best image to check what's happening.

Gaai commented 4 months ago

Added a pull request for some new icons I made recently.

deadlink commented 4 months ago
image

I couldn't reproduce on the latest version

Gaai commented 4 months ago

Let me check. Is this version you tried the version linked in here?

Gaai commented 4 months ago

https://68533a75.lopaka-dev.pages.dev/

Gaai commented 4 months ago

And happens also on https://dev.lopaka.app/ for me

deadlink commented 4 months ago

yes, it works for me on both, requires inversion after import Because according to our algorithm, if the image does not have an alpha channel, we find the most used color and consider it the background

https://github.com/sbrin/lopaka/assets/804731/3eaa4209-29d7-4c77-bae4-01529f554015

Gaai commented 4 months ago

Alright. So I checked in an other browser. In MS Edge it works alright in both versions. In brave it doesn't. Maybe a cache issue. But got to go, so can only check later this evening.

Gaai commented 4 months ago

Works in Chrome too.

Gaai commented 4 months ago

So I've checked again, and the problem persists. On Firefox it's even worse. The preview / canvas doesn't render right even at start. Just vertical colored bars that swap places. On brave the issue seems to be with uploaded images. Adding icons from the list works fine, also the page loads just fine. Haven't checked too thoroughly but that was my impression. Here are the screenshots. Brave freshly installed on different computer. Firefox updated to latest version. Both windows.

dev_lopaka_firefox2 dev_lopaka_firefox dev_lopaka_brave_add_image

//checked the current main branch: lopaka.app too, and this shows the same issue on firefox. Afaik image upload used to work fine in Brave. Just noticed the problem with this 0.4 update.

deadlink commented 4 months ago

@Gaai I can't reproduce the issue in Firefox, but I have investigated the issue in Brave. And looks like it is a bug in the Brave. Look at this

Screenshot 2024-02-24 at 18 44 31

These are the colors I got from that image in Brave... and... this is false because the image only has black and white pixels, I checked it manually.

I understand that the colors are quite close to black and white, but our algorithm is not so complex to take this into account

I can try to solve this in the future and improve the algorithm, but at the moment it’s more of a browser bug

deadlink commented 4 months ago

@Gaai :D i found it https://stackoverflow.com/a/67779214

This is not a bug, it's a feature!

however, I do not recommend using it in applications that work with graphics

Gaai commented 4 months ago

Might be a privacy setting on Firefox then too. I'll check later if I can change some of those to test.