ai (Adobe Illustrator) 또는 eps 파일 (dpi 등)의 속성을 어떻게 얻을 수 있습니까? 파일을 서버에 업로드 할 때이 속성을 확인해야합니다..ai 또는 .eps 파일의 등록 정보를 얻는 방법은 무엇입니까?
또한 ai/eps를 표준 이미지 형식 (jpg, gif, png 등)으로 변환 할 DLL이 있습니까?
ai (Adobe Illustrator) 또는 eps 파일 (dpi 등)의 속성을 어떻게 얻을 수 있습니까? 파일을 서버에 업로드 할 때이 속성을 확인해야합니다..ai 또는 .eps 파일의 등록 정보를 얻는 방법은 무엇입니까?
또한 ai/eps를 표준 이미지 형식 (jpg, gif, png 등)으로 변환 할 DLL이 있습니까?
use ImageMagickNET.dll through this you can convert the .ai or .eps files into .jpg format..
C# 코드 :
public partial class Form1 : Form
{
Process ffmpeg;
string video;
string thumb;
public Form1()
{
InitializeComponent();
}
private void button4_Click(object sender, EventArgs e)
{
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = "convert \"" + .ai file path + "\" -background white -flatten -density 300 -colors 512 -antialias -normalize -units PixelsPerInch -quality 100 -colorspace RGB -resize 3425x3425 \"D:\\GRAPHICS SEARCH ENGINE\\GRAPHICS IMAGES\\AI\\" convert.jpg\"";
ffmpeg.StartInfo.FileName = ("C:\\Program Files (x86)\\ImageMagick-6.5.3-Q16\\convert.exe");
ffmpeg.Start();
}
}
사용 itextsharp.dll 폭, 높이, 페이지 제목의 수와 같은 AI 파일 속성을 얻으려면
코드 :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using iTextSharp.text;
using iTextSharp.text.pdf;
namespace pdfreared { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void button1_Click(object sender, EventArgs e)
{
PdfReader reader = new PdfReader(@"D:\Files Formats\Icon.ai");
int n = reader.NumberOfPages;
label4.Text = n.ToString();
// size of the first page
Rectangle psize = reader.GetPageSize(1);
float width = psize.Width;
label1.Text ="Width= " + Convert.ToString(width);
float height = psize.Height;
label2.Text = "Height = " + Convert.ToString(height);
// reader.Metadata.
Console.WriteLine("Size of page 1 of {0} => {1} × {2}", n, width, height);
// file properties
Dictionary<string, string> infodict = reader.Info;
foreach (KeyValuePair<string, string> kvp in infodict)
{
Console.WriteLine(kvp.Key + " => " + kvp.Value);
label3.Text = kvp.Key + " => " + kvp.Value;
}
}
}
"identify -verbose image.eps"를 사용하여 EPS 파일과 AI 파일의 메타 데이터 정보를 제공합니다.