/// <summary>Initializes the struct with default values.</summary> public static PixelVolume Default() { PixelVolume value = new PixelVolume(); value.left = 0; value.top = 0; value.right = 1; value.bottom = 1; value.front = 0; value.back = 1; return(value); }
private static extern PixelData Internal_Scale(PixelData source, ref PixelVolume newSize, ScaleFilter filter);
/// <summary> /// Scales pixel data in the source buffer and stores the scaled data in the destination buffer. /// </summary> /// <param name="source">Source pixels to scale.</param> /// <param name="newSize">New dimensions to scale to.</param> /// <param name="filter">Filter to use when scaling.</param> /// <returns>New pixel data object containing the scaled pixels.</returns> public static PixelData Scale(PixelData source, PixelVolume newSize, ScaleFilter filter = ScaleFilter.Linear) { return Internal_Scale(source, ref newSize, filter); }
/// <summary> /// Scales pixel data in the source buffer and stores the scaled data in the destination buffer. /// </summary> /// <param name="source">Source pixels to scale.</param> /// <param name="newSize">New dimensions to scale to.</param> /// <param name="filter">Filter to use when scaling.</param> /// <returns>New pixel data object containing the scaled pixels.</returns> public static PixelData Scale(PixelData source, PixelVolume newSize, ScaleFilter filter = ScaleFilter.Linear) { return(Internal_Scale(source, ref newSize, filter)); }
private static extern void Internal_GetExtents(IntPtr thisPtr, out PixelVolume value);
private static extern void Internal_CreateInstance(PixelData instance, ref PixelVolume volume, PixelFormat format);
/// <summary> /// Creates a new 3D pixel data buffer capable of storing the specified amount of pixels. /// </summary> /// <param name="width">Number of pixels in each row.</param> /// <param name="height">Number of pixels in each column.</param> /// <param name="depth">Number of 2D slices.</param> /// <param name="format">Format of individual pixels.</param> public PixelData(int width, int height, int depth, PixelFormat format = PixelFormat.R8G8B8A8) { PixelVolume volume = new PixelVolume(0, 0, 0, width, height, depth); Internal_CreateInstance(this, ref volume, format); }
/// <summary> /// Creates a new pixel data buffer capable of storing the specified amount of pixels. /// </summary> /// <param name="volume">Width, height and depth determining number of pixels to store.</param> /// <param name="format">Format of individual pixels.</param> public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.R8G8B8A8) { Internal_CreateInstance(this, ref volume, format); }
public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.BGRA8) { Internal_create(this, ref volume, format); }
private static extern void Internal_create(PixelData managedInstance, ref PixelVolume volume, PixelFormat format);
private static extern void Internal_getExtents(IntPtr thisPtr, out PixelVolume __output);