You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "jvdvegt (via GitHub)" <gi...@apache.org> on 2023/05/23 15:09:07 UTC

[GitHub] [commons-imaging] jvdvegt opened a new pull request, #294: IMAGING-352-palettefactory: IMAGING-352: allow supplying a custom Pal…

jvdvegt opened a new pull request, #294:
URL: https://github.com/apache/commons-imaging/pull/294

   This fixes https://issues.apache.org/jira/browse/IMAGING-352 : it allows the user to supply their own version of the PaletteFactory class.
   
   Example usage: https://github.com/jvdvegt/WuQuant/blob/77ccea6a28193ab1261528c555699a9c365b980a/src/test/java/nl/jvdvegt/WuQuantTest.java#L44


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] garydgregory commented on pull request #294: IMAGING-352-palettefactory: IMAGING-352: allow supplying a custom Pal…

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #294:
URL: https://github.com/apache/commons-imaging/pull/294#issuecomment-1559882340

   @jvdvegt 
   Thank you for your PR. It is missing unit tests for the new public APIs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] jvdvegt commented on pull request #294: [IMAGING-352] [PngWriter] Allow custom PaletteFactory

Posted by "jvdvegt (via GitHub)" <gi...@apache.org>.
jvdvegt commented on PR #294:
URL: https://github.com/apache/commons-imaging/pull/294#issuecomment-1560610451

   @garydgregory Thanks, I'm on it.
   
   While writing a test, I noticed a potential bug in PngImageParser: it only sets 'usesPalette' when there are *more than one* palette (see https://github.com/apache/commons-imaging/blob/a6ccaa76fdf1627a402eb7a2b965e457a7733968/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java#L500 ). That contradicts the check in that same file in 'getBufferedImage': https://github.com/apache/commons-imaging/blob/a6ccaa76fdf1627a402eb7a2b965e457a7733968/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java#L180
   I guess a PNG file can at most contain one palette, so the check on line 500 should be for 'isEmpty'.
   
   Shall I fix that in my PR as well, or does it need a separate ticket?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] garydgregory merged pull request #294: [IMAGING-352] [PngWriter] Allow custom PaletteFactory

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #294:
URL: https://github.com/apache/commons-imaging/pull/294


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] garydgregory commented on pull request #294: [IMAGING-352] [PngWriter] Allow custom PaletteFactory

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #294:
URL: https://github.com/apache/commons-imaging/pull/294#issuecomment-1560869162

   Hello @jvdvegt 
   It might be best in separate PRs so either can be reverted if the need arises.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] codecov-commenter commented on pull request #294: [IMAGING-352] [PngWriter] Allow custom PaletteFactory

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #294:
URL: https://github.com/apache/commons-imaging/pull/294#issuecomment-1561681729

   ## [Codecov](https://app.codecov.io/gh/apache/commons-imaging/pull/294?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#294](https://app.codecov.io/gh/apache/commons-imaging/pull/294?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (a67d491) into [master](https://app.codecov.io/gh/apache/commons-imaging/commit/a6ccaa76fdf1627a402eb7a2b965e457a7733968?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (a6ccaa7) will **increase** coverage by `0.15%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #294      +/-   ##
   ============================================
   + Coverage     70.69%   70.84%   +0.15%     
   - Complexity     3406     3416      +10     
   ============================================
     Files           335      335              
     Lines         16877    16880       +3     
     Branches       2595     2596       +1     
   ============================================
   + Hits          11931    11959      +28     
   + Misses         3919     3897      -22     
   + Partials       1027     1024       -3     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/commons-imaging/pull/294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [.../apache/commons/imaging/formats/png/PngWriter.java](https://app.codecov.io/gh/apache/commons-imaging/pull/294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvaW1hZ2luZy9mb3JtYXRzL3BuZy9QbmdXcml0ZXIuamF2YQ==) | `77.06% <100.00%> (+8.58%)` | :arrow_up: |
   
   ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/apache/commons-imaging/pull/294/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org