Code: Select all
on mouseUp
# the X, Y dimensions for an image are not supported on Android and are ignored
mobilePickPhoto "library"
if the result is text then
put the result into image "The_Image"
end if
end mouseUp
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
# the X, Y dimensions for an image are not supported on Android and are ignored
mobilePickPhoto "library"
if the result is text then
put the result into image "The_Image"
end if
end mouseUp
Apply a "rule of three" (a.k.a. rule of proportion)?Quinton B. wrote: ↑Sun Jun 09, 2019 1:15 amLol, well your way works. How do you resize the image to a certain size such as 250px x 250px?
Code: Select all
on mouseUp
if exists(img "XYZ") then
delete img "XYZ"
end if
answer file "Select image:"
if the result is not cancel then
set the lockscreen to true
import paint from file it
set the name of the last control to "XYZ"
put the width of img "XYZ" into WIDD
put the height of img "XYZ" into HITE
if WIDD < HITE then
put 250 into nHITE
put WIDD/HITE into sFACTOR
put 250*sFACTOR into nWIDD
set the width of img "XYZ" to nWIDD
set the height of img "XYZ" to nHITE
else
put 250 into nWIDD
put HITE/WIDD into sFACTOR
put 250*sFACTOR into nHITE
set the width of img "XYZ" to nWIDD
set the height of img "XYZ" to nHITE
end if
end if
end mouseUp