Plugin.cs (for PS)
来源:互联网 发布:娇韵诗淘宝旗舰店真假 编辑:程序博客网 时间:2024/05/17 21:41
/**
* FluffyApp Photoshop plugin
* Copyright (c) 2011-2012 Richard Z.H. Wang
* Licensed under New BSD
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
/*
namespace Uploadinator.TriggerPlugins.Photoshop
{
[Plugin("Photoshop",
Version = "0.1.1",
Description = "Uploads an image of the currently active tab's state.",
Author = "Richard Z.H. Wang",
Supports = "1.1.0",
TriggeredBy = "Photoshop.exe")]
public class Plugin : IPlugin
{
public PluginResult OnTriggered(PluginTriggerEventArgs e)
{
string dir = Path.Combine(Path.GetTempPath(), "FluffyApp");
Directory.CreateDirectory(dir);
Type photoshopType = Type.GetTypeFromProgID("Photoshop.Application");
if (photoshopType != null)
{
object photoshop = Activator.CreateInstance(photoshopType);
object activeDocument = photoshopType.InvokeMember("ActiveDocument", BindingFlags.GetProperty, null, photoshop, null);
string activeFilename = (string)activeDocument.GetType().InvokeMember("Name", BindingFlags.GetProperty, null, activeDocument, null);
string savePath = Path.Combine(dir, Path.GetFileNameWithoutExtension(activeFilename) + ".png");
Type saveOptionsType = Type.GetTypeFromProgID("Photoshop.PNGSaveOptions");
object saveOptions = Activator.CreateInstance(saveOptionsType);
activeDocument.GetType().InvokeMember("SaveAs", BindingFlags.InvokeMethod, null, activeDocument, new object[]
{
savePath,
saveOptions,
true,
2 // lowercase
});
return PluginResult.FromPath(savePath);
}
return null;
}
}
}
*/
- Plugin.cs (for PS)
- lu-PS && lu-CS
- CS和PS区别
- CS/PS域
- Imagenomic Professional Plugin Suite for Mac(ps磨皮降噪滤镜套装)附注册码 v1414破解版
- ps域和cs域
- CS域和PS域
- useful websites for CS
- CS/PS域[通信专术]
- 计算机通信中的CS和PS
- GSM系统中的CS和PS
- CS域和PS域的区别
- ria plugin for eclipse
- OllyFlow plugin for Ollydbg
- Jquery for table plugin
- AWK Plugin For BBEdit
- Eclipse Shell for Plugin
- Sqlmap plugin for BurpSuite
- APK权限大全
- php上传apk后自动提取apk包的信息
- JS中使用java方法与数据库交互
- There is a problem with the configuration server. (/usr/libexec/gconf-sanity-check-2 exite
- 关于产品的一些思考——腾讯之搜搜百科
- Plugin.cs (for PS)
- APK去除多余权限的方法
- Web网站性能测试工具
- 设置Java文件注释格式
- Why can't 32-bit Windows access 4GB of RAM
- Android ontouch 手速
- ubuntu复制权限不够
- Yii 验证码的使用
- LINUX动态链接库的创建与使用