MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / crop

Method crop

ij/src/main/java/ij/process/ByteProcessor.java:145–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143 }
144
145 public ImageProcessor crop() {
146 ImageProcessor ip2 = createProcessor(roiWidth, roiHeight);
147 byte[] pixels2 = (byte[])ip2.getPixels();
148 for (int ys=roiY; ys<roiY+roiHeight; ys++) {
149 int offset1 = (ys-roiY)*roiWidth;
150 int offset2 = ys*width+roiX;
151 for (int xs=0; xs<roiWidth; xs++)
152 pixels2[offset1++] = pixels[offset2++];
153 }
154 return ip2;
155 }
156
157 /** Returns a duplicate of this image. */
158 public ImageProcessor duplicate() {

Callers 3

drawStringMethod · 0.95
stringToPixelsMethod · 0.95
resizeMethod · 0.95

Calls 2

createProcessorMethod · 0.95
getPixelsMethod · 0.95

Tested by

no test coverage detected