You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/12/30 14:58:28 UTC
[commons-imaging] branch master updated: Format tweak
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
The following commit(s) were added to refs/heads/master by this push:
new b069225d Format tweak
b069225d is described below
commit b069225dafe7fb515f56cf39d0c0fe4528464533
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Dec 28 22:51:40 2022 -0500
Format tweak
---
.../apache/commons/imaging/common/ImageBuilder.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java b/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
index 4ddaa628..97befe69 100644
--- a/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
+++ b/src/main/java/org/apache/commons/imaging/common/ImageBuilder.java
@@ -220,16 +220,16 @@ public class ImageBuilder {
* @throws RasterFormatException if the specified area is not contained
* within this ImageBuilder
*/
- public ImageBuilder getSubset(final int x, final int y, final int w, final int h) {
- checkBounds(x, y, w, h);
- final ImageBuilder b = new ImageBuilder(w, h, hasAlpha, isAlphaPremultiplied);
- for(int i=0; i<h; i++){
- final int srcDex = (i+y)*width+x;
- final int outDex = i*w;
- System.arraycopy(data, srcDex, b.data, outDex, w);
- }
- return b;
- }
+ public ImageBuilder getSubset(final int x, final int y, final int w, final int h) {
+ checkBounds(x, y, w, h);
+ final ImageBuilder b = new ImageBuilder(w, h, hasAlpha, isAlphaPremultiplied);
+ for (int i = 0; i < h; i++) {
+ final int srcDex = (i + y) * width + x;
+ final int outDex = i * w;
+ System.arraycopy(data, srcDex, b.data, outDex, w);
+ }
+ return b;
+ }
/**