Thursday, January 25, 2007

Sampling theory, pt 1: WPFE in pictures

I got a few questions and comments about my comment that WPFE "botched" the sampling rules for bitmaps/images. I tried to explain in the comments, but its clear I wasn't clear.

So, I'll post a clearer text/mathematical explanation shortly but here's the issue, by visual example.

First a simple "linework" image:


Next, the same image if I apply a 400% scale to the canvas, as rendered by WPFE (I cropped the result to the upper left corner):


And now, the same image, with a 400% scale as produced by my (new) rasterizer - this is also the same image that Flash 8+ and OpenGL will produce:


See the problem?

I'll explain why this isn't a black and white issue, but why I think MS landed on the wrong side of it shortly, in a follow-up. The problem is covered well in the seminal computer graphics memo from Alvy Ray Smith, "A Pixel is NOT a little square..."

Alvy Ray, of course (being Alvy Ray), is not wrong in his final conclusion, but that doesn't make his point right for all applications either, and therein lies the rub... most UI designers, I'll posit, think of images as exactly little bags of rectangles...

Labels: ,

87 Comments:

Blogger metamerist said...

No! Not the Alvy Ray "A Pixel is NOT a little square..." memo!

Grrr. I have a bone or two to pick with that one. >:-)

Blinn did a better job in "What is a Pixel?" :-)

January 25, 2007 7:13 PM  
Blogger Sree Kotay said...

lol - yep, and they both made passes through MS, but "pixel is NOT a little square" is catchier, I guess... :)

January 25, 2007 7:46 PM  
Blogger metamerist said...

My chief complaint with the "A Pixel..." memo is that it seems to religiously insist that the idea of a pixel is more real than the real thing--at least from my perspective.

On one hand, we have the real thing (CCD pixels, Bayer patterns, Foveon sensors, microlens arrays, ink jets, whatever, etc.). On the other hand, we have ideas (the mathematical tools and models we use in processing digital images and computer graphics).

As I see it, DSP is merely a mathematical tool we use for dealing with the real thing(s), an intermediate step for conversion between ideas and realities.

In the case of digital photography, we have a whole chain of reality with which to cope: CCD -> digital image -> { CRT | LCD | printer | other }. In a sense, the input to output chain amounts to reality -> idea -> reality.

In 2D or 3D rendering, on the other hand, it's more a matter of beginning with the idea and taking it to reality: idea -> reality, a case in which our models are rendered on the real thing { CRT | LCD | printer | other }. The memo seems to thumb its nose at this possibility.

It also seems to me that the memo implies digital signal processing is the only valid perspective / tool one can use in processing images, but I don't believe that's true. In fact, I think doggedly adhering to such a belief can actually set one back, because it can blind one to physical realities that might be leveraged in creating a superior solution.

I'd argue that something like ClearType happens when you pay more attention to the real thing (i.e., the properties of a real LCD display) rather than strictly adhering to signal processing theory alone. In order to get ClearType to work, you need to know the physical reality of the LCD subpixel layout.

Likewise, if you're trying to create the ultimate algorithm to demosaic an image, it will make sense to leverage as many physical properties of the sensor as you possibly can.

February 01, 2007 10:09 AM  
Blogger Kilroy Trout said...

Sree repeat after me:

Microsoft is a marketing company
Microsoft is a marketing company

This should help you understand their failure in WPF rendering, music players, etc.

February 02, 2007 2:09 PM  
Blogger Sree Kotay said...

That's a little harsh Kilroy.

