Results 1 to 11 of 11

Thread: svg vs bitmap

  1. #1
    Join Date
    Jan 2007

    svg vs bitmap

    Hi, recently I work on a data visualization site. The designer wants the data generated graphics to be pixel perfect. Although I played with svg before, I never quite understand why svg graphics look so much nicer than bitmap base graphic such as in curves and circle.
    Doesn't the final drawing in svg is limited to the resolution of the display just like bitmap? I don't think there is a way in svg to split a pixel into a smaller unit, it's simply physically impossible.. But why does it look so much smoother?

  2. #2
    Join Date
    Aug 2006
    Presuming you don't try to scale up the bitmap from its intended original size, then you are correct, there is no quality difference due to the data format. If your SVG graphics look smoother, then you just did a poor job at generating the equivalent bitmap. After all, the SVG is eventually rendered as a bitmap by the browser.


  3. #3
    Join Date
    Jan 2007
    That's whAt I meant, regardless how the graph is generated, not just by me, lets say a circle on Gimp saved as png and a circle in Inkscape saved as svg the svg always look nicer and needless to say, when it is put in a responsive design page, once the image is resized by percentage, all jags come out in png or bmp, yike! but svg remain nice and smooth. My question is what magic is behind svg?

  4. #4
    Join Date
    Dec 2012
    SVG graphics don't use pixels, they use math to draw lines and shapes in specific places, so when you resize an SVG image you aren't "stretching" the pixels like with a bitmap image, the SVG image is redrawn at a larger scale, because of the lack of pixels the image naturally looks smoother, no jagged edges.

    For example take this SVG image of a dragon, you can zoom right in on it without losing any quality, whereas with a bitmap image you would just see a mess of pixels, if you view the source of that image you'll see the SVG magic that generates it.

    The browser does not render an SVG image as bitmap.

  5. #5
    Join Date
    Jan 2007
    Thanks for the reply

    "SVG graphics don't use pixels"
    Thats what I read, but doesnt it eventually have to end up in pixel value on the screen? Seems like thats the only way to get anything to display on the monitor, that is what I really dont under stand.

  6. #6
    Join Date
    Dec 2012
    A bitmap image is built up out of little dots of colour called pixels, an SVG image is built using solid blocks of colour with their outline defined using math allowing them to be scaled by recalculating each block of colours position.

    Basically bitmap images are static images that are drawn once, SVG images are math based images that can be redrawn dynamically.

  7. #7
    Join Date
    Aug 2006
    An SVG image, once it's on your monitor, is a set of pixels. Sorry to say it, that's how a monitor works these days. The very same set of pixels can be generated by sending a bitmap created in Photoshop or whatever else. Yes, if you need to re-size the image, SVG is going to do it right (presuming your image is vector-based).


  8. #8
    Join Date
    Dec 2012
    I think we're getting mixed up between image pixels and monitor pixels, sure the physical monitor displays it using pixels but the image itself isn't pixel based at all, and the browser doesn't treat it as such, which is why you can zoom in using the browsers zooming tool without being shown a horrible mess of pixels.

  9. #9
    Join Date
    Jan 2007
    "I think we're getting mixed up between image pixels and monitor pixels,"
    That's precisely my question, it doesn't matter how the image is calculated, the final output always end up on a monitor or a printer.In the case of a monitor, let's say the path of a Bézier curve, mathematically it might intersect a pixel, but physically the monitor has to display that one pixel no matter what, it simply can't display half of a pixel nor can it display a pixel half green or half red. But why does that curve look so smooth in svg while the same curve with a one pixel width looks awful in bitmap?

  10. #10
    Join Date
    Aug 2006
    Quote Originally Posted by MacPC View Post
    But why does that curve look so smooth in svg while the same curve with a one pixel width looks awful in bitmap?
    Until you show us an svg-rendered image and your equivalent bitmap rendered image, my answer is "because your mad photoshop skilz aren't good enough". You may not be anti-aliasing the lines, whereas svg is, for example.


  11. #11
    Join Date
    Dec 2012
    Yeah the quality of a bitmap image defines how "smooth" or unpixelated it looks, take this example, the curve on the left is drawn using canvas, a bitmap technology, while the curve on the right is SVG, without zooming in they both look identical.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.11077 seconds
  • Memory Usage 2,943KB
  • Queries Executed 13 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (11)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (11)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates