private static string GetTextureFilePath(Layer layer, out string writePath) { string file = string.Empty; writePath = _texturePath; string layerName = PsdUtils.ClearNameTail(layer.Name); file = Path.Combine(writePath, layerName + ".png"); return(file); }
public static string GetFilePath(Layer layer, out string writePath) { string file = string.Empty; writePath = _currentPath; string layerName = layer.Name; if (layerName.Contains(PUBLIC_IMG_HEAD)) { int length = writePath.Length - 1; if (writePath.LastIndexOf(@"/") != -1) { length = writePath.LastIndexOf(@"/"); } writePath = writePath.Substring(0, length); writePath += PUBLIC_IMG_PATH; } //layerName = PsdUtils.TrimSliceReg(layerName); layerName = PsdUtils.ClearNameTail(layerName); file = Path.Combine(writePath, layerName + ".png"); return(file); }