I have a grid of data with three columns: tname; tdesc; and tmini. tmini contains encoded image strings. Despite my ability to display the image in the listener, I have trouble creating the image in the grid widget script. The decoded image appears blank. (The reason I'm encoding these images in the first place is to keep all the data organized in, and local to, the card.) Is there anything I'm missing that would prevent my script from decoding images, or is there something I can do better?
code:
on click row do piece_data: extract tname:tname tdesc:tdesc tmini:tmini from ((list(row)) take me.value) name_field.text: piece_data.tname desc_field.text: piece_data.tdesc minipic: image[piece_data.tmini] print["this is what i want:"] print[piece_data.tmini] print["re-encoded image"] print[minipic.encoded] big_minimap.clear[] big_minimap.paste[minipic] print["this is what i get:"] print[big_minimap.copy[].encoded] end
output:
this is what i want: %%IMG2ADAAMAD/AP8A/wBHAQEALgEDAC0BAQAvAQEAAQEBAC0BAQACAQEAKwEBAAYBAgAmAQMAAgEBAAIBAgAmAQEAAQEBAAMBAgABAQEAJgEBAAEBAQADAQIAAgEBACcBAQAEAQEAAgEBACcBAQAIAQEALwEBAC8BAQAwAQEA/wD/AP8ARQ== re-encoded image %%IMG2AAAAAA== this is what i get: %%IMG2ADAAMAD/AP8A/wD/AP8A/wD/AP8A/wAJ