-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Bio-Formats to 6.13.0 #103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One outstanding question re the JSON dependency. Otherwise, happy to see this merged so that we can evaluate #68 (comment)
build.gradle
Outdated
@@ -39,7 +39,7 @@ dependencies { | |||
implementation 'com.bc.zarr:jzarr:0.3.5' | |||
implementation 'info.picocli:picocli:4.2.0' | |||
implementation 'me.tongfei:progressbar:0.9.0' | |||
implementation 'ome:formats-bsd:6.12.0' | |||
implementation 'ome:formats-bsd:6.13.0' | |||
// be careful here, this is a newer version of org.json:json than formats-gpl uses | |||
implementation 'org.json:json:20190722' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this dependency has been upgraded in the Bio-Formats stack, do we want to look into dropping this dependency and consume the transitive one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That required switching to formats-gpl, since formats-bsd does not have a dependency on org.json:json
. I'm fine with that, but can also revert a187d92 and just bump the org.json:json
version if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank Melissa, I had missed this aspect of the dependency tree.
Although, it would be certainly fine to use formats-gpl
, I think it's probably better to only depend formats-bsd
and indeed increment the version of the json
dependency to match the one in formats-gpl 6.13.0
(with the latest release addressing CVEs notably).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good and all CI tests keep passing.
Functionally tested in the context of #68 as the codec extension proposed in ome/ome-codecs#26 and included in Bio-Formats 6.13.0 should allow to control the JPEG quality.
Running
./raw2ometiff-0.5.0-SNAPSHOT/bin/raw2ometiff CMU-1.zarr CMU-1.ome.tiff
./raw2ometiff-0.5.0-SNAPSHOT/bin/raw2ometiff CMU-1.zarr CMU-1_jpeg.ome.tiff --compression JPEG
./raw2ometiff-0.5.0-SNAPSHOT/bin/raw2ometiff CMU-1.zarr CMU-1_jpeg_20.ome.tiff --compression JPEG --quality 0.2
./raw2ometiff-0.5.0-SNAPSHOT/bin/raw2ometiff CMU-1.zarr CMU-1_jpeg_95.ome.tiff --compression JPEG --quality 0.95
yields
$ ls -alh CMU-1*
-rw-rw-r-- 1 omero omero 1.9G May 17 18:58 CMU-1.ome.tiff
-rw-rw-r-- 1 omero omero 335M May 17 18:59 CMU-1_jpeg.ome.tiff
-rw-rw-r-- 1 omero omero 159M May 18 09:08 CMU-1_jpeg_20.ome.tiff
-rw-rw-r-- 1 omero omero 629M May 18 09:09 CMU-1_jpeg_95.ome.tiff
So the logic works as expected. It is worth noting that
raw2ometiff/src/main/java/com/glencoesoftware/pyramid/CompressionQualityConverter.java
Line 27 in 8862cd4
CodecOptions options = JPEG2000CodecOptions.getDefaultOptions(); |
JPEG2000Codec
so I suspect as we start enabling more configuration on the codec options we will need to start instantiating the appropriate CodecOptionss
subclass.
Immediately happy for this to be included as is in the upcoming 0.5.0 release
No description provided.