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

The saved picture is not the same as the original

$
0
0

I use Titanium Studio 3.4.0 and Titanium SDK 3.4.0

Before i use it all is fine. Now when i save an image i can't read the height and th width.

My code for saved:

var newDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'logo');
 
if(!newDir.exists())
    newDir.createDirectory();
 
var writeLogo  = Ti.Filesystem.getFile(newDir.resolve(), logoName);
writeLogo.write(image);
And when i do this
alert(Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'logo/'+logoName).read().height);
The result is 0.

But when i do this

alert(Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'logo/'+logoName).read().mimeType);
The result are "image/png" like the original.

Do you know where is my mistake and if there is a solution?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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