mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 03:15:11 +00:00
Simple editor - editing convolution filter
This commit is contained in:
@@ -142,8 +142,8 @@ public class ConvolveOp implements BufferedImageOp, RasterOp {
|
||||
|
||||
float[] kvals = kernel.getKernelData(null);
|
||||
|
||||
for (int x = srcX - left; x < srcX + srcWidth + left + 1; x++) {
|
||||
for (int y = srcY - top; y < srcY + srcHeight + top + 1; y++) {
|
||||
for (int x = srcX - left; x < srcX + srcWidth + left; x++) {
|
||||
for (int y = srcY - top; y < srcY + srcHeight + top; y++) {
|
||||
float a;
|
||||
if (preserveAlpha) {
|
||||
boolean outSide = false;
|
||||
|
||||
@@ -669,7 +669,7 @@ public class Filtering {
|
||||
int srcHeight
|
||||
) {
|
||||
Kernel kernel = new Kernel(w, h, matrix);
|
||||
BufferedImage dst = new BufferedImage(src.getWidth() + 1, src.getHeight() + 1, src.getType());
|
||||
BufferedImage dst = new BufferedImage(src.getWidth(), src.getHeight(), src.getType());
|
||||
BufferedImageOp op = new ConvolveOp(
|
||||
kernel,
|
||||
new RenderingHints(null),
|
||||
|
||||
Reference in New Issue
Block a user