message: maybe... add some luma<f32> functions...?
diff: @@ -20,7 +20,7 @@ use crate::error::{ImageError, ImageResult, ParameterError, ParameterErrorKind};
  // FIXME: These imports exist because we don't support all of our own color types.
  use crate::error::{ImageFormatHint, UnsupportedError, UnsupportedErrorKind};
  use crate::flat::FlatSamples;
  -use crate::image;
  +use crate::{image, LumaA, Luma};
  use crate::image::{GenericImage, GenericImageView, ImageDecoder, ImageFormat, ImageOutputFormat};
  use crate::io::free_functions;
  use crate::imageops;
  @@ -197,6 +197,11 @@ impl DynamicImage {
  dynamic_map!(*self, |ref p| p.convert())
  }
  + /// Returns a copy of this image as a Luma image.
  + pub fn to_luma32f(&self) -> ImageBuffer<Luma<f32>, Vec<f32>> {
  + dynamic_map!(*self, |ref p| p.convert())
  + }
  +
  /// Returns a copy of this image as a LumaA image.
  pub fn to_luma_alpha8(&self) -> GrayAlphaImage {
  dynamic_map!(*self, |ref p| p.convert())
  @@ -207,6 +212,11 @@ impl DynamicImage {
  dynamic_map!(*self, |ref p| p.convert())
  }
  + /// Returns a copy of this image as a LumaA image.
  + pub fn to_luma_alpha32f(&self) -> ImageBuffer<LumaA<f32>, Vec<f32>> {
  + dynamic_map!(*self, |ref p| p.convert())
  + }
  +
  /// Consume the image and returns a RGB image.
  ///
  /// If the image was already the correct format, it is returned as is.
  @@ -861,6 +871,30 @@ impl From<Rgba16Image> for DynamicImage {
  }
  }
  +impl From<Rgb32FImage> for DynamicImage {
  + fn from(image: Rgb32FImage) -> Self {
  + DynamicImage::ImageRgb32F(image)
  + }
  +}
  +
  +impl From<Rgba32FImage> for DynamicImage {
  + fn from(image: Rgba32FImage) -> Self {
  + DynamicImage::ImageRgba32F(image)
  + }
  +}
  +
  +impl From<ImageBuffer<Luma<f32>, Vec<f32>>> for DynamicImage {
  + fn from(image: ImageBuffer<Luma<f32>, Vec<f32>>) -> Self {
  + DynamicImage::ImageRgb32F(image.convert())
  + }
  +}
  +
  +impl From<ImageBuffer<LumaA<f32>, Vec<f32>>> for DynamicImage {
  + fn from(image: ImageBuffer<LumaA<f32>, Vec<f32>>) -> Self {
  + DynamicImage::ImageRgba32F(image.convert())
  + }
  +}
  +
  #[allow(deprecated)]
  impl GenericImageView for DynamicImage {
  type Pixel = color::Rgba<u8>; // TODO use f32 as default for best precision and unbounded color?
  