ASF Bugzilla – Attachment 23394 Details for
Bug 46882
[PATCH] ArrayIndexOutOfBoundsException when applying a CMYK color in PDFGraphics2D
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
the patch
cmyk_colorspace.patch (text/plain), 1.06 KB, created by
Yegor Kozlov
on 2009-03-20 01:45:18 UTC
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Yegor Kozlov
Created:
2009-03-20 01:45:18 UTC
Size:
1.06 KB
patch
obsolete
>Index: src/java/org/apache/fop/svg/PDFGraphics2D.java >=================================================================== >--- src/java/org/apache/fop/svg/PDFGraphics2D.java (revision 756371) >+++ src/java/org/apache/fop/svg/PDFGraphics2D.java (working copy) >@@ -741,11 +741,11 @@ > throw new PDFConformanceException( > "PDF/A-1 does not allow mixing DeviceRGB and DeviceCMYK."); > } >- float[] cComps = c.getColorComponents(new float[3]); >- double[] cmyk = new double[3]; >- for (int i = 0; i < 3; i++) { >+ float[] cComps = c.getColorComponents(new float[4]); >+ double[] cmyk = new double[cComps.length]; >+ for (int i = 0; i < cComps.length; i++) { > // convert the float elements to doubles for pdf >- cmyk[i] = cComps[i]; >+ cmyk[i] = 255*cComps[i]; > } > PDFColor currentColour = new PDFColor(cmyk[0], cmyk[1], cmyk[2], cmyk[3]); > currentStream.write(currentColour.getColorSpaceOut(fill));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46882
: 23394 |
23395