Image file type – .jpeg, .svg and .png image format extension description (below)

Get into the habit of writing together! This is the 12th day of my participation in the "Nuggets Daily New Plan·April Update Challenge", click to view the details of the event

What is TIFF? TIFF image format (.tif file format)

TIFF is a file type best suited for high-quality images that require editing. TIFF files are large, so they are not suitable for sharing online.

You should use TIFF when quality is more important than file size. In practice, PNG is almost always the better choice - especially when dealing with images on the web.

What is SVG? SVG file format (.svg file extension)

SVG is Scalable Vector Graphics. This means that graphics can be scaled to any size without loss of quality.

Unlike all the other file formats we've discussed in this article, SVG files are vector files. (JPEG, PNG, GIF, and TIFF are raster files.)

This means that SVG files can be scaled to any size without loss of quality, while raster files will lose quality when enlarged.

You can edit the SVG file with vector editing software (or just manually update the coordinates and colors of the graphic). You can only edit PNG files with raster editing software.

Here is a sample SVG file from the Mozilla Developer Network . This is what SVG looks like in its native XML code form:

<svg version="1.1"
     width="300" height="200"
     xmlns="http://www.w3.org/2000/svg">

  <rect width="100%" height="100%" fill="red" />

  <circle cx="150" cy="100" r="80" fill="green" />

  <text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text>

</svg>
复制代码

This simple code renders this image:

example-svg-file

A red square with a green dot and the letters "SVG".

SVG files are generally smaller than PNG files because they contain only the data needed to draw the image, whereas PNG files contain the data for the entire image.

You can also animate SVG files using a tool called SMIL. Therefore, they can be used as very space-efficient GIF files. If you're really adventurous, you can write SVG.

JPEG VS PNG - Which image format is best for the web?

As we lay more and more fiber optic cables and high-speed satellite internet becomes more commonplace, the future of networks may look very different.

But for now, my recommendation is to use JPEG for most images.

If you have a company logo or a very important photo where quality is paramount, PNG is a good choice.

For logos, I recommend SVG because it scales infinitely and is very compact in size.

in conclusion

Hope it can help you!

Guess you like

Origin juejin.im/post/7085586627656941581