Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

save image after resize (android) - unrecognized file type

$
0
0

I'm having trouble saving thumbs on android after resize the image sometimes, on iOS it works perfectly:

var image = this.responseData;
 
    this.FilePath.write(image);
 
    var thumbnail = image.imageAsResized(200, 100);
 
    console.log("THUMB");
    console.log(thumbnail); //some times this is null
 
    var thumb_path = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory+"/thumbs/",this.TempFile);
 
    thumb_path.write(thumbnail);
 
    this.FilePath = null;
    this.TempFile = null;
I've created a test app for this, with 4 exemple images, the last 2 always returns the following error:
[INFO] :   DOWNLOADING FILE: 2 -- FILE: banner_porque_winsig_new.jpg
[ERROR] :  TiDrawableReference: (pool-3-thread-1) [4,2234] Problem opening stream from file banner_porque_winsig_new.jpg: /data/data/teste.test/app_appdata/thumbs/banner_porque_winsig_new.jpg: open failed: ENOENT (No such file or directory)
[INFO] :   THUMB
[INFO] :   null
[INFO] :   TiFileProxy: (KrollRuntimeThread) [659,2230] Unable to write to an unrecognized file type
I'll comment this question with my app exemple

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>