         }
     }
     
+    // this table to used to place images marked with either @2, @3 into their respective android equals
+    private let iOStoAndroid = [
+        1: "mdpi",
+        2: "xhdpi",
+        3: "xxhdpi"
+    ]
     private func copyImages(files: Array<String>, type: LangType, useRoot: Bool) -> Void {
         for file in files {
             let filePath = sourceAssetFolder! + "/" + file


    /**
     *  Given a file, image.png, image@2.png, image@3.png, return the scaling factor
     *  1, 2, 1.5
     */
    static func getScaleFrom(file :String) -> Double {
        var scale = 1.0
        var fileName = (file as NSString).lastPathComponent
        fileName = (fileName as NSString).stringByDeletingPathExtension
        if (fileName.hasSuffix("@2")) {
            scale = 2.0
        }
        else if (fileName.hasSuffix("@3")) {
            scale = 3.0
        }
        return scale
    }

    func saveTo(file: String) -> Bool {

            
            var fileName = (file as NSString).lastPathComponent
            fileName = (fileName as NSString).stringByDeletingPathExtension

            if (type == .Swift) {
                copyFile(filePath, dest: destFile)
            }
            else if (type == .Java) {
                let result = NSImage.getScaleFrom(fileName)
                let drawable = iOStoAndroid[result.scale]!
                let defaultLoc = destPath + "/res/drawable-" + drawable + "/"
                createFolder(defaultLoc)
                fileName = result.file + ".png"
                copyFile(filePath, dest: defaultLoc + fileName)
            }
            else {
