lehmi commented on code in PR #147:
URL: https://github.com/apache/pdfbox/pull/147#discussion_r1009187853
##########
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java:
##########
@@ -542,18 +542,22 @@ public BufferedImage getStencilImage(Paint paint) throws
IOException
/**
* Returns an RGB buffered image containing the opaque image stream
without any masks applied.
* If this Image XObject is a mask then the buffered image will contain
the raw mask.
+ * @param region The region of the source image to get, or null if the
entire image is needed.
+ * The actual region will be clipped to the dimensions of
the source image.
+ * @param subsampling The amount of rows and columns to advance for every
output pixel, a value
+ * of 1 meaning every pixel will be read. It must not be larger than the
image width or height.
* @return the image without any masks applied
* @throws IOException if the image cannot be read
*/
- public BufferedImage getOpaqueImage() throws IOException
+ public BufferedImage getOpaqueImage(Rectangle region, int subsampling)
throws IOException
{
- return SampledImageReader.getRGBImage(this, null);
+ return SampledImageReader.getRGBImage(this, null, subsampling, null);
Review Comment:
The region isn't passed to getRGBImage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]