Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitmaps do not show up in the TI Script-Editor #14

Open
johannes-wolf opened this issue Feb 21, 2023 · 5 comments
Open

Bitmaps do not show up in the TI Script-Editor #14

johannes-wolf opened this issue Feb 21, 2023 · 5 comments
Labels

Comments

@johannes-wolf
Copy link

BMP-Files added using Luna do not show up in the image tab of the TI-Nspire Script-Editor (Student Software).

I have added a bmp and a lua file using lua test.bmp test.lua. The lua file is correctly added to the tns, but the bmp does not show up.

@Vogtinator
Copy link
Contributor

Yeah, that's a bit more complicated to do. The images need to be referenced by the problem XML document as img_info elements and a specially formatted _RES metadata item needs to be added to assign resource names to the image. It might be enough to add the img_info tags for making the script editor aware of it.

The Ndless installer for OS 3.9 is an example on how such a document looks: https://github.com/ndless-nspire/Ndless/blob/7ce6b732a6224ed9c017d1e9c36bb2429c947dbe/ndless/src/installer-3.9/Problem1_pre.xml

@Alekuso
Copy link

Alekuso commented May 2, 2023

I'm a bit confused about the formatting of the _RES metadata. At some part of it, I can't really find a relation between the bmp and the res metadata. I need some help to see how I should name it depending on my images

With this image it will be easier to understand what I'm trying to mean. There are just some parts where I can't really find why they're like that and how I can "find" them
image

@Vogtinator
Copy link
Contributor

That's a custom format of a string list: Number of strings followed by length of string, then the string itself.
The numbers are encoded as three capital letters from A(0)-P(15), which can be seen as alternate encoding for hex (0x0 - 0xF). For the value in the 3.9 installer this results in:

AAE -> 0x004 -> Four strings

ACE -> 0x024 -> 36 characters

1C86D1B39DEB85D42F438DE2C0C3BF78.BMP the string

AAG -> 0x006 -> 6 characters

device the string

ACE -> 0x024 -> 36 characters

BBF7096DCAF1CD03DE8364E14DB58939.BMP the string

AAE -> 0x004 -> 4 characters

plug the string

This results in 1C86D1B39DEB85D42F438DE2C0C3BF78.BMP using device and BBF7096DCAF1CD03DE8364E14DB58939.BMP using plug as resource name.

@Alekuso
Copy link

Alekuso commented May 3, 2023

Thanks for helping me out. Everything is detected as it should, however I think I have some problem with my bitmaps, I don't really know if I converted it using the right format or anything as I get these kinds of results.
image

When using the one on the ndless installer, it works fine.
From what I see, the image viewer can't open the ndless bmp one but for some reasons it can open mines.

I wanted to see the hex data directly and I can't really find out why I don't get the "right" bmp
image
image

I tried to use multiple converters, however none of them work.

@Vogtinator
Copy link
Contributor

The images have a specific BMP format. You can check https://github.com/ndless-nspire/Ndless/tree/master/ndless-sdk/tools/bmputil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants