Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

converting jpg to loadable bmp for blufruit and gizmo tft
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

converting jpg to loadable bmp for blufruit and gizmo tft

by rhyde on Fri Jul 24, 2020 6:19 pm

I have been trying to get the circuit python code to load any bmp file, but every thing I try fails with either out of memory, on unable to read this type of file.

How can a convert a jpeg image into an acceptable bmp? What type of .bmp does it need to be? This is driving me mad.

Rich

rhyde
 
Posts: 5
Joined: Fri Nov 02, 2012 6:42 pm

Re: converting jpg to loadable bmp for blufruit and gizmo tf

by Toldcodger on Mon Jul 27, 2020 10:07 am

Hi,

I haven’t tried anything with the Gizmo, but it’s on my to do list
Have you read this:
https://learn.adafruit.com/circuitpytho ... -displayio

I’ve only skimmed over it but there is nothing obvious about the format of the bmp. It looks like you define a number of tiles by size that fits the full photo. Then call each tile on to the screen.

I retire in a couple of weeks so I’ll be trying this out soon.

Regards

Dave

Toldcodger
 
Posts: 15
Joined: Mon Nov 04, 2019 4:52 pm

Re: converting jpg to loadable bmp for blufruit and gizmo tf

by adafruit_support_carter on Mon Jul 27, 2020 1:30 pm


adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Re: converting jpg to loadable bmp for blufruit and gizmo tf

by kd6wyk on Mon Jul 27, 2020 9:28 pm

Yes I read that and several other pages. Unfortunately that was trying to do something very different. It is also not clear on the types that are supposed to work. I have tried many different encodings, in bmp files, pnm, and gif files too. None seem to work. I am trying to make a simple display, for a grandmother of grand children.

kd6wyk
 
Posts: 12
Joined: Sat Sep 24, 2011 10:05 pm

Re: converting jpg to loadable bmp for blufruit and gizmo tf

by Toldcodger on Tue Jul 28, 2020 5:14 am

Hi,

Unfortunately I can’t find it again, but I saw it somewhere on the Adafruit Learn pages that the photo was 16 bit. As I said, I can’t find the damned thing again, so I don’t know whether that was specific to this project or whether it is a global thing.

I definitely going to have a go as soon as I can.

Regards

Toldcodger
 
Posts: 15
Joined: Mon Nov 04, 2019 4:52 pm

Re: converting jpg to loadable bmp for blufruit and gizmo tf

by kevinjwalters on Tue Jul 28, 2020 11:08 am

There's some previous discussion on Creating BMP files for CLUE. The CLUE is nRF52840 like the Bluefruit so both have a decent amount of memory.

The display is 240x240. Are you scaling your graphics down to that size? Might be worth posting some small code samples and error output.

Here's one I made that should work. Click on download on https://github.com/kevinjwalters/mini-p ... 240.16.bmp

kevinjwalters
 
Posts: 741
Joined: Sun Oct 01, 2017 3:15 pm

Re: converting jpg to loadable bmp for blufruit and gizmo tf

by adafruit_support_carter on Tue Jul 28, 2020 11:17 am

It should be an indexed image saved as BMP.

The specifics of how you do this will depend on the software tool you are using, Gimp, Photoshop, other. So it's difficult to give specific info on how to create the necessary output.

adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.