hi.
i’ve done app that picks a image from the internet and then i crop it and save it to the temp dir, so i can use the croped image later.
in windows simulator worsk fine. image is downloaded fine and croped image is created like i wanted.
in android nexus 7 is downloaded fine but the snapshot appears a black image not the downloaded. i’ve tried adding timers with no luck.
ive build 2607.
i’m doing something wrong? why it works on simulator and not in the device? Do i need to put anything in build.settings?
local img = display.newImageRect(original,dir, w\*.25,h\*.25) local snapshot = display.newSnapshot( w, c ) snapshot.group:insert( img ) snapshot:invalidate() -- tried with or without snapshot.width = w\*display.contentScaleX snapshot.height = c\*display.contentScaleY display.save( snapshot, { filename=croped, baseDir=dir, isFullResolution=false, jpegQuality=0.8 } ) snapshot:removeSelf() snapshot=nil
yes it works with the 1x version (320x173). all goes fine, the snapshot and the display.save of the croped image created with the snapshot. i don’t have access of then in the app. the server only have 4x versions…i download them…i create a .25 version of it with display.newImageRect and try to snapshot it and display.save it…don’t work because snapshot ignores my .25 version.