uploaded gif 1st frame glitched
poblabs opened this issue · 7 comments
this is a great utility, thank you. i'm using it to upload gifs to the pixoo 64 and it's working great except for the 1st frame of each gif gets glitched - meaning colors are slightly off, sharpness too. super noticeable with looped gifs.
i wonder if there's some fine tuning to that process that needs to take place?
Glad you like the project.
As mentioned in the README, pixoo-rest makes use of the pixoo-library.
So all the heavy-lifting (image conversion, etc.) is being done there.
So all the heavy-lifting (image conversion, etc.) is being done there.
Let me take that back (I just checked the code). 😏
Actually, the GIF-conversion is the one exception where things are handled without the pixoo-library.
Check:
Line 240 in c5a97cc
However, there's not that much magic involved.
Simple usage of pillow.
I can't reproduce the issues you describe.
Can you provide a sample GIF?
I found that section last night and was playing around with it. It looks like we need to use thumbnail
instead of resize. But when I try that the Divoom crashes. And I can't figure out how to convert the thumbnail to RGB.
Here's a sample gif that is normal, but when uploaded the first frame is glitchy
The good news: I can reproduce the issue now. 😄
The bad news: Resizing GIF images seems to be a major annoyance; I found a lot of attempts/code snippets in the web trying to fix similar issues (using standard Pillow features).
The root of the problem seems to be the very first frame of the GIF; which usually is a background with transparency-info, etc.
As a feasible workaround I've implemented an option (14de337) to skip the first frame when resizing the GIF.
The example GIF you provided above looks fine now.
Could you have a look at this branch; and possibly try a few more GIFs?
Thanks.
Awesome! So far so good. I had about 20 gifs I was testing with and all of them look great now.
Another quick question - are you aware of a method to create a playlist of gifs without using their app?
I see that you can assign a PicId, which I guess are slots to store animations. I don't see a way to cycle through them though?
Line 229 in c5a97cc
Another quick question - are you aware of a method to create a playlist of gifs without using their app?
Nope. Sorry.
I see that you can assign a PicId, which I guess are slots to store animations. I don't see a way to cycle through them though?
There's an "official" documentation available here: http://doc.divoom-gz.com/web/#/12?page_id=93
The PicID is described there. However, I haven't looked into this in detail.