From: Arnold P. <ap...@ma...> - 2005-08-30 16:40:11
|
At 11:18 PM 8/29/2005, Sam Hathaway wrote: I just uploaded the following change to Constants.pm ################################################################################ # WeBWorK::PG::ImageGenerator ################################################################################ # Arguments to pass to dvipng. This is dependant on the version of dvipng. # # For dvipng versions 0.x # $WeBWorK::PG::ImageGenerator::DvipngArgs = "-x4000.5 -bgTransparent -Q6 -mode toshiba -D180"; # For dvipng versions 1.0 to 1.5 # $WeBWorK::PG::ImageGenerator::DvipngArgs = "-bgTransparent -D120 -q -depth"; # # For dvipng versions 1.6 (and probably above) # $WeBWorK::PG::ImageGenerator::DvipngArgs = "-bgtransparent -D120 -q -depth"; # Note: In 1.6 and later, bgTransparent gives alpha-channel transparency while # bgtransparent gives single-bit transparency. If you use alpha-channel transparency, # the images will not be viewable with MSIE. bgtransparent works for versions lower # than 1.6, but does not give transparent backgrounds. # $WeBWorK::PG::ImageGenerator::DvipngArgs = "-bgtransparent -D120 -q -depth"; I think this is a reasonable compromise. Note that at least for dvipng 1.5 there is a difference between -bgTransparent and -bgtransparent but at least both do work. When I looked for documentation all I found was "-bg s" where "s" is TeX-style colors but I never found a list of TeX-style colors. Arnie >On Aug 29, 2005, at 20:02, Davide P.Cervone wrote: > >>>>If you change -bgTransparent to -bgtransparent (i.e., remove the >>>>capitalization) >>> >>>Is this a bug in Constants.pm? >> >>No, it's a bug in MSIE. :-) >> >>In dvipng prior to version 1.6, both forms meant the same thing. >>In 1.6 and later, the first gets you alpha-channel transparency >>while the second gets your single-bit transparency. While every >>other modern browser handles alpha-channel transparency, MSIE only >>does this if you include a horrible proprietary call to a special >>image filter that references the alpha image and link the source >>image to a blank image file (if I remember correctly). I would >>love to switch to alpha-channel transparency so that the background >>colors work better, but as long as we are saddled with the >>lumbering and decrepit beast known as MSIE, we have to dump down to >>its (in-)capabilities. Not that I'm upset by this. >:-p >> >>The upshot is, though, that Constants.pm probably should have the >>lower-case transparency to avoid the alpha-channel problem. > >Right, that's what I meant. -bgTransparent is not a valid switch to >dvipng, so Constants.pm is wrong. > -sam > > > Prof. Arnold K. Pizer Dept. of Mathematics University of Rochester Rochester, NY 14627 (585) 275-7767 |