iospdfadobe-illustratorasset-cataloguiimageasset

what is the best to way to get the vector image for asset catalog


I am aware xcode has introduced an option to provide a vector image(.pdf) so that we don't have to give a image for each dimension such as 1x,2x,3x

This saves lots of time and its really a good feature

But how to go about making an vector image in .pdf format.

As far as I know any png image can be saved as .pdf image does it mean it has been vectorized ?

or else we have to do it in the harder way .. by installing adobe illustrator and making an vector image through that

or else it there any web app that does it for us

basically I want to do the right way so the when image is displayed in 3x devices also there is no image distortion


Solution

  • This is a supplement to the excellent answer by @Senseful.

    How to make vector images in .pdf format

    I will tell how to do this in Inkscape since it is free and open source but other programs should be similar.

    In Inkscape:

    1. Create a new project.
    2. Go to File > Document Properties and set the custom page size to whatever your @1x size is (44x44, 100x100, etc) with the units in px.
    3. Make your artwork.
    4. Go to File > Save As... > Printable Document Format (*.pdf) > Save > OK. (Alternatively, you could go to Print > Print to File > Output format: PDF > Print but there are not as many options.)

    Notes:

    Further reading

    Original answer