|
void | Init (string data) |
|
void | SaveBitmapAs (string path, int width, int height) |
|
Size | GetRemovalSpace (int w, int h, int blockSize) |
| Returns the minimum width (if vertical seams are used) and minimum height (if horizontal seams are used) shrinkage needed to eliminate the marked removal areas. More...
|
|
|
int | BlockCount [get, set] |
|
int | Stride [get, set] |
|
int | Rows [get, set] |
|
byte[][] | Grid [get, set] |
|
Definition at line 8 of file CarveDataPlotter.cs.
Size ImageResizer.Plugins.SeamCarving.CarveDataPlotter.GetRemovalSpace |
( |
int |
w, |
|
|
int |
h, |
|
|
int |
blockSize |
|
) |
| |
|
inline |
Returns the minimum width (if vertical seams are used) and minimum height (if horizontal seams are used) shrinkage needed to eliminate the marked removal areas.
- Parameters
-
- Returns
Definition at line 66 of file CarveDataPlotter.cs.
68 int[] rows =
new int[Rows];
69 int[] cols =
new int[Stride];
73 for (
int y = 0; y < Rows; y++) {
74 for (
int x = 0; x < Stride; x++) {
75 if ((gr[y][x] == 2)) {
76 if (y < Rows - 1 && x < Stride - 1) {
80 rows[y] += blockSize + Math.Min(0, w - (x + 1) * blockSize);
81 cols[x] += blockSize + Math.Min(0, h - (y + 1) * blockSize);
90 foreach (
int i
in rows)
91 if (i > maxWidth) maxWidth = i;
93 foreach (
int i
in cols)
94 if (i > maxHeight) maxHeight = i;
96 return new Size(maxWidth, maxHeight);
The documentation for this class was generated from the following file: