Page 1 of 1
PolyList and Image data
Posted: Sun Jul 28, 2024 5:41 pm
by pink
I am trying to use the PolyList widget, however I cannot get the image-data to display.
This is very simple setup... I have a PolyList that only has the item "image" which is set to the content type of "image-data". There are 2 images in the card that I am testing with.
I have the following button set to add the imageData to the Polygrid. The data is in the array, but nothing is being displayed.
Code: Select all
on mouseUp
put the imageData of image "a1" into tData[1]["image"]
put the imageData of image "a2" into tData[2]["image"]
set the dataContent of widget "PolyList" to tData
end mouseUp
Because the images make the file too large, I can't attach, so here's my test stack:
https://u.pc.cd/qsM
Any thoughts as to what I'm missing?
Re: PolyList and Image data
Posted: Sun Jul 28, 2024 5:58 pm
by Klaus
Hi Greg,
putting "the imagedata" of an image into another image requires that both source and target image have the SAME dimensions (height and width).
Otherwise it will not work andI think this also applies to "PolyList" widgets.
Best
Klaus
Re: PolyList and Image data
Posted: Sun Jul 28, 2024 9:07 pm
by pink
So I added 128x128 images to the stack, and set the size of the item (Columns tab) to 128x128, and the item height of the item to 128 and the width of the column to 128.
Still no luck.
Re: PolyList and Image data
Posted: Sun Jul 28, 2024 9:18 pm
by pink
also trying to fool around with the PolyGrid with the same results
Re: PolyList and Image data
Posted: Sun Jul 28, 2024 10:45 pm
by bn
pink wrote: ↑Sun Jul 28, 2024 9:07 pm
So I added 128x128 images to the stack, and set the size of the item (Columns tab) to 128x128, and the item height of the item to 128 and the width of the column to 128.
Still no luck.
Hi Greg,
I tried your example stack: no luck.
Out of "desperation" and a little suspicion* I changed "imageData" to image:
Code: Select all
on mouseUp pMouseButton
put image "a1" into tData[1]["image"]
put image "a2" into tData[2]["image"]
set the dataContent of widget "PolyList" to tData
end mouseUp
That worked. Your images are shown in widget "PolyList"
I tested your second stack and for PolyGrid it is the same.
Who would've thunk?
Kind regards
Bernd
* suspicion because there are other instances in the terminology of Poly-Grig/List that are "strange"
Re: PolyList and Image data
Posted: Mon Jul 29, 2024 1:52 am
by pink
thanks Bernd, I wouldn't have thought of that
Also, just so it is listed somewhere, the size of the item/column/row DOES NOT have to be the same as the image being put into it.
The content fit of the item (fill, cover, or contain) will fit the image regardless of the size of the original.
Re: PolyList and Image data
Posted: Mon Jul 29, 2024 9:16 am
by Klaus
AHA!
Thanks for the info!