I have code that uses the media plugin and it's basically like this.
local media = Media.new(e.path)
media:crop(100,100, 200, 200)
media:save()
local localTakenImage = Bitmap.new(Texture.new(e.path, true))
stage:addChild(localTakenImage)
This is not cropped at all, it's the full sized image. The e.path is what's in the path after I call Media:takeScreenshot()
The app is in landscape if that helps.
Comments
so by reusing e.path, you are simply pointing to the same initial screenshot. Try:
It threw me off because if I did a rotate or resize operation, a save was all that was needed.
Now my code is:
local media = Media.new(e.path)
media:crop(x, y, width, height)
media:save()
local localTakenImage = Bitmap.new(Texture.new(media:getPath(), true))
Rotate and resize work but crop does nothing.
Also, though all paths are the same, the image is not actually there at that path. In the 'files' folder of an installed android application.
Unfortunately something messed with my set up and I can't build the plugin, not sure why, spend the day reinstalling the software and still nothing. I'll get back to you once I have something to report