5 Dec 2024 |
scorpion2185 | hello how do you make images like this one
let ferris = ImageRawLE::new(
include_bytes!("../ferris.raw"),
FERRIS_W as u32,
FERRIS_H as u32,
);
| 16:16:21 |
scorpion2185 | from https://github.com/dbrgn/pinetime-rtic/tree/master/pinetime-rtic | 16:17:03 |
scorpion2185 | darktable app? | 16:17:31 |
James Munns | https://docs.rs/embedded-graphics/latest/embedded_graphics/pixelcolor/raw/index.html has some hints, you could probably generate the raw images using those messages on a desktop or whatever | 16:18:25 |
James Munns | (I haven't done that personally though, so I don't know exactly how to do it offhand) | 16:19:04 |
scorpion2185 | is touchscreen support related to embedded-graphics ? | 16:20:05 |
James Munns | probably not, embedded graphics just handles drawing | 16:20:32 |
almindor | it's an interesting question though because you do need a sort of integrated driver for that. I do have one display with touch capabilities, but I never got around to trying to get the touch part working | 19:07:46 |
dngrs | I did get things to more or less work with an IL-something | 19:22:37 |
dngrs | but calibration was ass | 19:22:41 |
scorpion2185 | In reply to @scorpion2185:matrix.org from https://github.com/dbrgn/pinetime-rtic/tree/master/pinetime-rtic it's for ^ pinetime | 19:50:47 |
jamwaffles | This is code from ages and ages ago so some stuff might've changed but these old docs have an ImageMagick example:
convert image.png -flip -flop -type truecolor -define bmp:subtype=RGB565 -resize '64x64!' -depth 16 -strip image.bmp
| 20:16:20 |
jamwaffles | Also an example for 1BPP images here | 20:16:45 |
scorpion2185 | i found out that gimp can export to .raw | 20:16:57 |
jamwaffles | Oh nice, that's a lot easier | 20:17:28 |
scorpion2185 | Download gimp-raw.png | 20:20:33 |
scorpion2185 | do i pick BMP style ? | 20:21:30 |
jamwaffles | I don't think so, the order will be wrong and the alpha channel will mess the stride up | 20:23:46 |
scorpion2185 | and standard as rgp type? | 20:24:50 |
jamwaffles | Yeah | 20:28:55 |
jamwaffles | If you follow the docs through, the byte order and count per pixel is defined by the final colour you end up using, so e.g. an SSD1331 which uses the Rgb565 colour type will need R, G, B totalling 16 bits per pixel | 20:30:44 |
scorpion2185 | with gimp export or convert i get a black screen | 20:48:53 |
9names | Why not use a BMP file instead? Then you don't have to deal with converting your images into a raw bitstream https://crates.io/crates/tinybmp | 20:49:01 |
scorpion2185 | let me check that. the os uses a .raw so i tried that | 20:50:25 |
scorpion2185 | there some var some maybe something was not specified correctly | 20:51:57 |
scorpion2185 | * there some vars maybe something was not specified correctly like i did not update the width or height that it was different | 20:52:29 |
dngrs | just black seems like maybe something else is wrong. "wrong raw format" should give you random pixel colors, not black | 20:53:33 |
scorpion2185 | i changed the files used in https://github.com/dbrgn/pinetime-rtic/tree/master/pinetime-rtic without changing the rest. | 20:54:17 |
dngrs | maybe do a hexdump of your raw file | 20:55:00 |
9names | I'm going to copy-paste my answer to the last time someone asked for this:
getting imagemagick to export 565 can be a pain. it's easier to use ffmpeg
ffmpeg -i input.png -pix_fmt rgb565 -f rawvideo output_565.raw
check your raw image with https://rawpixels.net/ to verify that it is correct | 21:12:14 |