PhotoSauce icon indicating copy to clipboard operation
PhotoSauce copied to clipboard

Request more control over input/output pixel formats (BGRA32 / PBGRA32)

Open rickbrew opened this issue 3 years ago • 1 comments

I have two specific needs when using MagicScaler that, from our discussions on Discord, are not quite satisfied:

  • The ability to provide a BGRA32 input and get the output as PBGRA32
    • In this case, MagicScaler is doing its computations in premultiplied and then unpremultiplies at the end. And then I need to premultiply again. This would reduce CPU usage.
  • The ability to provide a PBGRA32 input and get the output as PBGRA32
    • As per our discussion, MagicScaler normalizes the output to BGRA32, which means I have to premultiply and use more CPU time.

rickbrew avatar Jul 20 '22 16:07 rickbrew

Like we discussed on Discord, it would also be really useful if [P]BGRA128F were supported end-to-end. Other pixel formats are optimization gravy. This would allow me to normalize on [P]BGRA128F -- especially for my own implementations of scalers or other kernels -- and to just use converters for other pixel formats when necessary.

rickbrew avatar Apr 03 '23 00:04 rickbrew