Closed msigman closed 5 years ago
You mentioned other images did work; were they the same size, on the same device and generated with the same tool?
Could you try something for me: can you try the image on a couple of sizes to see if the problem appears below a certain size? Maybe try it at 32x32 to start with for instance. The scaled image won't look good, but you should be able to see if the drawn image looks the same as in the tool.
No -- the other ones were either different sizes or ones I grabbed from your other troubleshooting threads to test with. Per your request I ran the same image I started with through several sizes...
32x32 = Works 16x16 = Works 17x12 = Failed 19x12 = Failed 19x19 = Failed 22x16 = Failed 32x32 = Reconfirmed works 30x30 = Failed 31x31 = Failed 16x11 = Works
I can't find a pattern but the dimensions clearly make a difference on whether it renders or not...
All non-square images you tried are horizontal (width > height), could you try one or two more with the numbers flipped? Like 12x17? I'll see if I can hook up a display here and give it a quick try. Getting tired of these small images not working and really want to get it fixed ;)
At 32x32 the image works fine, but when I use 31x32 you can clearly see the problem; some offset gets introduced, distorting the image.
Weird, it seems only values that are multiples of 8 work. Technically this make sense, as the script converts every 8 bits of color into a byte, but how was this never caught by anyone else? Not sure if this is something that was introduced in an update or if it has always worked like this.
edit: ok, just confirmed this error has been there all along.
This should finally fix the problem with small images getting distorted. Problem appears to have been that with some sizes (basically everything that wasn't divisible by 8) the last part of a row would be merged with the first part of the next row, creating an offset that increased with every next row.
This update pads every last byte of a row with zeros to fill out to 8 bits.
@msigman A clear description of the problem, the used image and a photo of the result on your display, together with testing some different sizes for me really helped me realize what the problem. was. Thanks!
Glad we got it solved! (Confirmed working now)
Cheers
First off, great tool and thanks for making it available to us. I see there have been a few similar issues in the past but I couldn't find a resolution, and I appear to be having the same issue.
Trying to convert an image into a small icon and display on a tiny 128x32 OLED driven by an ESP8266 via Adafruit GFX library. I've verified some other images work as expected, but can't get the one I actually want to work.
Icon size after conversion by your tool is 17x13.
Original image:![stock-vector-wifi-icon-wifi-icon-vector-in-trendy-flat-style-isolated-on-white-background-wifi-icon-image-745294486](https://user-images.githubusercontent.com/1909816/46584875-aec7eb80-ca1d-11e8-96be-4ea2696f868d.jpg)
The converted output from your tool (scaled down and inverted colors):![download](https://user-images.githubusercontent.com/1909816/46584884-c69f6f80-ca1d-11e8-9b25-1a4f15f12f07.png)
And the byte code:
However the actual output from my OLED is below. I tried Horizontal and Vertical already. Any thoughts?![img_0033](https://user-images.githubusercontent.com/1909816/46584910-37468c00-ca1e-11e8-881d-c077b22db381.jpg)