https://issues.apache.org/bugzilla/show_bug.cgi?id=46882
Summary: ArrayIndexOutOfBoundsException when applying a CMYK
color in PDFGraphics2D
Product: Fop
Version: 1.0dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: pdf
AssignedTo: [email protected]
ReportedBy: [email protected]
There are two bugs in PDFGraphics2D.applyColor.
Firstly, when applying a color with CMYK colorspace the number of components is
4, not 3.
See line 744:
float[] cComps = c.getColorComponents(new float[3]); //results in
ArrayIndexOutOfBoundsException
Secondly, Color.getColorComponents returns values in the range [0, 1] while
PDFColor expects them in the [0, 255] range.
I attached the patch and a sample program to reproduce the trouble.
Regards,
Yegor kozlov
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.