Brendan Tompkins

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Moblie Image Device-Specific Filtering

So, I'm working on this mobile site.  I've created a title image that looks great on a color phone. I went to show it to my boss, who has an older phone without color, and it looks like crap.  I knew that you could do device-specific filtering with MMIT, so I tried it out and it worked great and was easy...  I converted the image to a 1BPP GIF, and a WBMP (wireless bitmap format) using this online application here, and added the following code to my mobile web form:

<mobile:Image id=Image1 ImageUrl="images/mobiletitle.gif" AlternateText="VIT Mobile" runat="server">
<DEVICESPECIFIC>
  <CHOICE ImageUrl="images/mobiletitle.gif" Filter="supportsColor"></CHOICE>
  <CHOICE ImageUrl="images/mobiletitlebw.gif" Filter="prefersGIF"></CHOICE>
  <CHOICE ImageUrl="images/mobiletitle.wbmp" Filter="prefersWBMP"></CHOICE>
</DEVICESPECIFIC>
</mobile:Image>

Now, I can see the image on a variety of devices:

-Brendan


Posted Fri, Jan 30 2004 7:18 AM by Brendan Tompkins

[Advertisement]

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Devlicio.us