[plt-scheme] 204.4

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jun 4 11:57:51 EDT 2003

The exp-tagged code in CVS for Mzscheme and MrEd is now version 204.4.


 * PNG image files can be loaded and saved via bitmap%, making PNG the
   preferred format for working with raster images in PLT Scheme.

   If a PNG file contains a mask or alpha channel, then loading it as
   'png/mask (or 'unknown/mask) creates a mask bitmap that will be
   accessible from the loaded bitmap using `get-loaded-mask'. The mask
   bitmap is monochrome if the file contains a mask or an alpha channel
   with only extreme values; otherwise, the mask bitmap contains shades
   of gray reprsenting inverted alpha values. (See also the change to
   `draw-bitmap' below.)

   If the PNG file contains a mask or alpha channel and 'png or
   'unknown is used, then the mask or alpha channel is applied during
   loading, and no mask bitmap is generated. The `load-bitmap' method
   and bitmap% constructor accept an optional background color to use
   for this load-time alpha blending.

   When saving a bitmap% as 'png, if a mask bitmap is installed via
   `set-loaded-mask' (or if one was put there when loading a file), the
   mask bitmap is saved in the output file as the alpha channel.

   Loading a 1-bit grayscale PNG without a mask or alpha channel
   produces a monochrome bitmap% object. Similarly, saving a monochrome
   bitmap without a "mask" creates a 1-bit graysacle PNG. Thus, PNGs
   can be used for efficient storage of monochrome bitmaps.

   See the manual for further information, including information on
   gamma correction.

   The `configure' script looks for a pre-installed libpng and zlib to
   use when building MrEd. If it doesn't find them, then `make' will
   build the copy that is included with the MrEd source. Use
   --disable-libpng to avoid using a pre-installed libpng and zlib.

 * JPEG image files can be saved via bitmap%. (Loading has been
   supported for years.) The `save-file' method of bitmap% takes an
   optional quality argument, a number between 0 and 100.

   Just as for libpng, `configure' now looks for a pre-installed
   libjpeg for linking, and --disable-libjpeg disables this search.

 * The `draw-bitmap' method of dc<%> now accepts a non-monochrome mask
   bitmap. The new behavior generalizes the old mask behavior: a
   non-monochrome mask acts as an inverted alpha channel.

   Thus, a mask bitmap that corresponds to a PNG alpha channel can be
   used with `draw-bitmap' to achieve the intended alpha blending.

   In certain impoverished environments, a non-monchrome mask is
   treated like a monochrome mask (converting all non-white pixels to
   black): Windows 95 and NT without winimg32.dll, and X where the
   RENDER extension is not available at run time or when
   <X11/extensions/Xrender.h> is not available at build time.

 * image-snip% now uses a mask bitmap associated with its bitmap for
   drawing the image, and the mask bitmap is preserved when saving or
   copying the snip. (Saving applies only to a mask attached to the
   bitmap, and not to a separately supplied mask bitmap.)

   In graphical-format files, bitmaps are saved via embedded PNG
   instead of embedded XBM/XPM.

 * Mac OS Classic: a `file-size' result no longer includes the file's
   resource-fork size.

 * Added `custodian-managed-list', which returns the objects managed by
   a custodian, but only when given a super-custodian.

 * Changed `vector-set-performance-stats!' to accept an optional
   thread argument to obtain thread-specific stats.


Posted on the users mailing list.