| Issue 1: | ResampleOp.createSubSampling() ArrayIndexOutOfBoundsException | |
| 3 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Using the 0.7 release,
java.lang.ArrayIndexOutOfBoundsException: 8436
at
com.mortennobel.imagescaling.ResampleOp.createSubSampling(ResampleOp.java:240)
at com.mortennobel.imagescaling.ResampleOp.doFilter(ResampleOp.java:133)
at
com.mortennobel.imagescaling.AdvancedResizeOp.filter(AdvancedResizeOp.java:69)
The image I'm scaling is 1367x888. The code I'm using is roughly,
int WIDTH_THUMBNAIL = 57;
DimensionConstrain dimThumb
= DimensionConstrain.createMaxDimension(WIDTH_THUMBNAIL,
(int)(WIDTH_THUMBNAIL/1.5));
BufferedImage image = ImageIO.read(data);
ResampleOp resampleOp = new ResampleOp(dimThumb);
resampleOp.setFilter(ResampleFilters.getLanczos3Filter());
BufferedImage rescaled = resampleOp.filter(image, null);
|
||||||||||
,
Mar 15, 2009
I'd also note that the code worked fine until I adjusted WIDTH_THUMBNAIL to the value given. |
|||||||||||
,
Apr 27, 2009
The following code:
BufferedImage inputImage = ImageIO.read(new FileInputStream("test.jpg"));
new ResampleOp(51, 51).filter(inputImage, null);
Fails every time with exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3774
at com.mortennobel.imagescaling.ResampleOp.createSubSampling(ResampleOp.java:240)
at com.mortennobel.imagescaling.ResampleOp.doFilter(ResampleOp.java:133)
at com.mortennobel.imagescaling.AdvancedResizeOp.filter(AdvancedResizeOp.java:81)
When scaling image: http://www.koskue.net/test.jpg
When width is something else than 51 everything works just fine.
|
|||||||||||
,
Jun 07, 2009
Thanks for the feedback - and sorry for not responding before now (I didn't configure the google code to notify me on new issues). I have reproduced the bug and will hopefully soon have a patched version ready.
Status: Started
Owner: mor...@nobel-joergensen.com |
|||||||||||
,
Jun 09, 2009
Fixed in version 0.7.2
Status: Verified
|
|||||||||||
|
|
|||||||||||