Displaying images (not OFFIMGs)

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
User avatar
nibheis
Posts: 13
Joined: Tue Feb 05, 2019 1:08 pm
Location: FR/CH/ES

Re: Displaying images (not OFFIMGs)

Post by nibheis » Fri Jun 07, 2019 8:25 pm

Dear all,

Here is the latest version of my python script to convert BMP images (or any format) to raw format (program) for the DM42.

Changes:
- More comments in the code
- More parameters (filename, label, verbose, image size, etc)
- Some more checks
- "compression" (i.e skip blank parts of images)
- inverse image ("negative" ; for some reason, BMP colors are sometimes inversed)
- direct export to raw format

So now, one script does it all. Just run:

Code: Select all

python3 img2hex
to convert 'matterhorn.bmp' into 'Matt.raw'.

This script is design to be used as a module in your scripts, just import it.

Statistics:
- raw "images" are now between 10 to 17 kB, depending on the part of blank pixels.

I am experiencing issues while loading several images (yes, I do keep an eye on the available MEM this time ;) ).
I run into errors while loading 2 or 3 images, even starting from a clean state.
I can load:
- 1 "large" image (16 kB)
OR
- 2 images (one 16 kB, one 10 kB)
and there is still more than 42 kB of free memory... but loading the one extra program/image crashes the program loader.

I checked all of my programs one by one, and they do work well.
I also decoded them successfully with the DM42 encoder - so I am pretty sure they are OK.
On Free42, no pb at all - except that the screen is tiny :-)

Is there any limit I am reaching ?

Thanks for your help !
nibheis
Attachments
img2hex.tar.bz2
(8.86 KiB) Downloaded 4 times

User avatar
nibheis
Posts: 13
Joined: Tue Feb 05, 2019 1:08 pm
Location: FR/CH/ES

Re: Displaying images (not OFFIMGs)

Post by nibheis » Wed Jun 12, 2019 3:31 pm

For the latest script to convert images to .raw file, see this thread.

I'll keep this thread open to report the memory problem with DM42:

I cannot import programs (let's say 10 KB long): the importer crashes, even with more than 40 KB free MEM.
As anyone experienced the same issue ?

Thanks for your help !

Post Reply