Resizing an index-paletted transparent PNG results in a black background
See original GitHub issueI want to resize a png file in following code:
Thumbnails.of(srcImg).size(width, height).toFile(optImg)
But all transparent background turns to black.
See the attach
What should I do?
thumbnailator-0.4.0 in sun/oracle jdk1.7
Thank you very much!
Original issue reported on code.google.com by Science...@gmail.com
on 8 Nov 2012 at 4:27
Attachments:
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (1 by maintainers)
Top Results From Across the Web
Resizing an indexed image in Java without losing transparency
So we did the resize on a new ARGB image and then we reduce it to 256 colors. The problem is how to...
Read more >Customize indexed color tables in Photoshop - Adobe Support
Choose Image > Mode > Color Table. To change a single color, click the color and choose a new color in the Color...
Read more >PNG with indexed palette and semitransparent colors loses ...
The only solution is to save the image in RGB mode and convert it back to 4 bit with optipng later. … Expected...
Read more >Chapter 6 - Image Manipulation - The mtPaint Handbook
The type of effects available will depend on whether your are editing an indexed palette image or an RGB image. 6.6.1 Bacteria. Here...
Read more >Remove a Background Basics - Acorn - Flying Meat
Click once on the color well to the right of where it says 'Remove'. This will bring up the colors palette. Click on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have found a solution for this, might help others. Please test and verify.
I replaced below code:
with:
Input image used was indexed 8 bit png with transparency.
+1: We will also like to have this feature.