그래픽 / 웹 디자이너가 제 웹 사이트의 Adobe Illustrator 파일을 남겼습니다. 그녀는 이미지를 PNG로 추출하는 것이 쉬워서 HTML에서 사용할 수 있다고 말했다. 그러나 나는 이것을 너무 쉽게 알아낼 수 없다.
이미지는 많은 벡터 드로잉으로 보입니다. 주변 예술과 분리하여 모든 작품을 선택할 수 있습니다. 그러면 어떻게 선택을 PNG 파일로 저장합니까?
Btw .: Adobe Illustrator CS6을 사용하고 있습니다.
그래픽 / 웹 디자이너가 제 웹 사이트의 Adobe Illustrator 파일을 남겼습니다. 그녀는 이미지를 PNG로 추출하는 것이 쉬워서 HTML에서 사용할 수 있다고 말했다. 그러나 나는 이것을 너무 쉽게 알아낼 수 없다.
이미지는 많은 벡터 드로잉으로 보입니다. 주변 예술과 분리하여 모든 작품을 선택할 수 있습니다. 그러면 어떻게 선택을 PNG 파일로 저장합니까?
Btw .: Adobe Illustrator CS6을 사용하고 있습니다.
답변:
스크립팅으로 더 빠르게 수행 할 수 있습니다. Illustrator CS4 용으로이 js-script를 만들었습니다. CS6도 실행할 수 있기를 바랍니다.
노트:
png24에서도 작동합니다 .PNG8을 PNG24로 바꾸십시오.
function exportFileToPNG(dest, artBoardIndex)
{
var exportOptions = new ExportOptionsPNG8(); // or ExportOptionsPNG24
var type = ExportType.PNG8; // or ExportType.PNG24
var file = new File(dest + ".png");
exportOptions.artBoardClipping = true;
exportOptions.antiAliasing = true;
exportOptions.transparency = true;
exportOptions.qualitySetting = 72;
exportOptions.saveMultipleArtboards = false;
exportOptions.artboardRange = "" + artBoardIndex;
app.activeDocument.exportFile( file, type, exportOptions );
}
function execute()
{
if (app.documents.length == 0)
{
alert('No document open', 'Error');
return;
}
if (app.activeDocument.selection.length == 0)
{
alert('Nothing selected', 'Error');
return;
}
var selectedStuff = app.activeDocument.selection[0];
// snap position to pixels
selectedStuff.position = [ Math.round(selectedStuff.position[0]), Math.round(selectedStuff.position[1]) ];
// create temporary artboad for exporting
var docRef = app.activeDocument;
var rect = selectedStuff.visibleBounds;
try
{
docRef.artboards.add(rect);
}
catch(e)
{
alert('Could not create Artboard as step of export.', 'Failure');
return;
}
// determine destination
var destFolder = docRef.path;
if(destFolder == "")
destFolder = Folder.selectDialog('Select the folder to export to:');
if(destFolder)
{
try
{
exportFileToPNG(destFolder + "/" + docRef.name, docRef.artboards.length);
}
catch(e) {}
}
// delete temp-artboard
docRef.artboards.remove(docRef.artboards.length - 1);
}
execute();
나를 위해 잘 작동하고 지금까지 (더 많은) 오류가 없었습니다. 그러나 백업하는 것은 아프지 않습니다.
슬라이스 도구를 사용하십시오.
도구를 사용하여 슬라이스를 만든 다음 파일-> 웹용으로 저장 ... 대화 상자 (Ctrl-Shift-Alt S, Command-Shift-Alt S)를 사용하여 슬라이스를 내 보냅니다. 대화 상자에서 만든 슬라이스를 두 번 클릭하여 적절한 파일 이름을 지정하십시오.
내보내기-> 사용자 슬라이스가 선택되어 있는지 확인하고 저장을 클릭하십시오. 디렉토리를 선택합니다 (내보내기 출력에 '스크래치'폴더를 사용하고 싶습니다.) Illustrator는 해당 폴더에 'images'라는 디렉토리를 만들고 저장에서 선택한 형식으로 정의한 슬라이스가 있습니다. 웹 화면 용.