mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 03:42:47 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56113 954022d7-b5bf-4e40-9824-e11837661b57
51 lines
1.8 KiB
C#
51 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace TestConsole
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
TestFonts();
|
|
|
|
}
|
|
|
|
static void TestImage()
|
|
{
|
|
OfficeCore.CImageGdipFileClass oImage = new OfficeCore.CImageGdipFileClass();
|
|
oImage.OpenFile(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg");
|
|
|
|
//oImage.Resize(1200, 900, 0); // default
|
|
//oImage.Resize(1200, 900, 3); // bilinear
|
|
oImage.Resize(1200, 900, 4); // bicubic
|
|
//oImage.Resize(1200, 900, 5); // nearest
|
|
|
|
//oImage.SaveFile(@"C:\test\test.bmp", 1);
|
|
//oImage.SaveFile(@"C:\test\test.gif", 2);
|
|
//oImage.SaveFile(@"C:\test\test.jpg", 3);
|
|
oImage.SaveFile(@"C:\test\test.png", 4);
|
|
//oImage.SaveFile(@"C:\test\test.tiff", 5);
|
|
}
|
|
|
|
static void TestFonts()
|
|
{
|
|
OfficeCore.CWinFontsClass oFonts = new OfficeCore.CWinFontsClass();
|
|
|
|
//oFonts.Init("", false, true);
|
|
//oFonts.Init("", true, true);
|
|
//oFonts.Init("", false, false);
|
|
|
|
oFonts.Init(@"X:\AVS\Sources\TeamlabOffice\trunk\OfficeWeb\Fonts\native", false, true);
|
|
//oFonts.Init(@"X:\AVS\Sources\TeamlabOffice\trunk\OfficeWeb\Fonts\native", true, true);
|
|
//oFonts.Init(@"X:\AVS\Sources\TeamlabOffice\trunk\OfficeWeb\Fonts\native", false, false);
|
|
|
|
oFonts.SetAdditionalParam("BinaryFonts", @"C:\test\font_selection.bin");
|
|
oFonts.SetAdditionalParam("EditorFontsThumbnailsFolder", @"C:\test\");
|
|
oFonts.SetAdditionalParam("AllFonts.js", @"C:\test\AllFonts.js");
|
|
|
|
}
|
|
}
|
|
}
|