Draw images with CSS vs Images themselves -


i have built application reads pixels of image using java , creates css file drawing image on browser.

the fact css files larger images. suppose if image occupies 37kb, css occupies 7mb. thats unacceptably large.

but have heard somewhere browsers slower @ requesting images server css , find css easy parse.

are there still advantages of app? or waste of time?

please advice me.

my app works way website works , generates same kinda css:

http://image2css.alexdoesit.com/   

but have heard somewhere browsers slower @ requesting images server css , find css easy parse.

css preferable on images visual effects rounded corners, shadows, gradients, etc.

but if intend emulate "real" pictures (e.g. photographs) using css, that's bad idea. why?

  • space: consider simplest image format uncompressed 8-bit rgb bitmap. needs 3 bytes every pixel (plus fixed amount of bytes whole file). css need considerably more bytes every pixel.

  • time: simpler (from computational perspective) parse , display pixel data build huge html dom styled pseudo-elements.

  • features: real images can additionally processed/changed/enhanced via css, converting image greyscale, blurring, etc — see filters.


still, have accomplished nice programming exercise:

i have built application reads pixels of image using java , creates css file drawing image on browser.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -