-
Notifications
You must be signed in to change notification settings - Fork 102
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
Size limit for download as jpg #4172
Conversation
(Regarding that first puzzling exception message see c9612623) |
Limit set by OOM error in omeis.providers.re.RGBIntBuffer | ||
""" | ||
can = True | ||
k = 12100 * 12100 |
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.
this could go to settings.py
The functionality works as described in the PR header. |
As discussed with @aleksandra-tarkowska, since the limit depends on OOM error, this may vary with different set-ups so it's best to make the limit configurable (see last commit) |
You can now set cut-off like this:
Then log out of web & log in again.... |
the same limit will hold for export as png so I will strip the jpg |
@jburel but then you are left with |
|
||
:return: Integer | ||
""" | ||
size = self.getConfigService().getConfigValue( |
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.
The same here, it is breaking change for 5.1 series. It should go in try catch block to guarantee compatibility with < 5.1.4 server. see #4191
@@ -628,6 +628,12 @@ def leave_none_unset_int(s): | |||
" 'webtest/webclient_plugins/center_plugin.overlay.js.html'," | |||
" 'channel_overlay_panel']``. " | |||
"The javascript loads data into ``$('#div_id')``.")], | |||
"omero.web.download_jpg.max_size": |
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 can be removed now
Closing/reopening to include #4194 in the merge commit for Travis. |
@jburel Guess this new property has to be taken into account by Insight as well, right? I think at the moment jpg export is only allowed for non-tiled images. |
@dominikl : it will have to, This is applicable in the viewer only we will also have to adjust the "export as" script used to export as jpeg/png/tiff (right-hand panel) |
I still think we should modify the name to something like size_download_as. |
As this PR is not ready yet, could you please exclude it as is blocking #4191 (this is blocker for 5.1.4 and should be reviewed ASAP) |
This PR will also require changes in insight to be in synch and also in the export script (i.e. 2 more PRs) This, in my opinion, will require further testing and I do not feel comfortable to have it included for the release. |
@jburel From the user's point of view in web, this PR fixes the 404 bug (by preventing the user trying to download as jpg when the image is too big) and this also prevents OOM errors on the server etc. So I think this should be merged as it is, without waiting for Insight. This is not a feature that was previously aligned between the clients, so we are not introducing divergence here. This is simply the first step of convergence! |
@will-moore I agree with you but I think priority is to get #4191 in as it is blocker, this PR could be merged just after that as it introduce new property |
The first step will be to turn it off if the image is a big image with the actual limit i.e. the one used to build pyramid. That parameter is already in place |
…pg_12982 Conflicts: components/tools/OmeroWeb/omeroweb/decorators.py
Sorry - missed this last night - just fixing now... |
The export as "JPEG, PNG, TIFF" options are greyed out for Big image |
The options are greyed out but if you click on the option e.g. png, you can still download the image as png for example. |
@jburel Should be fixed now! |
Works like expected. Export as JPG/PNG/TIFF options are greyed out and disabled if a selected image is a 'big' image. Export as OME-TIFF still avaiable, fails on 'big' images but provides an explanation why it failed. |
Added an item to https://trello.com/c/4mDNygGv/38-5-1-3-follow-up so we can work on the new limit in 5.2 |
Size limit for download as jpg
See https://trac.openmicroscopy.org/ome/ticket/12982
This limits the download as jpeg / png / tiff to images of 12k * 12k or smaller.
This cut-off was determined by trying to download images of various sizes.
Above 2147483648 pixels (46k * 46k) we get
For 15k images we get
but 12k images download OK, but quite slowly.
To test:
--rebased-to #4223