• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

is this possible to get EPS save encoding (ie.. BINARY, ASCII, ASCII85)

Engaged ,
Sep 07, 2015 Sep 07, 2015

Copy link to clipboard

Copied

Hi Everyone,

is this possible to get EPS save encoding like BINARY, ASCII, ASCII85, JPEG(low)..

Thanks in advance.

1.jpg

-yajiv

TOPICS
Actions and scripting

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Sep 08, 2015 Sep 08, 2015

The format of Photoshop EPS files is partially documented here:

http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577413_pgfId-1035096

Photoshop includes a comment in the EPS files it writes so that it is able to read them back in again. Third party programs that write pixel-based EPS files may want to include this comment in their EPS files, so Photoshop can read their files.

The comment must follow immediately after the %% comment block at the start of the file. The comment is:

%Image

...

Votes

Translate

Translate
Adobe
Advisor ,
Sep 07, 2015 Sep 07, 2015

Copy link to clipboard

Copied

Usually, the only way to get information like this is to scan the file. There may be something in the exif data so you might want to check there first.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 07, 2015 Sep 07, 2015

Copy link to clipboard

Copied

Hi xbytor,

Thanks for your reply. Does not given any information in metadata exif.

Since the metadata means data about data information which is derived from image.

Is possible to get or not?

-yajiv

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 07, 2015 Sep 07, 2015

Copy link to clipboard

Copied

If the info you need is not in the exif metadata you will need to scan the image file. I don't have the EPS file format spec at my fingertips so I can't tell you how to find the encoding part of the spec. Take a trip on google and see if you can find it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 08, 2015 Sep 08, 2015

Copy link to clipboard

Copied

Hi xbytor,

Once again thanks for your reply. I tried lot on google but I can't find..

Please help me the Binary value of Save encoding for BINARY or ASCII or ASCII85.

Since I get binary value for Clipping path , Normal path and work path available in document. Hence save encoding has binary value. If possible can you find that binary value..?

Ex:

Path = '8BIM\x07\xd0'

Clipping Path = '8BIM\x0b\xb7'

WorkPath = '8BIM\x04\x01'

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 08, 2015 Sep 08, 2015

Copy link to clipboard

Copied

I created an empty document and saved it three times with the different encodings. The only difference I saw in the headers was at offset 8 in the files. These are the 4 bytes at 0x8 into the file for the different encodings:

Binary    - 02 d2 d2 0

ASCII85 - 07 9e 06 01

ASCII    -  fd 18 9f 01

I couldn't find the right spec for the EPS file format so I'm not sure if these bytes will always be the correct ones but it's a start.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 08, 2015 Sep 08, 2015

Copy link to clipboard

Copied

The format of Photoshop EPS files is partially documented here:

http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577413_pgfId-1035096

Photoshop includes a comment in the EPS files it writes so that it is able to read them back in again. Third party programs that write pixel-based EPS files may want to include this comment in their EPS files, so Photoshop can read their files.

The comment must follow immediately after the %% comment block at the start of the file. The comment is:

%ImageData: <columns> <rows> <depth> <mode> <pad channels> <block size> <binary/hex> "<data start>"

<columns>: Width of the image in pixels.

<rows>: Height of the image in pixels.

<depth>: Number of bits per channel. Must be 1 or 8.

<mode>: Image mode. Bitmap/grayscale = 1; Lab = 2; RGB = 3; CMYK = 4.

<pad channels>: Number of other channels store in the file. Ignored when reading. Photoshop uses this to include a grayscale image that is printed on non-color PostScript printers.

<block size>:Number of bytes per row per channel. Will be either 1 or formula (below):

  1 = Data is interleaved.

  (columns*depth+7)/8 = Data is stored in line-interleaved format, or there is only one channel.

<binary/hex>:

  1 = Data is in binary format.

  2 = Data is in hex ascii format.

<data start>: Entire PostScript line immediately preceding the image data. This entire line should not occur elsewhere in the PostScript header code, but it may occur at part of a line.

Besides, some information about other values of <binary/hex> can be found here:

http://python.6.x6.nabble.com/Correctly-determine-image-size-of-a-Photoshop-EPS-td2096786.html

1 - binary

2 - ascii

3 - jpeg low quality

4 - jpeg medium quality

5 - jpeg high quality

6 - jpeg maximum quality

7 - ascii85

Here is a test script using this information:

function main ()

{

    function isPhotoshopEPSFile (f)

    {

        return (f.type === 'EPSF') || f.name.match (/\.eps$/i);

    }

    var epsFilter =

        (File.fs === "Macintosh") ?

            function (f) { return (f instanceof Folder) || isPhotoshopEPSFile (f) } :

            "Photoshop EPS Files:*.eps,All Files:*.*";

    var epsFile = File.openDialog ("Open Photoshop EPS file:", epsFilter);

    if (epsFile)

    {

        if (epsFile.open ("r"))

        {

            while (!epsFile.eof)

            {

                var line = epsFile.readln ();

                var found = line.match (/^%ImageData:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/);

                if (found)

                {

                    var dataFormatIndex = found[7];

                    var dataFormats =

                    [

                        "Binary",

                        "ASCII",

                        "JPEG (low quality)",

                        "JPEG (medium quality)",

                        "JPEG (high quality)",

                        "JPEG (maximum quality)",

                        "ASCII85"

                    ];

                    alert (dataFormats[dataFormatIndex - 1]);

                    break;

                }

            }

            epsFile.close ();

        }

    }

}

main ();

HTH,

--Mikaeru

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 08, 2015 Sep 08, 2015

Copy link to clipboard

Copied

Thanks xbytor and Mikaeru,

Its Awesome.....:) and that was what i needed. 

Once again Thanks for your support.

-yajiv

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 08, 2015 Sep 08, 2015

Copy link to clipboard

Copied

Once again,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 08, 2015 Sep 08, 2015

Copy link to clipboard

Copied

LATEST

いえいえ、とんでもないです Not at all, really...

All of us Photoshop scripters know what we owe you, you've shown us so many times and for so long how to do things that seemed absolutely impossible to achieve... Many many thanks to you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines