Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

Ahemdani nwqj Nandish




Posted Questions


No Question(s) posted yet!

Posted Answers



Answer


For some reason, we’re still seeing plenty of PNGs (raster graphics file format) on the web, even on spanking new websites built in 2016! Things like logos and icons seem to be the main culprits. I suppose the question is why? Why do we still use them? Unless you’re using them as a fallback on ancient browsers, your time is up.

We’ve put together 5 key reasons to use SVGs over PNGs. SVGs if you don’t know are Scalable Vector Graphics, an XML-based image format for two-dimensional graphics. SVG is supported in all browsers, except IE 9 and lower and old Android (V3).

Right, now that we know the difference, let’s get through the reasons you should be using SVGs.

In a nutshell:

Carry on reading for an in-depth look at each point.

It doesn’t matter about your screen size, zoom level, resolution or whether or not you have a ‘retina’ display. SVG is vector based, paths, shapes and fills. This allows for infinite resolution, much like when creating artwork for print and using shapes, the same principles apply!

Using PNGs means you are restricted to pixels, urghh, that’s so 2001. Also, a lot of the time you need to cater for ‘retina’ devices, meaning you have two PNGs, one with almost always an absurd file size too.

These two icons below can demonstrate resolution problems, zoom in (cntrl/cmd + ‘+’) and take a look yourself, or just right click and open each item in a new tab. If you can’t do either of those, have a little play of the video below where I zoom in…

Touched on above, PNGs can weigh in at large file sizes, usually when catering for HDPI displays. As you know, the larger the file size, the slower it is to render/load. People tend to use PNGs when they require transparency in their images, transparency in an image = stupid file size. Stupid file size = Longer loading times. SVGs are just code, which means very small file sizes. There are instances when SVGs can take a life time to load, for example, if you’ve made the Eiffel Tower as a vector graphic with a million paths and fills, best to use a JPEG… or PNG.

HTTP requests: Using traditional PNGs means that, unless you base64 encode, the images have to be referenced as external resources. All those PNGs means an increase in http requests and thus a slower site. SVGs are not only smaller in filesize, but the XML can be embedded inline to your HTML, eliminating http requests and speeding up your site.

SVGs can be animated and styled with CSS. Animations (transformation/transition) that you use on HTML elements can also be used on an SVG element. There are instances where you can’t use CSS to animate SVGs but these instances can usually be covered with JavaScript, have a look at snap.svg (The JavaScript SVG library for the modern web.)

This opens up a whole world of creativity when it comes to the web, I’ve popped in an example of a SVG animation to give you an idea of what’s possible:

There are many ways SVGs can be used on the web, from displaying logos to full on physics engine in browser madness. I’m in the former camp, my needs are generally needing logos, icons and simple animations in SVG format.

Logos: Logos are usually vector based, and rightly so. Give someone from a print background a raster based logo and just watch their face melt. The beauty here is, you could define an SVG document as your logo and then use it wherever you like without worrying about size, resolution or load times. The same factors apply for icons too. Also, creating responsive logos: See our article on modern logo requirements here to find out more about responsive logos: Modern Logo Requirements

Graphs: Yes, graphs… SVGs are great at vector shapes, lending itself to things like infographics and graphs very well indeed.

Animations: See point 3

Cool stuff: Ok, not so practical, but there are some cool things you can do with SVG, check out this video below with a masking effect using an SVG:

Google index’s SVGs, which is good news. SVG content whether it is in a standalone file or embedded directly in HTML is indexed.

In the interest of fairness, here are a couple of points to consider when using SVGs.

You’ll have problems with trying to use SVGs with old browsers, having said that, you can have a fallback in place such as PNG replacements.

Complicated artwork with thousands of nodes is probably best suited to JPEGs, browsers trying to render complicated SVGs can have a meltdown.


Answer is posted for the following question.

Why svg over png?

Answer


OWWA Central Office · FB Harrison St, Pasay, Metro Manila · OWWA Hotline 1348 · owwacares @ owwa govph


Answer is posted for the following question.

How to claim owwa benefits?

Answer


The Chena hot springs in Alaska is the most popular as well as the most visited hot spring in Alaska It is located about 57 miles northeast of Fairbanks, the golden heart city of Alaska, near the Chena River State Recreation Area


Answer is posted for the following question.

Would you suggest best natural hot springs in Alaska?

Answer


  • On the Utilities panel, click the Measure button. 3ds Max displays the Measure rollout.
  • Select the object you want to measure. If both an object and a shape are in the selection, information is displayed for both types.
  • Click New Floater to display a modeless Measure dialog with all the same information.

Answer is posted for the following question.

How to measure object in 3ds max?

Answer


Main usage of Acemarc T 100 mg/4 mg Tablet is for Pain due to muscle spasm.

Acemarc T 100 mg/4 mg Tablet

Acemarc T 100 mg/4 mg Tablet is a combination medicine that contains a painkiller as well as a muscle relaxant. It is used to relieve pain, inflammation, and swelling in conditions that affect muscles. Also, it effectively relieves muscle stiffness or spasm, thereby improving muscle movement. It works by blocking chemical messengers in the brain that tell us we have pain.

Take it as it is prescribed to get the most benefit. Do not take more or for a longer duration than needed as that can be dangerous. In general, you should take the lowest dose that works, for the shortest possible time. This will help you to go about your daily activities more easily and have a better, more active, quality of life.


Answer is posted for the following question.

Why Acemarc T 100 mg/4 mg Tablet is used?

Answer


1
xed -b ios

Answer is posted for the following question.

How to open xcode shorthand react native (Javascript Scripting Language)


Wait...