Menu ▾ ▴

#101 New function: FreeImage_ConvertToRGBAF

None
closed
None
5
2015-03-15
2014-12-16
No

Hi Hervé,

This is a simple patch to implement a missing standard function, FreeImage_ConvertToRGBAF. The function is nearly identical to the existing function FreeImage_ConvertToRGBF. Source formats with an existing alpha channel have the alpha transformed to the range [0, 1], as expected. Source formats with no alpha are assigned an alpha of 1 on each pixel.

I needed an RGBAF transform function to work on some custom tone-mapping functions that also support alpha. I also think it makes sense for the library to have an RGBAF conversion function that covers the same format conversions as FreeImage's existing ConvertToRGBF function, so that RGBF and RGBAF have roughly identical coverage.

Besides the new file ConversionRGBAF.cpp, I have also included an updated ConversionType.cpp and FreeImage.h.

Thanks!

1 Attachments

Discussion

  • Hervé Drolon

    Hervé Drolon - 2015-02-19

    Hi Tanner,

    Thanks for the patch, the function FreeImage_ConvertToRGBAF is now in the CVS.
    I've also added a similar function for RGBA16, named FreeImage_ConvertToRGBA16.

    Hervé

     
  • Hervé Drolon

    Hervé Drolon - 2015-02-19
    • status: open --> pending
    • assigned_to: Hervé Drolon
    • Group: -->
     
  • Hervé Drolon

    Hervé Drolon - 2015-03-15

    fixed in release 3.17.0

     
  • Hervé Drolon

    Hervé Drolon - 2015-03-15
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel