Menu ▾ ▴

#29 Background filling routines patch

closed
None
5
2012-10-31
2009-09-16
No

Hi Hervé,

here is a new version of the file Background.cpp, which now contains documentation for all of the functions. You may use these, to complete the FreeImage API documentation. However, please replace the whole file, since there are some (or even lots of) changes in the code.

One major change is a new macro, which creates greyscale palettes for 8-bit, 4-bit and even 1-bit images. The 1-bit greyscale palette, of course, is just pal[0] = black, pal[1] = white. Another macro, which is currently not used by the code, creates reverse ordered greyscale palettes. I provide these macros as a separate file, so you could easily put them in Utilities.h. Maybe you'll rely on these in other places of the library as well. They are neither faster nor slower than the many other "create greyscale palette" code fragments, however, this would be a nice code centralization... Otherwise, just paste them into file Background.cpp.

Finally, I suggest to make some of the parameters of the new background filling routines optional for C++ with a FI_DEFAULT option. Therefor, I've also included modified declarations for file FreeImage.h

Discussion

  • Carsten Klein

    Carsten Klein - 2009-09-16

    Background filling routines patch archive

     
  • Hervé Drolon

    Hervé Drolon - 2009-09-20

    Patch added to the CVS

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Anonymous
Anonymous

Add attachments
Cancel