Search found 13 matches

by nibheis
Wed Jun 12, 2019 5:31 pm
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

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...
by nibheis
Wed Jun 12, 2019 5:26 pm
Forum: Software Library
Topic: Convert images to .raw programs
Replies: 1
Views: 5290

Convert images to .raw programs

Hi all, To follow up on this thread , here is a python3 script that turns any 400x240 image into a .raw program for the DM42 (and free42). It is basically one single class (Img2Hex) - you only need PIL or pillow Python package to use it. Here's how to use it: from img2hex import Img2Hex hexcode = Im...
by nibheis
Fri Jun 07, 2019 10:25 pm
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

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 o...
by nibheis
Wed Jun 05, 2019 11:58 am
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

You're basically trying to get the decoder page to display glyphs that don't exist. Characters with codes up to 0x7F are clearly defined in ASCII. Anything above that is undefined unless you know the code page that is being used. The HP-42S character set is no good because anything above 0x82 is ju...
by nibheis
Wed Jun 05, 2019 11:39 am
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

WARNING: the script code contained here is obsolete, look further in the thread for the latest version. And here we are! A massive "thank you" to all the persons involved. Attached to this post a tarball with the following files: - bmp2hex: a python module (using "pillow" python...
by nibheis
Wed Jun 05, 2019 9:31 am
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

Instead of changing the python script that generates the hex code, I've been lazy again and just used xxd: cat Matt.hex | tr -d \\n | xxd -p -r > Matt.raw This code loads and runs in Free42. Yeah! When listing the code on Free42, I can confirm that no chars where harmed (I mean lost) in the translat...
by nibheis
Wed Jun 05, 2019 8:55 am
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

To let you know the progress: As I anticipated (and Thomas confirmed it): using string append is the way to go. I now have a python script that reads the 1-bit 400x240 bitmap and converts it into a 42s program doing many CLA/|-/AGRAPH. Last problems to iron out: 1) my script generates ASCII hex code...
by nibheis
Tue Jun 04, 2019 7:38 pm
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

I confirm: it looks like string append helps to work around the opcodes working on names: FF7FFFFFFFFFFFFFFFFFFFFFFFFFFFFF decodes correctly to: ├"ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ" That means a few extra CLA (one byte), and an extra byte in every strings. String limit is 44 chars, so working with 40 chars-l...
by nibheis
Tue Jun 04, 2019 6:04 pm
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

Thanks for all this precious information!
I will try to work around these specific opcodes using XTOA and maybe string append. I will let you know how it goes.

Best regards,
nibheis
by nibheis
Tue Jun 04, 2019 5:27 pm
Forum: Usage tips, tricks and problem reports
Topic: Displaying images (not OFFIMGs)
Replies: 21
Views: 15412

Re: Displaying images (not OFFIMGs)

The encoder/decoder will handle any character that the DM42 can handle. If the encoder/decoder can't handle it then the DM42 can't, but remember the encoding to use if you want to create a string directly is that of the HP-42S/Free42/DM42. It will not handle UTF8 or any other representation of Unic...