Page MenuHome

Added rotate, transpose, blend and paste functions to ImBuf
Needs ReviewPublic

Authored by Colin Basnett (cmbasnett) on Nov 11 2019, 7:56 PM.



ImBuf improvements

  • Added rotate function that rotates an image about a given origin with an option to expand the canvas to fit the new image. You can also specify a fill color that plays nice with the various resampling methods.
  • Added transpose function to rotate in 90 degree increments, flip the image etc.
  • Added blend function to blend two images together using the different blend methods (eg. LINEAR_DODGE, MIX etc.)
  • Added paste function which pastes an image onto another at a given coordinate (convenience function, special case of blend call).
  • __deepcopy__ of an ImBuf now actually creates a deep copy of the original image (buffers etc.)
  • Added error-handling for the case where an ImBuf could be created with an invalid size (0*N)
  • Added simple mode handling when calling, allowing you to specify one of 3 color modes (L, RGB, and RGBA).
  • Fixed a number of compiler warnings about potential arithmetic overflows in rectop.c.
NOTE: All of these only work on the color buffers, not the z-buffers.

Diff Detail

rB Blender