BMP files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Al

Is there anyone who know how BMP files are stored in Windows Xp and 2000 platform
Is it same to those stored in Windows 95 and Windows NT platforms
Does it provide support for transparency

I will be thankfull if anyone can answer
regard
(e-mail address removed)
 
Hi,


There are many way to achieve transparency. The most versatile
format is (ARGB), where the fourth color, A, is an transparency degree ( 0
= fully transparent, full = fully opaque; in fact, it is BLENDING, not
transparency, the result, close to what transparency can be, is equal to
A*Source + (1-A)*BitMap, in this formula, A is in the range of 0 and 1, and
Source and Bitmap are the three other color, R, G, and B, individually. The
result depends on what is already present in the source). I know very few
drawing program that save in ARGB and allow you to edit the picture too
(DirectX SDK has such a utility). Clearly, a 24 bits is unlikely to get some
bits reserved to A ( 8bits on R, G and B, leaving none for A) and your
format has to be on 32 bits ( or 16 bits), where each "color" will get its 8
bits.

The second possibility is to use key code color, such as some ugly
pink (rarely used naturally), a single color (or, as a possibility not often
developed, a range of color) would be considered totally transparent, as if
your bitmap was HAVING A HOLE through the pixels of that specific key code
color. Its is more a full or nothing thing, not really a transparency, but
often referred by unscrupulous marketing people as "transparency" noneless.

The OS you use may also help. As example, XP has some API ( I don't
remember out of my head which ones exactly ) for that, and GDI+, with
dot-Net, has encapsulated that functionality (without explicit use of API,
like any dot-Net stuff). And, finally, there is DirectX that can use, even
with the help of hardware, can even combine multiple such bitmaps (textures)
together, combined with mixed interpolations techniques, to get really
realistic effects. Unfortunately, Access is very unfriendly toward any
"heavy" painting. Among the best you can do, "in process", is to use some
help from Stephen's site (http://www.lebans.com/), may be he even has some
"transparency" help implemented... the site is so big, and I didn't checked
in full...



Hoping it may help,
Vanderghast, Access MVP
 
There is no support for Transparency in a standard WIndows BMP file. For
a tool to convert BMP's etc. to a format including transparency that
Access supports see:
http://www.lebans.com/transparent.htm
Transparent.zip is a database containing functions to allow for the
conversion of Bitmap, Gif, Jpeg, Enhanced Metafile and Metafile to an
Enhanced Metafile format supporting Transparent backgrounds.
Bug in A2K under Win98 or NT.

The issue is with Access and how it it is rendering the metafile. As
someone mentioned you can load the converted files that do not display
properly in Access, into other Office apps where they display fine.

If you look closely you will see that Access is grabbing the current
display memory as background for the Image control before it paints the
metafile. That's what you are seeing as background noise in the
converted Transparent images.
In the versions of Access and Win OS's where the Images display
normally, the current display memory of the Form is masked out as the
Metafile is rendered. This is how I am able to achieve transparency with
Access.
For some internal Access issue, A2K is not masking the background
properly on Win98 and NT. It works fine on Win2K.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top