ProcessJP2 scandata crop box too big for image

Bug #206687 reported by danh
2
Affects Status Importance Assigned to Milestone
Microfilm
New
Undecided
Unassigned

Bug Description

It looks like the scandata for some microfilm books may include a crop box which is too big for the associated image. This triggers an error when the image is processed (pamcut complains deep inside some pipeline).

I plan to fix this by adding some code to cut the run-time crop boxes down to size before they are put into the pipeline. (I won't touch the scandata generating code, which we'll need to consult Raj about.)

DETAILS:

For example, consider the task log http://www.us.archive.org/log_show.php?task_id=25190314.

If you take a look at the scandata for the item, ftp://ia351418.us.archive.org/3/items/4626153/4626153_scandata.xml,
you will see that for leaf 5 the crop box has size 2149 x 2149, with lower left corner (716, 517).
But the original height is only 2588 (as reported in the scan data and which is actually true for the image).

So the crop box top edge at 517 + 2149 = 2666 is above 2588, and pamcut doesn't like it.

(Note that the image itself looks like some kind of calibration page, and has a huge chunk of black in it which maybe would confuse some algorithms (?).)

So i plan to just add some code to petabox/www/common/OrigJp2ImOp.inc to crop the crop box to be no larger than the original image.

Anybody with any objections or suggestions please let me know. (I'll try to package this so that it can be detached if it later seems reasonable to do so.)

Revision history for this message
Hank Bromley (hank-archive) wrote :

previously reported (with less detail) as https://bugs.launchpad.net/microfilm/+bug/175163

(note also the corresponding bug for scribe items, https://bugs.launchpad.net/deriver/+bug/175167)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.