Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

How can I resize image

$
0
0
as vector.

C#

public string GetEPSView(string EPSFileName, int iWidth, int iHeight, string path)
{
string result = EPSFileName.Replace(".eps", ".gif");

appIll.Open(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + EPSFileName, Illustrator.AiDocumentColorSpace.aiDocumentCMYKColor, openOptions);

Illustrator.Document curDok = appIll.ActiveDocument;
Illustrator.ExportOptionsGIF gifOptions = new Illustrator.ExportOptionsGIF();
gifOptions.AntiAliasing = true;
gifOptions.Transparency = true;
gifOptions.Matte = false;
gifOptions.ColorCount = 255;

Double dScale = 100;
if (iHeight > iWidth)
dScale = Math.Round(iWidth / curDok.Width * 100);
else
dScale = Math.Round(iHeight / curDok.Height * 100);

curDok.Export(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + result, Illustrator.AiExportType.aiGIF, gifOptions);

if (!File.Exists(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + result))
result = "Error";

curDok.Close(Illustrator.AiSaveOptions.aiDoNotSaveChanges);

return result;
}

but how can I establish new size of image and as vector graphics?

Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>