Open dgarciabriseno opened 2 years ago
Following the trail on this.
I found that kdu_expand is expanding the images down to nothing...
From my local testing so far: 11998945421549118743.pgm: Netpbm image data, size = 0 x 0, rawbits, greymap
When attempting to load this into image magick, I get the above error. Need to follow the parameters to see what's getting passed to kdu_expand
Yep, getting this for "{<top>,<left>},{<height>,<width>}"
{2.2353,1.4504},{0,0}
Following how these arguments are computed.
x1=2372
y1=7116
x2=7116
y2=4579
The above region is passed to the API. This region at imageScale 18 for source 13 (AIA 304) is just black space.
I think these are coming from the cut-out service in the UI because that seem to be where the takeScreenshot requests with the scales set to 0 and display=true come from.
It seems to me this error is completely valid since the front end is sending bogus requests.
Ideally the front end shouldn't send any API request if the selection is out of bounds. It handles out-of-bounds for taking screenshots, but not for the Cut out service as shown below.
We should use the onerror attribute of the image tags to update these to some default "no data" image.
onerror="this.src='something else'"
Request
Result