[jira] [Created] (PDFBOX-1970) Shadings are flipped or rotated
Tilman Hausherr created PDFBOX-1970: --- Summary: Shadings are flipped or rotated Key: PDFBOX-1970 URL: https://issues.apache.org/jira/browse/PDFBOX-1970 Project: PDFBox Issue Type: Bug Affects Versions: 1.8.4 Reporter: Tilman Hausherr Some of my shading test images are flipped or rotated when done with the 1.8 branch, not with the 2.0 branch. I have observed this with shadingtype 1, 4 and 5. The shadingContext is created with an AffineTransform (the CTM is identical and its just a translation) of [1.0, 0.0, 399.0] [0.0, 1.0, 49.0] for the 1.8 branch (bad) and with [1.0, 0.0, 399.0] [0.0, -1.0, 149.0] for the 2.0 branch (good). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (PDFBOX-1970) Shadings are flipped or rotated
[ https://issues.apache.org/jira/browse/PDFBOX-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tilman Hausherr updated PDFBOX-1970: Description: Some of my shading test images are flipped or rotated when done with the 1.8 branch, not with the trunk. I have observed this with shadingtype 1, 4 and 5. The shadingContext is created with an AffineTransform (the CTM is identical and its just a translation) of [1.0, 0.0, 399.0] [0.0, 1.0, 49.0] for the 1.8 branch (bad) and with [1.0, 0.0, 399.0] [0.0, -1.0, 149.0] for the trunk (good). was: Some of my shading test images are flipped or rotated when done with the 1.8 branch, not with the 2.0 branch. I have observed this with shadingtype 1, 4 and 5. The shadingContext is created with an AffineTransform (the CTM is identical and its just a translation) of [1.0, 0.0, 399.0] [0.0, 1.0, 49.0] for the 1.8 branch (bad) and with [1.0, 0.0, 399.0] [0.0, -1.0, 149.0] for the 2.0 branch (good). Shadings are flipped or rotated --- Key: PDFBOX-1970 URL: https://issues.apache.org/jira/browse/PDFBOX-1970 Project: PDFBox Issue Type: Bug Affects Versions: 1.8.4 Reporter: Tilman Hausherr Labels: shading, shadingpattern Some of my shading test images are flipped or rotated when done with the 1.8 branch, not with the trunk. I have observed this with shadingtype 1, 4 and 5. The shadingContext is created with an AffineTransform (the CTM is identical and its just a translation) of [1.0, 0.0, 399.0] [0.0, 1.0, 49.0] for the 1.8 branch (bad) and with [1.0, 0.0, 399.0] [0.0, -1.0, 149.0] for the trunk (good). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (PDFBOX-1970) 1.8 shadings are flipped or rotated
[ https://issues.apache.org/jira/browse/PDFBOX-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tilman Hausherr updated PDFBOX-1970: Summary: 1.8 shadings are flipped or rotated (was: Shadings are flipped or rotated) 1.8 shadings are flipped or rotated --- Key: PDFBOX-1970 URL: https://issues.apache.org/jira/browse/PDFBOX-1970 Project: PDFBox Issue Type: Bug Affects Versions: 1.8.4 Reporter: Tilman Hausherr Labels: shading, shadingpattern Attachments: _asy-gouraud.pdf-1.png, asy-gouraud.pdf Some of my shading test images are flipped or rotated when done with the 1.8 branch, not with the trunk. I have observed this with shadingtype 1, 4 and 5. The shadingContext is created with an AffineTransform (the CTM is identical and its just a translation) of [1.0, 0.0, 399.0] [0.0, 1.0, 49.0] for the 1.8 branch (bad) and with [1.0, 0.0, 399.0] [0.0, -1.0, 149.0] for the trunk (good). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (PDFBOX-1970) Shadings are flipped or rotated
[ https://issues.apache.org/jira/browse/PDFBOX-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tilman Hausherr updated PDFBOX-1970: Attachment: asy-gouraud.pdf _asy-gouraud.pdf-1.png This one is also incomplete due to the flip, others (not here) are sometimes complete, but sometimes apparently rotated or flipped. Shadings are flipped or rotated --- Key: PDFBOX-1970 URL: https://issues.apache.org/jira/browse/PDFBOX-1970 Project: PDFBox Issue Type: Bug Affects Versions: 1.8.4 Reporter: Tilman Hausherr Labels: shading, shadingpattern Attachments: _asy-gouraud.pdf-1.png, asy-gouraud.pdf Some of my shading test images are flipped or rotated when done with the 1.8 branch, not with the trunk. I have observed this with shadingtype 1, 4 and 5. The shadingContext is created with an AffineTransform (the CTM is identical and its just a translation) of [1.0, 0.0, 399.0] [0.0, 1.0, 49.0] for the 1.8 branch (bad) and with [1.0, 0.0, 399.0] [0.0, -1.0, 149.0] for the trunk (good). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (PDFBOX-1966) Type 1, 4 and 5 shadings for shFill()
[ https://issues.apache.org/jira/browse/PDFBOX-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13924752#comment-13924752 ] Tilman Hausherr edited comment on PDFBOX-1966 at 3/8/14 1:26 PM: - I also thought about creating a pattern dictionary and filling it, but at the end it looked like too much code to create just to get rid of the double code. What we need is some single method somewhere that takes a pattern, a matrix and a page height as an input and returns the appropriate paint. Maybe in a ShadingPaintFactory? I'm also for thinking about how to get rid of that switch. In a perfect world, a derived class would do the right thing just because it is derived. was (Author: tilman): I also thought about creating a pattern dictionary and filling it, but at the end it looked like too much code to create just to get rid of the double code. What we need is some single method somewhere that takes a pattern, a matrix and a page height as an input and returns the appropriate paint. Maybe in a ShadingPaintFactory? Type 1, 4 and 5 shadings for shFill() - Key: PDFBOX-1966 URL: https://issues.apache.org/jira/browse/PDFBOX-1966 Project: PDFBox Issue Type: Bug Components: Rendering Affects Versions: 1.8.4, 2.0.0 Reporter: Tilman Hausherr Assignee: Tilman Hausherr Priority: Minor Labels: shading, shadingpattern Fix For: 1.8.5, 2.0.0 Attachments: asy-functionshading.pdf, asy-functionshading.pdf-1.tif, hsv-shading.pdf, hsv-shading.pdf-1.png Original Estimate: 5m Remaining Estimate: 5m I found two images that didn't render properly. The reason is that the appropriate code was missing in shFill() (the code is there for axial and radial shading). I will fix this. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Resolved] (PDFBOX-1969) JPEGFactory bug
[ https://issues.apache.org/jira/browse/PDFBOX-1969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Hewson resolved PDFBOX-1969. - Resolution: Fixed Fixed in trunk in revision 1575618 and added a unit test. JPEGFactory bug --- Key: PDFBOX-1969 URL: https://issues.apache.org/jira/browse/PDFBOX-1969 Project: PDFBox Issue Type: Bug Reporter: Steven Burg Attempted to run the RubberStampWithImage sample and received the following errors: Exception in thread main java.lang.NullPointerException at org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory.createFromStream(JPEGFactory.java:72) at org.apache.pdfbox.examples.pdmodel.RubberStampWithImage.doIt(RubberStampWithImage.java:93) at org.apache.pdfbox.examples.pdmodel.RubberStampWithImage.main(RubberStampWithImage.java:185) This happens with any jog I tested with. -- This message was sent by Atlassian JIRA (v6.2#6252)
Build failed in Jenkins: PDFBox-trunk #857
See https://builds.apache.org/job/PDFBox-trunk/857/changes Changes: [jahewson] PDFBOX-1969: [Fix] JPEGFactory bug broke RubberStampWithImage, added fix and unit test [jahewson] PDFBOX-1969: JPEGFactory bug broke RubberStampWithImage, added fix and unit test -- [...truncated 1157 lines...] [INFO] [INFO] --- apache-rat-plugin:0.10:check (default) @ pdfbox-tools --- [INFO] 51 implicit excludes (use -debug for more details). [INFO] Exclude: release.properties [INFO] 34 resources included (use -debug for more details) [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 33 licence. [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ pdfbox-tools --- [INFO] Installing https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/target/pdfbox-tools-2.0.0-SNAPSHOT.jar to /home/jenkins/jenkins-slave/maven-repositories/1/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-SNAPSHOT.jar [INFO] Installing https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/pom.xml to /home/jenkins/jenkins-slave/maven-repositories/1/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-SNAPSHOT.pom [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ pdfbox-tools --- Downloading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml Downloaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml (782 B at 1.3 KB/sec) Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140308.230458-59.jar Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140308.230458-59.jar (91 KB at 204.7 KB/sec) Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140308.230458-59.pom Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140308.230458-59.pom (3 KB at 6.6 KB/sec) Downloading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/maven-metadata.xml Downloaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/maven-metadata.xml (289 B at 1.4 KB/sec) Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml (782 B at 2.9 KB/sec) Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/maven-metadata.xml Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/maven-metadata.xml (289 B at 0.8 KB/sec) [INFO] [INFO] [INFO] Building Apache PDFBox application 2.0.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ pdfbox-app --- [INFO] Deleting https://builds.apache.org/job/PDFBox-trunk/ws/trunk/app/target [TASKS] Scanning folder 'https://builds.apache.org/job/PDFBox-trunk/ws/trunk/app' for files matching the pattern '**/*.java' - excludes: [TASKS] Found 0 files to scan for tasks Found 0 open tasks. [TASKS] Computing warning deltas based on reference build #856 [INFO] [INFO] --- maven-remote-resources-plugin:1.4:process (default) @ pdfbox-app --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pdfbox-app --- [INFO] Using 'ISO-8859-1' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory https://builds.apache.org/job/PDFBox-trunk/ws/trunk/app/src/main/resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ pdfbox-app --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pdfbox-app --- [INFO] Using 'ISO-8859-1' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory https://builds.apache.org/job/PDFBox-trunk/ws/trunk/app/src/test/resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ pdfbox-app --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ pdfbox-app --- [JENKINS] Recording test results[INFO] [INFO] --- maven-bundle-plugin:2.3.7:bundle (default-bundle) @
[jira] [Commented] (PDFBOX-1966) Type 1, 4 and 5 shadings for shFill()
[ https://issues.apache.org/jira/browse/PDFBOX-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13925101#comment-13925101 ] John Hewson commented on PDFBOX-1966: - Yeah, I see why you are getting an NPE, the *sh* operator is drawing a Shading directly instead of drawing it via a Pattern. That's somewhat awkward and doesn't fit nicely into the color space concept, as you've spotted a Shading is not always a Pattern. Currently our various Paint subclasses in _org.apache.pdfbox.shading_ are all public, which I've realised they shouldn't be, as they are internal to PDFBox and not part of the public API. I didn't include any of the shading classes in my color space / drawing refactoring as they were undergoing active development (and still are). Because a Shading is not necessarily a Pattern I agree with your original proposal to move toShadingPaint into PDShading because it is indeed possible to have an instance of Paint which does not come from a PDColorSpace and this is the most logical place for it to belong. This also gives me the opportunity to modify the visibility of the Paint and PaintContext subclasses to be private. I've done this in revision 1575655 by giving each of the PDShading subclasses an overloaded toPaint method (which is nice and DRY) and I've gone through each of the classes in _org.apache.pdfbox.shading_ and made them package-private where possible. Along the way I've standardised some of the naming and formatting to facilitate future refactoring, but I haven't made any functional changes, nor do I plan to. Type 1, 4 and 5 shadings for shFill() - Key: PDFBOX-1966 URL: https://issues.apache.org/jira/browse/PDFBOX-1966 Project: PDFBox Issue Type: Bug Components: Rendering Affects Versions: 1.8.4, 2.0.0 Reporter: Tilman Hausherr Assignee: Tilman Hausherr Priority: Minor Labels: shading, shadingpattern Fix For: 1.8.5, 2.0.0 Attachments: asy-functionshading.pdf, asy-functionshading.pdf-1.tif, hsv-shading.pdf, hsv-shading.pdf-1.png Original Estimate: 5m Remaining Estimate: 5m I found two images that didn't render properly. The reason is that the appropriate code was missing in shFill() (the code is there for axial and radial shading). I will fix this. -- This message was sent by Atlassian JIRA (v6.2#6252)
Build failed in Jenkins: PDFBox-trunk #858
See https://builds.apache.org/job/PDFBox-trunk/858/changes Changes: [jahewson] PDFBOX-1966: refactor PDPattern#toColor to allow shFill to create shading Paint -- [...truncated 923 lines...] [TASKS] Computing warning deltas based on reference build #857 [INFO] [INFO] --- maven-remote-resources-plugin:1.4:process (default) @ pdfbox-tools --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pdfbox-tools --- [INFO] Using 'ISO-8859-1' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/src/main/resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ pdfbox-tools --- [INFO] Compiling 29 source files to https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pdfbox-tools --- [INFO] Using 'ISO-8859-1' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ pdfbox-tools --- [INFO] Compiling 3 source files to https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ pdfbox-tools --- [INFO] Surefire report directory: https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/target/surefire-reports --- T E S T S --- Running org.apache.pdfbox.tools.TestPDFText2HTML Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.422 sec Running org.apache.pdfbox.tools.TestTextToPdf Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec Running org.apache.pdfbox.tools.TestExtractText Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.269 sec Results : Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 [JENKINS] Recording test results [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ pdfbox-tools --- [INFO] Building jar: https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/target/pdfbox-tools-2.0.0-SNAPSHOT.jar [INFO] [INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ pdfbox-tools --- [INFO] [INFO] --- apache-rat-plugin:0.10:check (default) @ pdfbox-tools --- [INFO] 51 implicit excludes (use -debug for more details). [INFO] Exclude: release.properties [INFO] 34 resources included (use -debug for more details) [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 33 licence. [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ pdfbox-tools --- [INFO] Installing https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/target/pdfbox-tools-2.0.0-SNAPSHOT.jar to /home/jenkins/jenkins-slave/maven-repositories/0/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-SNAPSHOT.jar [INFO] Installing https://builds.apache.org/job/PDFBox-trunk/ws/trunk/tools/pom.xml to /home/jenkins/jenkins-slave/maven-repositories/0/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-SNAPSHOT.pom [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ pdfbox-tools --- Downloading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml Downloaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml (782 B at 0.9 KB/sec) Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140309.040552-60.jar Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140309.040552-60.jar (91 KB at 161.8 KB/sec) Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140309.040552-60.pom Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/pdfbox-tools-2.0.0-20140309.040552-60.pom (3 KB at 6.6 KB/sec) Downloading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/maven-metadata.xml Downloaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/maven-metadata.xml (289 B at 1.4 KB/sec) Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/pdfbox/pdfbox-tools/2.0.0-SNAPSHOT/maven-metadata.xml (782 B at 2.2 KB/sec) Uploading: