0

Please help me.Any help would be worth. Right now I am getting strange exception


ERROR - Numbers of source Raster bands and source color space components do not match
java.lang.IllegalArgumentException: Numbers of source Raster bands and source color      space components do not match
at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:460)
at   com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1169)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1137)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:948)
at javax.imageio.ImageIO.read(ImageIO.java:1422)
at javax.imageio.ImageIO.read(ImageIO.java:1282)

Below is the code i used.Urgent help is required.

java.awt.image.BufferedImage image1   =  javax.imageio.ImageIO.read(new File(root_url+"/Documents/SSOImage/"+linkInfo.get(FieldNames.IMAGE)));

enter image description here

Vinay Prajapati
  • 7,199
  • 9
  • 45
  • 86

2 Answers2

1

there was issue with the image quality. It was due to some pixels scattered around. Also,can't attach image as it is confidential.

Vinay Prajapati
  • 7,199
  • 9
  • 45
  • 86
0

i hit this issue before when i convert pdf to tif, cause by the picture in the pdf. the picture's color space is CMYK. refer to https://issues.apache.org/jira/browse/PDFBOX-3637?filter=-2

Lux
  • 124
  • 1
  • 9