Hi there,
I am trying to display an image which the user loads from their device. I have that bit all sorted, the problem comes when I try to resize it – here is my code;
local function sessionComplete ( event )
t = event.target
if t == nil then
print("t == nil")
else
local baseDir = system.DocumentsDirectory
t.width = t.width\*0.5;
t.height = t.height\*0.5;
display.save( t, "picture.jpg", baseDir )
t.alpha=0;
-- t.width = 198;
-- t.height = 283;
-- Outright changing of the width & height did not work, so I tried saving and reloading
end
r = display.newImageRect("picture.jpg", system.DocumentsDirectory, 198,283 )
r.x=100;
end
Instead of the image being resized to 198 x 283, it takes that portion from the image, essentially cropping it instead of resizing
What am I doing wrong?
Thanks,
Max [import]uid: 24641 topic_id: 20034 reply_id: 320034[/import]
