File import picture to image control
Posted: Mon Mar 01, 2021 11:00 pm
Hi, I'm probably missing something obvious but I cannot seem to get a decent image into an image control.
Here is my code
It all works but the image is horribly displayed with artefact lines across it. The image control is set to "Resize quality best" and the control size locked. What do I need to do to get a decent image displayed?
Do I need to put the image into a control off-screen or another card and resize it?
Thanks as usual for all help and comments gratefully received.
Here is my code
Code: Select all
put "" into image "coverimage" of card "Editor"
answer file "Select an image (preferably 120dpxx120px)" with tStartDirectory with type ("JPEG Images|jpg,jpeg|JPEG" & return & "PNG Images|png|PNG")
if it <> "" then
put it into theFilePath
put URL ("file:" & theFilePath) into image "coverimage"
else
--no file was selected, or cancel was pressed
beep
end if
Do I need to put the image into a control off-screen or another card and resize it?
Thanks as usual for all help and comments gratefully received.