Are Lossless EPS Transformations Supported?

Comments

5 comments

  • Avatar
    Stephen Doyle

    Hi Warren,

    With some exceptions, most of the transformation options we support are available for raster images, not vector, so the first step when working with a vector image is to convert it to a raster image implicitly.

    Depending on the output size you require for the final output, this can mean that the image is rasterized 'too small'; In general, we recommend that you start with a relatively large image, perform the transformation options you need, then adjust the size down to the required output size. For vector images specifically, as you noticed, the use of the `dn` parameter to set the density at which we perform the rasterization can solve a lot of these issues by creating a very large raster image before the other options are performed, so I recommend continuing with that.


    If you have some specific examples you can share either here or in a support request we'd be happy to take a look and give more specific advice for those exact images, but overall, what I said above is best - start with a large image before performing other transformations to minimise the negative effects of making it smaller before delivery.

    Thanks,

    Stephen

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Warren Parsons

    Hi Stephen, and thank you for your reply.

     

    I have two versions of a test image uploaded, one in SVG and one in EPS (original was an EPS, which I converted to SVG in Illustrator for the comparison).

    SVG: https://res.cloudinary.com/ocimages/image/upload/v1572291872/icon%20test/Icon_Rebar_RGB_b8krpl.svg

    EPS: https://res.cloudinary.com/ocimages/image/upload/v1572291386/icon%20test/Icon_Rebar_RGB_geykvc.eps

     

    Here is the image at its default size when just transformed by Cloudinary from an EPS to a JPG. As you can see, it's pretty small.
    https://res.cloudinary.com/ocimages/image/upload/v1572291386/icon%20test/Icon_Rebar_RGB_geykvc.jpg

    And now we have this same image upscaled to 1500px wide, again from the EPS and output as a JPG:

    https://res.cloudinary.com/ocimages/image/upload/w_1500/v1572291386/icon%20test/Icon_Rebar_RGB_geykvc.jpg

    You'll notice that it looks pretty bad.


    Here is the image with the same transformations -- upscaled to 1500px and output as JPG. The only difference being that this time we're using the SVG as the source image.

    https://res.cloudinary.com/ocimages/image/upload/w_1500/v1572291872/icon%20test/Icon_Rebar_RGB_b8krpl.jpg

    This time it's perfectly crisp and sharp.

    Even upscaling to 5000px wide results in no apparent loss of quality.

    Note that I haven't messed with the 'dn' parameter at all in this test.

    Now, while I can't definitively say what the technology differences are in the respective transformations here, it certainly does appear that the scale transformation is happening in vector-land for the SVG, while the EPS is being rasterized prior to upscaling.

    The main question I'm trying to get answered is whether there's any combination of settings in Cloudinary that will treat EPS files the same way SVGs are treated -- upscaling without massive quality loss, as is the common traditional expectation with vector-based images.

    If not, we can work around it. But it would be ideal if we could just work with our source EPS files rather than manually converting them to SVG prior to putting them into Cloudinary.

    Thank you

    0
    Comment actions Permalink
  • Avatar
    Stephen Doyle

    Hi Warren,

    Looking at those examples, the original .EPS seems to be quite small. Or rather, given it's a vector image, its metadata tells us it's quite small.

    When I open it on my local machine, Mac OS's Preview app converts it to a PDF and it's shown at about 180x180 pixels and the info pane indicates that it's to be shown at "0.67 × 0.67 inches":

     

    I'm afraid I don't have software on my machine to edit the EPS, but when you're saving it, is the page size or density configurable?

    Overriding the density/DPI when rasterizing as part of our transformations can give a better result, but for this example, even 300 dpi provides quite a small raster image:

    https://res.cloudinary.com/ocimages/image/upload/dn_300/v1572291386/icon%20test/Icon_Rebar_RGB_geykvc.jpg

    For  SVGs, we do indeed have more support than for other vector formats, which is why more of the operations (notably scaling) can be performed before rasterization,  but we should be able to get a better result for you here also

    Thanks,

    Stephen

    0
    Comment actions Permalink
  • Avatar
    Eric Norcross

    Correct me if I'm wrong, but shouldn't a vector-to-vector file type change retain the vector image? For example, if you're starting with an SVG and convert it to EPS, shouldn't the output EPS also be a vector file? 

    0
    Comment actions Permalink
  • Avatar
    Wissam Khalili

    Hi Eric,

    We do not support conversion from vector SVG to a vector EPS for now.

    We might have this option in the future.

    Regards,

    Wissam

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.