本文整理汇总了C#中Gdk.Pixbuf.Savev方法的典型用法代码示例。如果您正苦于以下问题:C# Pixbuf.Savev方法的具体用法?C# Pixbuf.Savev怎么用?C# Pixbuf.Savev使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdk.Pixbuf
的用法示例。
在下文中一共展示了Pixbuf.Savev方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoSave
protected override void DoSave(Pixbuf pb, string fileName, string fileType)
{
int level = PintaCore.Actions.File.RaiseModifyCompression (85);
if (level != -1)
pb.Savev (fileName, fileType, new string[] { "quality", null }, new string[] { level.ToString(), null });
}
示例2: CompositeEmblemIcon
private string CompositeEmblemIcon (String emblem)
{
if (emblem == null)
return "internal:bookmark.png";
if (! File.Exists (emblem)) {
return "internal:bookmark.png";
}
// Composite an icon...
Gdk.Pixbuf icon = new Pixbuf (emblem);
Gdk.Pixbuf bookmark =
new Pixbuf (GetImage ("bookmark.png"));
Gdk.Pixbuf white =
new Pixbuf (GetImage ("white.png"));
white.Composite (bookmark,
0, 0, // dest x,y
48, 20, // height,width
0, 0, // offset x,y
1, 1, // scaling x,y
Gdk.InterpType.Bilinear,
127); // Alpha
// I just want to make the icon be 16x16.
// This does it for me!
Gdk.Pixbuf small_icon = icon.ScaleSimple (16, 16, // x,y
Gdk.InterpType.Bilinear);
small_icon.Composite(bookmark,
0, 0, // dest x,y
48, 18, // height,width
31, 2, // offset x,y
1, 1, // scaling x,y
Gdk.InterpType.Bilinear,
255); // Alpha
emblem = System.IO.Path.GetFileName (emblem);
emblem = PathFinder.AppDataFileName ("transient:WebLinkHitRenderer",
"emblem-" + emblem);
bookmark.Savev (emblem, "png", null, null);
return emblem;
}