(Note I didn't say it was wrong :P...)

But seriously, its as much there seem to be all these overlapping/competing efforts, such that MS gets to expererience the pain of big company-ness, but little of the benefit (alignment of resources, scale, etc.)

They got smart folks there...

February 06, 2007 9:28 AM  
Anonymous Anonymous said...

The WPFE behavior you are seeing is a bug in the current CTP and will be addressed in the next WPFE CTP.

February 12, 2007 8:45 PM  
Blogger Sree Kotay said...

cool - I'd agree its a bug, but given its the same thing you see in GDI Plus I wasn't sure...

February 14, 2007 1:07 AM  
Anonymous <a href="http://medonlineshops.com/product_xenical.htm">Xenical</a> said...

Good design!

July 30, 2007 2:26 AM  
Anonymous <a href="http://phentermine1.eamped.com">Phentermine</a> said...

Thanks for interesting article.

August 17, 2007 2:31 PM  
Anonymous <a href="http://drugscenterhere.com">ShopMan</a> said...

I like articles like this. Thanks!

August 26, 2007 2:21 AM  
Anonymous <a href="http://m1.aol.com/phentermine4">Phentermine</a> said...

Great Article! Thank You!

August 28, 2007 8:52 PM  
Anonymous <a href="http://m1.aol.com/phentermine4">Buy Phentermine</a> said...

Thanks to author! I like articles like this, very interesting.

August 29, 2007 8:19 AM  
Anonymous <a href="http://courses.cvcc.vccs.edu/ENG112_GROSS/_Chat_Room/000008fd.htm">Anonimous</a> said...

Well done. Keep up the great work. Best regards!

September 09, 2007 12:51 PM  
Anonymous <a href="http://buy4soma.eamped.com">Anonimous</a> said...

I like it a lot! Nice site, I will bookmark!

September 10, 2007 3:32 PM  
Anonymous <a href="http://m2.aol.com/rth5gr/index.html">Anonymous</a> said...

Thanks to author! I like articles like this, very interesting.

September 11, 2007 2:48 PM  
Anonymous <a href="http://xanax.zzl.org">Xanax</a> said...

8EJvkp Very good blog! Thanks!

November 02, 2007 12:01 PM  
Anonymous <a href="http://users2.titanichost.com/buyviagra/487.html">usbank loans online approval</a> said...

WH0ywB Hello all!

November 02, 2007 1:47 PM  
Anonymous <a href="http://free.7host07.com/nmcfgy/163.html">allimax farm carriage tours</a> said...

Good job!

November 02, 2007 2:36 PM  
Anonymous <a href="http://fioricet.clanteam.com/?pharma=528">online pharmacy fioricet s</a> said...

Thanks to author.

November 02, 2007 3:20 PM  
Anonymous <a href="http://celebrex.zxq.net/?pharma=1216">celebrex sjs</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 02, 2007 4:26 PM  
Anonymous <a href="http://m1.aol.com/BrettHead14/214.html">golden rule insurance homepage</a> said...

Please write anything else!

November 02, 2007 5:29 PM  
Anonymous <a href="http://users2.titanichost.com/buyviagra/index9.html">phentermine home</a> said...

Hello all!

November 03, 2007 7:00 AM  
Anonymous <a href="http://tramadol.newsit.es/tramadol-120.html">tramadol 120</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 03, 2007 11:39 AM  
Anonymous <a href="http://vicodin.newsit.es/online-perscriptions-vicodin.html">online perscriptions vicodin</a> said...

Magnific!

November 03, 2007 12:41 PM  
Anonymous <a href="http://vicodin.newsit.es/interaction-vicodin-albuterol.html">interaction vicodin albuterol&lt;</a> said...

Hello all!

November 03, 2007 1:38 PM  
Anonymous <a href="http://phentermine.whdot.com/index9.html">canadian pharmacy online phentermine online pharmac</a> said...

Wonderful blog.

November 03, 2007 2:24 PM  
Anonymous <a href="users2.titanichost.com/amalopra">JohnBraun</a> said...

RyLnfZ write more, thanks.

November 04, 2007 4:44 PM  
Anonymous <a href="http://users2.titanichost.com/popebatret/index5.html">connecticut phone sex</a> said...

Nice Article.

November 04, 2007 11:07 PM  
Anonymous <a href="http://users2.titanichost.com/inoryum/index25.html">dominant top sex</a> said...

Magnific!

November 04, 2007 11:40 PM  
Anonymous <a href="http://users2.titanichost.com/hviler/index17.html">anime sex inuyasha</a> said...

Nice Article.

November 05, 2007 1:30 AM  
Anonymous <a href="http://users2.titanichost.com/ansfur/index17.html">lesbian minorities sex</a> said...

Thanks to author.

November 05, 2007 2:07 AM  
Anonymous <a href="http://users2.titanichost.com/olds77/index33.html">hot blonde anal</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 05, 2007 2:37 AM  
Anonymous <a href="http://users2.titanichost.com/shingro/index24.html">sex and clogs</a> said...

Good job!

November 05, 2007 3:05 AM  
Anonymous <a href="http://users2.titanichost.com/scersi/index22.html">emma pierson sex</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 05, 2007 3:39 AM  
Anonymous <a href="http://users2.titanichost.com/t1fielde/index9.html">pam naked sex</a> said...

Nice Article.

November 05, 2007 4:08 AM  
Anonymous <a href="http://users2.titanichost.com/adjutes/index10.html">beach sex pic</a> said...

Hello all!

November 05, 2007 4:50 AM  
Anonymous <a href="http://users2.titanichost.com/adjutes/index9.html">beast sex cartoons</a> said...

Wonderful blog.

November 05, 2007 5:33 AM  
Anonymous <a href="http://users2.titanichost.com/shiconta/index3.html">couples kit sex</a> said...

Hello all!

November 05, 2007 6:07 AM  
Anonymous <a href="http://users2.titanichost.com/gnites3/index33.html">hot asian sex</a> said...

Magnific!

November 05, 2007 6:37 AM  
Anonymous <a href="http://users2.titanichost.com/marymeno/index10.html">punch sex scene</a> said...

When there's a will, I want to be in it.

November 05, 2007 7:10 AM  
Anonymous <a href="http://users2.titanichost.com/vadhoms/index25.html">marianne faithfull sex</a> said...

What is a free gift ? Aren't all gifts free?

November 05, 2007 7:48 AM  
Anonymous <a href="http://users2.titanichost.com/etooking/index25.html">night sex video</a> said...

I'm not a complete idiot, some parts are missing!

November 05, 2007 8:24 AM  
Anonymous <a href="http://users2.titanichost.com/swiseny/index10.html">dog hentai sex</a> said...

Lottery: A tax on people who are bad at math.

November 05, 2007 8:51 AM  
Anonymous <a href="http://users2.titanichost.com/Lostsoldier3/index34.html">free mobile porn downloads</a> said...

Friends help you move. Real friends help you move bodies

November 05, 2007 9:19 AM  
Anonymous <a href="http://users2.titanichost.com/pyzoid/index5.html">brazil free sex</a> said...

Oops. My brain just hit a bad sector.

November 05, 2007 9:55 AM  
Anonymous <a href="http://users2.titanichost.com/pyzoid/index21.html">bonded forced sex</a> said...

I'm not a complete idiot, some parts are missing!

November 05, 2007 10:27 AM  
Anonymous <a href="http://users2.titanichost.com/selli83/index32.html">african zoo sex</a> said...

What is a free gift ? Aren't all gifts free?

November 05, 2007 10:59 AM  
Anonymous <a href="http://users2.titanichost.com/numdaso/index7.html">japan sex lady</a> said...

All generalizations are false, including this one.

November 05, 2007 11:31 AM  
Anonymous <a href="http://users2.TitanicHost.com/senatra/hydrocodone-addictions.html">hydrocodone addictions</a> said...

Lottery: A tax on people who are bad at math.

November 05, 2007 12:01 PM  
Anonymous <a href="http://cialis.whdot.com/index10.html">cialis actress</a> said...

Lottery: A tax on people who are bad at math.

November 05, 2007 12:34 PM  
Anonymous <a href="http://web.archive.org/web/20070818071737/freewebtown.com/loans1/loans-bad-credit.html">loans</a> said...

Thanks to author.

November 05, 2007 1:10 PM  
Anonymous <a href="http://users2.titanichost.com/numdaso/index5.html">jake loves sex</a> said...

640K ought to be enough for anybody. - Bill Gates 81

November 05, 2007 1:55 PM  
Anonymous <a href="http://users2.titanichost.com/febisko/index35.html">bhopal india sex</a> said...

640K ought to be enough for anybody. - Bill Gates 81

November 05, 2007 2:35 PM  
Anonymous <a href="http://users2.titanichost.com/topletrufus/index17.html">girlfriends mom sex</a> said...

All generalizations are false, including this one.

November 05, 2007 3:05 PM  
Anonymous <a href="http://users2.titanichost.com/yetzeit/index31.html">asian ameture sex</a> said...

What is a free gift ? Aren't all gifts free?

November 05, 2007 3:42 PM  
Anonymous <a href="http://users2.titanichost.com/brittanyrogers/41-0411.html">all ebony sex</a> said...

Save the whales, collect the whole set

November 05, 2007 4:13 PM  
Anonymous <a href="http://users2.titanichost.com/glicia80/index35.html">sex bomb promotios</a> said...

Friends help you move. Real friends help you move bodies

November 05, 2007 4:37 PM  
Anonymous <a href="http://users2.titanichost.com/reekello/index20.html">debra lafave sex</a> said...

A flashlight is a case for holding dead batteries.

November 05, 2007 5:04 PM  
Anonymous <a href="http://users2.titanichost.com/tortene/index3.html">obese sex videos</a> said...

I'm not a complete idiot, some parts are missing!

November 05, 2007 5:36 PM  
Anonymous <a href="http://users2.TitanicHost.com/kiderg/cocaine-furniture-made-entirely.html">cocaine furnitur</a> said...

Oops. My brain just hit a bad sector.

November 05, 2007 6:03 PM  
Anonymous name said...

Magnific!

November 05, 2007 6:44 PM  
Anonymous <a href="http://users2.titanichost.com/cuhozhilov/index7.html">forced sex free porn clips</a> said...

Beam me aboard, Scotty..... Sure. Will a 2x10 do?

November 05, 2007 7:12 PM  
Anonymous <a href="http://users2.titanichost.com/robertf/index8.html">rabbit porn</a> said...

Lottery: A tax on people who are bad at math.

November 05, 2007 7:53 PM  
Anonymous <a href="http://users2.titanichost.com/maxeevich/index16.html">anna nicole porn vids</a> said...

What is a free gift ? Aren't all gifts free?

November 05, 2007 8:23 PM  
Anonymous <a href="http://users2.titanichost.com/dityroe/index27.html">lesbian sex site</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 05, 2007 8:54 PM  
Anonymous <a href="http://users2.titanichost.com/liperwo/index20.html">awesome sex videos</a> said...

Wonderful blog.

November 05, 2007 9:26 PM  
Anonymous <a href="http://users2.titanichost.com/dasistorama/index10.html">gallery hardcore porn free video</a> said...

Energizer Bunny Arrested! Charged with battery.

November 05, 2007 10:01 PM  
Anonymous <a href="http://users2.titanichost.com/rego07/index3.html">clear computer from porn for free</a> said...

I don't suffer from insanity. I enjoy every minute of it.

November 05, 2007 10:48 PM  
Anonymous <a href="http://users2.titanichost.com/artinko/index7.html">high quality teen porn panties</a> said...

Good job!

November 05, 2007 11:24 PM  
Anonymous <a href="http://users2.titanichost.com/lindafmosley/index31.html">christine young free anal pictures</a> said...

If ignorance is bliss, you must be orgasmic.

November 05, 2007 11:58 PM  
Anonymous <a href="http://users2.titanichost.com/tereritoa1/39-0411.html">free teachers sex</a> said...

Build a watch in 179 easy steps - by C. Forsberg.

November 06, 2007 12:41 AM  
Anonymous <a href="http://users2.titanichost.com/eynol/index20.html">porn scan</a> said...

What is a free gift ? Aren't all gifts free?

November 06, 2007 1:11 AM  
Anonymous <a href="http://users2.titanichost.com/dentouj/index10.html">hentai young sex</a> said...

Build a watch in 179 easy steps - by C. Forsberg.

November 06, 2007 1:47 AM  
Anonymous <a href="http://users2.TitanicHost.com/turtra/ic-naproxen.html">ic naproxen</a> said...

I'm not a complete idiot, some parts are missing!

November 06, 2007 2:28 AM  
Anonymous <a href="http://users2.titanichost.com/bybonte/index30.html">cheerleader college sex</a> said...

What is a free gift ? Aren't all gifts free?

November 06, 2007 3:10 AM  
Anonymous <a href="http://users2.titanichost.com/unareq/index11.html">pokemon jesse sex</a> said...

Save the whales, collect the whole set

November 06, 2007 4:02 AM  
Anonymous <a href="http://users2.titanichost.com/mezers/index1.html">califonia sex offenders</a> said...

Lottery: A tax on people who are bad at math.

November 06, 2007 4:44 AM  
Anonymous <a href="http://users2.titanichost.com/deswef/index28.html">celeb sex pictures</a> said...

Ever notice how fast Windows runs? Neither did I.

November 06, 2007 5:24 AM  
Anonymous <a href="http://users2.titanichost.com/tedethe/index1.html">free goat sex</a> said...

Magnific!

November 06, 2007 6:07 AM  
Anonymous <a href="http://users2.titanichost.com/simpleplayer/index28.html">hot juicy porn</a> said...

All generalizations are false, including this one.

November 06, 2007 7:04 AM  
Anonymous <a href="http://users2.titanichost.com/sobermi/index11.html">india sex videos</a> said...

C++ should have been called B

November 06, 2007 7:54 AM  
Anonymous <a href="http://users2.titanichost.com/clydej/index9.html">xxx porn no credit card required</a> said...

Hello all!

November 06, 2007 8:41 AM  
Anonymous <a href="http://users2.titanichost.com/xcalomi/index34.html">keeley sex tapes</a> said...

Friends help you move. Real friends help you move bodies.

November 06, 2007 9:18 AM  
Anonymous <a href="http://users2.titanichost.com/ramisew/index14.html">pregant women sex</a> said...

If ignorance is bliss, you must be orgasmic.

November 06, 2007 9:58 AM  
Anonymous <a href="http://users2.titanichost.com/hegory/index12.html">austrian porn sites</a> said...

Friends help you move. Real friends help you move bodies.

November 06, 2007 10:37 AM  
Anonymous <a href="http://users2.titanichost.com/sidspros/index22.html">krissy love sex</a> said...

Build a watch in 179 easy steps - by C. Forsberg.

November 06, 2007 11:08 AM  
Anonymous Anonymous said...

runescape money runescape gold runescape money runescape gold wow power leveling wow powerleveling Warcraft Power Leveling Warcraft PowerLeveling buy runescape gold buy runescape money runescape items runescape gold runescape money runescape accounts runescape gp dofus kamas buy dofus kamas Guild Wars Gold buy Guild Wars Gold runescape accounts buy runescape accounts runescape lotro gold buy lotro gold lotro gold buy lotro gold lotro gold buy lotro gold lotro gold buy lotro gold runescape money runescape power leveling runescape money runescape gold dofus kamas cheap runescape money cheap runescape gold Hellgate Palladium Hellgate London Palladium Hellgate money Tabula Rasa gold tabula rasa money 压力开关 压力传感器 流量开关 流量计 液位计 液位开关 温湿度记录仪 风速仪 差压开关 可燃气体检测仪 过滤器 强磁水处理器 自清洗过滤器 自动反冲洗过滤器 保鲜棕榈树 棕榈树

November 16, 2007 12:57 AM  

Post a Comment

Links to this post:

Create a Link

<< Home