>HI All
>i want to create a single database with the [8 bpp] option so that the m505
device is capable of
>displaying the color images. But i want the database to be able to render
images on the devices
>which have only [4bpp] capability. currently if i view a database created
with an [8bpp] option
>the Palm Vx displays just the tag with [img]. what i want to know is how
can i override this >behaviuor
>such that the 505 devices can use the database created with [8bpp] and the
Palm Vx can also use >this
>database to display the images in grayscale.

I don't know what your database is distributing, but with the color support
code in the CVS (which I don't think has been released yet?), there is a tag
to allow colorizing of b&w bitmaps for just this type of purpose.

So if have a *single color* logo that is usually blue (for example the
bluefish logo on your email), it will appear as B&W on black and white
settings, Blue on 8bpp+, and the appropriate grayscale shade on 2bpp and
4bpp settings/devices.

To access this behaviour, just include a color="" parameter as one of the
parameters inside the img tag, for example:
<img src="my_logo.gif" color="#0000FF"> or the text equivalent of the blue
shade:
<img src="my_logo.gif" color="blue">

This is for single color only however, not multicolored bitmaps or photos,
but fits well with handheld databases which should be as small as possible.
If/when a bgcolor parameter is supported, then can set both colors of a b&w
color image as desired.

For actually including separate images for depths and then picking the right
one for bitdepth (like some icon file formats do, or the plucker toolbar
does) is probably possible, with the parser writing in some function
argument at the start describing the image, and then jumping to the stream
where the highest currently displayable bitmap starts). Or I guess could
have a separate imagefamily functioncode and the image functioncode is left
as is.
Would want to keep any calls to this, renderable in other HTML viewers,
perhaps a syntax thus of putting the 1bpp as src parameter and rest as
increasing depth:
<img src="photo.gif" src2bpp="photo_2bpp.gif" src4bpp=""
src8bpp="photo_8bpp.gif">
or letting src be any depth:
<img src="photo.gif" src1bpp="photo_1bpp.gif" src2bpp="photo_2bpp.gif"
src4bpp="" src8bpp="photo_8bpp.gif">
Parser, upon finding a src1bpp paramter while parsing an img tag, would then
build a imagefamily entry with the specified standard b&w, 2bp,
no-entry-for-4bpp-grays (empty quotes after src4bpp tells viewer just want
to drop to use the 2bpp on 4bpp instead of including a separate image), and
a 8bpp color version.

It is unlikely that the viewer will ever start dithering color images down,
as it is designed to be a viewer of what was parsed, so would only be
choosing images from database data, no dithering.
The parser does drop down colors, so in addition to including specific names
of the files, a .ini entry (and/or command line switch) to be allowed to be
turned on in the parser, such as:
imagefamily=1,2,8
to generate 1,2, and 8 bpp versions for all images found during the pluck,
and include them as  output for the imagefamily part of the document data.
Also allow access to autogenerate of versions on an img by img basis with:
<img src="photo.gif" IMAGEFAMILY >

I could use this feature myself also as it would make
distribution/maintenance easier. Most of the image I am using are just b&w
so can be currently addressed, but some images would benefit from having
some extra colors to work with.

Best wishes,
Robert


Reply via email to