Comments (13)
Hi Hazem,
Thanks for reporting!
My TIFFImageReader does not yet support "CCITT Group 3 fax encoding" aka T4 or "CCITT Group 4 fax encoding" aka T6 (TIFF compression tag constants 3 and 4) as these are not "Baseline" TIFF Class B compression types. Your TIFF file uses the former compression.
I'd like to support these compression types in the future, as they are very common. Feel free to submit a patch, if you have some time! :-)
If not, I'll look into it when I find the time.
Best regards,
Harald K
from twelvemonkeys.
I am very interested in this, and although a side-request, a 'best usage' of Twelvemonkeys for taking a TIFF, split out some pages, and create a new TIFF with those selected pages (something we did with the old JAI library). Reference thread around this common challenge: http://stackoverflow.com/questions/17770071/splitting-a-multipage-tiff-image-into-individual-images-java
from twelvemonkeys.
+1 CCITT 4
from twelvemonkeys.
Hi guys,
I'd really like to implement it, it's on the list but didn't make it to 3.1. If anyone has some spare time to implement the T4 and T6 decompression algorithms, I'd be very happy to integrate that (bilevel reading is already fully done). :-)
Otherwise, stay tuned.
Harald K
from twelvemonkeys.
Maybe a possible idea for the Google Summer of Code? Github has been accepted as organization. It is still a lot of work mentoring the student (in my case: 5-10 hours a week), but less than coding it yourself :-)
from twelvemonkeys.
@THausherr That is an interesting idea! Not sure I have 5-10 hours/week available, though. And if I had, I might as well just do it myself. :-) But will definitively consider it!
Harald K
from twelvemonkeys.
I'm currently trying to implement Group 3 / 4 decoding. As soon as i'm satisfied with the results i will make a pull request. However, i'm currently having problems with determining the correct reference row changing elements in Group 4 images.
from twelvemonkeys.
Is there any hope for a pure Java implementation of Group 4 en/decoding performing on par with JAI native libs?
from twelvemonkeys.
@Schmidor This is great news! I was planning to have a stab at this some time soon, but if you can make it work, that leaves me with more time for JPEG-Lossless. :-)
Let me know if I can help in any way (feel free to contact me by direct email)! I'd need to read up on the specs, and possibly need to see some code to be able to help with the exact problem you are referring to... But at least good to see that someone is working on this!
Best regards,
Harald K
from twelvemonkeys.
@rlauck Not sure. But I also don't see why not. :-)
In any case, if you need the native performance (and don't have a problem installing native libs and JNI stuff), using either JAI or even creating a separate plugin backed by LibTIFF shouldn't be a problem. The goal of this project is to have everything written in Java, for easy deployment and predictable behaviour.
Harald K
from twelvemonkeys.
I think i've got it, just a wrong start index in 2d encoding.
One thing left is wheter the decoder should know about PhotometricInterpretation and output accordingly or whether it always should output WhiteIsZero and the Tiff Reader should invert it at a later stage.
Currently it always outputs BlackIsZero and the reader inverts it if the Tag is set to WhiteIsZero, so WhiteIsZero images are currently displayed inverted :)
from twelvemonkeys.
Cool!
I'll have a look (I'm currently on holiday, so it may take some time).
The idea so far has been to keep the PhotometricInterpretation
out of the decoding parts, to avoid having to implement this for every possible combination of compression, predictor, interpretation, bits, etc., etc. I like to keep it that way, if you don't mind. :-)
Otherwise, this looks like a very valuable addition to the TIFF reader!
Thanks,
Harald K
from twelvemonkeys.
Fixed via #148.
Thanks @Schmidor !
Harald K
from twelvemonkeys.
Related Issues (20)
- ClassCastException ImageReadParam BigTIFF reading HOT 2
- jakarta.servlet support HOT 2
- Allow tiff writing to use an explicit photometric interpretation option HOT 7
- Enable a SAST Tool
- CVE-2023-5129 - Vulnerability in libwebp huffman table implementation HOT 2
- Question: compatibility with org.apache.commons:commons-imaging ? HOT 2
- Features stopped working after upgrading to JDK 17 HOT 8
- It would be nice if Twelvemonkeys had support for EXIF tag 0xa436 Title HOT 10
- Problematic inconsistence in JPEG color space detection: TwelveMonkey vs standard Java API HOT 9
- Wrong colors with CMYK JPEG HOT 1
- Webp: cannot decode grayscale images HOT 5
- NPE while read a PSD file HOT 3
- Unable to modify a JPEGImage10Metadata comment value HOT 17
- JPEG: Preserve metadata when writing CMYK HOT 5
- The OSGi support only exports the ImageReaderSpi services and not the ImageWriterSpi services HOT 1
- BMP: Write support for more ARGB types HOT 1
- Some malformed PSD images never return from `ImageIO.read()` using 3.10.0 HOT 2
- WebP: Images decoded with yellow tint HOT 1
- Possible bug in Half.shortBitsToFloat HOT 5
- Troubleshooting with ImageIO plugin registry issue (NoClassDefFoundErrors) without web.xml file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twelvemonkeys.