Wouldn't you still be limited to two sizes of image in your
scenario?  We're not talking about a vector-graphic-type scaling, right?

It's a step in the right direction, however.

We need some kind of auto-scaling image format.  JPEG2000, perhaps?
I've never worked with them, but I believe they're supposed to include
"in the image" or somehow, size accommodations.

Just more food for thought...

Rick

> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris
> Sent: Friday, February 15, 2008 11:50 AM
> To: jQuery (English)
> Subject: [jQuery] Re: a small accessibility rant
> 
> 
> On Feb 14, 11:31 pm, "Rick Faircloth" <[EMAIL PROTECTED]>
> wrote:
> 
> > I've never thought of specifying image
> > size in em's.  The problem of image degradation would
> > still be an issue, I'm sure, since an image may be
> > specified for display in em's in a browser, but would still start
> > its life in pixels (if it's not a vector graphic), unlike text, which isn't 
> > an
> > enlargement of a static entity, but is created anew
> > in larger dimensions.
> 
> jQuery to the rescue!
> 
> if (parseInt($("body").css("fontSize")) > 20) { // font-size in pixels
> 
>   // replace img with higher res source
> 
> }
> 
> In Firefox at least, $.css("fontSize") increases when you hit ctrl-+.
> If you set the font in ems in a stylesheet, $.css("fontSize") returns
> pixels, and the returned value increases with each ctrl-+. If you set
> the font-size inline though ($.css({fontSize: "1.2em"}) ), then all
> subsequent calls to $.css("fontSize") return the inline value.
> 
> I haven't tried other browsers.
> 
> It's worth playing around with. A plugin would be really cool. Imagine
> this:
> 
> $("#myImage").setImage({low: "myLowResImage.png", high:
> "myHighResImage.png"}.
> 
> Maybe someone's done it already. I might if no one else wants to :)
> 
> Chris


Reply via email to