Re:Colorspace
Re:Colorspace
- Subject: Re:Colorspace
- From: "Vince Jelenic" <email@hidden>
- Date: Tue, 21 Nov 2000 00:21:33 -0500
>
From: Hellum Timothy <email@hidden>
>
>
>
Does anyone know how to point an Applescript at an image file (an EPS
>
especially) and "see" it's colour space - without using colorsync as the
>
profile(s) may or may not be embedded. I have thought of using BBEdit to
>
crack the file and peak at a line number, but would like to avoid using a
>
second piece of software if possible).
by colour space do you mean if RGB, CMYK or other?
if so... , otherwise disregard.
>
you can just open the file for reading from the script like any text file.
set x to read <ANYTHING> for <INTEGER>
-- or you can get fancy and do
set x to read <ANYTHING> until "%%DocumentSuppliedResources" that would
stop the example below from reading in any more than the info you wanted.
the info is usually within about the first 5000 bytes of data or so.
(usually within the first 500 , I haven't counted)
i normally read in about 5 K of data for a file, then process.
for example, here' info from inside an eps opened with bbedit.
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Adobe Illustrator(TM) 5.5
%%For: (Quark, Inc.) (Quark, Inc.)
%%Title: (CMYKLogo.EPS)
%%CreationDate: (12/13/96) (1:59 PM)
%%BoundingBox: 218 370 290 442
%%HiResBoundingBox: 218.0017 370.0019 289.9983 441.9985
%%DocumentProcessColors: Cyan Magenta Yellow Black
I guess last line might give you the info you need.
I normally use this method for reading in bounds and dpi info from such
files.
as can be ascertained by readin in the next bunch of lines.
%%DocumentSuppliedResources: procset Adobe_level2_AI5 1.0 0
%%+ procset Adobe_IllustratorA_AI5 1.0 0
%AI5_FileFormat 1.2
%AI3_ColorUsage: Color
%AI3_TemplateBox: 306 396 306 396
%AI3_TileBox: 31 31 583 761
%AI3_DocumentPreview: Macintosh_ColorPic
%AI5_ArtSize: 612 792
%AI5_RulerUnits: 0
%AI5_ArtFlags: 1 0 0 1 0 0 1 1 0
%AI5_TargetResolution: 800
------ Vince Jelenic says:
"The only way to really ensure server security is to lock it in a sealed
room with the power off."